# Proofs

proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (prop)
   (("1" (move-terms 1 l 2) (mult-by 1 "N!1-1") (assert))
    ("2"
     (skosimp*)
     (transform-both 1 "%1 - a!1")
     (("1"
       (hide 2)
       (assert)
       (mult-by 1 "N!1-1")
       (name-replace "N1" "N!1-1")
       (assert))
      ("2" (assert))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst +
    "(LAMBDA (aa: T, bb:{x: T | aa < x}): choose({t: T | aa <= t AND t <= bb}))")
   (skosimp*)
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (inst - "(aa!1+bb!1)/2")
   (("1" (prop) (("1" (assert)) ("2" (assert))))
    ("2"
     (lemma "connected_domain")
     (expand "connected?")
     (inst -1 "aa!1" "bb!1" "_")
     (inst?)
     (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case-replace "(b!1 - a!1) / delta!1 > 0")
   (("1" (assert)) ("2" (cross-mult 1) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "is_finite_surj[T]")
   (inst?)
   (assert)
   (hide 2)
   (inst + "length(P!1)" "seq(P!1)")
   (("1" (expand "surjective?") (skosimp*) (typepred "y!1") (propax))
    ("2" (skosimp*) (inst?))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "part2set")
   (assert)
   (prop)
   (("1" (inst + "0") (assert)) ("2" (inst + "length(P!1)-1") (assert))
    ("3" (skosimp*) (inst?))
    ("4"
     (skosimp*)
     (typepred "x!1")
     (expand "part2set")
     (skosimp*)
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "part2set")
   (typepred "P!1")
   (lemma "card_subset[T]")
   (inst - "add(a!1,singleton[T](b!1))" "_")
   (inst?)
   (("1"
     (assert)
     (split -1)
     (("1"
       (case-replace "card(add(a!1,singleton[T](b!1))) = 2")
       (("1" (assert))
        ("2"
         (hide 2)
         (rewrite "card_add")
         (rewrite "card_singleton")
         (hide-all-but 1)
         (grind))))
      ("2"
       (hide 2)
       (expand "subset?")
       (skosimp*)
       (assert)
       (typepred "x!1")
       (expand "add")
       (expand "member")
       (expand "singleton")
       (split -2)
       (("1" (inst + "0") (assert))
        ("2" (inst + "length(P!1)-1") (assert))))))
    ("2" (hide 2) (lemma "part2set_prep") (assert) (inst?))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (lemma "min_lem[T,<=]")
     (inst?)
     (("1"
       (assert)
       (hide 2)
       (expand "part2set")
       (prop)
       (("1" (inst + "0") (assert))
        ("2"
         (skosimp*)
         (typepred "x!1")
         (expand "part2set")
         (skosimp*)
         (lemma "parts_order[T]")
         (inst - "a!1" "b!1" "P!1" "0" "kk!1")
         (assert))))
      ("2"
       (assert)
       (lemma "card_empty?[T]")
       (inst?)
       (assert)
       (lemma "card_part2set")
       (inst?)
       (assert))))
    ("2"
     (lemma "max_lem[T,<=]")
     (inst?)
     (("1"
       (assert)
       (hide 2)
       (expand "part2set")
       (prop)
       (("1" (inst + "length(P!1)-1") (assert))
        ("2"
         (skosimp*)
         (typepred "x!1")
         (expand "part2set")
         (skosimp*)
         (lemma "parts_order[T]")
         (inst - "a!1" "b!1" "P!1" "kk!1" "length(P!1)-1")
         (assert))))
      ("2"
       (lemma "card_empty?[T]")
       (inst?)
       (assert)
       (lemma "card_part2set")
       (inst?)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (induct "S" 1 "finite_set_induction_rest[T]")
   (("1" (assert))
    ("2"
     (skosimp*)
     (expand "set2seq")
     (case "empty?[T](emptyset[T])")
     (("1"
       (assert)
       (typepred "ii!1")
       (expand "set2seq")
       (expand "empty_seq")
       (assert))
      ("2" (assert) (grind))))
    ("3"
     (skosimp*)
     (expand "set2seq" 1)
     (expand "o ")
     (assert)
     (expand "#")
     (ground)
     (inst?)
     (("1"
       (assert)
       (lemma "rest_member[T]")
       (expand "member")
       (inst?)
       (("1" (assert))
        ("2"
         (assert)
         (hide 3)
         (typepred "ii!1")
         (assert)
         (expand "set2seq")
         (expand "o ")
         (assert)
         (expand "#")
         (assert))))
      ("2"
       (hide 3)
       (typepred "ii!1")
       (expand "set2seq")
       (expand "#")
       (expand "o")
       (assert)
       (lift-if)
       (ground)
       (("1" (expand "set2seq") (assert))
        ("2"
         (expand "set2seq")
         (assert)
         (expand "o")
         (expand "#")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (induct "S" 1 "finite_set_induction_rest[T]")
   (("1" (skosimp*) (assert) (inst?))
    ("2" (skosimp*) (typepred "x!1") (expand "emptyset") (propax))
    ("3"
     (skosimp*)
     (expand "set2seq" 1)
     (expand "o " 1)
     (expand "#")
     (assert)
     (inst?)
     (assert)
     (lemma "choose_rest_or[T]")
     (inst?)
     (inst?)
     (expand "member")
     (split -1)
     (("1"
       (assert)
       (skosimp*)
       (typepred "ii!1")
       (inst + "ii!1+1")
       (("1" (assert)) ("2" (grind))))
      ("2"
       (inst + "0")
       (("1" (assert)) ("2" (expand "set2seq") (grind))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (typepred "min(set2seq(S!1))")
     (("1"
       (skosimp*)
       (replace -3 * rl)
       (typepred
        "min[T, restrict[[real, real], [T, T], boolean](<=)](S!1)")
       (("1"
         (lemma "set2seq_lem")
         (inst?)
         (assert)
         (inst - "jj!1")
         (inst -4 "set2seq(S!1)`seq(jj!1)")
         (assert)
         (lemma "set2seq_exists")
         (inst - "S!1"
          "min[T, restrict[[real, real], [T, T], boolean](<=)](S!1)")
         (("1"
           (assert)
           (skosimp*)
           (replace -1 * rl)
           (inst -7 "ii!1")
           (assert))
          ("2" (assert) (lemma "card_empty?[T]") (inst?) (assert))))
        ("2" (lemma "card_empty?[T]") (inst?) (assert) (ground))))
      ("2" (propax))))
    ("2"
     (typepred "max(set2seq(S!1))")
     (("1"
       (skosimp*)
       (replace -3 * rl)
       (typepred
        "max[T, restrict[[real, real], [T, T], boolean](<=)](S!1)")
       (("1"
         (lemma "set2seq_lem")
         (inst?)
         (assert)
         (inst - "jj!1")
         (inst -4 "set2seq(S!1)`seq(jj!1)")
         (assert)
         (lemma "set2seq_exists")
         (inst - "S!1"
          "max[T, restrict[[real, real], [T, T], boolean](<=)](S!1)")
         (("1"
           (assert)
           (skosimp*)
           (replace -1 * rl)
           (inst -7 "ii!1")
           (assert))
          ("2" (assert) (lemma "card_empty?[T]") (inst?) (assert))))
        ("2" (lemma "card_empty?[T]") (inst?) (assert) (ground))))
      ("2" (propax))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (induct "S" 1 "finite_set_induction_rest[T]")
   (("1" (assert))
    ("2"
     (skosimp*)
     (typepred "ii!1")
     (typepred "jj!1")
     (assert)
     (rewrite "card_emptyset")
     (assert))
    ("3"
     (skosimp*)
     (typepred "ii!1")
     (typepred "jj!1")
     (assert)
     (expand "set2seq" -4)
     (expand "#")
     (expand "o")
     (case "ii!1 < 1")
     (("1"
       (assert)
       (lemma "set2seq_lem")
       (inst?)
       (assert)
       (inst - "jj!1-1")
       (assert)
       (lemma "choose_not_member[T]")
       (inst?)
       (assert))
      ("2"
       (case "jj!1 < 1")
       (("1"
         (assert)
         (lemma "set2seq_lem")
         (inst?)
         (assert)
         (inst - "ii!1-1")
         (lemma "choose_not_member[T]")
         (inst?)
         (assert))
        ("2"
         (assert)
         (inst -3 "ii!1-1" "jj!1-1")
         (("1" (assert)) ("2" (rewrite "card_rest") (assert))
          ("3" (rewrite "card_rest") (assert))))))))
    ("4"
     (skosimp*)
     (assert)
     (skosimp*)
     (hide 2)
     (typepred "ii!1")
     (typepred "jj!1")
     (assert))
    ("5"
     (skosimp*)
     (assert)
     (skosimp*)
     (assert)
     (typepred "ii!1")
     (typepred "jj!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (skosimp*)
   (lemma "sort_seq_in")
   (inst?)
   (("1"
     (expand "in?")
     (skosimp*)
     (replace -1)
     (hide -1)
     (lemma "set2seq_lem")
     (inst?)
     (assert)
     (inst?))
    ("2" (assert) (typepred "ii!1") (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (typepred "S!1")
   (typepred "min[T, restrict[[real, real], [T, T], boolean](<=)](S!1)")
   (("1"
     (typepred
      "max[T, restrict[[real, real], [T, T], boolean](<=)](S!1)")
     (assert)
     (name-replace "MINS"
      "min[T, restrict[[real, real], [T, T], boolean](<=)](S!1)")
     (name-replace "MAXS"
      "max[T, restrict[[real, real], [T, T], boolean](<=)](S!1)")
     (case "EXISTS (xx,yy: T): S!1(xx) AND S!1(yy) and xx /= yy")
     (("1"
       (skosimp*)
       (inst-cp -5 "xx!1")
       (inst-cp -5 "yy!1")
       (inst-cp -10 "yy!1")
       (inst-cp -10 "xx!1")
       (assert))
      ("2"
       (hide -1 -2 -3 -4 -5 -6 2)
       (case "card(S!1) = 0")
       (("1" (assert))
        ("2"
         (lemma "card_empty?[T]")
         (inst?)
         (assert)
         (expand "empty?")
         (skosimp*)
         (expand "member")
         (case "card(remove(x!1,S!1)) = 0")
         (("1" (rewrite "card_remove") (assert))
          ("2"
           (lemma "card_empty?[T]")
           (inst?)
           (assert)
           (ground)
           (expand "empty?")
           (skosimp*)
           (expand "member")
           (expand "remove")
           (expand "member")
           (flatten)
           (inst + "x!1" "x!2")
           (assert))))))))
    ("2" (lemma "card_empty?[T]") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (skosimp*)
   (typepred "sort(set2seq(S!1))")
   (hide -2)
   (lemma "perm_symmetric[T,<=]")
   (inst - "set2seq(S!1)" "sort(set2seq(S!1))")
   (assert)
   (hide -2)
   (expand "permutation?")
   (skosimp*)
   (typepred "ii!1")
   (typepred "jj!1")
   (inst-cp - "ii!1")
   (inst - "jj!1")
   (replace -4)
   (hide -4)
   (replace -4)
   (hide -4)
   (lemma "set2seq_neq")
   (inst?)
   (assert)
   (inst - "f!1(ii!1)" "f!1(jj!1)")
   (("1"
     (assert)
     (flatten)
     (expand "bijective?")
     (flatten)
     (expand "injective?")
     (inst - "ii!1" "jj!1")
     (assert))
    ("2" (typepred "f!1(jj!1)") (assert))
    ("3" (typepred "f!1(ii!1)") (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (expand "set2part")
   (lemma "sort_set2seq_lem")
   (inst?)
   (assert)
   (inst?)
   (typepred "ii!1")
   (assert)
   (expand "set2part")
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (expand "set2part")
   (lemma "set2seq_exists")
   (inst?)
   (assert)
   (assert)
   (skosimp*)
   (lemma "sort_seq_in?")
   (inst?)
   (inst -1 "x!1")
   (flatten)
   (hide -2)
   (split -1)
   (("1"
     (expand "in?")
     (skosimp*)
     (inst?)
     (assert)
     (typepred "ii!2")
     (assert))
    ("2" (expand "in?") (hide 2) (inst?) (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "card_part2set")
   (inst?)
   (lemma "card_empty?[T]")
   (inst?)
   (ground)
   (assert))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (skosimp*)
     (lemma "min_lem[T,<=]")
     (inst?)
     (("1"
       (inst - "min(S!1)")
       (("1"
         (assert)
         (inst?)
         (("1"
           (assert)
           (hide -1)
           (lemma "max_lem[T,<=]")
           (inst?)
           (("1"
             (inst - "max(S!1)")
             (("1"
               (assert)
               (inst?)
               (hide 2)
               (lemma "sort_set2seq_lem")
               (assert)
               (inst?))
              ("2"
               (typepred "S!1")
               (lemma "card_empty?[T]")
               (inst?)
               (assert))))
            ("2" (lemma "card_empty?[T]") (inst?) (assert))))
          ("2"
           (hide 2)
           (lemma "sort_set2seq_lem")
           (inst?)
           (assert)
           (inst?))))
        ("2" (lemma "card_empty?[T]") (inst?) (assert))))
      ("2" (lemma "card_empty?[T]") (inst?) (assert))))
    ("2" (assert))
    ("3"
     (assert)
     (rewrite "sort_seq_min")
     (typepred "min(set2seq(S!1))")
     (lemma "minmax_set2seq")
     (inst?)
     (assert))
    ("4"
     (typepred "S!1")
     (lemma "sort_seq_max")
     (inst?)
     (assert)
     (lemma "minmax_set2seq")
     (inst?)
     (assert))
    ("5"
     (skosimp*)
     (lemma "sort_seq_lem")
     (inst?)
     (flatten)
     (hide -1)
     (expand "increasing?")
     (inst - "ii!1" "ii!1+1")
     (assert)
     (typepred "ii!1")
     (assert)
     (lemma "sort_set2seq_neq")
     (inst?)
     (assert)
     (inst - "ii!1" "ii!1+1")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "card_add[T]")
   (assert)
   (lemma "card_part2set")
   (inst?)
   (assert)
   (lift-if)
   (ground))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: partitions_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (case "card(add[T](xx!1, part2set(a!1, b!1, P!1))) > 1")
   (("1"
     (prop)
     (("1"
       (skosimp*)
       (assert)
       (lemma "minmax_part2set")
       (inst?)
       (flatten)
       (case "NOT empty?[T](part2set(a!1, b!1, P!1))")
       (("1"
         (auto-rewrite-theory "sets[T]")
         (prop)
         (("1"
           (lemma "min_lem[T,<=]")
           (inst?)
           (("1"
             (assert)
             (lemma "set2part_lem")
             (inst?)
             (assert)
             (inst?))
            ("2" (expand "empty?") (skosimp*) (assert) (inst?))))
          ("2"
           (hide -1)
           (lemma "max_lem[T,<=]")
           (inst?)
           (("1"
             (assert)
             (lemma "set2part_lem")
             (inst?)
             (assert)
             (skosimp*)
             (inst?))
            ("2" (expand "empty?") (skosimp*) (assert) (inst?))))))
        ("2"
         (hide-all-but -1)
         (lemma "card_empty?[T]")
         (inst?)
         (lemma "card_part2set")
         (inst?)
         (assert))))
      ("2" (assert))
      ("3"
       (assert)
       (typepred "set2part(add[T](xx!1, part2set(a!1, b!1, P!1)))")
       (assert)
       (replace -2)
       (hide -)
       (lemma "min_lem[T,<=]")
       (inst?)
       (assert)
       (hide 2)
       (expand "add")
       (expand "member")
       (lemma "part2set_lem")
       (inst?)
       (flatten)
       (assert)
       (skosimp*)
       (typepred "x!1")
       (expand "add")
       (assert)
       (expand "part2set")
       (skosimp*)
       (lemma "parts_order[T]")
       (inst - "a!1" "b!1" "P!1" "0" "kk!1")
       (assert))
      ("4"
       (assert)
       (typepred "set2part(add[T](xx!1, part2set(a!1, b!1, P!1)))")
       (assert)
       (replace -3)
       (hide -)
       (lemma "max_lem[T,<=]")
       (inst?)
       (assert)
       (hide 2)
       (expand "add")
       (expand "member")
       (lemma "part2set_lem")
       (inst?)
       (flatten)
       (assert)
       (skosimp*)
       (hide -3)
       (typepred "x!1")
       (expand "add")
       (assert)
       (inst?)
       (assert))
      ("5"
       (skosimp*)
       (typepred "set2part(add[T](xx!1, part2set(a!1, b!1, P!1)))")
       (("1" (hide -1 -2 -3) (inst?)) ("2" (propax))))))
    ("2"
     (hide 2)
     (rewrite "card_add")
     (lemma "card_part2set")
     (inst?)
     (lift-if)
     (ground))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "integral_def")
   (expand "integral?")
   (skosimp*)
   (auto-rewrite "Rie_sum")
   (inst + "1")
   (skosimp*)
   (case-replace "R!1 = D!1*(b!1-a!1)")
   (("1" (assert) (expand "abs") (assert))
    ("2"
     (hide 2)
     (typepred "R!1")
     (expand "Riemann_sum?")
     (skosimp*)
     (replace -1)
     (hide -1)
     (assert)
     (("1"
       (expand "const_fun")
       (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)):             seq(P!1)(1 + n) * D!1 - seq(P!1)(n) * D!1) =   D!1*seq(P!1)(n) - D!1*seq(P!1)(0)")
       (("1" (inst -1 "length(P!1)-1") (assert))
        ("2"
         (hide 2)
         (induct "n" 1 "below_induction[length(P!1)]")
         (("1" (assert))
          ("2"
           (skosimp*)
           (assert)
           (("1"
             (case-replace "jb!1 = 0")
             (("1" (hide -3) (expand "sigma") (assert))
              ("2"
               (assert)
               (("1" (expand "sigma" 2) (replace -2) (assert))
                ("2" (skosimp*) (assert))))))
            ("2" (skosimp*) (assert))))
          ("3" (hide 2) (skosimp*) (assert))
          ("4" (hide 2) (skosimp*) (assert))))
        ("3" (hide 2) (skosimp*) (assert))
        ("4" (hide 2) (skosimp*) (assert))))
      ("2" (skosimp*) (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "integral_const_fun")
   (inst?)
   (assert)
   (flatten)
   (typepred "integral(a!1, b!1, const_fun[T](D!1))")
   (("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" (assert))
      ("2"
       (hide 2)
       (expand "Riemann_sum?")
       (auto-rewrite "Rie_sum")
       (skosimp*)
       (assert)
       (inst + "xis!1")
       (replace -1)
       (hide -1)
       (assert)
       (expand "const_fun")
       (rewrite "sigma_restrict_eq[below(length(P!1) - 1)]")
       (("1"
         (hide 2)
         (expand "restrict")
         (apply-extensionality 1 :hide? t)
         (("1"
           (inst?)
           (("1" (assert))
            ("2"
             (hide 2)
             (typepred "P!1")
             (typepred "xis!1")
             (assert)
             (flatten)
             (assert))))
          ("2"
           (skosimp*)
           (typepred "xis!1")
           (assert)
           (flatten)
           (assert))))
        ("2"
         (skosimp*)
         (hide 2)
         (typepred "xis!1")
         (assert)
         (flatten)
         (assert))
        ("3" (hide 2) (skosimp*) (assert))))))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (case-replace "D!1 = 0")
   (("1"
     (assert)
     (expand "*")
     (lemma "integral_const_fun")
     (inst - "0" "a!1" "b!1")
     (expand "const_fun")
     (flatten)
     (assert))
    ("2"
     (rewrite "integral_def")
     (typepred "integral(a!1, b!1, f!1)")
     (("1"
       (expand "integral?")
       (skosimp*)
       (inst -1 "epsi!1/abs(D!1)")
       (("1"
         (skosimp*)
         (inst + "delta!1")
         (skosimp*)
         (inst?)
         (assert)
         (typepred "R!1")
         (expand "Riemann_sum?")
         (auto-rewrite "Rie_sum")
         (assert)
         (skosimp*)
         (replace -1)
         (hide -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")
           (assert)
           (replace -1)
           (hide -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(n)) -
                                                    P!1`seq(n) * f!1(xis!1(n)))")
           (("1"
             (cross-mult -1)
             (("1"
               (assert)
               (split -1)
               (("1"
                 (flatten)
                 (rewrite "abs_mult " :dir rl)
                 (("1" (assert)) ("2" (hide 3) (skosimp*) (assert))))
                ("2"
                 (flatten)
                 (hide-all-but (1 2))
                 (expand "abs")
                 (lift-if)
                 (ground))))
              ("2" (skosimp*) (assert))
              ("3" (hide-all-but (1 2)) (grind))))
            ("2"
             (hide 3)
             (expand "Riemann_sum?")
             (assert)
             (inst + "xis!1"))
            ("3" (skosimp*) (assert))))
          ("2"
           (hide 2)
           (hide 2)
           (expand "Rie_sum")
           (assert)
           (lemma "sigma_scal[below(length(P!1) - 1)]")
           (("1" (inst?) (assert) (expand "*") (assert))
            ("2" (skosimp*) (assert))))))
        ("2"
         (hide 3)
         (assert)
         (case "epsi!1 / abs(D!1) > 0")
         (("1" (assert))
          ("2"
           (hide 2)
           (hide -2)
           (cross-mult 1)
           (("1" (grind)) ("2" (assert) (hide 2) (grind))))
          ("3" (hide 2) (grind))))
        ("3" (hide -2 3) (grind))))
      ("2" (propax)) ("3" (propax))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "integral_def")
   (typepred "integral(a!1, b!1, f!1)")
   (("1"
     (typepred "integral(a!1, b!1, g!1)")
     (("1"
       (name-replace "I1" "integral(a!1, b!1, f!1)")
       (name-replace "I2" "integral(a!1, b!1, g!1)")
       (expand "integral?")
       (skosimp*)
       (inst -1 "epsi!1/2")
       (inst - "epsi!1/2")
       (skosimp*)
       (inst + "min(delta!1,delta!2)")
       (("1"
         (skosimp*)
         (inst - "P!1")
         (inst - "P!1")
         (split -1)
         (("1"
           (split -2)
           (("1"
             (hide -4 -5 -6)
             (typepred "R!1")
             (expand "Riemann_sum?")
             (skosimp*)
             (replace -1)
             (hide -1)
             (case-replace
              "Rie_sum(a!1, b!1, P!1, xis!1, LAMBDA x: f!1(x) + g!1(x)) =                       Rie_sum(a!1, b!1, P!1, xis!1, f!1) + Rie_sum(a!1, b!1, P!1, xis!1, g!1)")
             (("1"
               (hide -1)
               (inst - "Rie_sum(a!1, b!1, P!1, xis!1, f!1)")
               (("1"
                 (inst - "Rie_sum(a!1, b!1, P!1, xis!1, g!1)")
                 (("1"
                   (lemma "triangle")
                   (inst -1 "I1 - Rie_sum(a!1, b!1, P!1, xis!1, f!1)"
                    "I2 - Rie_sum(a!1, b!1, P!1, xis!1, g!1)")
                   (assert))
                  ("2"
                   (hide-all-but 1)
                   (expand "Riemann_sum?")
                   (inst?))))
                ("2" (hide-all-but 1) (expand "Riemann_sum?") (inst?))))
              ("2"
               (hide 2)
               (hide -1 -2)
               (expand "Rie_sum")
               (assert)
               (lemma "sigma_sum[below(length(P!1) - 1)]")
               (("1"
                 (inst?)
                 (("1" (assert))
                  ("2"
                   (hide 2)
                   (skosimp*)
                   (typepred "xis!1")
                   (assert)
                   (flatten)
                   (assert))))
                ("2" (hide 2) (skosimp*) (assert))))))
            ("2"
             (hide -1 -2 -3 -4 2)
             (expand "min")
             (lift-if)
             (ground))))
          ("2" (hide -1 -2 -3 -4 2) (expand "min") (lift-if) (ground))))
        ("2"
         (hide-all-but 1)
         (assert)
         (expand "min")
         (lift-if)
         (ground))))
      ("2" (propax))))
    ("2" (propax)) ("3" (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "integral_sum")
   (inst?)
   (inst?)
   (assert)
   (lemma "integral_def")
   (inst - "a!1" "b!1" "f!1" "v1!1")
   (assert)
   (lemma "integral_def")
   (inst - "a!1" "b!1" "g!1" "v2!1")
   (assert)
   (flatten)
   (assert)
   (flatten)
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "integral_sum")
   (inst -1 "a!1" "b!1" "f!1" "-g!1")
   (assert)
   (split -1)
   (("1"
     (flatten)
     (assert)
     (expand "-")
     (assert)
     (assert)
     (replace -2)
     (assert)
     (lemma "integral_scal")
     (inst?)
     (assert)
     (flatten)
     (case-replace "(LAMBDA (x: T): -g!1(x)) = -1 * g!1")
     (("1" (assert))
      ("2" (apply-extensionality 1 :hide? t) (expand "*") (assert))))
    ("2"
     (hide 2)
     (lemma "integral_scal")
     (inst -1 "-1" "a!1" "b!1" "g!1")
     (assert)
     (flatten)
     (assert)
     (case-replace "-g!1 = -1*g!1")
     (apply-extensionality 1 :hide? t)
     (expand "*")
     (assert)
     (expand "-")
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (typepred "integral(a!1, b!1, f!1)")
   (expand "integral?")
   (case "FORALL (eps: posreal): integral(a!1, b!1, f!1) >= -eps")
   (("1"
     (hide -2 -3 -5)
     (inst -1 "-integral(a!1, b!1, f!1)/2")
     (("1" (assert)) ("2" (prop) (("1" (assert)) ("2" (assert))))))
    ("2"
     (skosimp*)
     (assert)
     (inst -1 "eps!1")
     (skosimp*)
     (lemma "axiom_of_archimedes")
     (inst -1 "(b!1-a!1)/delta!1+2")
     (skosimp*)
     (name "NM" "real_defs.max(i!1,2)")
     (inst - "eq_partition(a!1,b!1,NM)")
     (("1"
       (split -3)
       (("1"
         (inst -
          "Rie_sum(a!1, b!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, f!1)")
           (case "Rie_sum(a!1, b!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") (lift-if) (ground))
            ("2"
             (hide -1 -4 2 3)
             (name "NN" "eq_partition(a!1, b!1, NM)")
             (replace -1)
             (expand "Rie_sum")
             (lemma "sigma_nonneg[below(length(NN) - 1)]")
             (("1"
               (assert)
               (("1"
                 (inst?)
                 (assert)
                 (hide 2)
                 (skosimp*)
                 (factor 1 l)
                 (inst?)
                 (case "(NN`seq(1 + i!2) - NN`seq(i!2)) > 0")
                 (("1" (mult-ineq -1 -6) (assert))
                  ("2"
                   (hide 2)
                   (typepred "NN")
                   (inst - "i!2")
                   (assert))))
                ("2" (assert))))
              ("2" (hide 2) (skosimp*) (assert))))))
          ("2"
           (lemma "Riemann?_Rie")
           (inst -1 "a!1" "b!1" "f!1")
           (assert)
           (inst?)
           (assert)
           (hide -3 -4 -5 2 3)
           (name-replace ba "b!1-a!1")
           (lemma "Riemann?_Rie")
           (inst -1 "a!1" "b!1" "f!1")
           (split -1)
           (("1" (inst?)) ("2" (assert))))
          ("3" (assert))))
        ("2"
         (rewrite "width_eq_part")
         (hide -3 -4 -5 2 3)
         (name-replace ba "b!1-a!1")
         (move-terms -2 l 2)
         (case "ba / delta!1 < i!1 - 1")
         (("1"
           (hide -3)
           (mult-by -1 "delta!1")
           (mult-by 1 "NM-1")
           (expand "max")
           (lift-if)
           (ground)
           (replace -2 * rl)
           (hide -2)
           (assert)
           (typepred "i!1")
           (factor -3 r)
           (case "i!1-1 < 1")
           (("1" (hide -3) (mult-by -1 "delta!1") (assert))
            ("2" (assert))))
          ("2" (assert))))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
script:
  (""
   (skosimp*)
   (lemma "integral_def")
   (inst?)
   (assert)
   (flatten)
   (hide -1)
   (split -1)
   (("1" (propax))
    ("2"
     (hide 2)
     (expand "integral?")
     (skosimp*)
     (case "cc!1 = 0")
     (("1"
       (inst + "1")
       (skosimp*)
       (typepred "R!1")
       (expand "Riemann_sum?")
       (skosimp*)
       (replace -1)
       (hide -1)
       (case-replace "Rie_sum(a!1, b!1, P!1, xis!1, f!1) = 0")
       (("1" (assert))
        ("2"
         (hide 2)
         (expand "Rie_sum")
         (assert)
         (case-replace
          "(LAMBDA (n: below(length(P!1) - 1)):
                                                                                                                       P!1`seq(1 + n) * f!1(xis!1(n)) -
                                                                                                                        P!1`seq(n) * f!1(xis!1(n)))
                                                                                                           = (LAMBDA (n: below(length(P!1) - 1)): 0)")
         (("1"
           (lemma "sigma_const[below(length(P!1) - 1)]")
           (("1" (inst?) (assert)) ("2" (hide 2) (skosimp*) (assert))))
          ("2"
           (hide 2)
           (apply-extensionality 1 :hide? t)
           (inst?)
           (assert))))))
      ("2"
       (inst + "epsi!1/(2*abs(cc!1))")
       (("1"
         (skosimp*)
         (lemma "part_in")
         (inst -1 "a!1" "b!1" "z!1" "P!1")
         (assert)
         (skosimp*)
         (typepred "R!1")
         (expand "Riemann_sum?")
         (skosimp*)
         (replace -1)
         (hide -1)
         (lemma "Rie_sum_alt_lem")
         (inst - "a!1" "b!1" "f!1")
         (assert)
         (inst?)
         (replace -1)
         (hide -1)
         (expand "Rie_sum_alt")
         (expand "Rie_sec")
         (assert)
         (name "SS1"
               "sigma(1, length(P!1) - 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                LAMBDA (n: upto(length(P!1) - 1)):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  IF n = 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    THEN 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ELSE seq(P!1)(n) * f!1(xis!1(n - 1)) -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        seq(P!1)(n - 1) *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         f!1(xis!1(n - 1))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ENDIF)")
         (("1"
           (replace -1)
           (name "W" "width(a!1, b!1, P!1)")
           (replace -1)
           (case "abs(SS1) <= 2* W * abs(cc!1) ")
           (("1"
             (hide -2)
             (assert)
             (case-replace "abs(-1 * SS1) = abs(SS1)")
             (("1" (cross-mult -6) (assert))
              ("2"
               (hide-all-but 1)
               (expand "abs")
               (lift-if)
               (lift-if)
               (ground)
               (lift-if)
               (assert))))
            ("2"
             (name "Intv"
                   "(LAMBDA (nn: upto[length(P!1)-2]): seq(P!1)(nn+1) - seq(P!1)(nn))")
             (case-replace
              "(LAMBDA (n: upto(length(P!1) - 1)):
                                                                                                                                                                                         IF n = 0
                                                                                                                                                                                           THEN 0
                                                                                                                                                                                         ELSE seq(P!1)(n) * f!1(xis!1(n - 1)) -
                                                                                                                                                                                               seq(P!1)(n - 1) *
                                                                                                                                                                                                f!1(xis!1(n - 1))
                                                                                                                                                                                         ENDIF) =
                                                                                                                                                                                         (LAMBDA (n: upto(length(P!1) - 1)):
                                                                                                                                                                                           IF n = 0
                                                                                                                                                                                             THEN 0
                                                                                                                                                                                           ELSE Intv(n-1) * f!1(xis!1(n - 1))
                                                                                                                                                                                           ENDIF)")
             (("1"
               (hide -1)
               (name "FF"
                     "(LAMBDA (n: upto(length(P!1) - 1)):
                                                                                                                                                                                                                                                                                                                                                          IF n = 0
                                                                                                                                                                                                                                                                                                                                                            THEN 0
                                                                                                                                                                                                                                                                                                                                                          ELSE Intv(n - 1) * f!1(xis!1(n - 1))
                                                                                                                                                                                                                                                                                                                                                          ENDIF)")
               (("1"
                 (case-replace "length(P!1) = 1")
                 (("1"
                   (rewrite "sigma_rew" -5)
                   (replace -5 * rl)
                   (expand "abs" 1 1)
                   (expand "abs" +)
                   (assert))
                  ("2"
                   (case-replace "length(P!1) = 2")
                   (("1"
                     (rewrite "sigma_rew")
                     (("1"
                       (assert)
                       (hide 4)
                       (replace -5 * rl)
                       (rewrite "abs_mult")
                       (case "abs(Intv(0)) <= W")
                       (("1"
                         (case "abs(f!1(xis!1(0))) <= abs(cc!1)")
                         (("1"
                           (mult-ineq -1 -2 (+ +))
                           (("1" (assert))
                            ("2"
                             (rewrite "abs_abs")
                             (rewrite "abs_abs")
                             (rewrite "abs_abs")
                             (assert)
                             (expand "abs" 1 2)
                             (propax))))
                          ("2"
                           (hide 2 3)
                           (inst -14 "xis!1(0)")
                           (assert)
                           (hide-all-but (-13 -14 1 2))
                           (replace -2)
                           (expand "abs")
                           (lift-if)
                           (ground))))
                        ("2"
                         (hide-all-but (-1 -3 -4 1))
                         (replace -2 * rl)
                         (assert)
                         (expand "abs")
                         (lemma "width_lem")
                         (expand "finseq_appl")
                         (inst?)
                         (assert))))
                      ("2" (skosimp*) (assert))
                      ("3" (skosimp*) (assert))))
                    ("2"
                     (replace -1)
                     (hide 5)
                     (case-replace
                      "(FORALL (nn: upto(length(P!1) - 1)): abs(FF(nn)) <= W*abs(cc!1))")
                     (("1"
                       (hide -8 -9 -10 -11 -12 -13)
                       (case "(FORALL (ii: upto(length(P!1)-2)): abs(Intv(ii)) <= W)")
                       (("1"
                         (case-replace "ii!1 = 0")
                         (("1"
                           (rewrite "sigma_first_ge")
                           (case-replace "SS1 = FF(1) + FF(2)")
                           (("1"
                             (hide -1)
                             (hide -6)
                             (inst-cp -3 "1")
                             (inst-cp -3 "2")
                             (lemma "triangle")
                             (inst?)
                             (assert))
                            ("2"
                             (hide 4)
                             (rewrite "sigma_first_ge")
                             (case-replace
                              "sigma(3, length(P!1) - 1, FF) = 0")
                             (("1" (assert))
                              ("2"
                               (lemma
                                "sigma_restrict[upto(length(P!1) - 1)]")
                               (inst?)
                               (inst -1 "length(P!1) - 1" "3")
                               (("1"
                                 (assert)
                                 (replace -1)
                                 (hide -1)
                                 (case-replace
                                  "restrict(FF, 3, length(P!1) - 1) = (LAMBDA (n: upto(length(P!1) - 1)): 0)")
                                 (("1"
                                   (hide -1)
                                   (lemma
                                    "sigma_const[upto(length(P!1) - 1)]")
                                   (inst?)
                                   (assert))
                                  ("2"
                                   (expand "restrict")
                                   (apply-extensionality 1 :hide? t)
                                   (lift-if)
                                   (ground)
                                   (hide -5 -6 -7)
                                   (hide 3 4)
                                   (replace -4 * rl)
                                   (assert)
                                   (reveal -13)
                                   (inst?)
                                   (assert)
                                   (lemma "parts_order")
                                   (inst
                                    -1
                                    "a!1"
                                    "b!1"
                                    "P!1"
                                    "1"
                                    "x!1-1")
                                   (assert)
                                   (lemma "xis_lem")
                                   (assert)
                                   (inst?)
                                   (assert))))
                                ("2"
                                 (assert)
                                 (expand "sigma")
                                 (propax))))))
                            ("3" (assert))))
                          ("2"
                           (assert)
                           (hide -5)
                           (lemma
                            "sigma_upto[(length(P!1) - 1)].sigma_split_ge")
                           (inst?)
                           (inst -1 "ii!1")
                           (assert)
                           (replace -1)
                           (hide -1)
                           (rewrite "sigma_last_ge")
                           (case-replace "sigma(1, ii!1 - 1, FF) = 0")
                           (("1"
                             (assert)
                             (hide -1)
                             (case "z!1 = seq(P!1)(1+ii!1)")
                             (("1"
                               (case "FF(1 + ii!1) + FF(ii!1) = SS1")
                               (("1"
                                 (hide -7)
                                 (replace -1 * rl)
                                 (hide -1)
                                 (lemma "triangle")
                                 (inst?)
                                 (inst-cp -4 "1+ii!1")
                                 (inst -4 "ii!1")
                                 (assert))
                                ("2"
                                 (case "ii!1 = length(P!1) -2")
                                 (("1" (rewrite "sigma_rew") (assert))
                                  ("2"
                                   (rewrite "sigma_first_ge")
                                   (assert)
                                   (rewrite "sigma_first_ge")
                                   (assert)
                                   (case-replace
                                    "sigma(3 + ii!1, length(P!1) - 1, FF) = 0")
                                   (("1"
                                     (hide -1)
                                     (hide 2)
                                     (case "FF(ii!1) = 0")
                                     (("1"
                                       (replace -1)
                                       (hide -1)
                                       (assert)
                                       (replace -6 * rl)
                                       (hide -6)
                                       (lemma "triangle")
                                       (inst?)
                                       (inst-cp -4 "1+ii!1")
                                       (inst-cp -4 "2+ii!1")
                                       (assert))
                                      ("2"
                                       (hide -2 -3 -5 -6 6)
                                       (replace -2 * rl)
                                       (assert)
                                       (hide -2)
                                       (reveal -17)
                                       (inst?)
                                       (assert)
                                       (hide 2)
                                       (typepred "P!1")
                                       (inst -4 "ii!1")
                                       (assert)
                                       (lemma "xis_lem")
                                       (assert)
                                       (inst
                                        -
                                        "a!1"
                                        "b!1"
                                        "P!1"
                                        "xis!1"
                                        "ii!1-1")
                                       (flatten)
                                       (assert))))
                                    ("2"
                                     (rewrite "sigma_restrict_to")
                                     (case-replace
                                      "restrict(FF, 3 + ii!1, length(P!1) - 1) = (LAMBDA (n: upto(length(P!1) - 1)): 0)")
                                     (("1"
                                       (hide -1)
                                       (rewrite
                                        "sigma_const[upto(length(P!1) - 1)]"))
                                      ("2"
                                       (hide 2)
                                       (expand "restrict")
                                       (apply-extensionality 1 :hide? t)
                                       (hide -2 -3 -5 -6 3 7)
                                       (replace -2 * rl)
                                       (assert)
                                       (hide -2)
                                       (lift-if)
                                       (ground)
                                       (reveal -17)
                                       (inst?)
                                       (assert)
                                       (lemma "parts_order")
                                       (inst
                                        -1
                                        "a!1"
                                        "b!1"
                                        "P!1"
                                        "ii!1+1"
                                        "x!1-1")
                                       (assert)
                                       (lemma "xis_lem")
                                       (assert)
                                       (inst
                                        -
                                        "a!1"
                                        "b!1"
                                        "P!1"
                                        "xis!1"
                                        "x!1-1")
                                       (flatten)
                                       (assert))))))))))
                              ("2"
                               (case "FF(1 + ii!1) + FF(ii!1) = SS1")
                               (("1"
                                 (hide -6)
                                 (replace -1 * rl)
                                 (hide -1)
                                 (inst-cp -2 "ii!1")
                                 (inst-cp -2 "ii!1+1")
                                 (lemma "triangle")
                                 (inst?)
                                 (assert))
                                ("2"
                                 (rewrite "sigma_first_ge")
                                 (case-replace
                                  "sigma(2 + ii!1, length(P!1) - 1, FF) = 0")
                                 (("1" (hide -1) (assert))
                                  ("2"
                                   (hide -1 -2 -4 -5 2 7)
                                   (rewrite "sigma_restrict_to")
                                   (case
                                    "restrict(FF, 2 + ii!1, length(P!1) - 1) = (LAMBDA (n: upto(length(P!1) - 1)): 0)")
                                   (("1"
                                     (replace -1)
                                     (hide -1)
                                     (rewrite
                                      "sigma_const[upto(length(P!1) - 1)]"))
                                    ("2"
                                     (expand "restrict")
                                     (hide 2)
                                     (apply-extensionality 1 :hide? t)
                                     (replace -1 * rl)
                                     (hide -1)
                                     (assert)
                                     (ground)
                                     (lift-if)
                                     (ground)
                                     (reveal -17)
                                     (inst?)
                                     (assert)
                                     (lemma "parts_order")
                                     (inst
                                      -1
                                      "a!1"
                                      "b!1"
                                      "P!1"
                                      "ii!1+1"
                                      "x!1-1")
                                     (assert)
                                     (typepred "P!1")
                                     (inst?)
                                     (lemma "xis_lem")
                                     (assert)
                                     (inst
                                      -
                                      "a!1"
                                      "b!1"
                                      "P!1"
                                      "xis!1"
                                      "x!1-1")
                                     (flatten)
                                     (assert))))))))))
                            ("2"
                             (rewrite "sigma_restrict_to")
                             (case-replace
                              "restrict(FF, 1, ii!1 - 1) = (LAMBDA (n: upto(length(P!1) - 1)): 0)")
                             (("1"
                               (hide -1)
                               (rewrite
                                "sigma_const[upto(length(P!1) - 1)]"))
                              ("2"
                               (hide 2)
                               (expand "restrict")
                               (apply-extensionality 1 :hide? t)
                               (lift-if)
                               (ground)
                               (hide -4 -5)
                               (replace -3 * rl)
                               (hide -3)
                               (hide -1 -2)
                               (assert)
                               (reveal -16)
                               (inst?)
                               (assert)
                               (expand "abs")
                               (assert)
                               (lemma "parts_order")
                               (inst -1 "a!1" "b!1" "P!1" "x!1" "ii!1")
                               (assert)
                               (typepred "P!1")
                               (inst?)
                               (assert)
                               (lemma "xis_lem")
                               (assert)
                               (inst - "a!1" "b!1" "P!1" "xis!1" "x!1-1")
                               (flatten)
                               (assert))))))))
                        ("2"
                         (skosimp*)
                         (replace -3 * rl)
                         (assert)
                         (hide 4)
                         (replace -4 * rl)
                         (hide-all-but 1)
                         (lemma "width_lem")
                         (expand "finseq_appl")
                         (inst?)
                         (typepred "P!1")
                         (inst -4 "ii!2")
                         (expand "abs")
                         (assert))))
                      ("2"
                       (skosimp*)
                       (replace -1 * rl)
                       (assert)
                       (ground)
                       (lift-if)
                       (ground)
                       (hide -1)
                       (inst - "xis!1(nn!1 - 1)")
                       (rewrite "abs_mult")
                       (case "abs(Intv(nn!1 - 1)) <= W")
                       (("1"
                         (case "abs(f!1(xis!1(nn!1 - 1))) <= abs(cc!1)")
                         (("1"
                           (mult-ineq -1 -2)
                           (("1" (assert))
                            ("2"
                             (rewrite "abs_abs")
                             (rewrite "abs_abs")
                             (rewrite "abs_abs")
                             (assert)
                             (hide 2 4 7 -1 -5)
                             (expand "abs" 1 2)
                             (propax))))
                          ("2" (hide -2 -4 3) (assert) (ground))))
                        ("2"
                         (expand "abs" 1 1)
                         (assert)
                         (hide 3 6 -3 -6 -7 -8 -9 -10 -11)
                         (replace -1 * rl)
                         (assert)
                         (hide -1)
                         (lemma "width_lem")
                         (assert)
                         (inst?)
                         (assert)
                         (typepred "P!1")
                         (inst?)
                         (assert)
                         (lift-if)
                         (ground)
                         (typepred "P!1")
                         (inst -4 "nn!1-1")
                         (assert))))))))))
                ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
              ("2"
               (hide 2 4)
               (apply-extensionality 1 :hide? t)
               (("1" (replace -1 * rl) (lift-if) (ground))
                ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))
                ("4" (typepred "P!1") (inst?) (skosimp*) (assert))))
              ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))
              ("5" (skosimp*) (assert))))))
          ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))
          ("4" (skosimp*) (assert))))
        ("2"
         (assert)
         (prop)
         (("1" (cross-mult 1) (ground)) ("2" (cross-mult 1) (ground))))
        ("3" (expand "abs") (lift-if) (ground))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (name "GG"
         "(LAMBDA x: IF x = y!1 THEN yv!1 - f!1(y!1)
                                                                                        ELSE 0 ENDIF)")
   (case-replace "f!1 WITH [(y!1) := yv!1] = f!1 + GG")
   (("1"
     (lemma "integral_sum")
     (inst?)
     (inst - "GG")
     (lemma "integral_jmp")
     (inst - "a!1" "b!1" "yv!1- f!1(y!1)"
      "(LAMBDA x: IF x = y!1 THEN yv!1 - f!1(y!1) ELSE 0 ENDIF)" "y!1")
     (assert)
     (split -1)
     (("1"
       (flatten)
       (assert)
       (case-replace "(LAMBDA (x: T): GG(x) + f!1(x)) = f!1 + GG")
       (("1" (assert) (flatten) (assert))
        ("2"
         (hide 2)
         (apply-extensionality 1 :hide? t)
         (expand "+ ")
         (propax))))
      ("2" (hide 2) (skosimp*) (ground))))
    ("2"
     (hide 2)
     (apply-extensionality 1 :hide? t)
     (replace -1 * rl)
     (hide -1)
     (lift-if)
     (expand "+")
     (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "integral_chg_one_pt")
   (inst - "a!1" "b!1" "f!1" "g!1(a!1)")
   (assert)
   (inst?)
   (assert)
   (flatten)
   (lemma "integral_chg_one_pt")
   (inst - "a!1" "b!1" "f!1 WITH [(a!1) := g!1(a!1)]" "g!1(b!1)")
   (assert)
   (inst - "b!1")
   (assert)
   (flatten)
   (hide -3 -4)
   (lemma "integral_restrict_eq[T]")
   (inst - "a!1" "b!1" "f!1 WITH [(a!1) := g!1(a!1), (b!1) := g!1(b!1)]"
    "g!1")
   (assert)
   (split -1)
   (("1" (flatten) (assert))
    ("2" (hide 2) (skosimp*) (lift-if) (ground) (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "integral_const_fun")
   (inst -1 "_" "a!1" "b!1")
   (lemma "integral_diff")
   (inst -1 "a!1" "b!1" "_" "_")
   (lemma "integral_ge_0")
   (prop)
   (("1"
     (inst -1 "a!1" "b!1" "(LAMBDA (t:T): f!1(t) - m!1)")
     (assert)
     (case "integrable?(a!1, b!1, (LAMBDA (t: T): f!1(t) - m!1))")
     (("1"
       (assert)
       (inst -4 "m!1")
       (flatten)
       (inst -3 "f!1" "const_fun(m!1)")
       (assert)
       (expand "const_fun")
       (replace -5)
       (hide -5)
       (split -2)
       (("1" (assert))
        ("2" (hide -1 -2 -3 -5 2) (skosimp*) (inst?) (assert))))
      ("2"
       (inst -2 "f!1" "const_fun(m!1)")
       (assert)
       (inst -3 "m!1")
       (expand "const_fun")
       (assert))))
    ("2"
     (inst -1 "a!1" "b!1" "(LAMBDA (t:T): M!1 - f!1(t))")
     (assert)
     (case "integrable?(a!1, b!1, (LAMBDA (t: T): M!1 - f!1(t)))")
     (("1"
       (assert)
       (inst -4 "M!1")
       (flatten)
       (expand "const_fun")
       (inst -3 "(LAMBDA (x: T): M!1)" "f!1")
       (assert)
       (split -2)
       (("1" (replace -5) (hide -5) (replace -3) (hide -3) (assert))
        ("2" (hide -1 -2 -3 -4 -6 2) (skosimp*) (inst?) (assert))))
      ("2"
       (inst -2 "(LAMBDA (x: T): M!1)" "f!1")
       (assert)
       (hide -1 -4 -5 1 2)
       (inst -1 "M!1")
       (flatten)
       (assert)
       (expand "const_fun")
       (propax))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "integral_bound")
   (inst -1 "M!1" "a!1" "b!1" "f!1" "-M!1")
   (assert)
   (split -1)
   (("1" (expand "abs") (lift-if) (ground))
    ("2" (hide 2) (skosimp*) (inst?) (assert) (expand "abs") (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (move-terms 1 l 1)
   (assert)
   (lemma "integral_diff")
   (inst?)
   (assert)
   (flatten)
   (assert)
   (replace -2 * rl)
   (hide -2)
   (lemma "integral_ge_0")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (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, P1!1, xis1!1, f!1)")
   (replace -1)
   (name "R2" "Rie_sum(a!1, b!1, P2!1, xis2!1, f!1)")
   (replace -1)
   (case-replace "R1 - R2 = (R1 - S!1) - (R2 - S!1)")
   (("1"
     (lemma "triangle")
     (inst - "R1-S!1" "-(R2 - S!1)")
     (assert)
     (assert)
     (case-replace "abs(S!1 - R2) = abs(R2 - S!1)")
     (("1"
       (case-replace "abs(S!1 - R1) = abs(R1 - S!1)")
       (("1"
         (assert)
         (inst - "R1")
         (("1"
           (inst - "R2")
           (("1" (assert))
            ("2"
             (lemma "Riemann?_Rie[T]")
             (inst - "a!1" "b!1" "f!1")
             (split -1)
             (("1" (inst - "P2!1" "xis2!1") (assert)) ("2" (propax))))))
          ("2"
           (lemma "Riemann?_Rie[T]")
           (inst - "a!1" "b!1" "f!1")
           (split -1)
           (("1" (inst - "P1!1" "xis1!1") (assert)) ("2" (propax))))))
        ("2" (hide-all-but 1) (grind))))
      ("2" (hide-all-but 1) (grind))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: DEbugging PVS 3.2
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (skosimp*)
     (expand "integrable?")
     (skosimp*)
     (expand "integral?")
     (inst -1 "epsi!1/2")
     (skosimp*)
     (inst + "delta!1")
     (skosimp*)
     (inst-cp -1 "P1!1")
     (inst -1 "P2!1")
     (assert)
     (inst -1 "RS2!1")
     (inst -2 "RS1!1")
     (case-replace "RS1!1 - RS2!1 = (RS1!1 - S!1) - (RS2!1 - S!1)")
     (("1"
       (lemma "triangle")
       (inst -1 "RS1!1-S!1" "-(RS2!1-S!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" (assert))
          ("2"
           (hide-all-but 1)
           (expand "abs")
           (lift-if)
           (lift-if)
           (ground)
           (lift-if)
           (ground))))
        ("2" (hide-all-but 1) (expand "abs") (lift-if) (ground))))
      ("2" (assert))))
    ("2"
     (case "  FORALL (n: nat): nonempty?[real]({S: real |  EXISTS (P: partition[T](a!1, b!1),xis:(xis?(a!1,b!1,P))):  width[T](a!1, b!1, P) < 1 / (1 + n) AND  S = Rie_sum[T](a!1, b!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, P, xis, f!1)})                                    )")
       (("1"
         (case "cauchy(SS)")
         (("1"
           (lemma "convergence_cauchy2")
           (inst?)
           (assert)
           (expand "convergent?")
           (skosimp*)
           (expand "integrable?")
           (inst + "l!1")
           (expand "integral?")
           (skosimp*)
           (inst -5 "epsi!1/2")
           (skosimp*)
           (inst + "delta!1")
           (skosimp*)
           (typepred "R!1")
           (expand "Riemann_sum?")
           (skosimp*)
           (replace -1)
           (hide -1)
           (expand "convergence")
           (inst - "epsi!1/2")
           (skosimp*)
           (name "NN" "choose({nn: nat | nn > n!1 AND nn > 1/delta!1})")
           (("1"
             (inst - "NN")
             (assert)
             (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, P, xis, f!1)})")
             (("1"
               (skosimp*)
               (inst -8 "P!1" "P!2")
               (assert)
               (case "width(a!1, b!1, P!2) < delta!1")
               (("1"
                 (assert)
                 (name "S" "Rie_sum(a!1, b!1, P!1, xis!1, f!1)")
                 (replace -1)
                 (case-replace "abs(l!1 - S) = abs(S - l!1)")
                 (("1"
                   (case-replace
                    "S - l!1 = (S - SS(NN))  + (SS(NN) - l!1)")
                   (("1"
                     (lemma "triangle")
                     (inst - "S - SS(NN)" "SS(NN) - l!1")
                     (inst -13 "S" "SS(NN)")
                     (("1" (assert))
                      ("2"
                       (hide 2)
                       (case "SS(NN) = Rie_sum(a!1, b!1, P!2, xis!2, f!1)")
                       (("1"
                         (replace -1)
                         (hide-all-but 1)
                         (lemma "Riemann?_Rie")
                         (inst - "a!1" "b!1" "f!1")
                         (split -1)
                         (("1" (inst?)) ("2" (assert))))
                        ("2"
                         (assert)
                         (hide 2)
                         (replace -11 + rl)
                         (assert))))
                      ("3"
                       (hide 2)
                       (replace -4 + rl)
                       (hide-all-but 1)
                       (lemma "Riemann?_Rie")
                       (inst - "a!1" "b!1" "f!1")
                       (split -1)
                       (("1" (inst?)) ("2" (assert))))))
                    ("2" (assert))))
                  ("2"
                   (hide-all-but 1)
                   (expand "abs")
                   (lift-if)
                   (lift-if)
                   (ground)
                   (lift-if)
                   (ground))))
                ("2"
                 (assert)
                 (hide 2)
                 (case "1 / (1 + NN) < delta!1")
                 (("1" (assert))
                  ("2"
                   (hide 2)
                   (cross-mult 1)
                   (typepred "NN")
                   (cross-mult -2))))))
              ("2" (assert) (inst?))))
            ("2"
             (hide 2)
             (hide-all-but 1)
             (expand "nonempty?")
             (expand "empty?")
             (expand "member")
             (lemma "axiom_of_archimedes")
             (case "n!1 > 1/delta!1")
             (("1"
               (inst -2 "n!1")
               (skosimp*)
               (inst -3 "i!1")
               (("1" (assert)) ("2" (assert))))
              ("2"
               (assert)
               (inst -1 "1/delta!1")
               (skosimp*)
               (inst -2 "i!1")
               (("1" (assert)) ("2" (assert))))))))
          ("2"
           (hide 2)
           (expand "cauchy")
           (skosimp*)
           (inst -3 "epsilon!1")
           (skosimp*)
           (name "NN" "choose({n: posnat | 1/n < delta!1})")
           (("1"
             (inst + "NN")
             (skosimp*)
             (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, P, xis, f!1)})")
             (("1"
               (skosimp*)
               (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, P, xis, f!1)})")
               (("1"
                 (skosimp*)
                 (assert)
                 (inst - "P!1" "P!2")
                 (split -10)
                 (("1"
                   (assert)
                   (replace -9 :dir RL :hide? t)
                   (beta)
                   (replace -3 :hide? t)
                   (replace -4 :hide? t)
                   (assert)
                   (inst?)
                   (("1" (assert) (rewrite "Riemann_sum?") (inst?))
                    ("2" (rewrite "Riemann_sum?") (inst?))))
                  ("2"
                   (hide -2 -4 -8)
                   (case "1 / NN < delta!1")
                   (("1"
                     (case "1 / (1 + i!1) <= 1/NN")
                     (("1" (assert))
                      ("2"
                       (hide 2 3)
                       (hide -1 -2 -3 -7)
                       (name "ip1" "i!1+1")
                       (replace -1)
                       (cross-mult 1)
                       (assert))))
                    ("2" (assert))))
                  ("3"
                   (case-replace "1 / (1 + j!1) <= 1/NN")
                   (("1" (assert))
                    ("2"
                     (hide 2 3)
                     (hide -1 -2 -3 -4 -5 -8 -9)
                     (name "jp1" "j!1+1")
                     (replace -1)
                     (cross-mult 1)
                     (assert))))))
                ("2" (inst -7 "j!1"))))
              ("2" (inst -5 "i!1")) ("3" (skosimp*)) ("4" (skosimp*))))
            ("2"
             (assert)
             (hide 2)
             (hide-all-but 1)
             (expand "nonempty?")
             (expand "empty?")
             (expand "member")
             (lemma "axiom_of_archimedes")
             (inst -1 "1/delta!1")
             (skosimp*)
             (inst -2 "i!1")
             (("1"
               (case "i!1 >= 0")
               (("1"
                 (lemma "div_mult_pos_lt1")
                 (inst?)
                 (lemma "div_mult_pos_lt1")
                 (inst -1 "i!1" "delta!1" "1")
                 (("1" (assert)) ("2" (assert))))
                ("2" (cross-mult 2) (assert))))
              ("2" (assert))))))))
        ("2" (propax))))
      ("2"
       (skosimp*)
       (hide -1 2)
       (expand "nonempty?")
       (expand "empty?")
       (expand "member")
       (assert)
       (name "BMA" "b!1-a!1")
       (name "NP" "choose({n: above(1) | BMA/(n-1) < 1/(1+n!1)})")
       (("1"
         (inst -
          "Rie_sum[T](a!1, b!1, eq_partition(a!1,b!1,NP), gen_xis(a!1,b!1,eq_partition(a!1,b!1,NP)), f!1)")
         (inst?)
         (rewrite "width_eq_part")
         (assert)
         (replace -2 :dir rl)
         (hide -2)
         (assert))
        ("2"
         (expand "nonempty?")
         (expand "empty?")
         (expand "member")
         (lemma "axiom_of_archimedes")
         (inst -1 "2 + BMA*(n!1+1)")
         (skosimp*)
         (lemma "pos_times_lt")
         (inst?)
         (assert)
         (inst - "i!1")
         (case "BMA / (i!1 - 1) < BMA / (1 + BMA * (n!1 + 1) )")
         (("1"
           (name "np1" "n!1+1")
           (case-replace "BMA / (1 + BMA * np1) < 1/np1")
           (("1" (assert)) ("2" (hide 2) (hide -6) (cross-mult 1))
            ("3" (ground))))
          ("2"
           (hide -4)
           (hide 2)
           (assert)
           (case-replace "1 + BMA + BMA * n!1 < i!1 -1")
           (("1"
             (hide -3)
             (name "TT" "1 + BMA + BMA * n!1")
             (name "im1" "i!1-1")
             (cancel 1))
            ("2" (assert))))))))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (skosimp*)
   (typepred "ii!1")
   (assert)
   (lift-if)
   (typepred "P!1")
   (inst - "ii!1")
   (typepred "xx!1")
   (assert))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "xis?")
   (skosimp*)
   (assert)
   (typepred "xx!1")
   (assert)
   (typepred "P!1")
   (lift-if)
   (ground)
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_pulse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "FORALL (P: partition(a!1,b!1),p,q:nat):
                                                0 < p AND p+q <= length(P) - 1 IMPLIES
                                                sigma(p, p+q, (LAMBDA (n: upto(length(P) - 1)):
                                                IF n = 0 THEN 0 ELSE seq(P)(n) - seq(P)(n - 1) ENDIF)) =
                                                       seq(P)(p+q) - seq(P)(p-1)")
   (("1" (inst -1 "P!1" "p!1" "q!1-p!1") (("1" (assert)) ("2" (assert))))
    ("2"
     (hide 2)
     (induct "q")
     (("1"
       (skosimp*)
       (expand "sigma")
       (ground)
       (expand "sigma")
       (propax))
      ("2"
       (skosimp*)
       (inst - "P!2" "p!2")
       (assert)
       (expand "sigma" 1)
       (replace -1)
       (assert))
      ("3" (hide 2) (skosimp*) (assert)) ("4" (skosimp*) (assert))
      ("5" (skosimp*) (assert)) ("6" (skosimp*) (assert))
      ("7" (skosimp*)) ("8" (skosimp*) (assert))))
    ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))
    ("5" (skosimp*) (assert)) ("6" (skosimp*) (assert)) ("7" (skosimp*))
    ("8" (hide 2) (skosimp*) (inst + "0") (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_pulse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (expand "Rie_sec")
   (typepred "P!1")
   (assert)
   (inst - "ii!1-1")
   (name "FF" "f!1(xis!1(ii!1 - 1))")
   (replace -1)
   (lemma "width_lem")
   (expand "finseq_appl")
   (inst -1 "a!1" "b!1" "P!1" "ii!1-1")
   (assert)
   (case " FF >= 0 AND FF <= 1")
   (("1"
     (flatten)
     (assert)
     (mult-ineq -2 -3)
     (assert)
     (expand "abs")
     (move-terms -9 l 1)
     (assert)
     (case-replace "FF = 0")
     (("1" (assert)) ("2" (mult-by -9 "FF") (assert))))
    ("2" (inst - "xis!1(ii!1-1)") (ground))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_pulse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite "xis?")
   (auto-rewrite "xis_lem")
   (skosimp*)
   (rewrite "integral_def")
   (expand "integral?")
   (skosimp*)
   (inst + "epsi!1/1000")
   (skosimp*)
   (typepred "R!1")
   (expand "Riemann_sum?")
   (skosimp*)
   (replace -1)
   (hide -1)
   (lemma "Rie_sum_alt_lem")
   (inst - "a!1" "b!1" "f!1")
   (assert)
   (inst?)
   (replace -1)
   (hide -1)
   (name "N" "length(P!1)")
   (case "(EXISTS (k: below(N-1)): xl!1 < seq(P!1)(k) AND seq(P!1)(k+1) < xh!1)")
   (("1"
     (skosimp*)
     (case "EXISTS (p,q: nat): p >= 1 AND p <= length(P!1) -1
                                                                                                                                                                                                                 AND seq(P!1)(p-1) <= xl!1 AND xl!1 < seq(P!1)(p)
                                                                                                                                                                                                                 AND    q >=  1 AND q <= length(P!1) - 1
                                                                                                                                                                                                                 AND seq(P!1)(q-1) < xh!1 AND xh!1 <= seq(P!1)(q) AND p+1 <= q-1")
     (("1"
       (skosimp*)
       (expand "Rie_sum_alt")
       (expand "Rie_sec")
       (assert)
       (name "SEC"
             "       LAMBDA (n: upto(length(P!1) - 1)):
                                                                                                                                                                                                                                                                                                                                                                                                                                IF n = 0 THEN 0
                                                                                                                                                                                                                                                                                                                                                                                                                                ELSE seq(P!1)(n) *
                                                                                                                                                                                                                                                                                                                                                                                    f!1(xis!1(n - 1))
                                                                                                                                                                                                                                                                                                                                                                                                                                      -
                                                                                                                                                                                                                                                                                                                                                                                                                                      seq(P!1)(n - 1) *
                                                                                                                                                                                                                                                                                                                                                                                                                                       f!1(xis!1(n - 1))
                                                                                                                                                                                                                                                                                                                                                                                                                                ENDIF")
       (("1"
         (replace -1)
         (name "SS"
               "sigma[upto(length(P!1) - 1)](1, length(P!1) - 1, SEC)")
         (("1"
           (replace -1)
           (case "sigma(p!1+1,q!1-1,SEC) <= SS AND SS <= sigma(p!1,q!1,SEC)")
           (("1"
             (flatten)
             (case "sigma(p!1+1, q!1 - 1, SEC) = seq(P!1)(q!1-1) - seq(P!1)(p!1)")
             (("1"
               (case "sigma(p!1, q!1, SEC) <= seq(P!1)(q!1) - seq(P!1)(p!1-1)")
               (("1"
                 (case-replace
                  "abs(-1 * SS - xl!1 + xh!1) = abs(SS - xh!1 + xl!1)")
                 (("1"
                   (hide -1)
                   (expand "abs")
                   (lift-if)
                   (hide -6 -22)
                   (lemma "width_lem")
                   (expand "finseq_appl")
                   (inst-cp - "a!1" "b!1" "P!1" "p!1-1")
                   (inst-cp - "a!1" "b!1" "P!1" "p!1")
                   (inst - "a!1" "b!1" "P!1" "q!1-1")
                   (ground))
                  ("2"
                   (hide-all-but 1)
                   (lemma "abs_neg")
                   (inst - "SS - xh!1 + xl!1")
                   (assert))))
                ("2"
                 (lemma "EX3p")
                 (inst -1 "a!1" "b!1")
                 (inst?)
                 (assert)
                 (inst -1 "P!1" "p!1" "q!1")
                 (assert)
                 (assert)
                 (replace -1 + rl)
                 (rewrite "sigma_le")
                 (("1"
                   (hide 2)
                   (skosimp*)
                   (replace -6 + rl)
                   (assert)
                   (hide -1 -2 -3 -4 -5 -6)
                   (case "f!1(xis!1(n!1 - 1)) <= 1")
                   (("1"
                     (assert)
                     (mult-by -1 "seq(P!1)(n!1) - seq(P!1)(n!1 - 1)")
                     (("1" (assert))
                      ("2"
                       (hide 2)
                       (typepred "xis!1")
                       (assert)
                       (inst - "n!1-1")
                       (assert)
                       (flatten)
                       (assert))))
                    ("2"
                     (hide 2)
                     (reveal -8)
                     (inst - "xis!1(n!1 - 1)")
                     (assert))))
                  ("2" (skosimp*) (assert))))))
              ("2"
               (lemma "EX3p")
               (inst -1 "a!1" "b!1")
               (assert)
               (inst -1 "P!1" "p!1+1" "q!1-1")
               (assert)
               (case "1 + p!1 <= q!1 - 1")
               (("1"
                 (assert)
                 (hide 2)
                 (replace -2 + rl)
                 (hide -2)
                 (rewrite "sigma_restrict_eq")
                 (("1"
                   (hide 2)
                   (expand "restrict")
                   (apply-extensionality 1 :hide? t)
                   (("1"
                     (lift-if)
                     (ground)
                     (replace -5 + rl)
                     (assert)
                     (inst - "xis!1(x!1 - 1)")
                     (hide -2 -3 -4 -5)
                     (lemma "parts_order")
                     (inst-cp -1 "a!1" "b!1" "P!1" "p!1" "x!1-1")
                     (inst-cp -1 "a!1" "b!1" "P!1" "x!1" "q!1-1")
                     (hide -1)
                     (typepred "xis!1")
                     (expand "xis?")
                     (assert)
                     (lemma "xis_lem")
                     (assert)
                     (inst?)
                     (flatten)
                     (ground))
                    ("2" (skosimp*) (assert))
                    ("3" (skosimp*) (assert) (expand "SEC") (propax))))
                  ("2" (skosimp*) (assert))))
                ("2" (propax))))))
            ("2"
             (assert)
             (assert)
             (hide 2)
             (replace -14)
             (prop)
             (("1"
               (lemma "sigma_upto[length(P!1) - 1].sigma_split_ge")
               (inst -1 "_" "N-1" "1" "p!1")
               (inst?)
               (assert)
               (replace -1)
               (hide -1)
               (lemma "sigma_upto[length(P!1) - 1].sigma_split_ge")
               (inst -1 "_" "N-1" "1+p!1" "q!1-1")
               (inst?)
               (assert)
               (replace -1)
               (case-replace
                "sigma(q!1, N - 1, SEC) >= 0 AND sigma(1, p!1, SEC) >= 0")
               (("1" (flatten) (assert))
                ("2"
                 (hide 2)
                 (lemma "sigma_nonneg[upto(length(P!1)-1)]")
                 (case "(FORALL (i: upto(length(P!1) - 1)): SEC(i) >= 0)")
                 (("1"
                   (inst-cp -2 "SEC" "N-1" "q!1")
                   (inst -2 "SEC" "p!1" "1")
                   (assert)
                   (replace -1)
                   (assert))
                  ("2"
                   (skosimp*)
                   (hide 2)
                   (replace -4 + rl)
                   (assert)
                   (hide -1 -2 -3 -4)
                   (lift-if)
                   (ground)
                   (inst - "xis!1(i!1 - 1)")
                   (lemma "xis_lem")
                   (assert)
                   (inst?)
                   (flatten)
                   (ground))
                  ("3" (skosimp*) (expand "SEC") (propax))))
                ("3" (flatten) (skosimp*) (assert))))
              ("2"
               (assert)
               (lemma "sigma_upto[length(P!1) - 1].sigma_split_ge")
               (inst -1 "_" "N-1" "1" "p!1-1")
               (inst?)
               (assert)
               (replace -1)
               (hide -1)
               (case-replace "sigma(1, p!1 - 1, SEC) = 0")
               (("1"
                 (assert)
                 (hide -1)
                 (lemma "sigma_upto[length(P!1) - 1].sigma_split_ge")
                 (inst -1 "_" "N-1" "p!1" "q!1")
                 (inst?)
                 (assert)
                 (replace -1)
                 (hide -1)
                 (case-replace "sigma(1 + q!1, N - 1, SEC) = 0")
                 (("1" (assert))
                  ("2"
                   (hide -1)
                   (hide 2)
                   (case-replace
                    "sigma(1+q!1,N-1, SEC) = sigma(1+q!1,N-1,(LAMBDA (n: upto(length(P!1) - 1)): 0))")
                   (("1" (rewrite "sigma_const[upto(length(P!1) - 1)]"))
                    ("2"
                     (hide 2)
                     (rewrite "sigma_restrict_eq")
                     (hide 2)
                     (expand "restrict")
                     (apply-extensionality 1 :hide? t)
                     (("1"
                       (lift-if)
                       (ground)
                       (replace -1 + rl)
                       (assert)
                       (inst - "xis!1(x!1 - 1)")
                       (case "xis!1(x!1 - 1) >= xh!1")
                       (("1" (assert))
                        ("2"
                         (assert)
                         (typepred "xis!1")
                         (assert)
                         (lemma "parts_order")
                         (inst-cp -1 "a!1" "b!1" "P!1" "q!1-1" "x!1")
                         (inst-cp -1 "a!1" "b!1" "P!1" "q!1" "x!1")
                         (inst-cp -1 "a!1" "b!1" "P!1" "q!1+1" "x!1")
                         (assert)
                         (inst -1 "a!1" "b!1" "P!1" "q!1" "x!1-1")
                         (lemma "xis_lem")
                         (inst -1 "a!1" "b!1" "P!1" "xis!1" "x!1-1")
                         (assert))))
                      ("2" (skosimp*) (expand "SEC") (propax))))))))
                ("2"
                 (case-replace
                  "sigma(1, p!1 - 1, SEC) = sigma(1,p!1-1,(LAMBDA (n: upto(length(P!1) - 1)): 0))")
                 (("1"
                   (hide -1 -2 -3)
                   (rewrite "sigma_const[upto(length(P!1) - 1)]"))
                  ("2"
                   (rewrite "sigma_restrict_eq")
                   (expand "restrict")
                   (apply-extensionality 1 :hide? t)
                   (("1"
                     (lift-if)
                     (ground)
                     (hide 4 5 6)
                     (replace -2 + rl)
                     (assert)
                     (inst - "xis!1(x!1-1)")
                     (case "xl!1 >= xis!1(x!1-1)")
                     (("1" (ground))
                      ("2"
                       (typepred "xis!1")
                       (assert)
                       (hide 4)
                       (lemma "parts_order")
                       (inst-cp -1 "a!1" "b!1" "P!1" "x!1" "p!1-1")
                       (assert)
                       (lemma "xis_lem")
                       (inst -1 "a!1" "b!1" "P!1" "xis!1" "x!1-1")
                       (assert)
                       (flatten)
                       (assert))))
                    ("2" (skosimp*) (expand "SEC") (propax))))))))))
            ("3" (flatten) (skosimp*) (assert))))
          ("2" (skosimp*) (assert))))
        ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
      ("2"
       (name "M_xl" "min_nat.min({j: below(N) | seq(P!1)(j) > xl!1})")
       (("1"
         (name "M_xh" "min_nat.min({j: below(N) | seq(P!1)(j) >= xh!1})")
         (("1"
           (inst + "M_xl" "M_xh")
           (assert)
           (typepred "M_xh")
           (inst - "M_xh-1")
           (assert)
           (typepred "M_xl")
           (typepred "M_xl")
           (inst - "M_xl-1")
           (assert)
           (inst -5 "k!1")
           (assert)
           (typepred "M_xh")
           (inst -3 "k!1+1")
           (lemma "parts_order")
           (inst-cp -1 "a!1" "b!1" "P!1" "M_xl" "k!1+1")
           (assert)
           (inst-cp -1 "a!1" "b!1" "P!1" "M_xh" "k!1")
           (inst-cp -1 "a!1" "b!1" "P!1" "M_xh" "k!1+1")
           (assert))
          ("2"
           (expand "nonempty?")
           (expand "empty?")
           (expand "member")
           (inst -1 "N-1")
           (assert))))
        ("2"
         (expand "nonempty?")
         (expand "empty?")
         (expand "member")
         (inst -1 "k!1")
         (assert))
        ("3" (skosimp*) (assert))))
      ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))
      ("5" (skosimp*) (assert)) ("6" (skosimp*) (assert))))
    ("2"
     (lemma "triangle")
     (inst -1 "-1 * Rie_sum(a!1, b!1, P!1, xis!1, f!1)" "xh!1-xl!1")
     (case "abs(xh!1 - xl!1) < epsi!1/2")
     (("1"
       (case "abs(-1 * Rie_sum(a!1, b!1, P!1, xis!1, f!1)) < epsi!1/2")
       (("1" (assert))
        ("2"
         (hide 3)
         (rewrite "abs_mult")
         (case-replace "abs(-1) = 1")
         (("1"
           (hide -1 -2 -3)
           (lemma "Rie_sum_alt_lem")
           (inst - "a!1" "b!1" "f!1")
           (assert)
           (inst?)
           (replace -1)
           (hide -1)
           (expand "Rie_sum_alt")
           (name "M_xh"
                 "min_nat.min({j: below(N) | seq(P!1)(j) >= xh!1})")
           (("1"
             (case "M_xh > 1")
             (("1"
               (inst + "M_xh-2")
               (("1"
                 (assert)
                 (typepred "M_xh")
                 (inst - "M_xh-1")
                 (assert)
                 (lemma "sigma_upto[length(P!1) - 1].sigma_split_ge")
                 (inst -1 "_" "N-1" "1" "M_xh-2")
                 (inst -
                  "(LAMBDA (n: upto(length(P!1) - 1)):
                                                                                                                                                                                                                                                                                                                                                                                                              Rie_sec(a!1, b!1, P!1, xis!1, f!1, n))")
                 (assert)
                 (replace -6)
                 (replace -1)
                 (hide -1)
                 (assert)
                 (case-replace
                  "sigma(1, M_xh - 2,
                                                                                                                                                                                                                                                                                                                                                                                                             (LAMBDA (n: upto(length(P!1) - 1)):
                                                                                                                                                                                                                                                                                                                                                                                                                Rie_sec(a!1, b!1, P!1, xis!1, f!1, n))) = 0")
                 (("1"
                   (assert)
                   (case "abs(Rie_sec(a!1, b!1, P!1, xis!1, f!1, M_xh)) < epsi!1 / 4")
                   (("1"
                     (case "abs(Rie_sec(a!1, b!1, P!1, xis!1, f!1, M_xh-1)) < epsi!1 / 4")
                     (("1"
                       (lemma
                        "sigma_upto[length(P!1) - 1].sigma_first_ge")
                       (inst -
                        "(LAMBDA (n: upto(length(P!1) - 1)):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Rie_sec(a!1, b!1, P!1, xis!1, f!1, n))"
                        "N-1" "M_xh-1")
                       (assert)
                       (replace -1)
                       (hide -1)
                       (case "1 + M_xh <= length(P!1) - 1")
                       (("1"
                         (lemma
                          "sigma_upto[length(P!1) - 1].sigma_first_ge")
                         (inst -
                          "(LAMBDA (n: upto(length(P!1) - 1)):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Rie_sec(a!1, b!1, P!1, xis!1, f!1, n))"
                          "N-1" "M_xh")
                         (assert)
                         (replace -1)
                         (hide -1)
                         (case-replace
                          "sigma(1 + M_xh, N - 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         (LAMBDA (n: upto(length(P!1) - 1)):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Rie_sec(a!1, b!1, P!1, xis!1, f!1, n))) = 0")
                         (("1"
                           (assert)
                           (assert)
                           (lemma "triangle")
                           (inst -1
                            "Rie_sec(a!1, b!1, P!1, xis!1, f!1, M_xh)"
                            "Rie_sec(a!1, b!1, P!1, xis!1, f!1, M_xh - 1)")
                           (assert))
                          ("2"
                           (assert)
                           (hide 3)
                           (case-replace
                            "sigma(1 + M_xh, N - 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             (LAMBDA (n: upto(length(P!1) - 1)):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Rie_sec(a!1, b!1, P!1, xis!1, f!1, n)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        = sigma(1+M_xh,N-1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 		      , (LAMBDA (n: upto(length(P!1) - 1)): 0))")
                           (("1"
                             (assert)
                             (rewrite
                              "sigma_const[upto(length(P!1) - 1)]")
                             (skosimp*)
                             (assert))
                            ("2"
                             (hide 2)
                             (rewrite "sigma_restrict_eq")
                             (("1"
                               (hide 2)
                               (expand "restrict")
                               (apply-extensionality 1 :hide? t)
                               (lift-if)
                               (ground)
                               (expand "Rie_sec")
                               (assert)
                               (inst - "xis!1(x!1-1)")
                               (assert)
                               (case "xis!1(x!1-1) >= xh!1")
                               (("1" (assert))
                                ("2"
                                 (hide -6)
                                 (typepred "xis!1(x!1-1)")
                                 (lemma "parts_order")
                                 (inst
                                  -1
                                  "a!1"
                                  "b!1"
                                  "P!1"
                                  "M_xh"
                                  "x!1-1")
                                 (assert)
                                 (lemma "xis_lem")
                                 (assert)
                                 (inst?)
                                 (flatten)
                                 (assert))))
                              ("2" (skosimp*) (assert))))
                            ("3" (skosimp*) (assert))))
                          ("3" (skosimp*) (assert))))
                        ("2"
                         (typepred "M_xh")
                         (rewrite "sigma_rew" 3)
                         (("1"
                           (assert)
                           (assert)
                           (lemma "triangle")
                           (inst -1
                            "Rie_sec(a!1, b!1, P!1, xis!1, f!1, M_xh)"
                            "Rie_sec(a!1, b!1, P!1, xis!1, f!1, M_xh - 1)")
                           (assert))
                          ("2" (skosimp*) (assert))))))
                      ("2"
                       (hide 3)
                       (lemma "EXse")
                       (inst - "epsi!1/1000" "a!1" "b!1" "f!1" "M_xh-1"
                        "xh!1" "xl!1")
                       (assert)
                       (inst?)
                       (assert))))
                    ("2"
                     (hide 3)
                     (expand "Rie_sec")
                     (hide -1)
                     (assert)
                     (case "f!1(xis!1(M_xh - 1)) <= 1")
                     (("1"
                       (case "P!1`seq(1 + (M_xh - 1)) - P!1`seq(M_xh - 1) < epsi!1 / 4")
                       (("1"
                         (mult-ineq -1 -2)
                         (case-replace "f!1(xis!1(M_xh - 1)) >= 0")
                         (("1"
                           (hide-all-but (-1 -2 1))
                           (expand "abs")
                           (lift-if)
                           (case "seq(P!1)(M_xh) - seq(P!1)(M_xh - 1) > 0")
                           (("1"
                             (assert)
                             (case "(seq(P!1)(M_xh) - seq(P!1)(M_xh - 1))* f!1(xis!1(M_xh - 1)) >= 0")
                             (("1" (assert))
                              ("2"
                               (hide -3 2)
                               (lemma "ge_times_ge_pos")
                               (inst - "0" "0" "f!1(xis!1(M_xh - 1))"
                                "seq(P!1)(M_xh) - seq(P!1)(M_xh - 1)")
                               (assert))))
                            ("2" (hide 2) (assert))))
                          ("2" (inst - "xis!1(M_xh - 1)") (assert))))
                        ("2"
                         (assert)
                         (lemma "width_lem")
                         (assert)
                         (inst -1 "a!1" "b!1" "P!1" "M_xh-1")
                         (assert))))
                      ("2"
                       (hide 2)
                       (inst - "xis!1(M_xh - 1)")
                       (ground))))))
                  ("2"
                   (hide 3)
                   (case-replace
                    "sigma(1, M_xh - 2,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    (LAMBDA (n: upto(length(P!1) - 1)):
                                                                                                                                                                                                                                                                                                                                                                                                                                                       Rie_sec(a!1, b!1, P!1, xis!1, f!1, n))) = sigma(1, M_xh - 2,                                                                                                                                                                      (LAMBDA (n: upto(length(P!1) - 1)):
                                                                                                                                                                                                                                                                                                                                                                                                                                                       0))")
                   (("1"
                     (assert)
                     (rewrite "sigma_const[upto(length(P!1) - 1)]")
                     (skosimp*)
                     (assert))
                    ("2"
                     (hide 2)
                     (rewrite "sigma_restrict_eq")
                     (("1"
                       (hide 2)
                       (expand "restrict")
                       (apply-extensionality 1 :hide? t)
                       (lift-if)
                       (ground)
                       (expand "Rie_sec")
                       (case "f!1(xis!1(x!1-1)) = 0")
                       (("1" (assert))
                        ("2"
                         (assert)
                         (hide 4)
                         (inst - "xis!1(x!1-1)")
                         (assert)
                         (ground)
                         (lemma "parts_order")
                         (inst -1 "a!1" "b!1" "P!1" "x!1" "M_xh-2")
                         (lemma "xis_lem")
                         (assert)
                         (inst?)
                         (flatten)
                         (assert))))
                      ("2" (skosimp*) (assert))))
                    ("3" (skosimp*) (assert))))
                  ("3" (skosimp*) (assert))))
                ("2" (typepred "P!1") (inst?) (assert))))
              ("2"
               (assert)
               (case-replace "M_xh = 1")
               (("1"
                 (replace -3)
                 (case "3 <= length(P!1)")
                 (("1"
                   (assert)
                   (lemma "sigma_upto[length(P!1) - 1].sigma_first_ge")
                   (inst -
                    "(LAMBDA (n: upto(length(P!1) - 1)): Rie_sec(a!1, b!1,
                                                                                                                                                                                                                               P!1, xis!1, f!1, n))"
                    "N-1" "1")
                   (assert)
                   (replace -1)
                   (case-replace
                    "sigma(2, N - 1,
                                                                                                                                                                                                                                                 (LAMBDA (n: upto(length(P!1) - 1)):
                                                                                                                                                                                                                                                    Rie_sec(a!1, b!1, P!1, xis!1, f!1, n))) = 0")
                   (("1"
                     (hide -1 -2)
                     (lemma "EXse")
                     (inst - "epsi!1/1000" "a!1" "b!1" "f!1" "1" "xh!1"
                      "xl!1")
                     (assert)
                     (inst?)
                     (assert))
                    ("2"
                     (hide 3 4)
                     (hide -1)
                     (case-replace
                      "sigma(2, N - 1, (LAMBDA (n: upto(length(P!1) - 1)):
                                                                                                                                                                                                                                                                             Rie_sec(a!1, b!1, P!1, xis!1, f!1, n))) = sigma(2,N-1 , (LAMBDA (n:
                                                                                                                                                                                                                                                                             upto(length(P!1) - 1)): 0))")
                     (("1"
                       (rewrite "sigma_const[upto(length(P!1) - 1)]")
                       (skosimp*)
                       (assert))
                      ("2"
                       (hide 2)
                       (rewrite "sigma_restrict_eq")
                       (("1"
                         (hide 2)
                         (expand "restrict")
                         (apply-extensionality 1 :hide? t)
                         (lift-if)
                         (ground)
                         (case-replace "x!1 - 1 >= M_xh")
                         (("1"
                           (expand "Rie_sec")
                           (assert)
                           (inst - "xis!1(x!1-1)")
                           (assert)
                           (case-replace "xis!1(x!1-1) >= xh!1")
                           (("1" (ground))
                            ("2"
                             (hide 3)
                             (lemma "parts_order")
                             (inst - "a!1" "b!1" "P!1" "M_xh" "x!1-1")
                             (assert)
                             (lemma "xis_lem")
                             (assert)
                             (inst?)
                             (flatten)
                             (assert))))
                          ("2" (assert))))
                        ("2" (skosimp*) (assert))))
                      ("3" (skosimp*) (assert))))
                    ("3" (skosimp*) (assert))))
                  ("2"
                   (rewrite "sigma_rew")
                   (("1"
                     (lemma "EXse")
                     (inst - "epsi!1/1000" "a!1" "b!1" "f!1" "1" "xh!1"
                      "xl!1")
                     (assert)
                     (inst?)
                     (assert))
                    ("2" (skosimp*) (assert))))))
                ("2" (assert))))))
            ("2"
             (expand "nonempty?")
             (expand "empty?")
             (expand "member")
             (inst -1 "N-1")
             (assert))))
          ("2" (expand "abs" 1) (assert))))))
      ("2"
       (assert)
       (hide 3)
       (name "M_xh" "min_nat.min({j: below(N) | seq(P!1)(j) >= xh!1})")
       (("1"
         (case "M_xh = 1")
         (("1"
           (case "xh!1 - xl!1 <=seq(P!1)(M_xh) - seq(P!1)(0)")
           (("1"
             (expand "abs" 1)
             (assert)
             (lemma "width_lem")
             (assert)
             (inst-cp - "a!1" "b!1" "P!1" "M_xh-1")
             (assert))
            ("2" (assert)) ("3" (assert))))
          ("2"
           (inst + "M_xh-2")
           (("1"
             (assert)
             (typepred "M_xh")
             (assert)
             (inst - "M_xh-1")
             (assert)
             (expand "abs" 3)
             (case "xh!1 - xl!1 <=seq(P!1)(M_xh) - seq(P!1)(M_xh-2)")
             (("1"
               (lemma "width_lem")
               (assert)
               (inst-cp - "a!1" "b!1" "P!1" "M_xh-2")
               (("1" (inst-cp - "a!1" "b!1" "P!1" "M_xh-1") (assert))
                ("2" (assert))))
              ("2" (assert)) ("3" (assert))))
            ("2" (assert))))))
        ("2"
         (expand "nonempty?")
         (expand "empty?")
         (expand "member")
         (inst -1 "N-1")
         (assert))))))
    ("3" (assert)) ("4" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_pulse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "integral_jmp")
   (inst?)
   (assert)
   (expand "zero_except?")
   (assert)
   (skosimp*)
   (inst?)
   (assert)
   (ground))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_pulse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "Example_3")
   (inst -1 "a!1" "b!1" "_" "xh!1" "xl!1")
   (assert)
   (expand "zero_not_intv?")
   (case "c!1 = 0")
   (("1"
     (case-replace "f!1 = const_fun(0)")
     (("1"
       (lemma "integral_const_fun")
       (inst?)
       (assert)
       (flatten)
       (assert))
      ("2"
       (hide 2)
       (apply-extensionality 1 :hide? t)
       (expand "const_fun")
       (inst -6 "x!1")
       (assert))))
    ("2"
     (inst -1 "1/c!1*f!1")
     (("1"
       (assert)
       (split -1)
       (("1"
         (flatten)
         (lemma "integral_scal")
         (inst -1 "c!1" "a!1" "b!1" "(1/c!1)*f!1")
         (assert)
         (flatten)
         (assert)
         (case-replace "c!1 * ((1 / c!1) * f!1) = f!1")
         (("1" (assert))
          ("2"
           (apply-extensionality 1 :hide? t)
           (hide-all-but 1)
           (expand "*")
           (assert))))
        ("2" (skosimp*) (inst?) (expand "*") (ground))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_pulse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (name "FM" "f!1 WITH [xl!1 := 0] WITH [xh!1 := 0]")
   (case "zero_not_intv?(xl!1,xh!1,FM,c!1)")
   (("1"
     (lemma "zero_not_intv?_integrable")
     (assert)
     (inst - "a!1" "b!1" "c!1" "FM" "xh!1" "xl!1")
     (assert)
     (flatten)
     (lemma "integral_chg_one_pt")
     (inst - "a!1" "b!1" "FM" "f!1(xl!1)")
     (assert)
     (inst - "xl!1")
     (assert)
     (flatten)
     (lemma "integral_chg_one_pt")
     (inst - "a!1" "b!1" "FM WITH [(xl!1) := f!1(xl!1)]" "f!1(xh!1)")
     (assert)
     (inst - "xh!1")
     (assert)
     (flatten)
     (case-replace
      "FM WITH [(xl!1) := f!1(xl!1), (xh!1) := f!1(xh!1)] = f!1")
     (("1" (assert))
      ("2"
       (hide 2)
       (apply-extensionality 1 :hide? t)
       (replace -8 * rl)
       (hide -8)
       (assert)
       (lift-if)
       (ground))))
    ("2"
     (hide 2)
     (replace -1 * rl)
     (hide -1)
     (expand "zero_not_intv?")
     (skosimp*)
     (expand "zero_except_intv?")
     (inst?)
     (grind))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: step_fun_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (expand "step_function?")
     (expand "step_function_on?")
     (expand "step_fun?")
     (skosimp*)
     (inst + "P!1")
     (skosimp*)
     (inst - "ii!1")
     (skosimp*)
     (inst-cp - "x!1")
     (inst - "y!1")
     (assert))
    ("2"
     (expand "step_fun?")
     (expand "step_function?")
     (expand "step_function_on?")
     (skosimp*)
     (inst + "P!1")
     (skosimp*)
     (inst - "ii!1")
     (inst + "f!1((P!1`seq(1 + ii!1) + P!1`seq(ii!1)) / 2)")
     (("1"
       (skosimp*)
       (inst -1 "x!1" "(P!1`seq(1 + ii!1) + P!1`seq(ii!1)) / 2"))
      ("2"
       (lemma "connected_domain")
       (expand "connected?")
       (inst?)
       (inst - "P!1`seq(ii!1)" "P!1`seq(ii!1+1)")
       (assert)
       (hide 2)
       (typepred "P!1")
       (inst - "ii!1")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_step
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "stp_sect")
   (case "x!1 = seq(P!1)(ii!1)")
   (("1"
     (assert)
     (lemma "parts_order")
     (inst - "a!1" "b!1" "P!1" "ii!1" "jj!1")
     (assert))
    ("2"
     (assert)
     (lift-if)
     (lemma "parts_order")
     (inst - "a!1" "b!1" "P!1" "ii!1" "jj!1")
     (assert)
     (lemma "parts_order")
     (inst - "a!1" "b!1" "P!1" "ii!1+1" "jj!1")
     (assert)
     (ground))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_step
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (assert)
   (flatten)
   (skolem!)
   (induct "j")
   (("1"
     (assert)
     (flatten)
     (expand "sigma")
     (lemma "stp_sect_lem")
     (inst?)
     (inst -1 "f!1" "x!1")
     (assert)
     (inst?)
     (inst -1 "1")
     (assert)
     (expand "sigma")
     (propax))
    ("2"
     (skosimp*)
     (expand "sigma" 1)
     (assert)
     (case-replace
      "       sigma(0, j!1,
                       LAMBDA (ii: nat):
                         IF ii >= 2 + j!1 THEN 0
                         ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x!1)
                         ENDIF) =        sigma(0, j!1,
                       LAMBDA (ii: nat):
                         IF ii >= 1 + j!1 THEN 0
                         ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x!1)
                         ENDIF)")
     (("1"
       (hide -1)
       (case "x!1 > seq(P!1)(1 + j!1)")
       (("1"
         (assert)
         (replace -2)
         (lemma "stp_sect_lem")
         (inst?)
         (inst -1 "f!1" "x!1")
         (assert)
         (inst?)
         (inst - "j!1+2")
         (assert))
        ("2"
         (lemma "parts_order")
         (inst - "a!1" "b!1" "P!1" "j!1+1" "j!1+2")
         (assert))))
      ("2"
       (hide 2)
       (rewrite "sigma_restrict_eq[nat]")
       (hide 2)
       (expand "restrict")
       (propax))))
    ("3" (skosimp*)) ("4" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_step
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "integral_def" :dir rl)
   (("1"
     (lemma "zero_except_intv?_integrable")
     (inst?)
     (assert)
     (assert)
     (inst - "val_in(a!1, b!1, P!1, j!1, f!1)" "seq(P!1)(1 + j!1)"
      "seq(P!1)(j!1)")
     (assert)
     (split -1)
     (("1" (flatten) (assert)) ("2" (typepred "P!1") (inst - "j!1"))
      ("3"
       (assert)
       (hide 2)
       (expand "zero_except_intv?")
       (skosimp*)
       (assert)
       (expand "stp_sect")
       (assert)
       (lift-if)
       (expand "val_in")
       (ground)
       (typepred "P!1")
       (inst - "j!1")
       (assert))))
    ("2"
     (assert)
     (lemma "parts_order[T]")
     (inst - "a!1" "b!1" "P!1" "0" "1+j!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_step
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "sigma_0_m1")
   (skolem!)
   (flatten)
   (expand "step_function_on?")
   (induct "n")
   (("1"
     (assert)
     (skosimp*)
     (expand "sumof")
     (expand "sigma")
     (inst - "0")
     (skosimp*)
     (expand "stp_sect")
     (assert)
     (lift-if)
     (lift-if)
     (typepred "P!1")
     (inst - "0")
     (ground)
     (expand "val_in")
     (inst-cp - "pick(a!1, b!1, P!1, 0)")
     (inst - "x!1")
     (assert))
    ("2"
     (typepred "P!1")
     (assert)
     (skosimp*)
     (split -5)
     (("1"
       (inst?)
       (assert)
       (case "x!1 <= seq(P!1)(1 + j!1)")
       (("1"
         (assert)
         (expand "sumof")
         (expand "sigma" 1)
         (case-replace
          "       sigma(0, j!1,
                                                                       LAMBDA (ii: nat):
                                                                         IF ii > 1 + j!1 THEN 0
                                                                         ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x!1)
                                                                         ENDIF) =        sigma(0, j!1,
                                                                       LAMBDA (ii: nat):
                                                                         IF ii > j!1 THEN 0
                                                                         ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x!1)
                                                                         ENDIF)")
         (("1"
           (hide -1)
           (move-terms -2 l 2)
           (replace -2)
           (hide -2)
           (expand "stp_sect")
           (lift-if)
           (typepred "P!1")
           (inst - "j!1+1")
           (assert))
          ("2"
           (hide 2)
           (rewrite "sigma_restrict_eq[nat]")
           (hide 2)
           (expand "restrict")
           (propax))))
        ("2"
         (assert)
         (hide -1)
         (expand "sumof")
         (assert)
         (inst - "j!1+1")
         (assert)
         (lift-if)
         (case-replace "x!1 = seq(P!1)(2 + j!1)")
         (("1"
           (assert)
           (case-replace
            "(LAMBDA (ii: nat):
                                                                                     IF ii > 1 + j!1 THEN 0
                                                                                     ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(seq(P!1)(2 + j!1))
                                                                                     ENDIF) = (LAMBDA (ii: nat): 0)")
           (("1" (rewrite "sigma_const[nat]"))
            ("2"
             (hide 3)
             (apply-extensionality 1 :hide? t)
             (lift-if)
             (ground)
             (expand "stp_sect")
             (lift-if)
             (ground)
             (("1"
               (lemma "parts_order[T]")
               (inst -1 "a!1" "b!1" "P!1" "x!2" "2+j!1")
               (assert))
              ("2"
               (expand "val_in")
               (lemma "parts_order[T]")
               (inst -1 "a!1" "b!1" "P!1" "x!2+1" "2+j!1")
               (assert))))))
          ("2"
           (assert)
           (lemma "sigma_stp_sect")
           (inst - "a!1" "b!1" "f!1" "x!1")
           (assert)
           (inst -1 "P!1")
           (expand "sigma" 3)
           (inst -1 "j!1")
           (assert)
           (assert)
           (case-replace
            "       sigma(0, j!1,
                                                                                       LAMBDA (ii: nat):
                                                                                         IF ii > 1 + j!1 THEN 0
                                                                                         ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x!1)
                                                                                         ENDIF) =        sigma(0, j!1,
                                                                                       LAMBDA (ii: nat):
                                                                                         IF ii >= 1 + j!1 THEN 0
                                                                                         ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x!1)
                                                                                         ENDIF)")
           (("1"
             (hide -1)
             (replace -1)
             (expand "stp_sect")
             (inst - "j!1+1")
             (skosimp*)
             (inst-cp - "x!1")
             (expand "val_in")
             (inst - "pick(a!1, b!1, P!1, 1 + j!1)")
             (assert))
            ("2"
             (assert)
             (hide 4)
             (rewrite "sigma_restrict_eq[nat]")
             (hide 2)
             (expand "restrict")
             (propax))))))))
      ("2" (assert))))
    ("3" (skosimp*) (assert)) ("4" (assert)) ("5" (skosimp*) (assert))
    ("6" (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_step
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skosimp*)
     (expand "sumof")
     (expand "sigma")
     (lemma "integral_stp_sect")
     (inst?)
     (rewrite "integral_def" - :dir rl)
     (flatten)
     (expand "stp_sect")
     (expand "sigma")
     (propax))
    ("2"
     (assert)
     (skosimp*)
     (expand "sumof")
     (expand "sigma" 1)
     (lemma "integral_sum")
     (inst - "a!1" "b!1" "stp_sect(a!1, b!1, P!1, 1 + j!1, f!1)"
      "(LAMBDA (x: T):
                                                sigma(0, j!1,
                                                      LAMBDA (ii: nat):
                                                        IF ii > 1 + j!1 THEN 0
                                                        ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x)
                                                        ENDIF))")
     (assert)
     (hide 2)
     (lemma "integral_stp_sect")
     (inst?)
     (rewrite "integral_def" - :dir rl)
     (flatten)
     (case-replace
      "(LAMBDA x: stp_sect(a!1, b!1, P!1, 1 + j!1, f!1)(x)) = stp_sect(a!1, b!1, P!1, 1 + j!1, f!1)")
     (("1"
       (assert)
       (hide -1 -2 -3)
       (inst?)
       (inst?)
       (case-replace
        "(LAMBDA x: sigma(0, j!1,
                                                                          LAMBDA (ii: nat):
                                                                            IF ii > 1 + j!1 THEN 0
                                                                            ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x)
                                                                            ENDIF)) =
                                                                    (LAMBDA x: sigma(0, j!1,
                                                                          LAMBDA (ii: nat):
                                                                            IF ii > j!1 THEN 0
                                                                            ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x)
                                                                            ENDIF))")
       (("1" (assert))
        ("2"
         (hide -1 -2)
         (apply-extensionality 1 :hide? t)
         (rewrite "sigma_restrict_eq[nat]")
         (hide 2 3)
         (expand "restrict")
         (propax))))
      ("2" (hide 2) (expand "stp_sect") (propax))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_step
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skosimp*)
     (assert)
     (expand "sumof")
     (expand "sigma")
     (lemma "integral_stp_sect")
     (inst?)
     (assert)
     (rewrite "integral_def" - :dir rl)
     (flatten)
     (expand "stp_sect")
     (expand "sigma")
     (propax))
    ("2"
     (skosimp*)
     (expand "sumof")
     (expand "sigma" 1)
     (assert)
     (lemma "integral_sum")
     (inst - "a!1" "b!1" "stp_sect(a!1, b!1, P!1, 1 + j!1, f!1)"
      "(LAMBDA (x: T):
                                                    sigma(0, j!1,
                                                          LAMBDA (ii: nat):
                                                            IF ii > 1 + j!1 THEN 0
                                                            ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x)
                                                            ENDIF))")
     (assert)
     (split -1)
     (("1"
       (flatten)
       (hide -1)
       (replace -1)
       (case-replace
        "(LAMBDA x: sigma(0, j!1,
                                                                                  LAMBDA (ii: nat):
                                                                                    IF ii > 1 + j!1 THEN 0
                                                                                    ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x)
                                                                                    ENDIF)) =
                                                                            (LAMBDA x: sigma(0, j!1,
                                                                                  LAMBDA (ii: nat):
                                                                                    IF ii > j!1 THEN 0
                                                                                    ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x)
                                                                                    ENDIF))")
       (("1"
         (hide -1 -2)
         (inst?)
         (assert)
         (replace -1)
         (hide -1)
         (lemma "integral_stp_sect")
         (inst?)
         (rewrite "integral_def" - :dir rl)
         (flatten)
         (replace -2)
         (assert))
        ("2"
         (hide 2)
         (apply-extensionality 1 :hide? t)
         (rewrite "sigma_restrict_eq[nat]")
         (hide 2)
         (expand "restrict")
         (propax))))
      ("2"
       (hide -1 2)
       (lemma "integral_stp_sect")
       (inst?)
       (rewrite "integral_def" - :dir rl)
       (flatten))
      ("3"
       (hide -1 2)
       (lemma "integrable_sumof")
       (expand "sumof")
       (inst - "f!1" "j!1" "a!1" "b!1" "P!1")
       (assert)
       (case-replace
        "(LAMBDA x: sigma(0, j!1,
                                                                                  LAMBDA (ii: nat):
                                                                                    IF ii > 1 + j!1 THEN 0
                                                                                    ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x)
                                                                                    ENDIF)) =
                                                                            (LAMBDA x: sigma(0, j!1,
                                                                                  LAMBDA (ii: nat):
                                                                                    IF ii > j!1 THEN 0
                                                                                    ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x)
                                                                                    ENDIF))")
       (hide 2)
       (apply-extensionality 1 :hide? t)
       (rewrite "sigma_restrict_eq[nat]")
       (hide 2)
       (expand "restrict")
       (propax))))
    ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))
    ("5"
     (skosimp*)
     (assert)
     (hide 2)
     (lemma "integrable_sumof")
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_step
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "sigma_0_m1")
   (induct "n")
   (("1" (skosimp*) (inst?) (assert))
    ("2"
     (skosimp*)
     (expand "sumof")
     (assert)
     (lift-if)
     (expand "sigma")
     (ground)
     (expand "stp_sect")
     (lift-if)
     (ground)
     (expand "val_in")
     (assert)
     (expand "step_function_on?")
     (inst - "0")
     (skosimp*)
     (inst-cp -2 "x!1")
     (inst -2 "pick(a!1, b!1, P!1, 0)")
     (assert))
    ("3"
     (skosimp*)
     (expand "sumof")
     (lift-if)
     (ground)
     (expand "sigma" 2)
     (inst?)
     (assert)
     (typepred "x!1")
     (case "x!1 <= seq(P!1)(1 + j!1)")
     (("1"
       (inst?)
       (lift-if)
       (assert)
       (ground)
       (("1"
         (case-replace
          "       sigma(0, j!1,
                                       LAMBDA (ii: nat):
                                         IF ii > 1 + j!1 THEN 0
                                         ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x!1)
                                         ENDIF)
                           = 0")
         (("1" (assert) (expand "stp_sect") (propax))
          ("2"
           (hide 3)
           (case-replace
            "sigma(0, j!1,
                                            LAMBDA (ii: nat):
                                              IF ii > 1 + j!1 THEN 0
                                              ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x!1)
                                              ENDIF) = sigma(0, j!1,
                                            LAMBDA (ii: nat): 0)")
           (("1" (lemma "sigma_const[nat]") (inst?) (assert))
            ("2"
             (assert)
             (hide 2)
             (rewrite "sigma_restrict_eq[nat]")
             (hide 2)
             (expand "restrict")
             (apply-extensionality 1 :hide? t)
             (lift-if)
             (ground)
             (expand "stp_sect")
             (lift-if)
             (ground)
             (("1"
               (lemma "parts_order")
               (inst - "a!1" "b!1" "P!1" "x!2" "j!1+1")
               (assert))
              ("2"
               (expand "val_in")
               (case "x!2 = 1 + j!1")
               (("1" (assert))
                ("2"
                 (assert)
                 (lemma "parts_order")
                 (inst - "a!1" "b!1" "P!1" "x!2+1" "j!1+1")
                 (assert))))))))))
        ("2"
         (case-replace
          "       sigma(0, j!1,
                                       LAMBDA (ii: nat):
                                         IF ii > 1 + j!1 THEN 0
                                         ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x!1)
                                         ENDIF)
                           =        sigma(0, j!1,
                                       LAMBDA (ii: nat):
                                         IF ii > j!1 THEN 0
                                         ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x!1)
                                         ENDIF)")
         (("1"
           (hide -1)
           (replace -1)
           (hide -1)
           (expand "stp_sect")
           (propax))
          ("2"
           (hide 4)
           (rewrite "sigma_restrict_eq[nat]")
           (hide 2)
           (expand "restrict")
           (propax))))))
      ("2"
       (assert)
       (hide -4)
       (lemma "sigma_stp_sect")
       (inst - "a!1" "b!1" "f!1" "x!1")
       (assert)
       (inst - "P!1" "j!1")
       (assert)
       (assert)
       (case-replace
        "sigma(0, j!1,
                                 LAMBDA (ii: nat):
                                   IF ii >= 1 + j!1 THEN 0
                                   ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x!1)
                                   ENDIF) =
                     sigma(0, j!1,
                                 LAMBDA (ii: nat):
                                   IF ii > 1 + j!1 THEN 0
                                   ELSE stp_sect(a!1, b!1, P!1, ii, f!1)(x!1)
                                   ENDIF)")
       (("1"
         (assert)
         (replace -2)
         (hide -1 -2)
         (expand "step_function_on?")
         (inst - "j!1+1")
         (skosimp*)
         (inst-cp - "x!1")
         (inst - "pick(a!1, b!1, P!1, 1+j!1)")
         (expand "stp_sect")
         (expand "val_in")
         (assert))
        ("2"
         (hide -1 4)
         (rewrite "sigma_restrict_eq[nat]")
         (hide 2)
         (expand "restrict")
         (propax))))))
    ("4" (hide 2) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_step
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "step_fun_is_sumof_n")
   (inst?)
   (assert)
   (inst - "length(P!1)-2")
   (assert)
   (inst - "x!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_step
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (expand "step_function?")
   (skosimp*)
   (lemma "step_fun_is_sumof")
   (inst?)
   (inst - "a!1" "b!1" "P!1")
   (assert)
   (split -1)
   (("1"
     (lemma "integrable_sumof")
     (inst?)
     (assert)
     (lemma "integral_restr_eq")
     (inst - "a!1" "b!1"
      "        sumof(length(P!1) - 2,
                    LAMBDA (jj: upto(length(P!1) - 2)):
                      stp_sect(a!1, b!1, P!1, jj, f!1))
                WITH [b!1 := f!1(b!1)]"
      "f!1")
     (assert)
     (split +)
     (("1" (skosimp*) (inst?) (assert))
      ("2"
       (hide 2)
       (hide -2 -4)
       (lemma "integral_chg_one_pt")
       (inst - "a!1" "b!1"
        "sumof(length(P!1) - 2,
                      LAMBDA (jj: upto(length(P!1) - 2)):
                        stp_sect(a!1, b!1, P!1, jj, f!1))"
        "f!1(b!1)")
       (assert)
       (inst - "b!1")
       (assert))))
    ("2" (expand "step_function_on?") (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_step
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (lemma "step_fun_is_sumof")
   (inst - "f!1" "a!1" "b!1" "P!1")
   (assert)
   (lemma "integral_sumof")
   (inst?)
   (assert)
   (replace -1 * rl)
   (hide -1)
   (lemma "integral_chg_one_pt")
   (inst - "a!1" "b!1"
    "sumof(length(P!1) - 2,
                            LAMBDA (jj: upto(length(P!1) - 2)):
                              stp_sect(a!1, b!1, P!1, jj, f!1))"
    "f!1(b!1)")
   (assert)
   (inst - "b!1")
   (assert)
   (lemma "integrable_sumof")
   (inst?)
   (assert)
   (flatten)
   (replace -3)
   (hide -3)
   (lemma "integral_restr_eq")
   (inst - "a!1" "b!1"
    "        sumof(length(P!1) - 2,
                        LAMBDA (jj: upto(length(P!1) - 2)):
                          stp_sect(a!1, b!1, P!1, jj, f!1))
                    WITH [b!1 := f!1(b!1)]"
    "f!1")
   (assert)
   (hide 2)
   (skosimp*)
   (assert)
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_step
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "integrable_lem")
   (inst?)
   (assert)
   (skosimp*)
   (inst - "epsi!1/3")
   (skosimp*)
   (lemma "step_function_integrable?")
   (inst-cp -1 "a!1" "b!1" "f2!1")
   (inst -1 "a!1" "b!1" "f1!1")
   (assert)
   (expand "integrable?" -)
   (skosimp*)
   (case "integral(a!1, b!1, f1!1) = S!1")
   (("1"
     (case "integral(a!1, b!1, f2!1) = S!2")
     (("1"
       (expand "integral?")
       (inst -3 "epsi!1/3")
       (inst -4 "epsi!1/3")
       (skosimp*)
       (name "DEL"
             "IF delta!1 <= delta!2 THEN delta!1 ELSE delta!2 ENDIF")
       (case "FORALL (P: partition[T](a!1, b!1), xis: (xis?(a!1,b!1,P))):                 width(a!1, b!1, P) < DEL IMPLIES         S!1-epsi!1/3 < Rie_sum(a!1, b!1, P, xis, f!1) AND         Rie_sum(a!1, b!1, P, xis, f!1) < S!2+epsi!1/3")
       (("1"
         (inst + "DEL")
         (skosimp*)
         (typepred "RS1!1")
         (expand "Riemann_sum?")
         (skosimp*)
         (replace -1)
         (hide -1)
         (typepred "RS2!1")
         (expand "Riemann_sum?")
         (skosimp*)
         (replace -1)
         (hide -1)
         (inst-cp -1 "P1!1" "xis!1")
         (inst -1 "P2!1" "xis!2")
         (assert)
         (lemma "integral_diff")
         (inst -1 "a!1" "b!1" "f2!1" "f1!1")
         (assert)
         (flatten)
         (case-replace "(LAMBDA x: f2!1(x) - f1!1(x)) = f2!1 - f1!1")
         (("1"
           (hide -1)
           (replace -2)
           (hide -16 -17)
           (hide -1 -2)
           (name-replace rsum1 "Rie_sum(a!1, b!1, P1!1, xis!1, f!1)")
           (name-replace rsum2 "Rie_sum(a!1, b!1, P2!1, xis!2, f!1)")
           (replace -6)
           (hide -6)
           (replace -6)
           (hide -6)
           (hide -5 -6 -7 -8 -9 -10 -11 2)
           (hide -5)
           (grind))
          ("2" (hide-all-but 1) (expand "-") (propax))))
        ("2"
         (hide 2)
         (skosimp*)
         (inst -5 "P!1")
         (inst -6 "P!1")
         (assert)
         (split -5)
         (("1"
           (split -6)
           (("1"
             (inst - "Rie_sum(a!1, b!1, P!1, xis!1, f2!1)")
             (("1"
               (inst - "Rie_sum(a!1, b!1, P!1, xis!1, f1!1)")
               (("1"
                 (hide -3 -4)
                 (hide -3 -4 -5 -6)
                 (case "Rie_sum(a!1, b!1, P!1, xis!1, f1!1) <= Rie_sum(a!1, b!1, P!1, xis!1, f!1)")
                 (("1"
                   (case "Rie_sum(a!1, b!1, P!1, xis!1, f!1) <= Rie_sum(a!1, b!1, P!1, xis!1, f2!1)")
                   (("1"
                     (hide -5 -6)
                     (hide -5 2)
                     (grind :exclude "Rie_sum"))
                    ("2"
                     (hide -1 -2 -3 -4 -6 -7 2 3)
                     (expand "Rie_sum")
                     (assert)
                     (lemma "sigma[below(length(P!1)-1)].sigma_le")
                     (("1"
                       (inst?)
                       (assert)
                       (hide 2)
                       (skosimp*)
                       (factor 1 l)
                       (factor 1 r)
                       (name "DD" "(seq(P!1)(n!1+1) - seq(P!1)(n!1))")
                       (replace -1)
                       (inst?)
                       (flatten)
                       (mult-by -3 "DD")
                       (typepred "xis!1")
                       (assert)
                       (inst?)
                       (lemma "parts_order")
                       (inst - "a!1" "b!1" "P!1" "n!1" "n!1+1")
                       (assert))
                      ("2"
                       (typepred "xis!1")
                       (hide 2)
                       (skosimp*)
                       (assert))))))
                  ("2"
                   (expand "Rie_sum")
                   (assert)
                   (hide 2 3)
                   (lemma "sigma[below(length(P!1)-1)].sigma_le")
                   (("1"
                     (inst?)
                     (assert)
                     (hide 2)
                     (skosimp*)
                     (factor 1 l)
                     (factor 1 r)
                     (name "DD" "(seq(P!1)(n!1+1) - seq(P!1)(n!1))")
                     (replace -1)
                     (inst?)
                     (flatten)
                     (mult-by -5 "DD")
                     (typepred "xis!1")
                     (assert)
                     (hide-all-but (-1 1 2))
                     (lemma "parts_order")
                     (inst -1 "a!1" "b!1" "P!1" "n!1" "n!1+1")
                     (assert))
                    ("2" (skosimp*) (assert))))))
                ("2"
                 (hide-all-but (-1 1))
                 (lemma "Riemann?_Rie")
                 (inst - "a!1" "b!1" "f1!1")
                 (split -1)
                 (("1" (assert) (inst -1 "P!1" "xis!1"))
                  ("2" (assert))))))
              ("2"
               (hide-all-but 1)
               (lemma "Riemann?_Rie")
               (inst - "a!1" "b!1" "f2!1")
               (split -1)
               (("1" (inst -1 "P!1" "xis!1")) ("2" (assert))))))
            ("2"
             (hide -1 -4 -5 -6 -7 -8 -9 -10 2 3)
             (grind :exclude "width"))))
          ("2"
           (hide -3 -4 -5 -6 -7 -8 -9 -10 2 3)
           (grind :exclude "width"))))))
      ("2"
       (hide -4 -5 -6 -7 -8 2 3)
       (lemma "integral_def")
       (inst?)
       (assert))))
    ("2"
     (hide -3 -4 -5 -6 -7 2 3)
     (lemma "integral_def")
     (inst?)
     (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_step
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (inst - "(seq(P!1)(j!1) + seq(P!1)(1 + j!1))/2")
   (("1"
     (typepred "P!1")
     (inst - "j!1")
     (split)
     (("1" (cross-mult 1) (assert)) ("2" (cross-mult 1) (assert))))
    ("2"
     (lemma "connected_domain")
     (expand "connected?")
     (inst - "seq(P!1)(j!1)" "seq(P!1)(1 + j!1)"
      "(seq(P!1)(j!1) + seq(P!1)(1 + j!1))/2")
     (assert)
     (hide 2)
     (typepred "P!1")
     (inst - "j!1")
     (split)
     (("1" (cross-mult 1) (assert)) ("2" (cross-mult 1) (assert))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_step
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "P!1")
   (lemma "parts_order")
   (inst - "a!1" "b!1" "P!1" "0" "n!1+1")
   (("1" (assert)) ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_step
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "step_function_integrable?")
   (inst?)
   (assert)
   (expand "step_function?")
   (inst?))


proof_type: f_proof
decl_type: formula
library: analysis
theory: step_fun_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (lemma "part2set_lem")
   (inst?)
   (assert)
   (flatten)
   (prop)
   (("1"
     (rewrite "card_union[T]")
     (lemma "card_intersection_le[T]")
     (inst?)
     (assert)
     (flatten)
     (assert)
     (lemma "card_part2set")
     (inst?)
     (lemma "card_part2set")
     (inst - "a!1" "b!1" "P2!1")
     (assert))
    ("2" (expand "union") (expand "member") (assert))
    ("3" (expand "union") (expand "member") (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: step_fun_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (expand "UnionPart")
   (lemma "part2set_lem[T]")
   (inst?)
   (flatten)
   (assert)
   (inst -3 "kk!1")
   (case "union(part2set(a!1, b!1, P1!1),
                                                     part2set(a!1, b!1, P2!1))(P1!1`seq(kk!1))")
   (("1"
     (lemma "set2part_ix[T]")
     (inst?)
     (assert)
     (split -1)
     (("1"
       (skosimp*)
       (inst + "ii!1")
       (("1" (assert))
        ("2" (typepred "ii!1") (assert) (expand "UnionPart") (propax))))
      ("2" (hide 2) (lemma "UP_prep") (inst?) (assert) (flatten))))
    ("2" (hide 2) (expand "union") (expand "member") (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: step_fun_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (case " nonempty?[below[length(P1!1) - 1]]
                                 ({kk: below(length(P1!1) - 1) |
                                     seq(P1!1)(kk) <=
                                      UnionPart(a!1, b!1, P1!1, P2!1)`seq(nn!1)})")
   (("1"
     (inst +
      "max[length(P1!1)-1]({kk: below(length(P1!1) - 1) | seq(P1!1)(kk) <= UnionPart(a!1, b!1, P1!1, P2!1)`seq(nn!1)})")
     (name-replace "MAX"
      "max[length(P1!1) - 1]
                                 ({kk: below(length(P1!1) - 1) |
                                     seq(P1!1)(kk) <=
                                      UnionPart(a!1, b!1, P1!1, P2!1)`seq(nn!1)})")
     (assert)
     (typepred "MAX")
     (assert)
     (ground)
     (inst - "MAX+1")
     (ground)
     (lemma "UnionPart_lem")
     (inst?)
     (name "UP" "UnionPart(a!1, b!1, P1!1, P2!1)")
     (replace -1)
     (inst -2 "MAX+1")
     (skosimp*)
     (assert)
     (replace -2 * rl)
     (lemma "parts_order[T]")
     (inst - "a!1" "b!1" "UP" "nn!2" "nn!1")
     (lemma "parts_order[T]")
     (inst - "a!1" "b!1" "UP" "nn!1" "nn!2+1")
     (lemma "parts_order[T]")
     (inst - "a!1" "b!1" "UP" "nn!1+1" "nn!2")
     (assert))
    ("2"
     (hide 2)
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (inst - "0")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: step_fun_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "card_union")
   (lemma "card_part2set[T]")
   (inst?)
   (assert)
   (lemma "card_part2set[T]")
   (inst - "a!1" "b!1" "P2!1")
   (assert)
   (lemma "card_intersection_le[T]")
   (inst?)
   (assert))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: step_fun_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (case "seq
                      (set2part(union[T]
                                    (part2set(a!1, b!1, P1!1),
                                     part2set(a!1, b!1, P2!1))))
                        (0)
                     = a!1")
   (("1"
     (case "seq
                        (set2part(union[T]
                                      (part2set(a!1, b!1, P1!1),
                                       part2set(a!1, b!1, P2!1))))
                          (length
                             (set2part(union[T]
                                           (part2set(a!1, b!1, P1!1),
                                            part2set(a!1, b!1, P2!1))))
                            - 1)
                       = b!1")
     (("1"
       (name "UP"
             "union[T]
                                          (part2set(a!1, b!1, P1!1),
                                           part2set(a!1, b!1, P2!1))")
       (replace -1)
       (case "seq(set2part(UP))(0) = a!1")
       (("1"
         (case "seq(set2part(UP))(length(set2part(UP)) - 1) = b!1")
         (("1"
           (assert)
           (prop)
           (("1"
             (skosimp*)
             (lemma "UP_prep")
             (inst?)
             (assert)
             (flatten)
             (typepred "set2part(UP)")
             (prop)
             (("1"
               (hide -3)
               (lemma "parts_order[T]")
               (inst - "a!1" "b!1" "set2part(UP)" "0" "x1!1")
               (("1" (assert)) ("2" (assert)) ("3" (assert))))
              ("2"
               (lemma "parts_order[T]")
               (inst - "a!1" "b!1" "set2part(UP)" "x1!1"
                "length(set2part(UP))-1")
               (("1" (assert)) ("2" (assert)) ("3" (assert))))))
            ("2" (skosimp*) (typepred "set2part(UP)") (inst - "ii!1"))))
          ("2" (propax)) ("3" (assert))))
        ("2" (propax))
        ("3" (assert) (hide 2) (lemma "UP_prep") (inst?) (assert))
        ("4" (assert))))
      ("2"
       (hide 2)
       (lemma "max_lem[T,<=]")
       (hide -2)
       (name "UP"
             "union[T]
                                          (part2set(a!1, b!1, P1!1),
                                           part2set(a!1, b!1, P2!1))")
       (replace -1)
       (inst - "UP" "b!1")
       (("1"
         (assert)
         (hide 2)
         (lemma "UP_prep")
         (inst?)
         (assert)
         (flatten)
         (assert)
         (skosimp*)
         (typepred "x!1")
         (replace -6 - rl)
         (expand "union")
         (expand "member")
         (split -2)
         (("1"
           (lemma "part2set_lem")
           (inst?)
           (flatten)
           (inst -4 "x!1")
           (flatten))
          ("2"
           (lemma "part2set_lem")
           (inst - "a!1" "b!1" "P2!1")
           (flatten)
           (inst -4 "x!1")
           (assert))))
        ("2"
         (expand "empty?")
         (expand "member")
         (inst - "a!1")
         (lemma "UP_prep")
         (inst?)
         (assert)
         (flatten)
         (assert))))
      ("3" (hide 2) (assert))))
    ("2"
     (hide 2)
     (lemma "min_lem[T,<=]")
     (name "UP"
           "union[T]
                                        (part2set(a!1, b!1, P1!1),
                                         part2set(a!1, b!1, P2!1))")
     (replace -1)
     (inst - "UP" "a!1")
     (("1"
       (assert)
       (hide 2)
       (lemma "UP_prep")
       (inst?)
       (assert)
       (flatten)
       (assert)
       (skosimp*)
       (typepred "x!1")
       (replace -6 * rl)
       (expand "union")
       (expand "member")
       (split -2)
       (("1"
         (lemma "part2set_lem")
         (inst?)
         (flatten)
         (inst -4 "x!1")
         (flatten))
        ("2"
         (lemma "part2set_lem")
         (inst - "a!1" "b!1" "P2!1")
         (flatten)
         (inst -4 "x!1")
         (assert))))
      ("2"
       (expand "empty?")
       (expand "member")
       (inst - "a!1")
       (assert)
       (lemma "UP_prep")
       (inst?)
       (assert))))
    ("3" (hide 2) (assert) (lemma "UP_prep") (inst?) (assert))
    ("4" (hide 2) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: step_fun_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (expand "step_function?")
   (expand "step_function_on?")
   (inst + "P!1")
   (skosimp*)
   (inst - "ii!1")
   (skosimp*)
   (inst + "fv!1")
   (skosimp*)
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: step_fun_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "step_function?")
   (expand "step_function_on?")
   (skosimp*)
   (inst + "UUPart(a!1,b!1,c!1,P!1,P!2)")
   (skosimp*)
   (case "ii!1 < length(P!1)-1")
   (("1"
     (inst -4 "ii!1")
     (skosimp*)
     (inst + "fv!1")
     (skosimp*)
     (hide -5)
     (inst?)
     (("1"
       (lift-if)
       (typepred "x!1")
       (expand "UUPart")
       (lift-if)
       (ground))
      ("2"
       (hide 2)
       (typepred "x!1")
       (expand "UUPart")
       (lift-if)
       (ground))))
    ("2"
     (hide -3)
     (inst - "ii!1-length(P!1)+1")
     (("1"
       (skosimp*)
       (inst + "fv!1")
       (skosimp*)
       (inst?)
       (("1" (typepred "x!1") (expand "UUPart") (lift-if) (ground))
        ("2"
         (hide 3)
         (typepred "x!1")
         (expand "UUPart")
         (lift-if)
         (ground))))
      ("2"
       (assert)
       (hide 3)
       (typepred "ii!1")
       (expand "UUPart")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: step_fun_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (lemma "Union_lem")
     (inst?)
     (assert)
     (skosimp*)
     (inst + "kk!1")
     (assert))
    ("2"
     (lemma "Union_sym")
     (inst?)
     (replace -1)
     (hide -1)
     (lemma "Union_lem")
     (inst?)
     (("1" (assert) (skosimp*) (inst + "kk!1") (assert))
      ("2" (hide 2) (typepred "nn!1") (reveal -2) (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: step_fun_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "step_fun?_lem" +)
   (expand "step_function?")
   (expand "step_function_on?")
   (skosimp*)
   (expand "step_fun?")
   (inst + "UnionPart(a!1,b!1,P!1,P!2)")
   (skosimp*)
   (typepred "x!1")
   (typepred "y!1")
   (lemma "ssis_prep")
   (inst - "a!1" "b!1" "P!1" "P!2" "ii!1" "x!1" "y!1")
   (assert)
   (skosimp*)
   (expand "+ ")
   (inst -16 "ii!2")
   (inst -17 "jj!1")
   (skosimp*)
   (inst-cp - "x!1")
   (("1"
     (inst - "y!1")
     (("1"
       (inst-cp - "x!1")
       (("1" (inst - "y!1") (("1" (assert)) ("2" (assert))))
        ("2" (assert))))
      ("2" (assert))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: step_fun_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "sum_step_is_step")
   (inst?)
   (inst - "-g!1")
   (assert)
   (expand "+ ")
   (case-replace "(LAMBDA (x: T): (-g!1)(x) + f!1(x)) = f!1 - g!1")
   (("1"
     (split -2)
     (("1" (propax))
      ("2"
       (hide 2)
       (hide -1 -3)
       (expand "step_function?")
       (expand "step_function_on?")
       (skosimp*)
       (inst + "P!1")
       (skosimp*)
       (inst - "ii!1")
       (skosimp*)
       (inst + "-fv!1")
       (skosimp*)
       (inst?)
       (expand "-")
       (assert))))
    ("2" (hide-all-but 1) (apply-extensionality 1 :hide? t) (grind))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: step_fun_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "step_function?")
   (expand "step_function_on?")
   (skosimp*)
   (name "ib"
         "min_nat.min({ii: below(length(P!1)) | seq(P!1)(ii) > b!1})")
   (("1"
     (name "ic"
           "max_below[length(P!1)].max({ii: below(length(P!1)) | seq(P!1)(ii) < c!1})")
     (("1"
       (name "SP" "P!1^(ib,ic)")
       (case "ib <= ic")
       (("1"
         (case "seq(P!1)(ib) > b!1 and seq(P!1)(ic) < c!1")
         (("1"
           (flatten)
           (case "P!1(ib-1) <= b!1 AND P!1(ic+1) >= c!1")
           (("1"
             (inst + "#(b!1) o SP o #(c!1)")
             (("1"
               (skosimp*)
               (assert)
               (inst - "ii!1+ib-1")
               (("1"
                 (skosimp*)
                 (inst + "fv!1")
                 (skosimp*)
                 (inst - "x!1")
                 (typepred "x!1")
                 (typepred "ii!1")
                 (replace -10 * rl)
                 (expand "o ")
                 (expand "#")
                 (expand "^")
                 (assert)
                 (lift-if)
                 (hide -6)
                 (hide -9)
                 (lemma "parts_order[T]")
                 (inst - "a!1" "d!1" "P!1" "ib" "ib+ii!1-1")
                 (assert)
                 (expand "min")
                 (assert)
                 (ground)
                 (case-replace "ii!1 = 1 - ib + ic")
                 (("1" (assert))
                  ("2" (name-replace "IBB" "ib") (assert))))
                ("2"
                 (assert)
                 (hide 2)
                 (typepred "ii!1")
                 (replace -7 * rl)
                 (hide -7)
                 (expand "#")
                 (grind))))
              ("2"
               (assert)
               (expand "#")
               (expand "o")
               (split +)
               (("1"
                 (skosimp*)
                 (typepred "x1!1")
                 (hide -8 -9 -13)
                 (replace -7 * rl)
                 (hide -7)
                 (expand "#")
                 (grind)
                 (("1"
                   (lemma "parts_order[T]")
                   (inst - "a!1" "d!1" "P!1" "x1!1 + ib -1" "ic")
                   (assert))
                  ("2"
                   (lemma "parts_order[T]")
                   (inst - "a!1" "d!1" "P!1" "ib" "x1!1 + ib -1")
                   (assert))))
                ("2" (assert))
                ("3" (ground) (replace -6 * rl) (hide-all-but 1) (grind))
                ("4"
                 (flatten)
                 (skosimp*)
                 (typepred "ii!1")
                 (hide -8 -9 -13)
                 (replace -7 * rl)
                 (hide -7)
                 (expand "#")
                 (grind)
                 (lemma "parts_order[T]")
                 (inst - "a!1" "d!1" "P!1" "ib+ii!1-1" "ib+ii!1")
                 (assert))))))
            ("2"
             (hide 2)
             (assert)
             (assert)
             (hide-all-but (-5 -6 1))
             (split +)
             (("1"
               (replace -2 * rl)
               (hide -1)
               (typepred "ib")
               (inst -3 "ib-1")
               (assert))
              ("2" (hide -2) (typepred "ic") (inst -3 "ic+1") (assert))))
            ("3" (assert)) ("4" (assert))))
          ("2"
           (hide-all-but (-3 -4 1))
           (split +)
           (("1"
             (replace -2 * rl)
             (hide -1)
             (typepred "ib")
             (inst -3 "ib-1")
             (("1" (assert)) ("2" (hide -2) (assert))))
            ("2" (typepred "ic") (propax))))))
        ("2"
         (hide 2)
         (typepred "ib")
         (typepred "ic")
         (inst -3 "ib")
         (inst -6 "ic")
         (assert)
         (reveal 1)
         (inst +
          "(# length := 2, seq := (LAMBDA (kk: below(2)): if kk = 0 then b!1 else c!1 Endif) #)")
         (skosimp*)
         (inst - "ic")
         (skosimp*)
         (inst + "fv!1")
         (skosimp*)
         (inst - "x!1")
         (assert)
         (typepred "x!1")
         (lift-if)
         (ground)
         (typepred "ic")
         (inst -3 "ic +1")
         (assert))))
      ("2"
       (hide 2)
       (expand "nonempty?")
       (expand "empty?")
       (expand "member")
       (inst - "0")
       (assert))))
    ("2"
     (hide 2)
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (inst - "length(P!1)-1")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: step_fun_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "card_union[T]")
   (lemma "card_intersection_le[T]")
   (inst?)
   (assert)
   (lemma "card_part2set")
   (inst?)
   (lemma "card_part2set")
   (inst - "b!1" "c!1" "P2!1")
   (assert))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: step_fun_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (prop)
   (("1" (skosimp*) (lift-if) (assert) (ground))
    ("2"
     (skosimp*)
     (lift-if)
     (lift-if)
     (ground)
     (("1" (typepred "ii!1") (assert) (typepred "P1!1") (inst?))
      ("2"
       (assert)
       (case "ii!1 = length(P1!1)-1")
       (("1"
         (replace -1)
         (typepred "P1!1")
         (replace -3)
         (assert)
         (lemma "parts_order[T]")
         (inst - "b!1" "c!1" "P2!1" "0" "1")
         (assert))
        ("2" (assert))))
      ("3" (assert) (typepred "P2!1") (inst?) (assert))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: step_fun_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lift-if)
   (lift-if)
   (assert)
   (skosimp*)
   (lift-if)
   (lift-if)
   (assert)
   (typepred "P1!1")
   (typepred "ii!1")
   (assert)
   (ground)
   (("1" (inst?))
    ("2"
     (case "ii!1 = length(P1!1)-1")
     (("1"
       (replace -1)
       (typepred "P1!1")
       (replace -3)
       (assert)
       (lemma "parts_order[T]")
       (inst - "b!1" "c!1" "P2!1" "0" "1")
       (assert))
      ("2" (assert))))
    ("3" (inst?) (typepred "P2!1") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_bounded
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (case "(FORALL (eps: posreal):
                                                               (EXISTS (EP: partition[T](a!1,b!1)):
                                                                 (FORALL (j: below(length(EP)-1)):
                                                                   FORALL (xx: real): (EP(j) <= xx AND xx <= EP(j+1))
                                                                     IMPLIES
                                                                      abs(f!1(xx) - f!1(EP(j))) < eps/abs(EP(j+1) - EP(j)))))")
   (("1"
     (assert)
     (inst - "1000")
     (skosimp*)
     (inst + "EP!1")
     (skosimp*)
     (inst - "j!1")
     (expand "bounded_on?")
     (inst +
      "1000 / abs(EP!1`seq(1 + j!1) - EP!1`seq(j!1)) + abs(f!1(EP!1`seq(j!1)))")
     (("1"
       (skosimp*)
       (inst?)
       (assert)
       (lemma "abs_diff")
       (inst - "f!1(x!1)" "f!1(EP!1`seq(j!1))")
       (assert))
      ("2" (typepred "EP!1") (inst - "j!1") (assert))))
    ("2"
     (hide 2)
     (skosimp*)
     (assert)
     (lemma "Lemma_1[T]")
     (inst?)
     (assert)
     (inst -1 "eps!1")
     (skosimp*)
     (name "EP" "eq_partition(a!1,b!1,floor((b!1-a!1)/delta!1) + 2)")
     (("1"
       (inst + "EP")
       (skosimp*)
       (case "T_pred(xx!1)")
       (("1"
         (case "abs(EP`seq(1 + j!1) - EP`seq(j!1)) > 0")
         (("1"
           (cross-mult 1)
           (hide -1)
           (name "SecJ" "(EP`seq(1 + j!1) - EP`seq(j!1))")
           (name "F_DIF" "(f!1((EP)(j!1)) - f!1(xx!1))")
           (assert)
           (rewrite "abs_mult" :dir rl)
           (case-replace
            "EP`seq(1 + j!1) * f!1(xx!1) - EP`seq(j!1) * f!1(xx!1) +
                                                                                                                                                                               (EP`seq(j!1) * f!1(EP`seq(j!1))-
                                                                                                                                                                                 EP`seq(1 + j!1) * f!1(EP`seq(j!1))) = -SecJ*F_DIF")
           (("1"
             (hide -1)
             (lemma "abs_neg")
             (inst - "SecJ * F_DIF")
             (replace -1)
             (hide -1)
             (inst - "EP" "EP" "gxis(a!1,b!1,EP,j!1,true,xx!1)"
              "gxis(a!1,b!1,EP,j!1,false,xx!1)")
             (split -5)
             (("1"
               (expand "Rie_sum")
               (assert)
               (assert)
               (rewrite "sigma_minus[below[length(EP)-1]]")
               (("1"
                 (case-replace
                  "(LAMBDA (i: below(length(EP) - 1)):
                                                                                                                                                                                                                                                                                                        EP`seq(i) *
                                                                                                                                                                                                                                                                                                         f!1(gxis(a!1, b!1, EP, j!1, FALSE, xx!1)(i))
                                                                                                                                                                                                                                                                                                         +
                                                                                                                                                                                                                                                                                                         EP`seq(1 + i) *
                                                                                                                                                                                                                                                                                                          f!1(gxis(a!1, b!1, EP, j!1, TRUE, xx!1)(i))
                                                                                                                                                                                                                                                                                                         -
                                                                                                                                                                                                                                                                                                         EP`seq(i) *
                                                                                                                                                                                                                                                                                                          f!1(gxis(a!1, b!1, EP, j!1, TRUE, xx!1)(i))
                                                                                                                                                                                                                                                                                                         -
                                                                                                                                                                                                                                                                                                         EP`seq(1 + i) *
                                                                                                                                                                                                                                                                                                          f!1(gxis(a!1, b!1, EP, j!1, FALSE, xx!1)(i)))
                                                                                                                                                                                                                                                                                       =                (LAMBDA (i: below(length(EP) - 1)):
                                                                                                                                                                                                                                                                                                                                                                                            IF i = j!1 THEN
                                                                                                                                                                                                                                                                                                                                                                             (EP`seq(1 + j!1) - EP`seq(j!1)) * (f!1(EP(j!1)) - f!1(xx!1))
                                                                                                                                                                                                                                                                                                                                                                                             ELSE 0
                                                                                                                                                                                                                                                                                                                                                                                            ENDIF)")
                 (("1"
                   (assert)
                   (hide -1)
                   (case-replace
                    "EP`seq(1 + j!1) * f!1(EP`seq(j!1)) -
                                                                                                                                                                                                                                                                                                                                                   EP`seq(1 + j!1) * f!1(xx!1)
                                                                                                                                                                                                                                                                                                                                                   +
                                                                                                                                                                                                                                                                                                                                                   (EP`seq(j!1) * f!1(xx!1) -
                                                                                                                                                                                                                                                                                                                                                     EP`seq(j!1) * f!1(EP`seq(j!1)))
                                                                                                                                                                                                                                                                                                                         = SecJ*F_DIF")
                   (("1"
                     (hide -1)
                     (case "j!1 < length(EP) - 2")
                     (("1"
                       (lemma "sigma_below[length(EP)-1].sigma_split_ge")
                       (inst - "_" "length(EP) - 2" "0" "j!1")
                       (assert)
                       (inst?)
                       (assert)
                       (replace -1)
                       (hide -1)
                       (case-replace
                        "sigma(1 + j!1, length(EP) - 2,
                                                                                                                                                                                                                                                                                                                                                                                                                               (LAMBDA (i: below(length(EP) - 1)):
                                                                                                                                                                                                                                                                                                                                                                                                                                  IF i = j!1 THEN SecJ * F_DIF ELSE 0 ENDIF)) = 0")
                       (("1"
                         (hide -1)
                         (rewrite "sigma_last_ge")
                         (assert)
                         (case "sigma(0, j!1 - 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (LAMBDA (i: below(length(EP) - 1)):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 IF i = j!1 THEN SecJ * F_DIF ELSE 0 ENDIF)) = 0")
                         (("1" (assert))
                          ("2"
                           (lemma
                            "sigma_restrict_eq[below(length(EP)-1)]")
                           (inst?)
                           (inst -
                            "(LAMBDA (i: below(length(EP) - 1)): 0)")
                           (expand "restrict")
                           (replace -1)
                           (hide -1)
                           (lemma "sigma_const[below(length(EP)-1)]")
                           (inst?)
                           (assert))
                          ("3" (skosimp*) (assert))))
                        ("2"
                         (hide 2)
                         (lemma "sigma_restrict_eq[below(length(EP)-1)]")
                         (("1"
                           (inst?)
                           (inst -
                            "(LAMBDA (i: below(length(EP) - 1)): 0)")
                           (expand "restrict")
                           (replace -1)
                           (hide -1)
                           (lemma "sigma_const[below(length(EP)-1)]")
                           (inst?)
                           (assert))
                          ("2" (hide 2) (skosimp*) (assert))))
                        ("3" (skosimp*) (assert))))
                      ("2"
                       (case "j!1 = length(EP) - 2")
                       (("1"
                         (rewrite "sigma_last_ge")
                         (case-replace
                          "sigma(0, length(EP) - 3,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (LAMBDA (i: below(length(EP) - 1)):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       IF i = j!1 THEN SecJ * F_DIF ELSE 0 ENDIF)) = 0")
                         (("1" (assert))
                          ("2"
                           (lemma
                            "sigma_restrict_eq[below(length(EP)-1)]")
                           (("1"
                             (inst?)
                             (inst -
                              "(LAMBDA (i: below(length(EP) - 1)): 0)")
                             (expand "restrict")
                             (assert)
                             (lemma "sigma_const[below(length(EP)-1)]")
                             (inst?)
                             (assert))
                            ("2" (skosimp*) (assert))))
                          ("3" (skosimp*) (assert))))
                        ("2" (assert))))))
                    ("2" (assert))))
                  ("2"
                   (hide -1 2)
                   (apply-extensionality 1 :hide? t)
                   (expand "gxis")
                   (lift-if)
                   (ground))))
                ("2" (skosimp*) (expand "gxis") (assert))))
              ("2" (lemma "N_from_delta") (inst?) (assert))
              ("3" (lemma "N_from_delta") (inst?) (assert))))
            ("2" (assert))))
          ("2" (hide 2) (typepred "EP") (inst - "j!1") (assert))))
        ("2"
         (hide 2)
         (lemma "connected_domain")
         (expand "connected?")
         (inst?)
         (inst?)
         (assert))))
      ("2"
       (hide 2)
       (case "(b!1 - a!1) / delta!1 > 0")
       (("1" (assert)) ("2" (cross-mult 1))))))
    ("3" (hide 2) (skosimp*) (typepred "EP!1") (inst - "j!1") (assert))
    ("4"
     (hide 2)
     (skosimp*)
     (lemma "connected_domain")
     (expand "connected?")
     (inst - "_" "_" "xx!1")
     (inst?)
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_bounded
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "int_to_bnd")
   (inst?)
   (assert)
   (skosimp*)
   (inst + "EP!1")
   (expand "bounded_on_all?")
   (skosimp*)
   (inst - "j!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_bounded
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (typepred "P!1")
     (inst - "j!1")
     (case "T_pred((P!1`seq(1 + j!1) + P!1`seq(j!1)) / 2)")
     (("1"
       (inst - "f!1((P!1`seq(j!1) + P!1`seq(j!1+1))/2)")
       (inst + "(P!1`seq(j!1) + P!1`seq(j!1+1))/2")
       (assert))
      ("2"
       (lemma "connected_domain")
       (expand "connected?")
       (hide -2)
       (inst?)
       (inst - "P!1`seq(j!1)" "P!1`seq(j!1+1)")
       (assert))))
    ("2"
     (typepred "f!1")
     (expand "bounded?")
     (prop)
     (("1"
       (expand "bounded_above?")
       (expand "bounded_on_all?")
       (assert)
       (inst? -)
       (expand "bounded_on?")
       (skosimp*)
       (inst + "B!1")
       (expand "upper_bound?")
       (skosimp*)
       (typepred "s!1")
       (skosimp*)
       (replace -3)
       (hide -3)
       (inst?)
       (("1" (expand "abs") (lift-if) (ground)) ("2" (assert))))
      ("2"
       (expand "bounded_on_all?")
       (expand "bounded_below?")
       (assert)
       (inst? -)
       (expand "bounded_on?")
       (skosimp*)
       (inst + "-B!1")
       (expand "lower_bound?")
       (skosimp*)
       (typepred "s!1")
       (skosimp*)
       (replace -3)
       (hide -3)
       (inst?)
       (("1" (expand "abs") (lift-if) (ground)) ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_bounded
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "MINj")
   (name-replace "GLB"
    "glb({fx: real |
                       EXISTS (xx: T):
                         P!1`seq(j!1) <= xx AND
                          xx <= P!1`seq(1 + j!1) AND fx = f!1(xx)})")
   (("1"
     (typepred "GLB")
     (expand "greatest_lower_bound?")
     (flatten)
     (hide -2)
     (expand "lower_bound?")
     (inst?)
     (inst?)
     (assert))
    ("2"
     (hide 2)
     (lemma "MINj_prep")
     (inst?)
     (flatten)
     (assert)
     (expand "bounded?")
     (flatten))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_bounded
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "MAXj")
   (name-replace "LUB"
    "lub({fx: real |
                         EXISTS (xx: T):
                           P!1`seq(j!1) <= xx AND
                            xx <= P!1`seq(1 + j!1) AND fx = f!1(xx)})")
   (("1"
     (typepred "LUB")
     (expand "least_upper_bound?")
     (flatten)
     (hide -2)
     (expand "upper_bound?")
     (inst - "f!1(x!1)")
     (("1" (assert)) ("2" (inst?) (assert))))
    ("2"
     (hide 2)
     (lemma "MINj_prep")
     (inst?)
     (flatten)
     (expand "bounded?")
     (flatten)
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_bounded
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "part_in[T]")
   (inst - "a!1" "b!1" "x!1" "P!1")
   (assert)
   (skosimp*)
   (expand "MIN_ALL")
   (lemma "MINj_lem")
   (inst - "a!1" "b!1")
   (assert)
   (inst - "P!1" "f!1" "ii!1" "x!1")
   (("1"
     (assert)
     (typepred
      "min({mm: real |
                   EXISTS (jj: below(length(P!1) - 1)):
                     mm = MINj(a!1, b!1, P!1, jj, f!1)})")
     (("1"
       (skosimp*)
       (inst -2 "MINj(a!1, b!1, P!1, ii!1, f!1)")
       (assert)
       (hide 2)
       (inst + "ii!1"))
      ("2" (hide 2) (lemma "MIN_ALL_TCC1") (inst?))))
    ("2" (postpone))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_bounded
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "part_in[T]")
   (inst - "a!1" "b!1" "x!1" "P!1")
   (assert)
   (skosimp*)
   (expand "MAX_ALL")
   (lemma "MAXj_lem")
   (inst - "a!1" "b!1")
   (assert)
   (inst - "P!1" "f!1" "ii!1" "x!1")
   (assert)
   (typepred
    "max({mm: real |
                         EXISTS (jj: below(length(P!1) - 1)):
                           mm = MAXj(a!1, b!1, P!1, jj, f!1)})")
   (("1"
     (skosimp*)
     (inst -2 "MAXj(a!1, b!1, P!1, ii!1, f!1)")
     (assert)
     (hide 2)
     (inst + "ii!1"))
    ("2" (hide 2) (lemma "MAX_ALL_TCC1") (inst?))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_bounded
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "bounded_on_all_lem")
   (inst?)
   (assert)
   (expand "bounded_on?")
   (inst +
    "max(abs(MIN_ALL(a!1,b!1,P!1,f!1)),
                             abs(MAX_ALL(a!1,b!1,P!1,f!1)))")
   (skosimp*)
   (lemma "MAX_ALL_lem")
   (inst?)
   (assert)
   (inst?)
   (inst?)
   (lemma "MIN_ALL_lem")
   (inst?)
   (assert)
   (inst?)
   (inst?)
   (hide -3 -5)
   (grind :exclude ("MAX_ALL" "MIN_ALL")))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_bounded
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "bounded_on_all_lem")
   (inst?)
   (assert)
   (skosimp*)
   (lemma "bounded_on_all_is")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_bounded
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "bounded_on_all?")
   (skosimp*)
   (assert)
   (expand "bounded_on?")
   (skosimp*)
   (inst + "B!1")
   (skosimp*)
   (inst?)
   (assert)
   (typepred "x!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_bounded
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "integrable_bounded")
   (inst?)
   (assert)
   (lemma "bnd_on_lem")
   (inst?)
   (assert)
   (inst?))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_bounded
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "MINj_prep")
   (assert)
   (inst?)
   (flatten)
   (assert)
   (expand "bounded?")
   (flatten))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_bounded
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "MINj_prep")
   (inst?)
   (flatten)
   (expand "bounded?")
   (flatten)
   (assert))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_bounded
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (lemma "is_finite_surj[real]")
     (inst?)
     (assert)
     (hide 2)
     (inst + "length(P!1) -1"
      "(LAMBDA (jj: below[length(P!1)-1]): MINj(a!1, b!1, P!1, jj, f!1))")
     (("1"
       (expand "surjective?")
       (skosimp*)
       (typepred "y!1")
       (skosimp*)
       (inst?)
       (assert))
      ("2" (skosimp*) (inst?))))
    ("2"
     (expand "empty?")
     (expand "member")
     (inst - "MINj(a!1, b!1, P!1, 0, f!1)")
     (inst?))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_bounded
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (lemma "is_finite_surj[real]")
     (inst?)
     (assert)
     (hide 2)
     (inst + "length(P!1) -1"
      "(LAMBDA (jj: below[length(P!1)-1]): MAXj(a!1, b!1, P!1, jj, f!1))")
     (("1"
       (expand "surjective?")
       (skosimp*)
       (typepred "y!1")
       (skosimp*)
       (inst?)
       (assert))
      ("2" (skosimp*) (inst?))))
    ("2"
     (expand "empty?")
     (expand "member")
     (inst - "MAXj(a!1, b!1, P!1, 0, f!1)")
     (inst?))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "step_function_on?")
   (skosimp*)
   (inst - "ii!1")
   (inst - "ii!1")
   (skosimp*)
   (inst + "fv!1-fv!2")
   (skosimp*)
   (inst - "x!1")
   (inst - "x!1")
   (expand "-")
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "x!1")
   (case "ii!1 = jj!1")
   (("1" (assert))
    ("2"
     (lemma "parts_order[T]")
     (inst - "a!1" "b!1" "P!1" "ii!1+1" "jj!1")
     (assert)
     (case "ii!1 + 1 = jj!1")
     (("1" (assert))
      ("2"
       (assert)
       (replace -4)
       (hide -4)
       (lemma "parts_order[T]")
       (inst - "a!1" "b!1" "P!1" "jj!1" "ii!1")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "find_P_sec(a!1, b!1, P!1, x!1)")
   (("1"
     (name-replace "FP" "find_P_sec(a!1, b!1, P!1, x!1)")
     (typepred "x!1")
     (case-replace "x!1 = seq(P!1)(FP) ")
     (("1"
       (hide -1)
       (hide -5)
       (lemma "parts_order[T]")
       (inst - "a!1" "b!1" "P!1" "ii!1+1" "FP")
       (("1"
         (assert)
         (lemma "parts_order[T]")
         (inst - "a!1" "b!1" "P!1" "FP" "ii!1")
         (assert))
        ("2" (assert))))
      ("2"
       (case-replace "x!1 = seq(P!1)(FP+1) ")
       (("1"
         (hide -7)
         (lemma "parts_order[T]")
         (inst - "a!1" "b!1" "P!1" "FP+1" "ii!1")
         (("1"
           (assert)
           (lemma "parts_order[T]")
           (inst - "a!1" "b!1" "P!1" "ii!1+1" "FP")
           (assert))
          ("2" (assert))))
        ("2" (lemma "parts_disjoint[T]") (inst?) (inst?) (assert))
        ("3" (assert))))
      ("3" (assert))))
    ("2" (assert) (hide 2) (typepred "x!1") (assert)) ("3" (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (expand "step_function_on?")
     (skosimp*)
     (expand "F1")
     (assert)
     (inst + "MINj(a!1, b!1, P!1, ii!1, f!1)")
     (("1"
       (skosimp*)
       (lift-if)
       (typepred "x!1")
       (ground)
       (("1" (lemma "se_not_on") (inst?) (inst -1 "ii!1" "x!1") (assert))
        ("2" (lemma "se_not_on") (inst?) (inst -1 "ii!1" "x!1") (assert))
        ("3"
         (lemma "find_P_sec_in")
         (inst - "a!1" "b!1")
         (assert)
         (inst - "P!1")
         (inst?)
         (assert))))
      ("2"
       (lemma "connected_domain")
       (lemma "integrable_bounded[T]")
       (inst?)
       (assert)
       (lemma "bnd_on_lem[T]")
       (inst?)
       (assert)
       (inst?))))
    ("2"
     (expand "step_function_on?")
     (skosimp*)
     (expand "F2")
     (assert)
     (inst + "MAXj(a!1, b!1, P!1, ii!1, f!1)")
     (("1"
       (skosimp*)
       (lift-if)
       (typepred "x!1")
       (ground)
       (("1" (lemma "se_not_on") (inst?) (inst -1 "ii!1" "x!1") (assert))
        ("2" (lemma "se_not_on") (inst?) (inst -1 "ii!1" "x!1") (assert))
        ("3"
         (lemma "find_P_sec_in")
         (inst - "a!1" "b!1")
         (assert)
         (inst - "P!1")
         (inst?)
         (assert))))
      ("2"
       (lemma "connected_domain")
       (lemma "bnd_on_lem[T]")
       (inst?)
       (inst?)
       (assert)
       (inst?)
       (assert)
       (hide 2)
       (lemma "integrable_bounded[T]")
       (inst?)
       (assert))))
    ("3"
     (skosimp*)
     (prop)
     (("1"
       (expand "F1")
       (assert)
       (lift-if)
       (lemma "MIN_ALL_lem[T]")
       (inst?)
       (assert)
       (inst?)
       (("1"
         (ground)
         (lemma "MINj_lem[T]")
         (inst?)
         (assert)
         (inst?)
         (assert)
         (lemma "connected_domain")
         (lemma "integrable_bounded_on_all[T]")
         (inst?)
         (assert)
         (inst?))
        ("2"
         (assert)
         (lemma "integrable_bounded_on_all[T]")
         (inst?)
         (assert)
         (inst?))))
      ("2"
       (assert)
       (expand "F2")
       (assert)
       (lemma "MAX_ALL_lem[T]")
       (inst?)
       (assert)
       (inst?)
       (("1"
         (inst?)
         (lift-if)
         (ground)
         (lemma "MAXj_lem[T]")
         (inst?)
         (assert)
         (inst?)
         (("1" (inst?) (assert))
          ("2"
           (lemma "connected_domain")
           (lemma "integrable_bounded_on_all[T]")
           (inst?)
           (assert)
           (inst?))))
        ("2"
         (assert)
         (lemma "integrable_bounded_on_all[T]")
         (inst?)
         (assert)
         (inst?))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (lemma "F1_F2_lem")
   (inst?)
   (assert)
   (inst?)
   (flatten)
   (lemma "diff_step_is_step_on")
   (inst?)
   (("1" (assert) (inst?) (assert) (inst - "P!1") (assert))
    ("2"
     (hide 2)
     (lemma "integrable_bounded[T]")
     (inst?)
     (assert)
     (expand "bnded_on?")
     (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (case "bnded_on?(a!1, b!1)(f!1)")
   (("1"
     (lemma "F2_F1_step_function_on")
     (inst?)
     (assert)
     (inst?)
     (assert)
     (lemma "step_function_integrable?[T]")
     (("1"
       (inst - "a!1" "b!1"
        "F2(a!1, b!1, P!1, f!1) - F1(a!1, b!1, P!1, f!1)")
       (assert)
       (hide 2)
       (expand "step_function?")
       (inst + "P!1")
       (expand "step_function_on?")
       (propax))
      ("2" (lemma "connected_domain") (propax))))
    ("2"
     (lemma "integrable_bounded[T]")
     (inst?)
     (assert)
     (expand "bnded_on?")
     (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (lemma "connected_domain")
   (case "bnded_on?(a!1, b!1)(f!1)")
   (("1"
     (lemma "step_function_on_integral[T]")
     (assert)
     (inst - "a!1" "b!1"
      "F2(a!1, b!1, P!1, f!1) - F1(a!1, b!1, P!1, f!1)")
     (assert)
     (inst - "P!1")
     (split -1)
     (("1"
       (replace -1)
       (hide -1)
       (rewrite "sigma_restrict_eq[below(length(P!1)-1)]")
       (("1"
         (hide 2)
         (expand "restrict")
         (apply-extensionality 1 :hide? t)
         (("1"
           (expand "val_in")
           (typepred "pick(a!1, b!1, P!1, x!1)")
           (case "bounded_on_all?[T](a!1, b!1, P!1)(f!1)")
           (("1"
             (case-replace
              "(F2(a!1, b!1, P!1, f!1) - F1(a!1, b!1, P!1, f!1))
                                                                             (pick(a!1, b!1, P!1, x!1))
                                                     =
                                                     MAXj(a!1, b!1, P!1, x!1, f!1) - MINj(a!1, b!1, P!1, x!1, f!1)")
             (("1" (assert))
              ("2"
               (hide 2)
               (name-replace "MM" "pick(a!1, b!1, P!1, x!1)")
               (expand "-")
               (expand "F2")
               (expand "F1")
               (assert)
               (case "MM /= P!1`seq(find_P_sec(a!1, b!1, P!1, MM))")
               (("1"
                 (case "MM /= P!1`seq(1 + find_P_sec(a!1, b!1, P!1, MM))")
                 (("1"
                   (flatten)
                   (assert)
                   (case "find_P_sec(a!1, b!1, P!1, MM) = x!1")
                   (("1" (replace -1) (propax))
                    ("2"
                     (hide 4)
                     (typepred "find_P_sec(a!1, b!1, P!1, MM)")
                     (name-replace "IM" "find_P_sec(a!1, b!1, P!1, MM)")
                     (lemma "part_not_in[T]")
                     (inst - "a!1" "b!1" "MM")
                     (assert)
                     (inst?)
                     (inst - "IM")
                     (lemma "parts_disjoint[T]")
                     (inst - "a!1" "b!1" "MM" "P!1" "x!1" "IM")
                     (assert))))
                  ("2"
                   (hide 2)
                   (flatten)
                   (hide 1)
                   (typepred "MM")
                   (hide -5)
                   (name-replace "IM" "find_P_sec(a!1, b!1, P!1, MM)")
                   (assert)
                   (lemma "part_not_in[T]")
                   (inst - "a!1" "b!1" "MM")
                   (assert)
                   (inst - "P!1" "x!1" "1+IM")
                   (assert))))
                ("2"
                 (hide 2)
                 (flatten)
                 (lemma "part_not_in[T]")
                 (inst - "a!1" "b!1" "MM")
                 (assert)
                 (inst - "P!1" "x!1" "find_P_sec(a!1, b!1, P!1, MM)")
                 (assert))))))
            ("2"
             (lemma "integrable_bounded_on_all[T]")
             (inst?)
             (assert)
             (inst?))))
          ("2"
           (skosimp*)
           (lemma "integrable_bounded_on_all[T]")
           (inst?)
           (assert)
           (inst?))))
        ("2"
         (skosimp*)
         (lemma "integrable_bounded_on_all[T]")
         (inst?)
         (assert)
         (inst?))
        ("3" (skosimp*) (assert))))
      ("2"
       (hide 2)
       (lemma "F2_F1_step_function_on")
       (inst - "a!1" "b!1" "f!1")
       (assert)
       (inst?))))
    ("2"
     (hide 2)
     (lemma "integrable_bounded[T]")
     (inst?)
     (assert)
     (expand "bnded_on?")
     (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (expand "MINj")
     (name-replace "GLB"
      "         glb({fx: real |
                      EXISTS (xx: T):
                        P!1`seq(j!1) <= xx AND
                         xx <= P!1`seq(1 + j!1) AND fx = f!1(xx)})")
     (("1"
       (typepred "GLB")
       (expand "greatest_lower_bound?")
       (flatten)
       (inst -2 "GLB+nu!1")
       (assert)
       (expand "lower_bound?")
       (skosimp*)
       (typepred "s!1")
       (skosimp*)
       (replace -3)
       (hide -3)
       (inst + "xx!1")
       (("1" (assert)) ("2" (assert))))
      ("2"
       (hide 2)
       (prop)
       (("1"
         (expand "nonempty?")
         (expand "empty?")
         (expand "member")
         (inst - "f!1(P!1`seq(j!1))")
         (inst?)
         (assert)
         (typepred "P!1")
         (assert)
         (inst - "j!1")
         (assert))
        ("2"
         (typepred "f!1")
         (lemma "bounded_on_all_is[T]")
         (("1"
           (inst?)
           (inst?)
           (assert)
           (split -1)
           (("1"
             (hide -2)
             (expand "bounded_on?")
             (skosimp*)
             (expand "bounded_below?")
             (inst + "-B!1")
             (expand "lower_bound?")
             (skosimp*)
             (typepred "s!1")
             (skosimp*)
             (inst - "xx!1")
             (("1" (grind)) ("2" (assert))))
            ("2" (inst?))))
          ("2" (lemma "connected_domain") (propax))))))))
    ("2"
     (expand "MAXj")
     (name-replace "LUB"
      "         lub({fx: real |
                      EXISTS (xx: T):
                        P!1`seq(j!1) <= xx AND
                         xx <= P!1`seq(1 + j!1) AND fx = f!1(xx)})")
     (("1"
       (typepred "LUB")
       (expand "least_upper_bound?")
       (flatten)
       (inst -2 "LUB-nu!1")
       (assert)
       (expand "upper_bound?")
       (skosimp*)
       (typepred "s!1")
       (skosimp*)
       (replace -3)
       (hide -3)
       (inst + "xx!1")
       (("1" (assert)) ("2" (assert))))
      ("2"
       (hide 2)
       (prop)
       (("1"
         (expand "nonempty?")
         (expand "empty?")
         (expand "member")
         (inst - "f!1(P!1`seq(j!1))")
         (inst?)
         (assert)
         (typepred "P!1")
         (assert)
         (inst - "j!1")
         (assert))
        ("2"
         (typepred "f!1")
         (lemma "bounded_on_all_is[T]")
         (("1"
           (inst?)
           (inst?)
           (assert)
           (split -1)
           (("1"
             (hide -2)
             (expand "bounded_on?")
             (skosimp*)
             (expand "bounded_above?")
             (inst + "B!1")
             (expand "upper_bound?")
             (skosimp*)
             (typepred "s!1")
             (skosimp*)
             (inst - "xx!1")
             (("1" (grind)) ("2" (assert))))
            ("2" (inst?))))
          ("2" (lemma "connected_domain") (propax))))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (case "FORALL (n: below(length(P!1) - 1)):  sigma(0, n,
                     LAMBDA (j: below(length(P!1) - 1)):
                       P!1`seq(1 + j) - P!1`seq(j)) = P!1`seq(1+n) - a!1")
   (("1" (inst - "length(P!1) - 2") (assert))
    ("2"
     (hide 2)
     (induct "n")
     (("1" (assert) (expand "sigma") (assert) (expand "sigma") (assert))
      ("2" (skosimp*) (expand "sigma" 1) (replace -2) (assert))
      ("3" (hide 2) (skosimp*) (assert))))
    ("3" (hide 2) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite "xis?")
   (auto-rewrite "xis_lem")
   (skosimp*)
   (lemma "connected_domain")
   (lemma "Lemma_1[T]")
   (inst?)
   (assert)
   (inst - "eps!1/2")
   (skosimp*)
   (name "EP" "eq_partition(a!1,b!1,floor((b!1-a!1)/delta!1) + 2)")
   (("1"
     (case "bnded_on?(a!1, b!1)(f!1)")
     (("1"
       (inst + "F1(a!1,b!1,EP,f!1)" "F2(a!1,b!1,EP,f!1)")
       (lemma "F1_F2_lem")
       (inst?)
       (assert)
       (inst - "EP")
       (flatten)
       (case-replace
        "    step_function?(a!1, b!1, F1(a!1, b!1, EP, f!1))
                                 AND step_function?(a!1, b!1, F2(a!1, b!1, EP, f!1))")
       (("1"
         (flatten)
         (hide -3 -4)
         (assert)
         (replace -3)
         (hide -3)
         (lemma "integrable_F2_F1")
         (inst?)
         (assert)
         (inst?)
         (assert)
         (hide -1 -2 -3)
         (case-replace
          "integral(a!1, b!1, F2(a!1, b!1, EP, f!1) - F1(a!1, b!1, EP, f!1)) <=
                                                                                             eps!1/2")
         (("1" (assert))
          ("2"
           (hide 2)
           (lemma "lt_via_epsi")
           (inst -
            "integral(a!1, b!1, F2(a!1, b!1, EP, f!1) - F1(a!1, b!1, EP, f!1))"
            "eps!1 / 2")
           (assert)
           (hide 2)
           (skosimp*)
           (name "NU" "epsi!1/(2*(b!1 - a!1))")
           (case "NU > 0")
           (("1"
             (case "bounded_on_all?[T](a!1, b!1, EP)(f!1)")
             (("1"
               (name "XP"
                     "(LAMBDA (j: below(length(EP) - 1)):
                                                                                                                                                                                               get_xp(a!1,b!1,EP,f!1,j,NU))")
               (("1"
                 (name "XPP"
                       "(LAMBDA (j: below(length(EP) - 1)):
                                                                                                                                                                                                                 get_xpp(a!1,b!1,EP,f!1,j,NU))")
                 (inst - "EP" "EP" "XPP" "XP")
                 (("1"
                   (assert)
                   (case "width(a!1, b!1, EP) < delta!1")
                   (("1"
                     (assert)
                     (expand "Rie_sum")
                     (assert)
                     (lemma "integral_F2_F1")
                     (inst?)
                     (assert)
                     (inst?)
                     (rewrite "sigma_minus[below(length(EP) - 1)]")
                     (("1"
                       (case "sigma(0, length(EP) - 2,
                                                                                                                                                                                   LAMBDA (i: below(length(EP) - 1)):
                                                                                                                                                                     EP`seq(i) * f!1(XP(i)) + EP`seq(1 + i) * f!1(XPP(i)) -
                                                                                                                                                                     EP`seq(i) * f!1(XPP(i))
                                                                                                                                                                     - EP`seq(1 + i) * f!1(XP(i))) >    sigma(0, length(EP) - 2,
                                                                                                                                                                     LAMBDA (j: below(length(EP) - 1)):
                                                                                                                                                                     (MAXj(a!1, b!1, EP, j, f!1) - MINj(a!1, b!1, EP, j, f!1) - 2*NU) * (EP`seq(j+1) - EP`seq(j)))")
                       (("1"
                         (case-replace
                          "sigma(0, length(EP) - 2,
                                                                                                                                                                                                                                                           LAMBDA (j: below(length(EP) - 1)):
                                                                                                                                                                                                                                                             (MAXj(a!1, b!1, EP, j, f!1) - MINj(a!1, b!1, EP, j, f!1) -
                                                                                                                                                                                                                                                               2 * NU)
                                                                                                                                                                                                                                                              * (EP`seq(j + 1) - EP`seq(j))) = integral(a!1, b!1, F2(a!1, b!1, EP, f!1) - F1(a!1, b!1, EP, f!1)) - 2*NU*(b!1 - a!1)")
                         (("1"
                           (hide -1)
                           (case "integral(a!1, b!1,
                                                                                                                                                                                                                                                                                                         F2(a!1, b!1, EP, f!1) - F1(a!1, b!1, EP, f!1))
                                                                                                                                                                                                                                                                                                                      - 2 * NU * (b!1 - a!1) < eps!1 / 2")
                           (("1" (assert) (cross-mult -9))
                            ("2" (assert))))
                          ("2"
                           (assert)
                           (hide -1 2)
                           (replace -1)
                           (hide-all-but 1)
                           (lemma "sigma_sum[below(length(EP) - 1)]")
                           (inst -
                            "(LAMBDA (j: below(length(EP) - 1)):
                                                                                                                                                                                                                                                        2 * (EP`seq(j) * NU) - 2 * (EP`seq(1 + j) * NU))"
                            "(LAMBDA (j: below(length(EP) - 1)):
                                                                                                                                                                                                                                                         (EP`seq(j) * MINj(a!1, b!1, EP, j, f!1) -
                                                                                                                                                                                                                                                           EP`seq(1 + j) * MINj(a!1, b!1, EP, j, f!1))
                                                                                                                                                                                                                                                         +
                                                                                                                                                                                                                                                         (EP`seq(1 + j) * MAXj(a!1, b!1, EP, j, f!1) -
                                                                                                                                                                                                                                                           EP`seq(j) * MAXj(a!1, b!1, EP, j, f!1)))"
                            "length(EP) - 2" "0")
                           (replace -1 * rl)
                           (hide -1)
                           (assert)
                           (lemma "sigma_all_parts")
                           (inst - "a!1" "b!1")
                           (assert)
                           (inst?)
                           (lemma "sigma_scal[below(length(EP) - 1)]")
                           (inst?)
                           (inst - "-2*NU")
                           (assert)
                           (assert))))
                        ("2"
                         (hide 2)
                         (hide -1)
                         (case "FORALL (i: below(length(EP) - 1)): f!1(XP(i)) < MINj(a!1, b!1, EP, i, f!1) + NU")
                         (("1"
                           (case "FORALL (i: below(length(EP) - 1)): f!1(XPP(i)) > MAXj(a!1, b!1, EP, i, f!1) - NU")
                           (("1"
                             (hide -4 -5)
                             (hide -3 -5 -6 -7 -8)
                             (lemma "sigma_lt[below(length(EP) -1)]")
                             (inst -
                              "(LAMBDA (j: below(length(EP) - 1)):
                                                                                                                                                                                                                     (MAXj(a!1, b!1, EP, j, f!1) - MINj(a!1, b!1, EP, j, f!1) -
                                                                                                                                                                                                                       2 * NU)
                                                                                                                                                                                                                      * (EP`seq(j + 1) - EP`seq(j)))"
                              "(LAMBDA (i: below(length(EP) - 1)):
                                                                                                                                                                                                                    EP`seq(i) * f!1(XP(i)) + EP`seq(1 + i) * f!1(XPP(i)) -
                                                                                                                                                                                                                     EP`seq(i) * f!1(XPP(i))
                                                                                                                                                                                                                     - EP`seq(1 + i) * f!1(XP(i)))"
                              "length(EP) - 2" "0")
                             (assert)
                             (hide 2)
                             (case "length(EP) > 2")
                             (("1"
                               (assert)
                               (skosimp*)
                               (assert)
                               (inst?)
                               (inst?)
                               (assert)
                               (case "f!1(XPP(n!1)) - f!1(XP(n!1)) > MAXj(a!1, b!1, EP, n!1, f!1) - MINj(a!1, b!1, EP, n!1, f!1) - 2*NU ")
                               (("1"
                                 (mult-by
                                  -1
                                  "EP`seq(n!1+1) - EP`seq(n!1)")
                                 (("1" (assert))
                                  ("2"
                                   (typepred "EP")
                                   (inst - "n!1")
                                   (assert))))
                                ("2" (assert))))
                              ("2"
                               (hide 2)
                               (reveal 2)
                               (typepred "EP")
                               (rewrite "sigma_rew" 1)
                               (lemma "sigma_rew[below(length(EP) - 1)]")
                               (inst -
                                "(LAMBDA (j: below(length(EP) - 1)):
                                                                                                           2 * (EP`seq(j) * NU) - 2 * (EP`seq(1 + j) * NU) +
                                                                                                            (EP`seq(j) * MINj(a!1, b!1, EP, j, f!1) -
                                                                                                              EP`seq(1 + j) * MINj(a!1, b!1, EP, j, f!1))
                                                                                                            +
                                                                                                            (EP`seq(1 + j) * MAXj(a!1, b!1, EP, j, f!1) -
                                                                                                              EP`seq(j) * MAXj(a!1, b!1, EP, j, f!1)))"
                                "length(EP) - 2" "0")
                               (replace -1)
                               (hide -1)
                               (assert)
                               (inst - "0")
                               (inst - "0")
                               (case "f!1(XPP(0)) - f!1(XP(0)) > MAXj(a!1, b!1, EP, 0, f!1) - MINj(a!1, b!1, EP, 0, f!1) - 2*NU ")
                               (("1"
                                 (mult-by -1 "EP`seq(1) - EP`seq(0)")
                                 (assert))
                                ("2" (assert))))))
                            ("2" (skosimp*) (replace -3 * rl) (assert))))
                          ("2"
                           (skosimp*)
                           (hide -9 2)
                           (replace -3 * rl)
                           (assert))))
                        ("3" (assert) (skosimp*) (assert))))
                      ("2" (skosimp*) (assert))))
                    ("2"
                     (hide 2)
                     (lemma " N_from_delta[T]")
                     (inst?)
                     (assert))))
                  ("2"
                   (hide 2)
                   (assert)
                   (hide -1 -2)
                   (prop)
                   (("1"
                     (skosimp*)
                     (typepred "get_xpp(a!1, b!1, EP, f!1, x1!1, NU)")
                     (assert)
                     (assert))
                    ("2"
                     (skosimp*)
                     (typepred "get_xp(a!1, b!1, EP, f!1, ii!1, NU)")
                     (assert)
                     (assert))))
                  ("3"
                   (assert)
                   (hide 2)
                   (assert)
                   (hide -1 -2)
                   (prop)
                   (("1"
                     (skosimp*)
                     (typepred "get_xp(a!1, b!1, EP, f!1, x1!1, NU)")
                     (assert)
                     (assert))
                    ("2"
                     (skosimp*)
                     (assert)
                     (typepred "get_xp(a!1, b!1, EP, f!1, ii!1, NU)")
                     (assert))))))
                ("2" (hide 2) (skosimp*) (assert)) ("3" (skosimp*))))
              ("2"
               (hide 2)
               (lemma "integrable_bounded_on_all[T]")
               (inst?)
               (assert)
               (inst?))))
            ("2" (hide 2) (assert) (replace -1 * rl) (cross-mult 1))))))
        ("2"
         (assert)
         (hide 2)
         (hide -3 -4 -5 -6 -7 -8 -9)
         (split +)
         (("1" (expand "step_function?") (inst?))
          ("2" (expand "step_function?") (inst?))))))
      ("2"
       (hide 2)
       (expand "bnded_on?")
       (lemma "integrable_bounded[T]")
       (inst?)
       (assert))))
    ("2"
     (hide 2)
     (case-replace "(b!1 - a!1) / delta!1 > 0")
     (("1" (assert)) ("2" (cross-mult 1))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (case "ceiling((b!1 - a!1) / delta!1) > 0")
   (("1"
     (inst + "eq_partition(a!1,b!1,ceiling((b!1-a!1)/delta!1)+2)")
     (("1"
       (lemma "width_eq_part[T]")
       (inst?)
       (("1"
         (replace -3)
         (replace -1)
         (hide -1)
         (assert)
         (cross-mult 1)
         (typepred "ceiling((b!1 - a!1) / delta!1)")
         (cross-mult -1)
         (assert))
        ("2"
         (hide 2)
         (case "(b!1 - a!1) / delta!1 > 0")
         (("1" (assert)) ("2" (cross-mult 1) (assert))))))
      ("2" (assert))))
    ("2"
     (hide 2)
     (case "(b!1 - a!1) / delta!1 > 0")
     (("1" (assert)) ("2" (cross-mult 1) (assert))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst +
    "(LAMBDA (d:  [a: T, b: {x: T | a < x}, partition[T](a, b),
                                  (LAMBDA (x: T): a <= x AND x <= b)]):
                                 choose({ii: below(length(d`3) - 1) |
                                          seq(d`3)(ii) <= d`4 AND
                                           d`4 <= seq(d`3)(1 + ii)}))")
   (("1"
     (skosimp*)
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (lemma "part_in[T]")
     (inst - "d!1`1" "d!1`2" "d!1`4" "d!1`3")
     (assert)
     (assert)
     (skosimp*)
     (inst?)
     (assert))
    ("2"
     (skosimp*)
     (lemma "connected_domain")
     (expand "connected?")
     (inst?)
     (inst?)
     (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst +
    "(LAMBDA (d:  [a: T, b: {x: T | a < x}, partition[T](a, b),
                                    (LAMBDA (x: T): a <= x AND x <= b)]):
                                   choose({ii: below(length(d`3) - 1) |
                                            seq(d`3)(ii) <= d`4 AND
                                             d`4 <= seq(d`3)(1 + ii)}))")
   (skosimp*)
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (lemma "part_in[T]")
   (inst - "d!1`1" "d!1`2" "d!1`4" "d!1`3")
   (assert)
   (assert)
   (skosimp*)
   (inst?)
   (assert))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (typepred "f!1")
   (expand "bnded_on?")
   (expand "bounded_on_all?")
   (assert)
   (expand "bounded_on?")
   (skosimp*)
   (inst + "B!1")
   (skosimp*)
   (inst?)
   (assert)
   (typepred "x!2")
   (assert))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "f!1")
   (expand "bnded_on?")
   (expand "bounded_on?")
   (expand "bounded_on_all?")
   (skosimp*)
   (expand "bounded_on?")
   (assert)
   (inst + "B!1")
   (skosimp*)
   (inst?)
   (assert)
   (typepred "x!2")
   (assert))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (expand "bnded_on?")
   (lemma "integrable_bounded[T]")
   (("1" (inst?) (assert)) ("2" (lemma "connected_domain") (propax))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "integrable_bounded_on_all[T]")
   (("1" (inst?) (assert) (inst?))
    ("2" (lemma "connected_domain") (propax))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (inst +
    "(LAMBDA (d:
                                   [a: T, b: {x: T | a < x}, P: partition[T](a, b),
                                    (bounded_on_all?[T](a, b, P)), below(length(P) - 1),
                                    posreal]):
                 choose({xp: closed_interval[T](d`3`seq(d`5), d`3`seq(1 + d`5)) |
                                d`4(xp) < MINj[T](d`1, d`2, d`3, d`5, d`4) + d`6}))")
   (("1" (skosimp*) (assert)) ("2" (skosimp*) (assert))
    ("3"
     (skosimp*)
     (grind :if-match nil)
     (lemma "se_prep")
     (inst - "d!1`1" "d!1`2")
     (assert)
     (assert)
     (typepred "d!1`2")
     (inst?)
     (inst - "d!1`6")
     (flatten)
     (skosimp*)
     (hide -4)
     (inst - "xp!1")
     (assert))
    ("4" (skosimp*) (assert)) ("5" (skosimp*) (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_split_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (inst +
    "(LAMBDA (d:
                                       [a: T, b: {x: T | a < x}, P: partition[T](a, b),
                                        (bounded_on_all?[T](a, b, P)), below(length(P) - 1),
                                        posreal]):
                     choose({xpp: closed_interval[T](d`3`seq(d`5), d`3`seq(1 + d`5)) |
                                    d`4(xpp) > MAXj[T](d`1, d`2, d`3, d`5, d`4) - d`6}))")
   (("1" (skosimp*) (assert)) ("2" (skosimp*) (assert))
    ("3"
     (skosimp*)
     (lemma "se_prep")
     (inst - "d!1`1" "d!1`2")
     (assert)
     (assert)
     (typepred "d!1`2")
     (inst?)
     (flatten)
     (skosimp*)
     (hide -3)
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (inst - "xpp!1"))
    ("4" (skosimp*) (assert)) ("5" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite "xis?")
   (auto-rewrite "xis_lem")
   (skosimp*)
   (typepred "xisa!1")
   (typepred "xisb!1")
   (expand "xis?")
   (assert)
   (inst + "UUPart(a!1,b!1,c!1,Pa!1,Pb!1)" "xisa!1 o xisb!1")
   (("1"
     (split +)
     (("1"
       (hide -1 -2)
       (expand "width")
       (lemma "connected_domain")
       (name "LUU"
             "{l: real |
                                                 EXISTS (ii: below(length(UUPart(a!1, b!1, c!1, Pa!1, Pb!1)) - 1)):
                                                   l = seq(UUPart(a!1, b!1, c!1, Pa!1, Pb!1))(1 + ii)
                                                         - seq(UUPart(a!1, b!1, c!1, Pa!1, Pb!1))(ii)}")
       (("1"
         (replace -1)
         (case "is_finite[real](LUU) AND NOT empty?[real](LUU)")
         (("1"
           (name "LA"
                 "{l: real | EXISTS (ii: below(length(Pa!1) - 1)):
                                                                            l = seq(Pa!1)(1 + ii) - seq(Pa!1)(ii)}")
           (replace -1)
           (name "LB"
                 "{l: real | EXISTS (ii: below(length(Pb!1) - 1)):
                                                                            l = seq(Pb!1)(1 + ii) - seq(Pb!1)(ii)}")
           (replace -1)
           (case "is_finite[real](LA) AND NOT empty?[real](LA)")
           (("1"
             (case "is_finite[real](LB) AND NOT empty?[real](LB)")
             (("1"
               (typepred "max(LUU)")
               (replace -8 -1 rl)
               (assert)
               (skosimp*)
               (replace -8)
               (replace -1)
               (hide -1)
               (expand "UUPart")
               (ground)
               (lift-if)
               (case "1 + ii!1 < length(Pa!1)")
               (("1"
                 (assert)
                 (typepred "max(LA)")
                 (inst -2 "Pa!1`seq(1 + ii!1) - Pa!1`seq(ii!1)")
                 (assert)
                 (replace -7 + rl)
                 (assert)
                 (inst?))
                ("2"
                 (assert)
                 (lift-if)
                 (case-replace "ii!1 = length(Pa!1) - 1")
                 (("1"
                   (case-replace
                    "Pa!1`seq(length(Pa!1) - 1) = Pb!1`seq(0)")
                   (("1"
                     (assert)
                     (typepred "max(LB)")
                     (replace -8 -1 rl)
                     (assert)
                     (skosimp*)
                     (replace -8)
                     (inst -2 "Pb!1`seq(1) - Pb!1`seq(0)")
                     (assert)
                     (replace -7 + rl)
                     (assert)
                     (inst 1 "0")
                     (assert))
                    ("2" (assert))))
                  ("2"
                   (assert)
                   (typepred "max(LB)")
                   (replace -6 -1 rl)
                   (assert)
                   (skosimp*)
                   (replace -6)
                   (inst -2
                    "Pb!1`seq(2 - length(Pa!1) + ii!1) - Pb!1`seq(1 - length(Pa!1) + ii!1)")
                   (assert)
                   (replace -5 1 rl)
                   (assert)
                   (inst 1 "1-length(Pa!1)+ii!1")
                   (("1" (assert))
                    ("2"
                     (assert)
                     (hide -5 -6 -8)
                     (hide -2 -3 -4 -5 -6)
                     (typepred "ii!1")
                     (assert)
                     (expand "UUPart")
                     (assert))))))))
              ("2"
               (replace -2 * rl)
               (hide-all-but 1)
               (split +)
               (("1"
                 (lemma "is_finite_surj")
                 (inst?)
                 (assert)
                 (hide 2)
                 (inst + "length(Pb!1)-1"
                  "(LAMBDA (ii: below(length(Pb!1) - 1)):
                                                                      seq(Pb!1)(1 + ii) - seq(Pb!1)(ii))")
                 (("1"
                   (expand "surjective?")
                   (skosimp*)
                   (typepred "y!1")
                   (skosimp*)
                   (inst?)
                   (assert))
                  ("2" (skosimp*) (inst?))))
                ("2"
                 (expand "empty?")
                 (expand "member")
                 (inst - "seq(Pb!1)(1) - seq(Pb!1)(0)")
                 (inst?)
                 (assert))))))
            ("2"
             (replace -2 * rl)
             (hide-all-but 1)
             (split +)
             (("1"
               (lemma "is_finite_surj")
               (inst?)
               (assert)
               (hide 2)
               (inst + "length(Pa!1)-1"
                "(LAMBDA (ii: below(length(Pa!1) - 1)):
                                                              seq(Pa!1)(1 + ii) - seq(Pa!1)(ii))")
               (("1"
                 (expand "surjective?")
                 (skosimp*)
                 (typepred "y!1")
                 (skosimp*)
                 (inst?)
                 (assert))
                ("2" (skosimp*) (inst?))))
              ("2"
               (expand "empty?")
               (inst - "seq(Pa!1)(1) - seq(Pa!1)(0)")
               (expand "member")
               (inst?)
               (assert))))))
          ("2"
           (replace -1 * rl)
           (hide-all-but 1)
           (split +)
           (("1"
             (lemma "is_finite_surj")
             (inst?)
             (("1"
               (assert)
               (hide 2)
               (inst + "length(UUPart(a!1, b!1, c!1, Pa!1, Pb!1))-1"
                "(LAMBDA (ii: below(length(UUPart(a!1, b!1, c!1, Pa!1, Pb!1)) - 1)):
                                                             seq(UUPart(a!1, b!1, c!1, Pa!1, Pb!1))(1 + ii)
                                                                - seq(UUPart(a!1, b!1, c!1, Pa!1, Pb!1))(ii))")
               (("1"
                 (expand "surjective?")
                 (skosimp*)
                 (typepred "y!1")
                 (skosimp*)
                 (inst?)
                 (assert))
                ("2" (skosimp*) (inst?))
                ("3" (lemma "connected_domain") (skosimp*))
                ("4" (expand "UUPart") (assert))
                ("5" (lemma "connected_domain") (propax))))
              ("2" (skosimp*) (lemma "connected_domain") (propax))))
            ("2"
             (expand "empty?")
             (expand "member")
             (inst -
              "seq(UUPart(a!1, b!1, c!1, Pa!1, Pb!1))(1) -
                                                          seq(UUPart(a!1, b!1, c!1, Pa!1, Pb!1))(0)")
             (("1"
               (assert)
               (inst + "0")
               (("1" (assert)) ("2" (expand "UUPart") (assert))))
              ("2" (expand "UUPart") (assert))
              ("3" (lemma "connected_domain") (propax))
              ("4" (expand "UUPart") (assert))))))))
        ("2" (skosimp*))))
      ("2"
       (hide -1 -2)
       (expand "Rie_sum")
       (assert)
       (("1"
         (case " length(UUPart(a!1, b!1, c!1, Pa!1, Pb!1)) = length(Pa!1) + length(Pb!1) - 1")
         (("1"
           (same-name "sigma[below(length(UUPart(a!1, b!1, c!1, Pa!1, Pb!1)) - 1)]"
                      "sigma[below(length(Pa!1) + length(Pb!1) - 2)]")
           (("1"
             (replace -1)
             (hide -1)
             (assert)
             (lemma
              "sigma_split[below(length(Pa!1) + length(Pb!1) - 2)]")
             (inst?)
             (("1"
               (assert)
               (inst - "length(Pa!1) - 2")
               (assert)
               (replace -2)
               (assert)
               (replace -1)
               (hide -1)
               (case-replace
                "sigma[below(length(Pa!1) + length(Pb!1) - 2)].sigma(0, length(Pa!1) - 2,
                                                        LAMBDA (n: below(length(UUPart(a!1, b!1, c!1, Pa!1, Pb!1)) - 1)):
                                                           UUPart(a!1, b!1, c!1, Pa!1, Pb!1)`seq(1 + n) *
                                                             f!1((concat_arrays.o(xisa!1, xisb!1))(n))
                                                               - UUPart(a!1, b!1, c!1, Pa!1, Pb!1)`seq(n) *
                                                                 f!1((concat_arrays.o(xisa!1, xisb!1))(n)))
                                                            = sigma[below(length(Pa!1) - 1)]
                                                                 (0, length(Pa!1) - 2,
                                                                  LAMBDA (n: below(length(Pa!1) - 1)):
                                                                    Pa!1`seq(1 + n) * f!1(xisa!1(n)) -
                                                                      Pa!1`seq(n) * f!1(xisa!1(n)))")
               (("1"
                 (assert)
                 (hide -1)
                 (lemma
                  "sigma_diff_shift[length(Pb!1) - 1,length(Pa!1) + length(Pb!1) - 2
                                                                                           ]")
                 (inst -
                  "(LAMBDA (n: below(length(Pb!1) - 1)):
                                                                                                        Pb!1`seq(1 + n) * f!1(xisb!1(n)) -
                                                                                                         Pb!1`seq(n) * f!1(xisb!1(n)))"
                  "(LAMBDA (n:
                                                                                                                below(length(UUPart(a!1, b!1, c!1, Pa!1, Pb!1)) -
                                                                                                                       1)):
                                                                                                        UUPart(a!1, b!1, c!1, Pa!1, Pb!1)`seq(1 + n) *
                                                                                                         f!1((concat_arrays.o(xisa!1, xisb!1))(n))
                                                                                                         -
                                                                                                         UUPart(a!1, b!1, c!1, Pa!1, Pb!1)`seq(n) *
                                                                                                          f!1((concat_arrays.o(xisa!1, xisb!1))(n)))"
                  "length(Pa!1) - 1" "length(Pb!1) - 2" "0")
                 (("1"
                   (assert)
                   (hide 2)
                   (skosimp*)
                   (expand "UUPart")
                   (assert)
                   (expand "o ")
                   (lift-if)
                   (ground))
                  ("2" (hide 2) (skosimp*) (assert) (ground))
                  ("3" (hide 2) (lemma "connected_domain") (skosimp*))))
                ("2"
                 (hide 2)
                 (lemma
                  "sigma_diff_eq[length(Pa!1) + length(Pb!1) - 2
                                                                                           ,length(Pa!1) - 1]")
                 (lemma "connected_domain")
                 (lemma
                  "sigma_diff_eq[length(Pa!1) + length(Pb!1) - 2
                                                                                                           ,length(Pa!1) - 1]")
                 (inst?)
                 (("1"
                   (assert)
                   (hide 2)
                   (skosimp*)
                   (expand "UUPart")
                   (assert)
                   (expand "o ")
                   (propax))
                  ("2" (hide 2) (skosimp*) (assert) (ground))
                  ("3" (hide 2) (skosimp*))))
                ("3" (hide 2) (skosimp*) (assert))
                ("4" (hide 2) (lemma "connected_domain") (skosimp*))))
              ("2" (hide 2) (lemma "connected_domain") (propax))
              ("3" (assert) (hide 2) (skosimp*) (ground))
              ("4" (hide 2) (lemma "connected_domain") (skosimp*))))
            ("2" (hide 2) (skosimp*) (expand "UUPart") (propax))
            ("3" (hide 2) (skosimp*) (assert))
            ("4" (hide 2) (skosimp*) (assert))))
          ("2" (expand "UUPart") (propax))
          ("3" (lemma "connected_domain") (propax))))
        ("2" (hide 2) (assert) (assert))
        ("3" (lemma "connected_domain") (propax))))))
    ("2"
     (split +)
     (("1" (skosimp*) (expand "UUPart") (propax))
      ("2" (skosimp*) (expand "o") (assert) (lift-if) (ground))
      ("3"
       (skosimp*)
       (typepred "ii!1")
       (expand "UUPart")
       (expand "o")
       (case-replace "ii!1 < length(Pa!1) - 1")
       (("1" (inst -4 "ii!1") (assert))
        ("2"
         (assert)
         (inst -2 "1 - length(Pa!1) + ii!1")
         (assert)
         (flatten)
         (lift-if)
         (ground))))))
    ("3" (lemma "connected_domain") (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: FIX
script:
  (""
   (skosimp*)
   (assert)
   (case "(EXISTS (jj: below(length(P!1))): seq(P!1)(jj) = b!1)")
   (("1" (skosimp*) (inst + "P!1") (assert) (inst?))
    ("2"
     (name "ab"
           "min_nat.min({ii: below(length(P!1)) | seq(P!1)(ii) > b!1})")
     (("1"
       (inst 2
        "               LET N = length(P!1)+1 IN
                                   (# length := N,
                                       seq :=  (LAMBDA (ii: below(N)):
                                                IF ii < ab THEN P!1`seq(ii)
                                                ELSIF ii = ab THEN b!1
                                                ELSE P!1`seq(ii-1)
                                                ENDIF)
                                   #)")
       (("1"
         (split +)
         (("1"
           (hide 2)
           (expand "step_function_on?")
           (skosimp*)
           (case "ii!1 < ab")
           (("1"
             (assert)
             (inst - "ii!1")
             (skosimp*)
             (inst + "fv!1")
             (skosimp*)
             (inst?)
             (assert)
             (typepred "x!1")
             (assert)
             (lift-if)
             (ground))
            ("2"
             (case "ii!1 = ab")
             (("1"
               (inst -5 "ab-1")
               (("1"
                 (skosimp*)
                 (inst + "fv!1")
                 (skosimp*)
                 (inst - "x!1")
                 (typepred "x!1")
                 (lift-if)
                 (assert)
                 (case "seq(P!1)(ab - 1) < b!1")
                 (("1" (assert))
                  ("2"
                   (hide 2)
                   (typepred "P!1")
                   (inst - "ab-1")
                   (assert)
                   (typepred "ab")
                   (inst -3 "ab-1")
                   (assert))))
                ("2" (assert))))
              ("2"
               (inst - "ii!1-1")
               (("1"
                 (skosimp*)
                 (inst + "fv!1")
                 (skosimp*)
                 (inst - "x!1")
                 (typepred "x!1")
                 (assert))
                ("2" (assert))))))))
          ("2" (inst 1 "ab") (("1" (assert)) ("2" (assert))))))
        ("2"
         (skosimp*)
         (lift-if)
         (lift-if)
         (ground)
         (skosimp*)
         (lift-if)
         (lift-if)
         (ground)
         (("1" (typepred "P!1") (inst - "ii!1"))
          ("2"
           (case-replace "ii!1 = ab - 1")
           (("1"
             (typepred "ab")
             (inst - "ab-1")
             (assert)
             (inst + "ab-1")
             (assert))
            ("2" (assert))))
          ("3"
           (typepred "P!1")
           (inst + "ii!1-1")
           (inst - "ii!1-1")
           (assert))))
        ("3" (typepred "P!1") (skosimp*) (assert))
        ("4" (skosimp*) (assert))))
      ("2"
       (hide 2 3)
       (expand "nonempty?")
       (expand "empty?")
       (expand "member")
       (inst - "length(P!1)-1")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "step_function_integrable?[T]")
   (("1"
     (inst - "a!1" "c!1" "f!1")
     (assert)
     (hide -1)
     (lemma "iss_prep")
     (inst - "a!1" "b!1" "c!1" "f!1")
     (assert)
     (expand "step_function?")
     (skosimp*)
     (inst - "P!1")
     (split -1)
     (("1"
       (skosimp*)
       (hide -7)
       (case-replace "step_function_on?(a!1, b!1, f!1, PP!1^(0,ib!1))")
       (("1"
         (case-replace
          "step_function_on?(b!1, c!1, f!1, PP!1^(ib!1,length(PP!1)-1))")
         (("1"
           (name "LP" "PP!1 ^ (0, ib!1)")
           (replace -1)
           (name "UP" "PP!1 ^ (ib!1, length(PP!1) - 1)")
           (replace -1)
           (case "length(LP) = ib!1+1")
           (("1"
             (case "length(UP) = length(PP!1)-ib!1")
             (("1"
               (lemma "step_function_on_integral[T]")
               (inst - "a!1" "b!1" "f!1")
               (assert)
               (inst - "LP")
               (assert)
               (replace -1)
               (hide -1)
               (lemma "step_function_on_integral[T]")
               (inst - "b!1" "c!1" "f!1")
               (assert)
               (inst - "UP")
               (assert)
               (replace -1)
               (hide -1)
               (hide -1 -2)
               (lemma "step_function_on_integral[T]")
               (inst - "a!1" "c!1" "f!1")
               (assert)
               (inst - "PP!1")
               (assert)
               (replace -1)
               (hide -1)
               (hide -3 -4 -5 -9 -10)
               (lemma "sigma_split[below[length(PP!1)-1]]")
               (("1"
                 (inst?)
                 (("1"
                   (inst - "ib!1 - 1")
                   (assert)
                   (replace -1)
                   (hide -1)
                   (case-replace
                    "sigma[below(length(LP) - 1)].sigma
                                                                                                (0, length(LP) - 2,
                                                                                                 LAMBDA (ii: below(length(LP) - 1)):
                                                                                                   LP`seq(1 + ii) *
                                                                                                    integral_step[T].val_in(a!1, b!1, LP, ii, f!1)
                                                                                                    -
                                                                                                    LP`seq(ii) * integral_step[T].val_in(a!1, b!1, LP, ii, f!1)) = sigma[below[length(PP!1) - 1]].sigma
                                                                                                 (0, ib!1 - 1,
                                                                                                  LAMBDA (ii: below(length(PP!1) - 1)):
                                                                                                    PP!1`seq(1 + ii) *
                                                                                                     integral_step[T].val_in(a!1, c!1, PP!1, ii, f!1)
                                                                                                     -
                                                                                                     PP!1`seq(ii) *
                                                                                                      integral_step[T].val_in(a!1, c!1, PP!1, ii, f!1))")
                   (("1"
                     (assert)
                     (hide -1)
                     (lemma
                      "sigma_diff_shift[length(UP)-1,length(PP!1)-1]")
                     (inst?)
                     (("1"
                       (inst -
                        "(LAMBDA (ii: below(length(PP!1) - 1)):
                                                                                           PP!1`seq(1 + ii) * val_in(a!1, c!1, PP!1, ii, f!1) -
                                                                                            PP!1`seq(ii) * val_in(a!1, c!1, PP!1, ii, f!1))"
                        "ib!1")
                       (("1"
                         (assert)
                         (hide 2)
                         (skosimp*)
                         (replace -2 * rl)
                         (hide -2 -3)
                         (case-replace
                          "val_in(b!1, c!1, PP!1 ^ (ib!1, length(PP!1) - 1), i!1, f!1) = val_in(a!1, c!1, PP!1, i!1 + ib!1, f!1)")
                         (("1" (assert) (hide -1) (expand "^") (propax))
                          ("2"
                           (hide 2)
                           (expand "val_in")
                           (name-replace "P1"
                            "pick(b!1, c!1, PP!1 ^ (ib!1, length(PP!1) - 1), i!1)")
                           (typepred "P1")
                           (name-replace "P2"
                            "pick(a!1, c!1, PP!1, i!1 + ib!1)")
                           (typepred "P2")
                           (reveal -13)
                           (expand "step_function_on?")
                           (expand "^")
                           (expand "min")
                           (inst - "i!1+ib!1")
                           (("1"
                             (skosimp*)
                             (inst-cp - "P1")
                             (("1" (inst - "P2") (assert))
                              ("2" (assert))))
                            ("2" (assert))))))
                        ("2"
                         (assert)
                         (hide 2)
                         (lemma "connected_domain")
                         (assert))))
                      ("2"
                       (hide 2)
                       (assert)
                       (skosimp*)
                       (assert)
                       (lemma "connected_domain")
                       (propax))
                      ("3"
                       (skosimp*)
                       (hide 2)
                       (split +)
                       (("1"
                         (skosimp*)
                         (assert)
                         (typepred "x1!1")
                         (replace -2 * rl)
                         (hide -2 -3)
                         (grind)
                         (lemma "parts_order[T]")
                         (inst - "a!1" "c!1" "PP!1" "ib!1" "x1!1+ib!1")
                         (assert))
                        ("2" (replace -1 * rl) (hide -1 -2) (grind))
                        ("3" (replace -1 * rl) (hide -1 -2) (grind))
                        ("4"
                         (skosimp*)
                         (replace -1 * rl)
                         (hide -1 -2)
                         (grind)
                         (typepred "PP!1")
                         (inst - "ib!1+ii!2")
                         (assert))))))
                    ("2"
                     (lemma
                      "sigma_diff_eq[length(LP) - 1,length(PP!1) - 1]")
                     (inst?)
                     (("1"
                       (assert)
                       (hide 2)
                       (skosimp*)
                       (hide -2)
                       (replace -2 * rl)
                       (hide -2)
                       (case-replace
                        "integral_step[T].val_in(a!1, b!1, PP!1 ^ (0, ib!1), i!1, f!1) = integral_step[T].val_in(a!1, c!1, PP!1, i!1, f!1)")
                       (("1" (hide -1) (expand "^") (propax))
                        ("2"
                         (hide 2)
                         (expand "val_in")
                         (reveal -9)
                         (expand "step_function_on?")
                         (inst - "i!1")
                         (skosimp*)
                         (name-replace "P1"
                          "pick(a!1, b!1, PP!1 ^ (0, ib!1), i!1)")
                         (typepred "P1")
                         (name-replace "P2" "pick(a!1, c!1, PP!1, i!1)")
                         (typepred "P2")
                         (inst-cp - "P1")
                         (("1" (inst - "P2") (assert)) ("2" (grind))))))
                      ("2"
                       (skosimp*)
                       (lemma "connected_domain")
                       (propax))
                      ("3"
                       (skosimp*)
                       (lemma "connected_domain")
                       (propax))
                      ("4"
                       (hide 2 3)
                       (skosimp*)
                       (split +)
                       (("1"
                         (skosimp*)
                         (replace -2 * rl)
                         (typepred "x1!1")
                         (grind)
                         (lemma "parts_order[T]")
                         (inst - "a!1" "c!1" "PP!1" "x1!1" "ib!1")
                         (assert))
                        ("2" (replace -2 * rl) (hide -1 -2) (grind))
                        ("3" (replace -2 * rl) (hide -1 -2) (grind))
                        ("4"
                         (skosimp*)
                         (replace -2 * rl)
                         (hide -1 -2)
                         (grind)
                         (typepred "PP!1")
                         (inst - "ii!2"))))))
                    ("3" (lemma "connected_domain") (skosimp*))
                    ("4" (hide 2) (skosimp*) (assert))
                    ("5" (lemma "connected_domain") (skosimp*))
                    ("6"
                     (hide 2)
                     (skosimp*)
                     (prop)
                     (("1"
                       (skosimp*)
                       (typepred "x1!1")
                       (replace -3 * rl)
                       (assert)
                       (hide -2 -3)
                       (lemma "parts_order[T]")
                       (inst - "a!1" "c!1" "PP!1" "x1!1" "ib!1")
                       (grind))
                      ("2"
                       (assert)
                       (replace -2 * rl)
                       (assert)
                       (expand "^")
                       (assert))
                      ("3"
                       (replace -2 * rl)
                       (expand "^")
                       (assert)
                       (expand "min")
                       (propax))
                      ("4"
                       (skosimp*)
                       (assert)
                       (replace -2 * rl)
                       (expand "^")
                       (assert)
                       (typepred "PP!1")
                       (inst - "ii!2"))))))
                  ("2" (skosimp*) (lemma "connected_domain") (propax))))
                ("2" (skosimp*) (assert))))
              ("2" (hide -1 -3 -4 -5 -6 -9 -10 -11 2) (grind))))
            ("2" (hide -1 -3 -4 -5 -9 -10 2) (grind))))
          ("2"
           (hide -1 2 -6 -7)
           (expand "step_function_on?")
           (skosimp*)
           (typepred "ii!1")
           (inst - "ii!1+ib!1")
           (("1"
             (skosimp*)
             (inst + "fv!1")
             (skosimp*)
             (inst - "x!1")
             (typepred "x!1")
             (grind))
            ("2" (grind))))
          ("3"
           (hide 2)
           (hide -1 -2 -6 -7)
           (prop)
           (("1"
             (skosimp*)
             (typepred "x1!1")
             (grind)
             (lemma "parts_order[T]")
             (inst - "a!1" "c!1" "PP!1" "ib!1" "ib!1+x1!1")
             (assert))
            ("2" (grind)) ("3" (grind)) ("4" (grind))
            ("5"
             (skosimp*)
             (typepred "ii!1")
             (grind)
             (lemma "parts_order[T]")
             (inst - "a!1" "c!1" "PP!1" "ib!1+ii!1" "ib!1+ii!1+1")
             (assert))))))
        ("2"
         (hide 2)
         (expand "step_function_on?")
         (skosimp*)
         (inst - "ii!1")
         (("1"
           (skosimp*)
           (inst + "fv!1")
           (skosimp*)
           (inst - "x!1")
           (hide -4 -5)
           (typepred "x!1")
           (typepred "ii!1")
           (grind))
          ("2" (hide 2) (typepred "ii!1") (grind))))
        ("3"
         (hide -1 -5 -6 2)
         (prop)
         (("1"
           (skosimp*)
           (typepred "x1!1")
           (grind)
           (lemma "parts_order[T]")
           (inst - "a!1" "c!1" "PP!1" "x1!1" "ib!1")
           (assert))
          ("2" (grind)) ("3" (grind)) ("4" (grind))
          ("5"
           (skosimp*)
           (typepred "ii!1")
           (grind)
           (lemma "parts_order[T]")
           (inst - "a!1" "c!1" "PP!1" "ii!1" "ii!1+1")
           (assert))))))
      ("2" (propax))))
    ("2" (lemma "connected_domain") (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (";;; Proof integrable_split-12 for formula integral_split.integrable_split"
   ";;; developed with shostak decision procedures"
   (stop-rewrite "abs_0")
   (skosimp*)
   (lemma "steps_exist[T]")
   (("1"
     (inst - "a!1" "b!1" "f!1")
     (assert)
     (lemma "steps_exist[T]")
     (inst - "b!1" "c!1" "f!1")
     (assert)
     (lemma "step_to_integrable[T]")
     (inst - "a!1" "c!1" "f!1")
     (assert)
     (skosimp*)
     (inst - "eps!1/2")
     (inst - "eps!1/2")
     (skosimp*)
     (name "FF1"
           "(LAMBDA (x: T): IF x < a!1 OR x > c!1 THEN 0
                                                                       ELSIF x <= b!1 THEN f1!2(x)
                                                                       ELSE f1!1(x) ENDIF)")
     (name "FF2"
           "(LAMBDA (x: T): IF x < a!1 OR x > c!1 THEN 0
                                                                        ELSIF x <= b!1 THEN f2!2(x)
                                                                        ELSE f2!1(x) ENDIF)")
     (inst + "FF1" "FF2")
     (case "step_function?(a!1, c!1, FF1)")
     (("1"
       (case "step_function?(a!1, c!1, FF2)")
       (("1"
         (assert)
         (prop)
         (("1"
           (skosimp*)
           (replace -3 * rl)
           (hide -3)
           (replace -3 * rl)
           (hide -3)
           (assert)
           (hide -1 -2)
           (lift-if)
           (ground)
           (("1" (inst -9 "xx!1") (assert))
            ("2" (inst -9 "xx!1") (assert))
            ("3" (inst -3 "xx!1") (assert))
            ("4" (inst -3 "xx!1") (assert))))
          ("2"
           (hide 2)
           (lemma "diff_step_is_step[T]")
           (inst?)
           (inst -1 "FF1")
           (assert)
           (lemma "step_function_integrable?[T]")
           (inst?)
           (assert))
          ("3"
           (hide 2)
           (lemma "integrable_split_step")
           (inst - "a!1" "b!1" "c!1" "FF2 - FF1")
           (assert)
           (case "step_function?(a!1, c!1, FF2 - FF1)")
           (("1"
             (assert)
             (case "integrable?(a!1, b!1, FF2 - FF1) AND integral(a!1, b!1, FF2 - FF1) = integral(a!1, b!1, f2!2 - f1!2)")
             (("1"
               (flatten)
               (assert)
               (case "integrable?(b!1, c!1, FF2 - FF1) AND integral(b!1, c!1, FF2 - FF1) = integral(b!1, c!1, f2!1 - f1!1)")
               (("1" (flatten) (assert))
                ("2"
                 (hide 2)
                 (replace -7 * rl)
                 (hide -7)
                 (replace -7 * rl)
                 (hide -7)
                 (hide -1 -2 -3 -4 -5 -6 -7 -8)
                 (lemma "integral_restr_eq[T]")
                 (inst?)
                 (assert)
                 (split -1)
                 (("1" (propax))
                  ("2"
                   (assert)
                   (hide 2)
                   (skosimp*)
                   (expand "-")
                   (assert))))
                ("3"
                 (flatten)
                 (skosimp*)
                 (lemma "connected_domain")
                 (expand "connected?")
                 (inst?)
                 (inst?)
                 (assert))))
              ("2"
               (hide 2)
               (hide -1 -2 -3 -4 -7 -8 -9 -10 -11 -12 -13 -14)
               (lemma "integral_restrict_eq[T]")
               (inst?)
               (assert)
               (split -1)
               (("1" (propax))
                ("2"
                 (hide 2)
                 (skosimp*)
                 (replace -3 * rl)
                 (hide -3)
                 (replace -3 * rl)
                 (hide -3)
                 (expand "-")
                 (assert))))
              ("3"
               (flatten)
               (lemma "connected_domain")
               (expand "connected?")
               (propax))))
            ("2" (inst?) (hide 2) (rewrite "diff_step_is_step[T]"))))))
        ("2"
         (hide 2 3)
         (hide -1)
         (replace -1 * rl)
         (hide -1)
         (hide -1)
         (hide-all-but (-1 -2 -6 -7 1))
         (hide -1 -3)
         (rewrite "split_step_is_step[T]"))))
      ("2"
       (hide 2 3)
       (hide -1)
       (replace -1 * rl)
       (hide -1)
       (hide-all-but (-1 -2 -6 -7 1))
       (hide -2 -4)
       (rewrite "split_step_is_step[T]"))))
    ("2"
     (skosimp*)
     (lemma "connected_domain")
     (expand "connected?")
     (inst?)
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "integrable_split")
   (inst - "a!1" "b!1" "c!1" "f!1")
   (assert)
   (typepred "integral(a!1, b!1, f!1)")
   (("1"
     (typepred "integral(b!1, c!1, f!1)")
     (hide -6 -7)
     (expand "integrable?")
     (skosimp*)
     (lemma "integral_def[T]")
     (inst -1 "a!1" "c!1" "f!1" "S!1")
     (assert)
     (replace -1 * rl)
     (expand "integral?")
     (lemma "epsilon_is_0[T]")
     (inst -
      "integral(a!1, b!1, f!1) + integral(b!1, c!1, f!1) -
                                     integral(a!1, c!1, f!1)")
     (("1"
       (assert)
       (hide 2)
       (skosimp*)
       (inst - "eps!1/3")
       (skosimp*)
       (inst -3 "eps!1/3")
       (inst -4 "eps!1/3")
       (skosimp*)
       (name "DEL" "min(delta!1, min(delta!2, delta!3))")
       (lemma "partition_exists[T]")
       (inst - "a!1" "b!1" "DEL")
       (lemma "partition_exists[T]")
       (inst - "b!1 " c!1 "DEL")
       (assert)
       (skosimp*)
       (inst -5 "P!1")
       (inst -6 "P!2")
       (assert)
       (lemma "partition_join")
       (inst - "a!1" "b!1" "c!1" "DEL" "f!1")
       (assert)
       (inst - "P!2" "gen_xis(a!1,b!1,P!2)" "P!1" "gen_xis(b!1,c!1,P!1)")
       (("1"
         (assert)
         (skosimp*)
         (inst -9 "PP!1")
         (assert)
         (name "Sab"
               "Rie_sum(a!1, b!1, P!2, gen_xis(a!1, b!1, P!2), f!1)")
         (replace -1)
         (name "Sbc"
               "Rie_sum(b!1, c!1, P!1, gen_xis(b!1, c!1, P!1), f!1)")
         (replace -1)
         (inst -10 "Sab")
         (("1"
           (inst -9 "Sbc")
           (("1"
             (inst -11 "Rie_sum(a!1, c!1, PP!1, xisp!1, f!1)")
             (("1"
               (replace -4)
               (hide -4)
               (hide -1 -2)
               (case "abs(integral(a!1, b!1, f!1) + integral(b!1, c!1, f!1) -
                                                                                                                                                                                                         integral(a!1, c!1, f!1)) <=
                                                                                                                                                                                                         abs(integral(a!1, b!1, f!1) - Sab) +
                                                                                                                                                                                                         abs(integral(b!1, c!1, f!1) - Sbc) +
                                                                                                                                                                                                         abs(Sab + Sbc - integral(a!1, c!1, f!1))")
               (("1"
                 (case "abs(Sab + Sbc - integral(a!1, c!1, f!1)) =
                                                                                                                                                                                                                           abs(integral(a!1, c!1, f!1) - Sab - Sbc)")
                 (("1" (assert))
                  ("2"
                   (hide-all-but 1)
                   (lemma "abs_neg")
                   (inst?)
                   (("1" (assert))
                    ("2"
                     (hide 2)
                     (skosimp*)
                     (lemma "connected_domain")
                     (inst?)
                     (inst?)
                     (assert))))))
                ("2"
                 (hide 2)
                 (hide-all-but 1)
                 (name-replace "Iab" "integral(a!1, b!1, f!1)")
                 (name-replace "Ibc" "integral(b!1, c!1, f!1)")
                 (name-replace "Iac" "integral(a!1, c!1, f!1)")
                 (grind))))
              ("2"
               (hide-all-but 1)
               (lemma "Riemann?_Rie[T]")
               (inst - "a!1" "c!1" "f!1")
               (assert)
               (inst?))
              ("3"
               (hide 2)
               (skosimp*)
               (lemma "connected_domain")
               (inst?)
               (inst?)
               (assert))))
            ("2"
             (replace -1 * rl)
             (hide-all-but 1)
             (lemma "Riemann?_Rie[T]")
             (inst - "b!1" "c!1" "f!1")
             (assert)
             (inst?)
             (hide 2)
             (skosimp*)
             (lemma "connected_domain")
             (inst?)
             (inst?)
             (assert))))
          ("2"
           (replace -2 * rl)
           (hide-all-but 1)
           (lemma "Riemann?_Rie[T]")
           (inst - "a!1" "b!1" "f!1")
           (assert)
           (inst?)
           (hide 2)
           (skosimp*)
           (lemma "connected_domain")
           (inst?)
           (inst?)
           (assert))))
        ("2"
         (hide-all-but (-1 -7 1))
         (hide -2)
         (ground)
         (hide-all-but 1)
         (skosimp*)
         (lemma "connected_domain")
         (inst?)
         (inst?)
         (assert))))
      ("2"
       (hide-all-but 1)
       (skosimp*)
       (lemma "connected_domain")
       (inst?)
       (inst?)
       (assert))))
    ("2"
     (hide-all-but 1)
     (skosimp*)
     (lemma "connected_domain")
     (inst?)
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "steps_exist[T]")
   (("1"
     (inst?)
     (assert)
     (lemma "step_to_integrable[T]")
     (inst - "a!1" "b!1" "f!1")
     (assert)
     (lemma "step_to_integrable[T]")
     (inst - "b!1" "c!1" "f!1")
     (assert)
     (case "(FORALL (x, y: T), (z: real): x <= z AND z <= y IMPLIES T_pred(z))")
     (("1"
       (case "(FORALL (eps: posreal):
                                                                                                 EXISTS (f1, f2: [T -> real]):
                                                                                                        step_function?(a!1, b!1, f1)
                                                                                                    AND step_function?(a!1, b!1, f2)
                                                                                                    AND (FORALL (xx: closed_interval[T](a!1, b!1)):
                                                                                                          f1(xx) <= f!1(xx) AND f!1(xx) <= f2(xx))
                                                                                                    AND integrable?(a!1, b!1, f2 - f1)
                                                                                                    AND integral(a!1, b!1, f2 - f1) < eps
                                                                                                    AND    step_function?(b!1, c!1, f1)
                                                                                                    AND step_function?(b!1, c!1, f2)
                                                                                                    AND (FORALL (xx: closed_interval[T](b!1, c!1)):
                                                                                                          f1(xx) <= f!1(xx) AND f!1(xx) <= f2(xx))
                                                                                                    AND integrable?(b!1, c!1, f2 - f1)
                                                                                                    AND integral(b!1, c!1, f2 - f1) < eps)")
       (("1"
         (hide -2)
         (split -2)
         (("1"
           (assert)
           (split -3)
           (("1" (propax))
            ("2"
             (hide 2)
             (skosimp*)
             (hide -3)
             (inst - "eps!1")
             (skosimp*)
             (inst + "f1!1" "f2!1")
             (assert))))
          ("2"
           (skosimp*)
           (hide -2 -3)
           (inst - "eps!1")
           (skosimp*)
           (inst + "f1!1" "f2!1")
           (assert))))
        ("2"
         (skosimp*)
         (hide -1 -2)
         (inst - "eps!1")
         (skosimp*)
         (inst + "f1!1" "f2!1")
         (lemma "step_function_subrng[T]")
         (inst -1 "a!1" "a!1" "b!1" "c!1" "f1!1")
         (assert)
         (lemma "step_function_subrng[T]")
         (inst -1 "a!1" "a!1" "b!1" "c!1" "f2!1")
         (assert)
         (lemma "step_function_subrng[T]")
         (inst -1 "a!1" "b!1" "c!1" "c!1" "f1!1")
         (assert)
         (lemma "step_function_subrng[T]")
         (inst -1 "a!1" "b!1" "c!1" "c!1" "f2!1")
         (assert)
         (hide 2)
         (case "step_function?(a!1, c!1, f2!1 - f1!1)")
         (("1"
           (case "integrable?(a!1, b!1, f2!1 - f1!1)")
           (("1"
             (case "integrable?(b!1, c!1, f2!1 - f1!1)")
             (("1"
               (assert)
               (lemma "integrable_split_step")
               (inst - "a!1" "b!1" "c!1" "f2!1 - f1!1")
               (assert)
               (assert)
               (case "integral(a!1, b!1, f2!1 - f1!1) >= 0")
               (("1"
                 (case "integral(b!1, c!1, f2!1 - f1!1) >= 0")
                 (("1"
                   (assert)
                   (split +)
                   (("1" (skosimp*) (inst?))
                    ("2" (assert) (skosimp*) (inst?))))
                  ("2"
                   (assert)
                   (hide 2)
                   (lemma "integral_ge_0[T]")
                   (inst?)
                   (assert)
                   (skosimp*)
                   (expand "-")
                   (inst?)
                   (assert)
                   (flatten)
                   (assert))))
                ("2"
                 (hide 2)
                 (lemma "integral_ge_0[T]")
                 (inst?)
                 (assert)
                 (skosimp*)
                 (inst?)
                 (flatten)
                 (assert)
                 (expand "-")
                 (assert))))
              ("2"
               (hide 2)
               (lemma "step_function_integrable?[T]")
               (inst?)
               (assert)
               (hide-all-but (-2 1))
               (lemma "step_function_subrng[T]")
               (inst -1 "a!1" "b!1" "c!1" "c!1" "f2!1-f1!1")
               (assert))))
            ("2"
             (hide 2)
             (lemma "step_function_integrable?[T]")
             (inst?)
             (assert)
             (hide-all-but (-1 1))
             (lemma "step_function_subrng[T]")
             (inst -1 "a!1" "a!1" "b!1" "c!1" "f2!1-f1!1")
             (assert))))
          ("2"
           (hide 2)
           (lemma "diff_step_is_step[T]")
           (hide -2 -3 -4 -5 -6)
           (inst?)
           (assert))))
        ("3" (skosimp*) (lemma "connected_domain") (propax))
        ("4" (assert) (skosimp*) (lemma "connected_domain") (propax))
        ("5" (skosimp*) (lemma "connected_domain") (propax))
        ("6" (skosimp*) (lemma "connected_domain") (propax))
        ("7" (skosimp*) (lemma "connected_domain") (propax))
        ("8" (skosimp*) (lemma "connected_domain") (propax))
        ("9" (skosimp*) (lemma "connected_domain") (propax))))
      ("2" (lemma "connected_domain") (expand "connected?") (propax))))
    ("2" (lemma "connected_domain") (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (case-replace "a!1 = x!1")
   (("1"
     (case-replace "b!1 = y!1")
     (lemma "integrable?_split")
     (inst - "a!1" "y!1" "b!1" "f!1")
     (assert))
    ("2"
     (case-replace "b!1 = y!1")
     (("1"
       (lemma "integrable?_split")
       (inst - "a!1" "x!1" "y!1" "f!1")
       (assert))
      ("2"
       (lemma "integrable?_split")
       (inst - "a!1" "x!1" "b!1" "f!1")
       (assert)
       (flatten)
       (lemma "integrable?_split")
       (inst - "a!1" "y!1" "b!1" "f!1")
       (assert)
       (flatten)
       (lemma "integrable?_split")
       (inst - "a!1" "x!1" "y!1" "f!1")
       (assert))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: interval_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (a: T, b: {x: T | a < x}, f: fun_cont_on(a, b)):
                                             continuous?[J[a, b]](restrict[T, J[a, b], real](f))")
   (("1"
     (inst +
      "(LAMBDA (a: T, b: {x: T | a < x}, f: fun_cont_on(a, b)):  min_pt[a,b](restrict[T,J[a,b],real](f)))")
     (("1"
       (skosimp*)
       (prop)
       (("1"
         (name "mp"
               "min_pt[a!1, b!1](restrict[T, J[a!1, b!1], real](f!1))")
         (("1"
           (replace -1)
           (typepred "mp")
           (lemma "connected_domain")
           (expand "connected?")
           (inst?)
           (inst -1 "b!1")
           (assert))
          ("2"
           (hide-all-but 1)
           (skosimp*)
           (assert)
           (typepred "x!1")
           (lemma "connected_domain")
           (expand "connected?")
           (inst?)
           (inst?)
           (assert))))
        ("2" (assert)) ("3" (assert))
        ("4"
         (skosimp*)
         (assert)
         (typepred
          "min_pt[a!1, b!1](restrict[T, J[a!1, b!1], real](f!1))")
         (("1"
           (expand "is_minimum?")
           (inst - "x!1")
           (expand "restrict")
           (propax))
          ("2"
           (hide 2)
           (hide -3)
           (skosimp*)
           (lemma "connected_domain")
           (expand "connected?")
           (inst - "a!1" "b!1" "x!2")
           (assert))))))
      ("2"
       (skosimp*)
       (typepred "x!1")
       (lemma "connected_domain")
       (expand "connected?")
       (inst?)
       (inst -1 "b!1")
       (assert))))
    ("2"
     (hide 2)
     (skosimp*)
     (typepred "f!1")
     (expand "continuous?" 1)
     (skosimp*)
     (inst?)
     (("1"
       (assert)
       (expand "restrict")
       (expand "continuous?")
       (skosimp*)
       (inst - "epsilon!1")
       (skosimp*)
       (inst + "delta!1")
       (skosimp*)
       (inst?)
       (assert))
      ("2"
       (hide-all-but 1)
       (lemma "connected_domain")
       (expand "connected?")
       (inst?)
       (assert)
       (typepred "x0!1")
       (inst - a!1 b!1)
       (assert))))
    ("3"
     (hide 2)
     (skosimp*)
     (typepred "x!1")
     (lemma "connected_domain")
     (expand "connected?")
     (inst?)
     (inst -1 "b!1")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: interval_minmax
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (a: T, b: {x: T | a < x}, f: fun_cont_on(a, b)):        continuous?[J[a, b]](restrict[T, J[a, b], real](f))")
   (("1"
     (inst +
      "(LAMBDA (a: T, b: {x: T | a < x}, f: fun_cont_on(a, b)):  max_pt[a,b](restrict[T,J[a,b],real](f)))")
     (("1"
       (skosimp*)
       (prop)
       (("1"
         (name "mp"
               "max_pt[a!1, b!1](restrict[T, J[a!1, b!1], real](f!1))")
         (("1"
           (replace -1)
           (typepred "mp")
           (lemma "connected_domain")
           (expand "connected?")
           (inst?)
           (inst -1 "b!1")
           (assert))
          ("2"
           (hide 2)
           (hide-all-but 1)
           (skosimp*)
           (typepred "x!1")
           (lemma "connected_domain")
           (expand "connected?")
           (inst?)
           (inst?)
           (assert))))
        ("2" (assert)) ("3" (assert))
        ("4"
         (skosimp*)
         (assert)
         (typepred
          "max_pt[a!1, b!1](restrict[T, J[a!1, b!1], real](f!1))")
         (("1"
           (expand "is_maximum?")
           (inst - "x!1")
           (expand "restrict")
           (assert))
          ("2"
           (hide 2)
           (hide -3)
           (lemma "connected_domain")
           (expand "connected?")
           (assert)
           (skosimp*)
           (inst - "a!1" "b!1" "x!2")
           (assert))))))
      ("2"
       (skosimp*)
       (typepred "x!1")
       (lemma "connected_domain")
       (expand "connected?")
       (inst?)
       (inst -1 "b!1")
       (assert))))
    ("2"
     (hide 2)
     (skosimp*)
     (typepred "f!1")
     (expand "continuous?" 1)
     (skosimp*)
     (inst?)
     (("1"
       (assert)
       (expand "restrict")
       (expand "continuous?")
       (skosimp*)
       (inst - "epsilon!1")
       (skosimp*)
       (inst + "delta!1")
       (skosimp*)
       (inst?)
       (assert))
      ("2"
       (hide-all-but 1)
       (lemma "connected_domain")
       (expand "connected?")
       (inst?)
       (inst - a!1 b!1)
       (assert))))
    ("3"
     (hide 2)
     (skosimp*)
     (typepred "x!1")
     (lemma "connected_domain")
     (expand "connected?")
     (inst?)
     (inst -1 "b!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_cont_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "adh")
   (skosimp*)
   (expand "fullset")
   (case "x!1+e!1/2 <= b!1")
   (("1"
     (inst + "x!1+e!1/2")
     (("1" (expand "abs") (assert))
      ("2"
       (assert)
       (lemma "connected_domain")
       (expand "connected?")
       (inst -1 "a!1" "b!1" "e!1/2 + x!1")
       (assert))))
    ("2" (inst + "b!1") (("1" (expand "abs") (ground)) ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_cont_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "x!1")
   (expand "continuous?")
   (skosimp*)
   (inst - "epsilon!1")
   (skosimp*)
   (inst + "delta!1")
   (skosimp*)
   (expand "restrict")
   (inst - "x!2")
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_cont_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "continuous?")
   (skosimp*)
   (expand "restrict")
   (inst?)
   (("1"
     (assert)
     (rewrite "continuity_def")
     (rewrite "continuity_def")
     (expand "convergence")
     (expand "convergence")
     (prop)
     (("1"
       (hide -2)
       (assert)
       (expand "adh")
       (skosimp*)
       (inst -1 "e!1")
       (skosimp*)
       (typepred "x0!1")
       (typepred "x!1")
       (case "x0!1 = seq(P!1)(ii!1)")
       (("1"
         (case "e!1 <= seq(P!1)(1 + ii!1) - x0!1")
         (("1"
           (inst + "x0!1+e!1/2")
           (("1" (assert) (expand "fullset") (expand "abs" 1) (assert))
            ("2"
             (assert)
             (lemma "connected_domain")
             (expand "connected?")
             (inst -1 "x0!1" "seq(P!1)(1 + ii!1)" "(e!1 / 2 + x0!1)")
             (assert))))
          ("2"
           (inst + "(seq(P!1)(1 + ii!1) + x0!1)/2")
           (("1" (expand "fullset") (expand "abs" 2) (assert))
            ("2"
             (lemma "connected_domain")
             (expand "connected?")
             (inst -1 "x0!1" "seq(P!1)(1 + ii!1)"
              "(seq(P!1)(1 + ii!1) + x0!1) / 2")
             (assert))))))
        ("2"
         (case "e!1 <= x0!1 - seq(P!1)(ii!1)")
         (("1"
           (inst + "x0!1 - e!1/2")
           (("1" (expand "fullset") (expand "abs" 2) (assert))
            ("2"
             (assert)
             (lemma "connected_domain")
             (expand "connected?")
             (inst -1 "seq(P!1)(ii!1)" "x0!1" "(x0!1 - e!1 / 2)")
             (assert))))
          ("2"
           (inst + "(x0!1 + seq(P!1)(ii!1))/2")
           (("1" (expand "fullset") (expand "abs") (lift-if) (ground))
            ("2"
             (lemma "connected_domain")
             (expand "connected?")
             (inst -1 "seq(P!1)(ii!1)" "x0!1"
              "(seq(P!1)(ii!1) + x0!1) / 2")
             (assert))))))))
      ("2"
       (hide -1)
       (skosimp*)
       (inst -1 "epsilon!1")
       (skosimp*)
       (inst + "delta!1")
       (skosimp*)
       (inst?)
       (("1" (assert))
        ("2"
         (typepred "x!1")
         (hide -1 -4 -5 -6 2)
         (typepred "P!1")
         (lemma "parts_order")
         (inst-cp -1 "a!1" "b!1" "P!1" "0" "ii!1")
         (inst -1 "a!1" "b!1" "P!1" "ii!1+1" "length(P!1)-1")
         (assert)
         (split -1)
         (("1" (assert) (split -2) (("1" (assert)) ("2" (assert))))
          ("2"
           (assert)
           (typepred "ii!1")
           (case "ii!1 = length(P!1) - 2")
           (("1" (assert)) ("2" (assert))))))))))
    ("2"
     (assert)
     (hide 2)
     (typepred "x0!1")
     (lemma "parts_order")
     (inst-cp -1 "a!1" "b!1" "P!1" "0" "ii!1")
     (inst -1 "a!1" "b!1" "P!1" "ii!1+1" "length(P!1)-1")
     (assert)
     (split -1)
     (("1" (split -2) (("1" (assert)) ("2" (assert))))
      ("2" (assert) (split -1) (("1" (assert)) ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_cont_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (inst-cp -1 "f!1(x!1)")
   (skosimp*)
   (ground)
   (inst - "f!1(min_x(seq(P!1)(ii!1), seq(P!1)(1 + ii!1), f!1))")
   (("1"
     (skosimp*)
     (ground)
     (("1"
       (case "ii!2 = ii!1")
       (("1" (assert))
        ("2"
         (hide 2 3)
         (lemma "parts_disjoint")
         (inst?)
         (inst?)
         (assert))))
      ("2"
       (hide 2)
       (hide 1)
       (lemma "parts_order")
       (case "ii!1 = ii!2")
       (("1" (assert))
        ("2"
         (case "ii!1 < ii!2")
         (("1" (inst - "a!1" "b!1" "P!1" "ii!1+1" "ii!2") (assert))
          ("2" (inst - "a!1" "b!1" "P!1" "ii!2" "ii!1") (assert))))))
      ("3"
       (hide 1 2)
       (lemma "parts_order")
       (case "ii!1 = ii!2")
       (("1" (assert))
        ("2"
         (case "ii!1 < ii!2")
         (("1" (inst - "a!1" "b!1" "P!1" "ii!1+1" "ii!2+1") (assert))
          ("2" (inst - "a!1" "b!1" "P!1" "ii!2+1" "ii!1") (assert))))))))
    ("2"
     (skosimp*)
     (hide 2)
     (typepred "f!1")
     (lemma "cont_interv")
     (inst -1 "a!1" "b!1" "f!1" "P!1" "seq(P!1)")
     (assert)
     (split -1)
     (("1" (assert) (inst?) (assert) (expand "continuous?" -1) (inst?))
      ("2" (hide 2) (expand "continuous?" 1) (propax))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_cont_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (inst-cp -1 "f!1(x!1)")
   (skosimp*)
   (ground)
   (inst - "f!1(max_x(seq(P!1)(ii!1), seq(P!1)(1 + ii!1), f!1))")
   (("1"
     (skosimp*)
     (ground)
     (("1"
       (case "ii!2 = ii!1")
       (("1" (assert))
        ("2"
         (hide 2 3)
         (lemma "parts_disjoint")
         (inst?)
         (inst?)
         (assert))))
      ("2"
       (hide 2)
       (hide 1)
       (lemma "parts_order")
       (case "ii!1 = ii!2")
       (("1" (assert))
        ("2"
         (case "ii!1 < ii!2")
         (("1" (inst - "a!1" "b!1" "P!1" "ii!1+1" "ii!2") (assert))
          ("2" (inst - "a!1" "b!1" "P!1" "ii!2" "ii!1") (assert))))))
      ("3"
       (hide 1 2)
       (lemma "parts_order")
       (case "ii!1 = ii!2")
       (("1" (assert))
        ("2"
         (case "ii!1 < ii!2")
         (("1" (inst - "a!1" "b!1" "P!1" "ii!1+1" "ii!2+1") (assert))
          ("2" (inst - "a!1" "b!1" "P!1" "ii!2+1" "ii!1") (assert))))))))
    ("2"
     (skosimp*)
     (hide 2)
     (typepred "f!1")
     (lemma "cont_interv")
     (inst -1 "a!1" "b!1" "f!1" "P!1" "seq(P!1)")
     (assert)
     (split -1)
     (("1" (assert) (inst?) (assert) (expand "continuous?" -1) (inst?))
      ("2" (hide 2) (expand "continuous?" 1) (propax))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_cont_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "step_function?")
   (expand "step_function_on?")
   (inst + "PP!1")
   (skosimp*)
   (inst + "f!1(max_x(seq(PP!1)(ii!1), seq(PP!1)(1 + ii!1), f!1))")
   (("1"
     (skosimp*)
     (typepred "fmax(a!1, b!1, PP!1, f!1)")
     (("1" (inst?) (assert)) ("2" (propax))))
    ("2"
     (skosimp*)
     (typepred "f!1")
     (lemma "cont_interv")
     (inst?)
     (inst -1 "PP!1" "seq(PP!1)")
     (assert)
     (split -1)
     (("1" (hide -2) (inst?) (expand "continuous?" -1) (inst?))
      ("2" (hide 2) (expand "continuous?" 1) (propax))))
    ("3" (typepred "PP!1") (inst?))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_cont_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "step_function?")
   (expand "step_function_on?")
   (inst + "PP!1")
   (skosimp*)
   (inst + "f!1(min_x(seq(PP!1)(ii!1), seq(PP!1)(1 + ii!1), f!1))")
   (("1"
     (skosimp*)
     (typepred "fmin(a!1, b!1, PP!1, f!1)")
     (("1" (inst?) (assert)) ("2" (propax))))
    ("2"
     (skosimp*)
     (typepred "f!1")
     (lemma "cont_interv")
     (inst?)
     (inst -1 "PP!1" "seq(PP!1)")
     (assert)
     (split -1)
     (("1" (inst?) (expand "continuous?" -1) (inst?))
      ("2" (hide 2) (expand "continuous?" 1) (propax))))
    ("3" (typepred "PP!1") (inst?))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_cont_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "fmax(a!1, b!1, PP!1, f!1)")
   (("1"
     (typepred "fmin(a!1, b!1, PP!1, f!1)")
     (lemma "part_induction")
     (inst -
      "(LAMBDA (x:T): fmax(a!1, b!1, PP!1, f!1)(x) - fmin(a!1, b!1, PP!1, f!1)(x) >= 0)"
      "a!1" "b!1" "PP!1" "x!1")
     (("1"
       (assert)
       (assert)
       (skosimp*)
       (inst -3 "ii!1")
       (inst -4 "ii!1")
       (inst - "x!1")
       (inst - "x!1")
       (case-replace "seq(PP!1)(ii!1) = x!1")
       (("1" (assert))
        ("2"
         (case-replace "seq(PP!1)(1+ii!1) = x!1")
         (("1" (assert))
          ("2"
           (assert)
           (replace -3)
           (hide -3)
           (replace -3)
           (hide -3)
           (typepred "max_x(seq(PP!1)(ii!1), seq(PP!1)(1 + ii!1), f!1)")
           (("1"
             (hide -1 -2 -3)
             (inst -1 "min_x(seq(PP!1)(ii!1), seq(PP!1)(1 + ii!1), f!1)")
             (("1" (assert))
              ("2"
               (skosimp*)
               (hide-all-but 1)
               (typepred "f!1")
               (inst?)
               (assert)
               (lemma "cont_interv")
               (inst?)
               (inst -1 "PP!1" "seq(PP!1)")
               (split -1)
               (("1"
                 (inst?)
                 (assert)
                 (expand "continuous?" -1)
                 (inst -1 "x!2"))
                ("2"
                 (hide 2)
                 (hide -1)
                 (typepred "f!1")
                 (expand "continuous?" 1)
                 (propax))))))
            ("2"
             (skosimp*)
             (hide-all-but 1)
             (lemma "cont_interv")
             (inst -1 "a!1" "b!1" "f!1" "PP!1" "seq(PP!1)")
             (assert)
             (split -1)
             (("1" (inst?) (assert) (expand "continuous?" -1) (inst?))
              ("2"
               (hide 2)
               (typepred "f!1")
               (expand "continuous?" 1)
               (propax))))))))))
      ("2" (assert) (skosimp*))))
    ("2" (propax))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_cont_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "cont_interv")
   (inst -1 "a!1" "b!1" "f!1" "P!1" "seq(P!1)")
   (assert)
   (split -1)
   (("1" (inst?) (expand "continuous?" -1) (inst?))
    ("2" (hide 2) (expand "continuous?") (typepred "f!1") (propax))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_cont_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "f!1")
   (lemma "cont_interv")
   (inst?)
   (inst?)
   (inst -1 "xx!1")
   (expand "continuous?" -1)
   (split -1)
   (("1" (inst?)) ("2" (propax)) ("3" (propax))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_cont_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst +
    "(LAMBDA  (a: T, b: {x: T | a < x}, P: partition(a, b),                        f: fun_cont_on(a, b)):            (LAMBDA (x:T): choose({ fv: real  |                   FORALL (ii : below(length(P)-1)):                       (seq(P)(ii) < x AND x < seq(P)(ii+1) IMPLIES                                fv = f(min_x(seq(P)(ii),seq(P)(ii+1),f))) AND                             ((seq(P)(ii) = x OR x = seq(P)(ii+1)) IMPLIES                                fv = f(x))})))")
   (("1"
     (skosimp*)
     (typepred
      "choose[real]             ({fv: real |                 FORALL (ii: below(length(P!1) - 1)):                   (seq(P!1)(ii) < x!1 AND x!1 < seq(P!1)(1 + ii) IMPLIES                     fv = f!1(min_x(seq(P!1)(ii), seq(P!1)(1 + ii), f!1)))                    AND                    ((seq(P!1)(ii) = x!1 OR x!1 = seq(P!1)(1 + ii)) IMPLIES                      fv = f!1(x!1))})")
     (("1" (inst?)) ("2" (hide 2) (rewrite "fmin_nonempty"))
      ("3"
       (skosimp*)
       (lemma "cont_interv")
       (inst -1 "a!1" "b!1" "f!1" "P!1" "seq(P!1)")
       (assert)
       (split -1)
       (("1" (inst?) (expand "continuous?" -1) (inst?))
        ("2"
         (hide 2)
         (typepred "f!1")
         (expand "continuous?" 1)
         (propax))))
      ("4" (skosimp*) (assert))))
    ("2" (skosimp*) (rewrite "fmin_nonempty"))
    ("3"
     (skosimp*)
     (lemma "cont_interv")
     (inst -1 "a!1" "b!1" "f!1" "P!1" "seq(P!1)")
     (assert)
     (split -1)
     (("1" (inst?) (expand "continuous?" -1) (inst?))
      ("2" (hide 2) (typepred "f!1") (expand "continuous?" 1) (propax))))
    ("4" (skosimp*) (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_cont_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst +
    "(LAMBDA  (a: T, b: {x: T | a < x}, P: partition(a, b),
                                  f: fun_cont_on(a, b)):
                    (LAMBDA (x:T): choose({ fv: real  |
                            FORALL (ii : below(length(P)-1)):
                                (seq(P)(ii) < x AND x < seq(P)(ii+1) IMPLIES
                                          fv = f(max_x(seq(P)(ii),seq(P)(ii+1),f))) AND
                                       ((seq(P)(ii) = x OR x = seq(P)(ii+1)) IMPLIES
                                          fv = f(x))})))")
   (("1"
     (skosimp*)
     (typepred
      "choose[real]
                               ({fv: real |
                                   FORALL (ii: below(length(P!1) - 1)):
                                     (seq(P!1)(ii) < x!1 AND x!1 < seq(P!1)(1 + ii) IMPLIES
                                       fv = f!1(max_x(seq(P!1)(ii), seq(P!1)(1 + ii), f!1)))
                                      AND
                                      ((seq(P!1)(ii) = x!1 OR x!1 = seq(P!1)(1 + ii)) IMPLIES
                                        fv = f!1(x!1))})")
     (("1" (inst?)) ("2" (hide 2) (rewrite "fmax_nonempty"))
      ("3"
       (skosimp*)
       (hide 2)
       (lemma "cont_interv")
       (inst -1 "a!1" "b!1" "f!1" "P!1" "seq(P!1)")
       (assert)
       (split -1)
       (("1" (inst?) (expand "continuous?" -1) (inst?))
        ("2"
         (hide 2)
         (typepred "f!1")
         (expand "continuous?" 1)
         (propax))))
      ("4" (skosimp*) (assert))))
    ("2" (skosimp*) (rewrite "fmax_nonempty"))
    ("3"
     (skosimp*)
     (lemma "cont_interv")
     (inst -1 "a!1" "b!1" "f!1" "P!1" "seq(P!1)")
     (assert)
     (split -1)
     (("1" (inst?) (expand "continuous?" -1) (inst?))
      ("2" (hide 2) (typepred "f!1") (expand "continuous?" 1) (propax))))
    ("4" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_cont
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "unif_cont_interval[closed_interval(a!1,b!1)]")
   (("1"
     (inst?)
     (("1"
       (inst -1 "f!1")
       (assert)
       (expand "restrict")
       (case "  continuous_on?(LAMBDA (s: closed_interval[T](a!1, b!1)): f!1(s),
                                                                {xx: closed_interval[T](a!1, b!1) | TRUE})")
       (("1"
         (assert)
         (hide -1)
         (rewrite "step_to_integrable")
         (skosimp*)
         (expand "uniformly_continuous?")
         (inst -1 "(eps!1/2)/(b!1-a!1)")
         (("1"
           (skosimp*)
           (name "PP" "eq_partition(a!1,b!1,floor((b!1-a!1)/delta!1)+2)")
           (("1"
             (case "step_function?(a!1, b!1, fmin(a!1, b!1, PP, f!1))")
             (("1"
               (case "step_function?(a!1, b!1, fmax(a!1, b!1, PP, f!1))")
               (("1"
                 (inst + "fmin(a!1,b!1,PP,f!1)" "fmax(a!1,b!1,PP,f!1)")
                 (assert)
                 (case "integrable?(a!1, b!1,                     fmax(a!1, b!1, PP, f!1) - fmin(a!1, b!1, PP, f!1))")
                 (("1"
                   (assert)
                   (case "       integral(a!1, b!1,                fmax(a!1, b!1, PP, f!1) - fmin(a!1, b!1, PP, f!1))        < eps!1")
                   (("1"
                     (assert)
                     (skosimp*)
                     (hide-all-but (-7 1))
                     (split 1)
                     (("1"
                       (typepred "fmin(a!1, b!1, PP, f!1)")
                       (lemma "part_induction")
                       (inst -1
                        "(LAMBDA x: fmin(a!1, b!1, PP, f!1)(x) <= f!1(x))"
                        "a!1" "b!1" "PP" "xx!1")
                       (assert)
                       (assert)
                       (skosimp*)
                       (assert)
                       (inst - "ii!1")
                       (inst - "xx!1")
                       (flatten)
                       (split -4)
                       (("1" (assert))
                        ("2"
                         (flatten)
                         (assert)
                         (replace -3)
                         (hide -3)
                         (assert)
                         (typepred
                          "min_x(seq(PP)(ii!1), seq(PP)(1 + ii!1), f!1)")
                         (hide -1 -2 -3)
                         (inst -1 "xx!1")
                         (assert))))
                      ("2"
                       (typepred "fmax(a!1, b!1, PP, f!1)")
                       (lemma "part_induction")
                       (inst -1
                        "(LAMBDA x: fmax(a!1, b!1, PP, f!1)(x) >= f!1(x))"
                        "a!1" "b!1" "PP" "xx!1")
                       (assert)
                       (assert)
                       (skosimp*)
                       (inst - "ii!1")
                       (inst - "xx!1")
                       (flatten)
                       (split -4)
                       (("1" (assert))
                        ("2"
                         (assert)
                         (flatten)
                         (assert)
                         (replace -3)
                         (hide -3)
                         (typepred
                          "max_x(seq(PP)(ii!1), seq(PP)(1 + ii!1), f!1)")
                         (hide -1 -2 -3)
                         (inst - "xx!1")
                         (assert))))))
                    ("2"
                     (hide 2)
                     (lemma "width_eq_part")
                     (inst?)
                     (assert)
                     (replace -5)
                     (case "width(a!1,b!1,PP) < delta!1")
                     (("1"
                       (hide -2 -6)
                       (lemma "integral_bound_abs")
                       (inst -1 "eps!1/(2*(b!1-a!1))" "a!1" "b!1"
                        "fmax(a!1, b!1, PP, f!1) - fmin(a!1, b!1, PP, f!1)")
                       (name-replace "BMA" "b!1-a!1")
                       (assert)
                       (split -1)
                       (("1"
                         (name "III"
                               "integral(a!1, b!1, fmax(a!1, b!1, PP, f!1) - fmin(a!1, b!1, PP, f!1))")
                         (case "III >= 0")
                         (("1" (replace -2) (expand "abs" -3) (assert))
                          ("2" (assert))))
                        ("2"
                         (hide 2)
                         (skosimp*)
                         (expand "-")
                         (lemma "part_induction")
                         (inst -1
                          "(LAMBDA x: (fmax(a!1, b!1, PP, f!1) - fmin(a!1, b!1, PP, f!1))(x) <=   eps!1 / (2 * BMA))"
                          "a!1" "b!1" "PP" "x!1")
                         (assert)
                         (expand "-")
                         (case "fmax(a!1, b!1, PP, f!1)(x!1) - fmin(a!1, b!1, PP, f!1)(x!1)  >= 0")
                         (("1"
                           (expand "abs" 1)
                           (assert)
                           (assert)
                           (skosimp*)
                           (typepred "fmax(a!1, b!1, PP, f!1)")
                           (typepred "fmin(a!1, b!1, PP, f!1)")
                           (inst -1 "ii!1")
                           (inst -2 "ii!1")
                           (inst -1 "x!1")
                           (inst -2 "x!1")
                           (flatten)
                           (case "(seq(PP)(ii!1) = x!1 OR x!1 = seq(PP)(1 + ii!1))")
                           (("1"
                             (assert)
                             (split -1)
                             (("1"
                               (assert)
                               (hide -2 -4)
                               (replace -2)
                               (replace -3)
                               (assert)
                               (hide-all-but 1)
                               (reveal -21)
                               (mult-by 1 "(2*BMA)")
                               (assert))
                              ("2"
                               (assert)
                               (hide -2 -4)
                               (replace -2)
                               (replace -3)
                               (assert)
                               (hide-all-but 1)
                               (reveal -21)
                               (mult-by 1 "(2*BMA)")
                               (assert))))
                            ("2"
                             (flatten)
                             (assert)
                             (hide -2 -4)
                             (replace -1)
                             (hide -1)
                             (replace -1)
                             (hide -1)
                             (name "MIN_x"
                                   "min_x(seq(PP)(ii!1), seq(PP)(1 + ii!1), f!1)")
                             (replace -1)
                             (name "MAX_x"
                                   "max_x(seq(PP)(ii!1), seq(PP)(1 + ii!1), f!1)")
                             (replace -1)
                             (case "(FORALL (x,y: closed_interval(seq(PP)(ii!1),seq(PP)(ii!1+1))): abs(x-y) <= seq(PP)(1 + ii!1) - seq(PP)(ii!1))")
                             (("1"
                               (case "abs(MAX_x - MIN_x) <= seq(PP)(1+ii!1) - seq(PP)(ii!1)")
                               (("1"
                                 (inst -12 "MAX_x" "MIN_x")
                                 (("1"
                                   (assert)
                                   (lemma "width_lem")
                                   (expand "finseq_appl")
                                   (inst?)
                                   (assert))
                                  ("2" (ground))
                                  ("3" (ground))))
                                ("2"
                                 (assert)
                                 (hide-all-but (-2 -3 -16 1))
                                 (typepred "MAX_x")
                                 (typepred "MIN_x")
                                 (hide -1 -4 -5 -8 -9 -10)
                                 (lemma "in_interval")
                                 (inst?))))
                              ("2"
                               (assert)
                               (hide-all-but 1)
                               (lemma "in_interval")
                               (skosimp*)
                               (inst?))))))
                          ("2" (hide 2) (rewrite "fmax_ge"))))))
                      ("2"
                       (hide -3 -4 -6 -8 2)
                       (replace -1)
                       (hide -1 -2 -3)
                       (name-replace "BMA" "b!1-a!1")
                       (mult-by 1 "(1 + floor(BMA / delta!1))")
                       (("1" (div-by 1 "delta!1") (assert))
                        ("2"
                         (hide 2)
                         (reveal -3)
                         (assert)
                         (case-replace "BMA / delta!1 >= 0")
                         (("1" (assert))
                          ("2"
                           (hide 2)
                           (mult-by 1 "delta!1")
                           (assert)
                           (reveal -4)
                           (assert))))))))))
                  ("2"
                   (hide 2)
                   (lemma "integral_diff")
                   (inst -1 "a!1" "b!1" "fmax(a!1, b!1, PP, f!1)"
                    "fmin(a!1, b!1, PP, f!1)")
                   (assert)
                   (split -1)
                   (("1" (flatten) (assert) (expand "-") (propax))
                    ("2" (hide 2) (rewrite "step_function_integrable?"))
                    ("3"
                     (hide 2)
                     (rewrite "step_function_integrable?"))))))
                ("2" (hide 2) (rewrite "fmax_step"))))
              ("2" (hide 2) (rewrite "fmin_step"))
              ("3"
               (hide 2)
               (skosimp*)
               (hide -1 -2 -3)
               (inst?)
               (lemma "cont_restrict")
               (inst?)
               (assert))))
            ("2"
             (hide 2)
             (assert)
             (case "(b!1 - a!1) / delta!1 > 0")
             (("1" (assert)) ("2" (mult-by 1 "delta!1") (assert))))))
          ("2"
           (hide 2)
           (split +)
           (("1" (mult-by 1 "b!1-a!1") (assert))
            ("2" (mult-by 1 "b!1-a!1") (assert))))))
        ("2"
         (hide -1 2)
         (rewrite "continuous_on_def")
         (skosimp*)
         (inst -2 "y!1")
         (rewrite "continuity_def")
         (expand "convergence")
         (expand "convergence")
         (flatten)
         (expand "extend")
         (expand "adh")
         (split +)
         (("1" (skosimp*) (inst + "y!1") (assert))
          ("2"
           (skosimp*)
           (inst -3 "epsilon!1")
           (skosimp*)
           (inst + "delta!1")
           (skosimp*)
           (assert)
           (inst -4 "x!1")
           (expand "fullset")
           (propax))))))
      ("2" (assert)) ("3" (assert))))
    ("2"
     (expand "not_one_element?")
     (skosimp*)
     (typepred "x!1")
     (inst-cp 1 "a!1")
     (inst-cp 1 "b!1")
     (assert))
    ("3"
     (lemma "connected_domain")
     (expand "connected?")
     (assert)
     (skosimp*)
     (lemma "connected_domain")
     (expand "connected?")
     (inst -1 "a!1" "b!1" "z!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_cont
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "continuous_integrable")
   (inst?)
   (assert)
   (skosimp*)
   (expand "continuous?" -2)
   (inst?))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (case "x < y")
   (("1"
     (lemma "integrable?_inside")
     (inst - "a" "b" "f" "x" "y")
     (assert)
     (expand "Integrable?")
     (assert))
    ("2" (expand "Integrable?") (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite "xis_lem")
   (skosimp*)
   (expand "Integrable?")
   (lemma "integrable_bounded[T]")
   (("1"
     (split -2)
     (("1"
       (inst?)
       (hide -2)
       (replace -1)
       (expand "bounded_on?")
       (inst + "abs(f!1(a!1))")
       (skosimp*)
       (assert)
       (typepred "x!1")
       (expand "min")
       (expand "max")
       (assert))
      ("2"
       (flatten)
       (inst?)
       (assert)
       (expand "min")
       (expand "max")
       (propax))
      ("3"
       (flatten)
       (inst - "b!1" "a!1" "f!1")
       (assert)
       (hide -2)
       (expand "min")
       (expand "max")
       (propax))))
    ("2" (hide 2) (lemma "connected_domain") (propax))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "connected_domain")
   (expand "connected?")
   (inst - "x!1" "y!1" "z!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: fundamental_theorem
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "continuous_Integrable?[T]")
   (("1"
     (inst?)
     (split -1)
     (("1"
       (assert)
       (hide -1)
       (case "FORALL (x): Integrable?[T](a!1, x, f!1)")
       (("1"
         (case "derivable?[T](LAMBDA x: Integral[T](a!1, x, f!1))")
         (("1"
           (case "derivable?[T](LAMBDA x: Integral[T](a!1, x, f!1) - F!1(x))")
           (("1"
             (case "FORALL (xx: T): deriv((LAMBDA x: Integral(a!1, x, f!1) -F!1(x)),xx) = 0")
             (("1"
               (lemma "null_derivative[T]")
               (inst?)
               (("1"
                 (assert)
                 (replace -2)
                 (assert)
                 (hide -2)
                 (case "EXISTS (c:real): (LAMBDA x: Integral(a!1, x, f!1)) = F!1+const_fun(c)")
                 (("1"
                   (skosimp*)
                   (expand "+ ")
                   (case "(LAMBDA x: Integral(a!1, x, f!1))(a!1) =       (LAMBDA (x: T): const_fun(c!1)(x) + F!1(x))(a!1)")
                   (("1"
                     (hide -2)
                     (assert)
                     (expand "Integral" -1)
                     (expand "const_fun")
                     (reveal -1)
                     (case "(LAMBDA x: Integral(a!1, x, f!1))(b!1) =       (LAMBDA (x: T): const_fun(c!1)(x) + F!1(x))(b!1)")
                     (("1"
                       (hide -2)
                       (assert)
                       (expand "const_fun")
                       (assert))
                      ("2" (replace -1) (propax))
                      ("3" (skosimp*) (lemma "not_one_element") (propax))
                      ("4" (lemma "connected_domain") (skosimp*))
                      ("5"
                       (hide-all-but 1)
                       (reveal -5)
                       (skosimp*)
                       (inst?))))
                    ("2" (replace -1) (propax))
                    ("3"
                     (hide-all-but 1)
                     (skosimp*)
                     (assert)
                     (lemma "not_one_element")
                     (propax))
                    ("4" (lemma "connected_domain") (skosimp*))
                    ("5"
                     (hide-all-but 1)
                     (reveal -5)
                     (skosimp*)
                     (inst?))))
                  ("2"
                   (expand "const_fun")
                   (inst + "- F!1(a!1)")
                   (expand "+ ")
                   (apply-extensionality 1 :hide? t)
                   (("1"
                     (expand "constant?")
                     (inst -1 "a!1" "x!1")
                     (assert)
                     (expand "Integral" -1 1)
                     (assert))
                    ("2" (lemma "not_one_element") (propax))
                    ("3" (lemma "connected_domain") (propax))))))
                ("2" (lemma "not_one_element") (propax))
                ("3" (lemma "connected_domain") (propax))))
              ("2"
               (skosimp*)
               (lemma "deriv_diff_fun[T]")
               (expand "-")
               (inst -1 "(LAMBDA x: Integral(a!1, x, f!1))" "F!1")
               (("1"
                 (assert)
                 (case "deriv((LAMBDA x: Integral(a!1, x, f!1) - F!1(x)))(xx!1) = 0")
                 (("1" (expand "deriv" -1) (propax))
                  ("2"
                   (hide 2)
                   (replace -1)
                   (assert)
                   (hide -1)
                   (hide -3)
                   (lemma "fundamental")
                   (inst -1 "(LAMBDA x: Integral(a!1, x, f!1))" "a!1"
                    "f!1")
                   (("1" (assert))
                    ("2" (lemma "not_one_element") (propax))
                    ("3" (lemma "connected_domain") (propax))
                    ("4" (hide-all-but 1) (reveal -7) (propax))))))
                ("2" (lemma "not_one_element") (propax))
                ("3" (lemma "connected_domain") (propax))))
              ("3"
               (expand "derivable?" -1)
               (inst?)
               (lemma "deriv_domain")
               (propax))
              ("4" (skosimp*) (expand "derivable?" -1) (inst?))))
            ("2"
             (hide 2)
             (lemma "derivable_diff[T]")
             (expand "-")
             (inst -1 "(LAMBDA x: Integral[T](a!1, x, f!1))" "F!1")
             (("1" (lemma "not_one_element") (propax))
              ("2" (lemma "connected_domain") (propax))))))
          ("2"
           (hide 2)
           (lemma "fundamental")
           (inst -1 "(LAMBDA x: Integral(a!1, x, f!1))" "a!1" "f!1")
           (("1" (assert)) ("2" (lemma "not_one_element") (propax))
            ("3" (lemma "connected_domain") (propax))))
          ("3" (propax))))
        ("2"
         (lemma "continuous_Integrable?[T]")
         (skosimp*)
         (inst?)
         (assert)
         (skosimp*)
         (expand "continuous?" -3)
         (inst?))))
      ("2"
       (lemma "not_one_element")
       (lemma "connected_domain")
       (skosimp*)
       (hide 2)
       (hide -1 -2 -3 -4)
       (expand "continuous?" -1)
       (inst?))))
    ("2" (lemma "not_one_element") (propax))
    ("3" (lemma "connected_domain") (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integration_by_parts
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (name "F" "(LAMBDA (x: T): v!1(x) * deriv[T](u!1)(x))")
   (replace -1)
   (case "continuous?(F)")
   (("1"
     (lemma "cont_fun_Integrable?[T]")
     (("1" (inst?) (assert)) ("2" (lemma "not_one_element") (propax))
      ("3" (lemma "connected_domain") (propax))))
    ("2"
     (hide 2)
     (lemma "prod_fun_continuous[T]")
     (inst -1 "v!1" "deriv(u!1)")
     (("1" (expand "*") (assert))
      ("2" (lemma "derivable_cont_fun[T]") (inst?) (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integration_by_parts
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "deriv_prod_fun[T]")
   (inst -1 "u!1" "v!1")
   (lemma "prod_derivable_fun[T]")
   (inst?)
   (assert)
   (assert)
   (case "continuous?(deriv(u!1)*v!1)")
   (("1"
     (case "continuous?(deriv(v!1)*u!1)")
     (("1"
       (case "continuous?(deriv(u!1 * v!1))")
       (("1"
         (case "Integral(a!1,b!1,deriv(u!1 * v!1)) = Integral(a!1,b!1,deriv(u!1) * v!1 + deriv(v!1) * u!1)")
         (("1"
           (lemma "fundamental3b")
           (inst -1 "u!1 * v!1" "a!1" "b!1")
           (assert)
           (flatten)
           (replace -2)
           (hide -2)
           (assert)
           (lemma "Integral_sum[T]")
           (inst -1 "a!1" "b!1" "deriv(u!1) * v!1" "deriv(v!1) * u!1")
           (split -1)
           (("1"
             (flatten)
             (case-replace
              "(LAMBDA (x: T): (deriv(u!1) * v!1)(x) + (deriv(v!1) * u!1)(x)) = deriv(u!1) * v!1 + deriv(v!1) * u!1")
             (("1"
               (replace -3)
               (hide -1 -3)
               (case-replace
                "(LAMBDA (x_1: T): u!1(x_1) * deriv(v!1)(x_1)) = u!1 * deriv(v!1)")
               (("1"
                 (case-replace
                  "(LAMBDA (x_2: T): v!1(x_2) * deriv(u!1)(x_2)) =                  v!1      * deriv(u!1)")
                 (("1" (expand "*") (assert))
                  ("2" (hide 2) (expand "*") (propax))))
                ("2" (hide 2) (expand "*") (propax))))
              ("2"
               (assert)
               (hide 2)
               (expand "*")
               (expand "+ ")
               (propax))))
            ("2" (hide 2) (lemma "cont_Integrable?[T]") (inst?) (assert))
            ("3"
             (hide 2)
             (lemma "cont_Integrable?[T]")
             (inst?)
             (assert))))
          ("2" (hide 2) (assert))
          ("3"
           (hide 2)
           (lemma "cont_Integrable?[T]")
           (("1" (inst?) (assert))
            ("2" (lemma "not_one_element") (propax))
            ("3" (assert) (lemma "connected_domain") (propax))))
          ("4" (lemma "not_one_element") (propax))
          ("5" (lemma "connected_domain") (propax))
          ("6"
           (hide 2)
           (lemma "cont_Integrable?[T]")
           (("1" (inst?) (assert))
            ("2" (lemma "not_one_element") (propax))
            ("3" (lemma "connected_domain") (propax))))))
        ("2" (hide 2) (lemma "sum_cont_fun[T]") (inst?) (assert))))
      ("2"
       (hide 2)
       (lemma "prod_cont_fun[T]")
       (inst?)
       (assert)
       (lemma "derivable_cont[T]")
       (inst?))))
    ("2"
     (hide 2)
     (lemma "prod_cont_fun[T]")
     (inst?)
     (assert)
     (lemma "derivable_cont[T]")
     (inst?))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integration_by_parts
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (name "F" "(LAMBDA (x: T): v!1(x) * deriv[T](u!1)(x))")
   (replace -1)
   (case "continuous?(F)")
   (("1"
     (lemma "cont_fun_Integrable?[T]")
     (("1" (inst?) (assert)) ("2" (lemma "not_one_element") (propax))
      ("3"
       (lemma "connected_domain")
       (hide 2)
       (expand "connected?")
       (propax))))
    ("2"
     (hide 2)
     (lemma "prod_fun_continuous[T]")
     (inst -1 "v!1" "deriv(u!1)")
     (("1" (expand "*") (assert))
      ("2" (lemma "derivable_cont_fun[T]") (inst?) (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_mean_value
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "deriv_domain?")
   (skosimp*)
   (lemma "connected_domain")
   (expand "connected?")
   (lemma "connected_deriv_domain[T]")
   (expand "connected?")
   (expand "not_one_element?")
   (expand "deriv_domain?")
   (replace -2)
   (lemma not_one_element)
   (expand "not_one_element?")
   (replace -1)
   (hide -1)
   (inst?))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_mean_value
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "fundamental2")
   (inst?)
   (assert)
   (skosimp*)
   (lemma "mean_value[T]")
   (inst?)
   (assert)
   (inst - "F!1")
   (assert)
   (skosimp*)
   (case-replace "deriv(F!1, c!1) = f!1(c!1)")
   (("1"
     (inst + "c!1")
     (("1"
       (assert)
       (lemma "fundamental3")
       (inst?)
       (inst - "F!1")
       (assert))
      ("2" (assert))))
    ("2" (hide 2) (expand "deriv" -5) (replace -5 + rl) (assert))
    ("3" (lemma "not_one_element") (propax))
    ("4" (lemma "deriv_domain") (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_mean_value
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "mean_value_integral")
   (inst?)
   (assert)
   (skosimp*)
   (replace -1)
   (factor -5)
   (mult-cases -5)
   (inst?)
   (("1" (assert)) ("2" (assert) (typepred "c!1") (assert) (ground))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_mean_value
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "continuous_Integrable?[T]")
   (("1"
     (inst?)
     (split -1)
     (("1" (propax))
      ("2" (hide 2) (skosimp*) (expand "continuous?" -1) (inst?))))
    ("2" (hide 2) (lemma "not_one_element") (propax))
    ("3" (lemma "connected_domain") (expand "connected?") (propax))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_mean_value
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "continuous_Integrable?[T]")
   (("1"
     (inst?)
     (assert)
     (skosimp*)
     (inst?)
     (expand "continuous?" -3)
     (inst?))
    ("2" (assert) (lemma "not_one_element") (propax))
    ("3" (lemma "connected_domain") (expand "connected?") (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_diff_doms
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (expand "integrable?")
   (skosimp*)
   (lemma "integral_def[T]")
   (("1"
     (inst?)
     (("1"
       (assert)
       (hide 2)
       (case-replace "integral(a!1, b!1, g!1) = S!2")
       (("1"
         (expand "integral?")
         (hide -1)
         (skosimp*)
         (inst -7 "epsi!1")
         (skosimp*)
         (inst + "delta!1")
         (skosimp*)
         (typepred "P!1")
         (inst -12 "P!1")
         (("1"
           (assert)
           (split -12)
           (("1"
             (inst -1 "R!1")
             (assert)
             (typepred "R!1")
             (hide 2)
             (expand "Riemann_sum?")
             (skosimp*)
             (inst + "xis!1")
             (("1"
               (assert)
               (replace -1)
               (hide -1)
               (expand "Rie_sum")
               (assert)
               (rewrite "sigma_restrict_eq")
               (("1"
                 (rewrite "sigma_restrict_eq")
                 (("1"
                   (hide 2)
                   (expand "restrict")
                   (hide 2)
                   (apply-extensionality 1 :hide? t)
                   (("1"
                     (hide -4 -11)
                     (inst?)
                     (assert)
                     (expand "finseq_appl")
                     (assert))
                    ("2"
                     (skosimp*)
                     (hide -11 -12)
                     (typepred "xis!1")
                     (expand "xis?")
                     (assert)
                     (inst - "i!1")
                     (flatten)
                     (assert)
                     (lemma "con_dom_U")
                     (expand "connected?")
                     (inst - "a!1" "b!1" "xis!1(i!1)")
                     (assert))
                    ("3"
                     (skosimp*)
                     (assert)
                     (typepred "P!1`seq(x1!1)")
                     (lemma "con_dom_U")
                     (expand "connected?")
                     (inst - "a!1" "b!1" "P!1`seq(x1!1)")
                     (assert))))
                  ("2"
                   (hide -11 -12 2)
                   (skosimp*)
                   (lemma "con_dom_U")
                   (expand "connected?")
                   (inst - "a!1" "b!1" "xis!1(n!1)")
                   (assert))
                  ("3"
                   (hide 2)
                   (skosimp*)
                   (assert)
                   (assert)
                   (hide 2)
                   (lemma "con_dom_U")
                   (expand "connected?")
                   (inst - "a!1" "b!1" "P!1`seq(x1!1)")
                   (assert))
                  ("4" (hide 2 3) (skosimp*) (assert))))
                ("2"
                 (hide -11 -12 2)
                 (skosimp*)
                 (lemma "con_dom_U")
                 (assert)
                 (expand "connected?")
                 (inst - "a!1" "b!1" "xis!1(n!1)")
                 (assert))
                ("3"
                 (hide 2)
                 (skosimp*)
                 (assert)
                 (lemma "con_dom_U")
                 (expand "connected?")
                 (inst - "a!1" "b!1" "P!1`seq(x1!1)")
                 (assert))
                ("4" (skosimp*) (assert))))
              ("2"
               (prop)
               (("1"
                 (skosimp*)
                 (assert)
                 (lemma "con_dom_U")
                 (expand "connected?")
                 (inst - "a!1" "b!1" "xis!1(x1!1)")
                 (assert))
                ("2"
                 (typepred "xis!1")
                 (assert)
                 (expand "xis?")
                 (assert)
                 (skosimp*)
                 (expand "finseq_appl")
                 (inst?))))))
            ("2" (expand "width") (propax))))
          ("2"
           (prop)
           (skosimp*)
           (lemma "parts_order[T]")
           (inst - "a!1" "b!1" "P!1" "0" "x1!1")
           (assert)
           (case-replace "x1!1 = 0")
           (("1" (assert))
            ("2"
             (assert)
             (lemma "con_dom_U")
             (expand "connected?")
             (inst - "a!1" "b!1" "P!1`seq(x1!1)")
             (assert))))))
        ("2"
         (hide 2)
         (lemma "integral_def[U]")
         (("1" (inst?) (assert)) ("2" (lemma "not_one_U") (propax))
          ("3" (lemma "con_dom_U") (propax))))
        ("3" (lemma "not_one_U") (propax))
        ("4" (lemma "con_dom_U") (propax))))
      ("2"
       (lemma "not_one_element")
       (lemma "connected_domain")
       (lemma "not_one_U")
       (propax))
      ("3" (lemma "con_dom_U") (propax))))
    ("2" (lemma "connected_domain") (lemma "not_one_element") (propax))
    ("3" (lemma "connected_domain") (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_diff_doms
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (case "a!1 = b!1")
   (("1" (expand "Integral") (assert))
    ("2"
     (case "a!1 < b!1")
     (("1"
       (expand "Integral")
       (assert)
       (lemma "int_diff_dom")
       (inst?)
       (assert)
       (expand "Integrable?")
       (assert)
       (skosimp*)
       (inst?)
       (assert))
      ("2"
       (lemma "int_diff_dom")
       (expand "Integral")
       (assert)
       (inst?)
       (inst?)
       (assert)
       (expand "Integrable?")
       (assert)
       (skosimp*)
       (inst?)
       (assert))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_diff_doms
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (lemma "connected_domain")
   (expand "connected?")
   (skosimp*)
   (inst - "a!1" "b!1" "x!1")
   (assert))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_diff_doms
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (lemma "con_dom_U")
   (expand "connected?")
   (skosimp*)
   (inst - "a!1" "b!1" "x!1")
   (assert))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_diff_doms
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (typepred "x!1")
   (ground)
   (("1"
     (lemma "connected_domain")
     (expand "connected?")
     (inst - "a!1" "b!1" "x!1")
     (assert))
    ("2"
     (lemma "connected_domain")
     (expand "connected?")
     (inst - "b!1" "a!1" "x!1")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_diff_doms
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (typepred "x!1")
   (assert)
   (ground)
   (("1"
     (lemma "con_dom_U")
     (expand "connected?")
     (inst - "a!1" "b!1" "x!1")
     (assert))
    ("2"
     (lemma "con_dom_U")
     (expand "connected?")
     (inst - "b!1" "a!1" "x!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: lim_of_composition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :exclude ("convergence" "abs") :rewrites
    ("adh[T1]" "adh[T2]" "convergence_def[T1]") :if-match nil)
   (inst? -6)
   (skolem!)
   (inst -5 "delta!1")
   (skolem!)
   (inst?)
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: lim_of_composition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :exclude ("convergence" "abs" "adh") :rewrites
    ("convergence_def[T2]" "convergence_def[T1]") :if-match nil)
   (delete -1 -2 -3 -4 -5 -6 -8)
   (inst -2 "epsilon!1")
   (skolem!)
   (inst -1 "delta!1")
   (skolem!)
   (inst 1 "delta!2")
   (skosimp)
   (inst?)
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: lim_of_composition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "convergence_composition")
   (grind :defs nil :rewrites ("convergent?[T1]" "convergent?[T2]"))
   (rewrite "lim_fun_def[T1]" :dir rl)
   (inst?))


proof_type: f_proof
decl_type: formula
library: analysis
theory: lim_of_composition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (auto-rewrite "adherence_lemma2" "convergent_composition")
   (rewrite "lim_fun_def[T1]")
   (use "lim_fun_lemma[T2]")
   (use "lim_fun_lemma[T1]" ("f" "f!1"))
   (forward-chain "convergence_composition"))


proof_type: f_proof
decl_type: formula
library: analysis
theory: lim_of_composition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (auto-rewrite "lim_fun_lemma[T1]")
   (use "convergence_comp_continuous" ("z" "lim(f!1, x!1)"))
   (assert)
   (expand "convergent?" +)
   (inst?))


proof_type: f_proof
decl_type: formula
library: analysis
theory: lim_of_composition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (auto-rewrite "convergent_comp_continuous")
   (rewrite "lim_fun_def[T1]")
   (use "lim_fun_lemma[T1]")
   (forward-chain "convergence_comp_continuous"))


proof_type: f_proof
decl_type: formula
library: analysis
theory: chain_rule
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (auto-rewrite "deriv_TCC[T1]" "deriv_TCC[T2]" "adherence_fullset[T1]"
                 "adherence_fullset[T2]")
   (("1"
     (use "derivative_equivalence1[T1]")
     (("1"
       (replace -2)
       (prop)
       (forward-chain "derivable_continuous[T1]")
       (delete -2 -3)
       (rewrite continuity_def)
       (rewrite "derivative_equivalence2[T1]")
       (("1"
         (rewrite "derivative_equivalence2[T1]")
         (("1"
           (rewrite "derivative_equivalence2[T2]")
           (("1"
             (skosimp*)
             (inst 1
              "DG!1 * phi!1 + DF!1 * (phi!2 o f!1) + phi!1 * (phi!2 o f!1)")
             (prop)
             (("1"
               (use "convergence_composition"
                    ("f" "f!1" "g" "phi!2" "x" "x!1"))
               (assert)
               (delete -4 -5 -6)
               (lemma "cv_sum[T1]")
               (inst - "x!1" "DG!1 * phi!1"
                "DF!1 * (phi!2 o f!1) + phi!1 * (phi!2 o f!1)" "0" "0")
               (assert)
               (split -1)
               (("1" (expand "+") (propax))
                ("2"
                 (hide -1 -2 2)
                 (lemma "cv_scal[T1]")
                 (inst - "x!1" "DG!1" "phi!1" "0")
                 (assert))
                ("3"
                 (hide 2)
                 (lemma "cv_sum[T1]")
                 (inst - "x!1" "DF!1 * (phi!2 o f!1)"
                  "phi!1 * (phi!2 o f!1)" "0" "0")
                 (assert)
                 (hide 2)
                 (lemma "cv_scal[T1]")
                 (inst - "x!1" "DF!1" "(phi!2 o f!1)" "0")
                 (assert)
                 (lemma "cv_prod[T1]")
                 (inst - "x!1" "phi!1" "(phi!2 o f!1)" "0" "0")
                 (assert))))
              ("2"
               (delete -1 -2 -4)
               (skolem!)
               (inst -1 "y!1")
               (inst -2 "f!1(y!1)")
               (expand "o ")
               (expand "*")
               (expand "+ ")
               (replace -2)
               (assert))))
            ("2"
             (lemma "deriv_domain2")
             (lemma "not_one_element2")
             (expand "not_one_element?")
             (propax))))
          ("2"
           (lemma "not_one_element1")
           (expand "not_one_element?")
           (propax))
          ("3" (lemma "deriv_domain1  ") (propax))))
        ("2"
         (lemma "not_one_element1")
         (expand "not_one_element?")
         (propax))
        ("3" (lemma "deriv_domain1  ") (propax))))
      ("2"
       (lemma "not_one_element1")
       (expand "not_one_element?")
       (propax))
      ("3" (lemma "deriv_domain1  ") (propax))))
    ("2" (lemma "not_one_element2") (propax))
    ("3" (lemma "deriv_domain2  ") (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_chg_var
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "deriv_domain?")
   (skosimp*)
   (lemma "con_dom_U")
   (lemma "connected_deriv_domain[U]")
   (lemma not_one_U)
   (assert)
   (expand "deriv_domain?")
   (inst?))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_chg_var
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "cont_fun_Integrable?[U]")
   (("1"
     (inst?)
     (assert)
     (case-replace
      "(LAMBDA (u: U): f!1(phi!1(u)) * deriv[U](phi!1)(u)) =
                                  (f!1 o phi!1) * deriv[U](phi!1)")
     (("1"
       (hide -1)
       (lemma "composition_cont_fun[U,T]")
       (inst - "phi!1" "f!1")
       (assert)
       (lemma "derivable_cont_fun[U]")
       (inst - "phi!1")
       (assert)
       (lemma "prod_fun_continuous[U]")
       (inst?)
       (assert))
      ("2" (hide 2) (expand "o ") (assert) (expand "*") (propax))))
    ("2" (lemma "not_one_U") (propax))
    ("3" (lemma "con_dom_U") (expand "connected?") (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_chg_var
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "fundamental[T]")
   (("1"
     (inst - "(LAMBDA (y: T): Integral(phi!1(a!1),y,f!1))" "phi!1(a!1)"
      "f!1")
     (("1"
       (name "FF" "(LAMBDA (y: T): Integral(phi!1(a!1),y,f!1))")
       (("1"
         (replace -1)
         (assert)
         (flatten)
         (name "GG" "FF o phi!1")
         (case "(LAMBDA (x:U): Integral(phi!1(a!1), phi!1(x), f!1)) = GG")
         (("1"
           (lemma "composition_derivable_fun[U,T]")
           (("1"
             (inst - "phi!1" "FF")
             (assert)
             (replace -3)
             (lemma "deriv_comp_fun[U,T]")
             (inst - "phi!1" "FF")
             (replace -4)
             (replace -7)
             (case-replace
              "Integral(phi!1(a!1), phi!1(b!1), f!1) = GG(b!1)")
             (("1"
               (lemma "fundamental3[U]")
               (("1"
                 (inst - "GG" "a!1" "b!1" "(f!1 o phi!1) * deriv(phi!1)")
                 (assert)
                 (split -1)
                 (("1"
                   (flatten)
                   (case-replace
                    "(LAMBDA (u: U): f!1(phi!1(u)) * deriv(phi!1)(u)) = (f!1 o phi!1) * deriv(phi!1)")
                   (("1"
                     (replace -3)
                     (case-replace "GG(a!1) = 0")
                     (("1" (assert))
                      ("2"
                       (hide 2)
                       (replace -7 + rl)
                       (assert)
                       (rewrite "Integral_a_to_a[T]"))))
                    ("2"
                     (hide 2)
                     (apply-extensionality 1 :hide? t)
                     (expand "o ")
                     (assert)
                     (expand "*")
                     (propax))))
                  ("2"
                   (hide 2)
                   (lemma "int_chg_var_prep")
                   (inst?)
                   (assert))))
                ("2" (lemma "con_dom_U") (propax))))
              ("2" (hide 2) (replace -3 + rl) (assert))))
            ("2"
             (lemma "not_one_element")
             (lemma "not_one_U")
             (lemma "deriv_domain_T")
             (propax))
            ("3" (lemma "con_dom_U") (lemma not_one_U) (propax))
            ("4" (lemma "deriv_domain_U") (propax))))
          ("2"
           (hide 2)
           (replace -1 + rl)
           (hide -1)
           (replace -1 + rl)
           (hide -1)
           (expand "o ")
           (propax))
          ("3"
           (hide 2)
           (skosimp*)
           (lemma "cont_fun_Integrable?[T]")
           (inst?)
           (assert))))
        ("2"
         (hide -1 2)
         (lemma "connected_domain")
         (expand "connected?")
         (skosimp*)
         (lemma "cont_fun_Integrable?[T]")
         (inst?)
         (assert))))
      ("2" (lemma "not_one_element") (propax))
      ("3" (lemma "connected_domain") (propax))
      ("4"
       (hide 2)
       (skosimp*)
       (lemma "cont_fun_Integrable?[T]")
       (inst?)
       (assert))))
    ("2" (lemma "not_one_element") (propax))
    ("3" (lemma "connected_domain") (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: integral_chg_var
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "Int_chg_var")
   (inst?)
   (inst - "b!1" "_")
   (inst?)
   (assert)
   (expand "Integral")
   (propax))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_chg_var
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
script:
  (""
   (skosimp*)
   (lemma "continuous_Integrable?[T]")
   (("1" (inst?) (assert) (skosimp*) (expand "continuous?" -1) (inst?))
    ("2" (lemma "not_one_element") (propax))
    ("3" (lemma "connected_domain") (expand "connected?") (propax))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_chg_var
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "continuous_Integrable?[T]")
   (("1"
     (inst - "phi!1(a!1)" "phi!1(b!1)" "f!1")
     (assert)
     (expand "Integrable?")
     (skosimp*)
     (expand "continuous?" -3)
     (inst?))
    ("2" (assert) (lemma "not_one_element") (propax))
    ("3" (lemma "connected_domain") (expand "connected?") (propax))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: integral_chg_var
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "int_chg_var_prep")
   (inst?)
   (assert)
   (inst - "a!1" "b!1")
   (flatten)
   (expand "Integrable?")
   (propax))


proof_type: f_proof
decl_type: formula
library: analysis
theory: table_of_integrals
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "xis_lem")
   (skosimp*)
   (assert)
   (expand "antiderivative?")
   (lemma "deriv_x_to_n[T]")
   (("1"
     (inst - "n!1+1" "c!1/(n!1+1)")
     (assert)
     (flatten)
     (assert)
     (replace -2)
     (apply-extensionality 1 :hide? t)
     (factor 1 l)
     (name-replace "NP1" "(1 + n!1)")
     (assert))
    ("2"
     (hide 2)
     (lemma "not_one_element")
     (lemma "deriv_domain")
     (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: table_of_integrals
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite "xis_lem")
   (skosimp*)
   (assert)
   (lemma "fundamental3[T]")
   (inst?)
   (inst - "(LAMBDA x: (c!1/(n!1+1))*x^(n!1+1))")
   (assert)
   (split -1)
   (("1" (propax))
    ("2"
     (hide 2)
     (lemma "deriv_x_to_n[T]")
     (("1" (inst?) (assert) (flatten))
      ("2" (lemma "deriv_domain") (propax))))
    ("3"
     (hide 2)
     (lemma "deriv_x_to_n[T]")
     (("1"
       (assert)
       (inst?)
       (assert)
       (flatten)
       (assert)
       (replace -2)
       (apply-extensionality 1 :hide? t)
       (factor 1 l)
       (name-replace "NP1" "(1 + n!1)")
       (assert))
      ("2" (lemma "deriv_domain") (propax))))
    ("4"
     (hide 2)
     (lemma "derivable_cont_fun[T]")
     (("1"
       (inst?)
       (assert)
       (hide 2)
       (lemma "deriv_x_to_n[T]")
       (inst?)
       (assert))
      ("2" (lemma "deriv_domain") (propax))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite + "member")
   (skeep)
   (skeep)
   (assert)
   (case "NOT strictly_sort(P)`length > 1")
   (("1"
     (hide 2)
     (typepred "strictly_sort(P)")
     (inst-cp - "a")
     (inst - "b")
     (case "member(a,P) and member(b,P)")
     (("1"
       (flatten)
       (replace -1)
       (replace -2)
       (expand "member")
       (skosimp*)
       (assert))
      ("2"
       (assert)
       (split +)
       (("1" (inst + "0") (assert))
        ("2" (inst + "P`length-1") (assert))))))
    ("2"
     (assert)
     (split +)
     (("1"
       (typepred "strictly_sort(P)")
       (inst-cp - "strictly_sort(P)`seq(0)")
       (inst - "a")
       (case "member(a,P) AND member(strictly_sort(P)`seq(0), strictly_sort(P))")
       (("1"
         (flatten)
         (replace -1)
         (replace -2)
         (assert)
         (hide -1)
         (hide -1)
         (skosimp*)
         (expand "strictly_increasing?")
         (inst - "0" "i!1")
         (assert)
         (typepred "P")
         (expand "increasing?")
         (inst - "0" "i!2")
         (assert))
        ("2"
         (hide-all-but 1)
         (assert)
         (split)
         (("1" (inst + "0") (assert)) ("2" (inst + "0"))))))
      ("2"
       (assert)
       (typepred "strictly_sort(P)")
       (inst-cp - "strictly_sort(P)`seq(strictly_sort(P)`length-1)")
       (inst - "b")
       (case "member(b,P) AND member(strictly_sort(P)`seq(strictly_sort(P)`length-1), strictly_sort(P))")
       (("1"
         (flatten)
         (replace -1)
         (replace -2)
         (assert)
         (hide -1)
         (hide -1)
         (skosimp*)
         (expand "strictly_increasing?")
         (inst - "i!1" "strictly_sort(P)`length-1")
         (assert)
         (typepred "P")
         (expand "increasing?")
         (inst - "i!2" "P`length-1")
         (assert))
        ("2"
         (hide-all-but 1)
         (assert)
         (split)
         (("1" (inst + "P`length-1") (assert))
          ("2" (inst + "strictly_sort(P)`length-1"))))))
      ("3"
       (typepred "strictly_sort(P)")
       (expand "strictly_increasing?")
       (expand "increasing?")
       (skeep)
       (inst - "i" "j")
       (assert))
      ("4"
       (skeep)
       (typepred "strictly_sort(P)")
       (inst - "strictly_sort(P)`seq(i)")
       (case "member(strictly_sort(P)`seq(i),strictly_sort(P))")
       (("1"
         (replace -1)
         (hide -1)
         (assert)
         (skolem - "iz")
         (replace -2)
         (typepred "P")
         (inst - "iz"))
        ("2" (hide-all-but 1) (assert) (inst + "i"))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (expand "width")
   (typepred
    "max({l: real |
                     EXISTS (ii: below(P!1`length - 1)):
                       l = P!1`seq(1 + ii) - P!1`seq(ii)})")
   (("1"
     (skosimp*)
     (inst -2 "P!1`seq(1 + ii!1) - P!1`seq(ii!1)")
     (assert)
     (hide -1 2)
     (inst?))
    ("2"
     (hide 2)
     (lemma "width_TCC1")
     (inst - "a!1" "b!1" "P!1" "P!1`seq")
     (inst - "P!1`length")
     (ground))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (expand "width")
   (typepred
    "max({l: real |
                   EXISTS (ii: below(P`length - 1)):
                     l = P`seq(1 + ii) - P`seq(ii)})")
   (("1" (propax))
    ("2"
     (hide 2)
     (assert)
     (lemma "width_TCC1")
     (inst - "a" "b" "P" "P`seq")
     (assert)
     (inst - "P`length"))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "ii!1 < jj!1")
   (("1"
     (case-replace "seq(P!1)(ii!1+1) < seq(P!1)(jj!1)")
     (("1" (assert))
      ("2"
       (case "ii!1 + 1 = jj!1")
       (("1" (replace -1) (assert))
        ("2"
         (lemma "parts_order")
         (inst - "a!1" "b!1" "P!1" "ii!1+1" "jj!1")
         (assert))))))
    ("2"
     (case-replace "seq(P!1)(jj!1+1) < seq(P!1)(ii!1)")
     (("1" (assert))
      ("2"
       (case "jj!1 + 1 = ii!1")
       (("1" (replace -1) (assert))
        ("2"
         (lemma "parts_order")
         (inst -1 "a!1" "b!1" "P!1" "jj!1+1" "ii!1")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (name "mm"
         "max({ij:real | (EXISTS (km:below(length(P)-1)): ij = km) AND ij >= 0 AND x>=P`seq(ij)})")
   (("1"
     (typepred "mm")
     (skeep -1)
     (inst + "km")
     (assert)
     (inst - "1+mm")
     (assert)
     (inst + "1+mm"))
    ("2"
     (hide 2)
     (split +)
     (("1"
       (lemma "is_finite_surj")
       (inst?)
       (("1"
         (assert)
         (hide 2)
         (inst + "P`length-1"
          "(LAMBDA (pz:below[P`length-1]): IF x>=P`seq(pz) THEN pz ELSE 0 ENDIF)")
         (("1"
           (expand "surjective?")
           (skosimp*)
           (typepred "y!1")
           (skosimp*)
           (inst + "km!1")
           (lift-if)
           (ground))
          ("2" (skosimp*) (inst + "0"))
          ("3" (skosimp*) (assert) (inst + "pz!1"))))
        ("2" (hide 2) (skosimp*) (assert))))
      ("2"
       (expand "empty?")
       (inst - "0")
       (expand "member")
       (assert)
       (inst + "0"))))
    ("3" (hide 2) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (name "mm"
         "max({ij:real | (EXISTS (km:below(length(P)-1)): ij = km) AND ij >= 0 AND x>P`seq(ij)})")
   (("1"
     (typepred "mm")
     (skeep -1)
     (inst + "km")
     (assert)
     (inst - "1+mm")
     (assert)
     (inst + "1+mm"))
    ("2"
     (hide 2)
     (split +)
     (("1"
       (lemma "is_finite_surj")
       (inst?)
       (("1"
         (assert)
         (hide 2)
         (inst + "P`length-1"
          "(LAMBDA (pz:below[P`length-1]): IF x>P`seq(pz) THEN pz ELSE 0 ENDIF)")
         (("1"
           (expand "surjective?")
           (skosimp*)
           (typepred "y!1")
           (skosimp*)
           (inst + "km!1")
           (lift-if)
           (ground))
          ("2" (skosimp*) (inst + "0"))
          ("3" (skosimp*) (assert) (inst + "pz!1"))))
        ("2" (hide 2) (skosimp*) (assert))))
      ("2"
       (expand "empty?")
       (inst - "0")
       (expand "member")
       (assert)
       (inst + "0"))))
    ("3" (hide 2) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (name-replace "PP" "eq_partition(a!1, b!1, N!1)")
   (typepred "width(a!1, b!1, PP)")
   (expand "width")
   (typepred
    "max({l: real |
                     EXISTS (ii: below(PP`length - 1)):
                       l = seq(PP)(1 + ii) - seq(PP)(ii)})")
   (("1"
     (skosimp*)
     (replace -1)
     (reveal -1)
     (expand "eq_partition")
     (replace -1 + rl)
     (assert))
    ("2"
     (lemma "width_TCC1")
     (inst -1 "a!1" "b!1" "PP" "seq(PP)")
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (skoletin 1)
   (("1"
     (assert)
     (ground)
     (("1" (expand "Pac") (expand "partjoin" 1) (expand "o") (propax))
      ("2"
       (case "n = Pab`length -1")
       (("1"
         (replace -1 +)
         (assert)
         (expand "Pac" +)
         (expand "partjoin" +)
         (expand "o" +)
         (typepred "Pab")
         (typepred "Pbc")
         (assert))
        ("2"
         (expand "Pac" +)
         (expand "partjoin" +)
         (expand "o")
         (assert)
         (lift-if)
         (ground)
         (("1" (expand "delete") (propax))
          ("2"
           (expand "delete")
           (expand "Pac" -2)
           (expand "partjoin" -2)
           (expand "o")
           (expand "delete")
           (propax))))))))
    ("2" (assert) (hide -) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite + "member")
   (skeep)
   (skeep)
   (case "width(a, c, partjoin(a, b, c)(Pab, Pbc)) >= max(width(a, b, Pab), width(b, c, Pbc))")
   (("1"
     (lemma "width_lem_exists")
     (inst - "a" "c")
     (assert)
     (inst - "partjoin(a, b, c)(Pab, Pbc)")
     (skosimp*)
     (lemma "width_lem_exists")
     (inst - "a" "b")
     (assert)
     (inst - "Pab")
     (skosimp*)
     (lemma "width_lem_exists")
     (inst - "b" "c")
     (assert)
     (inst - "Pbc")
     (skosimp*)
     (assert)
     (name "PJ" "partjoin(a, b, c)(Pab, Pbc)")
     (replace -1)
     (name "wab" "width(a,b,Pab)")
     (replace -1)
     (name "wbc" "width(b,c,Pbc)")
     (replace -1)
     (name "wac" "width(a,c,PJ)")
     (replace -1)
     (expand "partjoin")
     (expand "o")
     (replace -4 -7 :dir rl)
     (assert)
     (expand "delete")
     (assert)
     (lift-if)
     (lift-if)
     (lift-if)
     (lift-if)
     (assert)
     (ground)
     (("1" (lemma "width_lem") (inst - "a" "b" "Pab" "ii!1") (assert))
      ("2"
       (case "1+ii!1 /= Pab`length")
       (("1" (assert))
        ("2"
         (hide 2)
         (flatten)
         (case "Pab`seq(ii!1) = Pbc`seq(0)")
         (("1"
           (assert)
           (case "delete(0, Pbc)`seq(1 - Pab`length + ii!1) = Pbc`seq(1)")
           (("1"
             (expand "delete")
             (lemma "width_lem")
             (inst - "b" "c" "Pbc" "0")
             (assert))
            ("2" (expand "delete") (assert))))
          ("2" (typepred "Pab") (typepred "Pbc") (assert))))))
      ("3"
       (lemma "width_lem")
       (inst - "b" "c" "Pbc" "1 - Pab`length + ii!1")
       (assert))
      ("4"
       (typepred "ii!1")
       (expand "partjoin" -1)
       (expand "o" -1)
       (expand "delete" -1)
       (assert))))
    ("2"
     (hide 2)
     (expand "max")
     (lift-if)
     (ground)
     (("1"
       (lemma "width_lem_exists")
       (inst - "b" "c")
       (assert)
       (inst?)
       (skosimp*)
       (replace -1)
       (hide -1)
       (hide -1)
       (lemma "width_lem")
       (inst - "a" "c" "partjoin(a,b,c)(Pab,Pbc)" "Pab`length-1+ii!1")
       (("1"
         (assert)
         (lemma "partjoin_def")
         (inst-cp - "a" "b" "c" "Pab`length + ii!1")
         (inst - "a" "b" "c" "Pab`length-1 + ii!1")
         (assert)
         (inst - "Pab" "Pbc")
         (inst - "Pab" "Pbc")
         (flatten)
         (assert)
         (hide -3)
         (hide -1)
         (split -)
         (("1"
           (replace -1)
           (split -)
           (("1" (replace -1) (propax))
            ("2"
             (expand "partjoin")
             (expand "o" 1)
             (expand "delete" 1)
             (assert))))
          ("2"
           (expand "partjoin")
           (expand "o" 1)
           (expand "delete" 1)
           (assert))))
        ("2"
         (expand "partjoin" 1)
         (expand "o")
         (expand "delete")
         (assert))))
      ("2"
       (hide 1)
       (lemma "width_lem_exists")
       (inst - "a" "b")
       (assert)
       (inst - "Pab")
       (skosimp*)
       (replace -1)
       (hide -1)
       (lemma "width_lem")
       (inst - "a" "c" "partjoin(a, b, c)(Pab, Pbc)" "ii!1")
       (("1"
         (case "partjoin(a, b, c)(Pab, Pbc)`seq(ii!1 + 1) -
                                                 partjoin(a, b, c)(Pab, Pbc)`seq(ii!1) = Pab`seq(1 + ii!1) - Pab`seq(ii!1)")
         (("1" (assert))
          ("2"
           (hide 2)
           (hide -1)
           (expand "partjoin")
           (expand "o")
           (propax))))
        ("2"
         (expand "partjoin" 1)
         (expand "o")
         (expand "delete")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite + "member")
   (skeep)
   (skeep)
   (name "PQ" "partition_union(a,b)(P,Q)")
   (replace -1)
   (name "QP" "partition_union(a,b)(Q,P)")
   (replace -1)
   (name "Le" "min(PQ`length,QP`length)")
   (label "Lename" -1)
   (label "QPname" -2)
   (label "PQname" -3)
   (label "altb" -4)
   (case "FORALL (mm: below(Le)): PQ`seq(mm) = QP`seq(mm)")
   (("1"
     (case "NOT PQ`length = QP`length")
     (("1"
       (hide 2)
       (case "PQ`length > QP`length")
       (("1"
         (expand "min")
         (assert)
         (inst - "QP`length-1")
         (typepred "PQ")
         (expand "strictly_increasing?")
         (inst - "QP`length-1" "PQ`length-1")
         (assert))
        ("2"
         (expand "min")
         (assert)
         (inst - "PQ`length-1")
         (typepred "QP")
         (expand "strictly_increasing?")
         (inst - "PQ`length-1" "QP`length-1")
         (assert))))
      ("2"
       (label "seqeq" -2)
       (label "lengtheq" -1)
       (expand "min")
       (assert)
       (case "FORALL (mm:below(Le)): PQ`seq(mm) = QP`seq(mm)")
       (("1"
         (decompose-equality 1)
         (decompose-equality 1)
         (inst - "x!1")
         (assert)
         (typepred "x!1")
         (typepred "PQ")
         (typepred "PQ`seq")
         (inst - "x!1")
         (typepred "QP`seq")
         (inst - "x!1")
         (assert))
        ("2" (propax))))))
    ("2"
     (hide 2)
     (induct "mm")
     (("1" (flatten) (assert))
      ("2"
       (skolem 1 "mm")
       (flatten)
       (name "pq" "PQ`seq(mm+1)")
       (replace -1)
       (name "qp" "QP`seq(mm+1)")
       (replace -1)
       (case "member(qp,PQ) and member(pq,QP)")
       (("1"
         (flatten)
         (assert)
         (skosimp*)
         (case "i!1 > mm and i!2 > mm")
         (("1"
           (flatten)
           (typepred "PQ")
           (expand "strictly_increasing?")
           (inst - "1+mm" "i!1")
           (assert)
           (typepred "QP")
           (expand "strictly_increasing?")
           (inst - "1+mm" "i!2")
           (assert))
          ("2"
           (split +)
           (("1"
             (case "qp <= PQ`seq(mm)")
             (("1"
               (typepred "QP")
               (expand "strictly_increasing?")
               (inst - "mm" "1+mm")
               (assert)
               (flatten)
               (assert))
              ("2"
               (typepred "PQ")
               (expand "increasing?")
               (inst - "i!1" "mm")
               (assert))))
            ("2"
             (case "pq <= QP`seq(mm)")
             (("1"
               (typepred "PQ")
               (expand "strictly_increasing?")
               (inst - "mm" "1+mm")
               (assert)
               (flatten)
               (assert))
              ("2"
               (typepred "QP")
               (expand "increasing?")
               (inst - "i!2" "mm")
               (assert))))))))
        ("2"
         (case "member(pq,PQ) and member(qp,QP)")
         (("1"
           (flatten)
           (typepred "PQ")
           (copy -6)
           (inst-cp - "pq")
           (inst - "qp")
           (typepred "QP")
           (copy -6)
           (inst-cp - "qp")
           (inst - "pq")
           (ground))
          ("2"
           (hide 2)
           (split)
           (("1"
             (expand "member")
             (inst?)
             (("1" (assert)) ("2" (assert))))
            ("2"
             (expand "member")
             (inst?)
             (("1" (assert)) ("2" (assert))))))))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite + "member")
   (skeep)
   (skeep)
   (name "QP" "partition_union(a,b)(P,Q)")
   (replace -1)
   (name "Le" "min(PQ`length,QP`length)")
   (label "Lename" -1)
   (label "QPname" -2)
   (ground)
   (("1"
     (case "FORALL (mm: below(Le)): PQ`seq(mm) = QP`seq(mm)")
     (("1"
       (case "NOT PQ`length = QP`length")
       (("1"
         (hide 2)
         (case "PQ`length > QP`length")
         (("1"
           (expand "min")
           (assert)
           (inst - "QP`length-1")
           (typepred "PQ")
           (expand "strictly_increasing?")
           (inst - "QP`length-1" "PQ`length-1")
           (assert))
          ("2"
           (expand "min")
           (assert)
           (inst - "PQ`length-1")
           (typepred "QP")
           (expand "strictly_increasing?")
           (inst - "PQ`length-1" "QP`length-1")
           (assert))))
        ("2"
         (label "seqeq" -2)
         (label "lengtheq" -1)
         (expand "min")
         (assert)
         (case "FORALL (mm:below(Le)): PQ`seq(mm) = QP`seq(mm)")
         (("1"
           (decompose-equality 1)
           (decompose-equality 1)
           (inst - "x!1")
           (assert)
           (typepred "x!1")
           (typepred "PQ`seq")
           (inst - "x!1")
           (typepred "QP`seq")
           (inst - "x!1")
           (assert))
          ("2" (propax))))))
      ("2"
       (hide 2)
       (induct "mm")
       (("1" (flatten) (assert))
        ("2"
         (skolem 1 "mm")
         (flatten)
         (name "pq" "PQ`seq(mm+1)")
         (replace -1)
         (name "qp" "QP`seq(mm+1)")
         (replace -1)
         (case "member(qp,PQ) and member(pq,QP)")
         (("1"
           (flatten)
           (assert)
           (skosimp*)
           (case "i!1 > mm and i!2 > mm")
           (("1"
             (flatten)
             (typepred "PQ")
             (expand "strictly_increasing?")
             (inst - "1+mm" "i!1")
             (assert)
             (typepred "QP")
             (expand "strictly_increasing?")
             (inst - "1+mm" "i!2")
             (assert))
            ("2"
             (split +)
             (("1"
               (case "qp <= PQ`seq(mm)")
               (("1"
                 (typepred "QP")
                 (expand "strictly_increasing?")
                 (inst - "mm" "1+mm")
                 (assert)
                 (flatten)
                 (assert))
                ("2"
                 (typepred "PQ")
                 (expand "increasing?")
                 (inst - "i!1" "mm")
                 (assert))))
              ("2"
               (case "pq <= QP`seq(mm)")
               (("1"
                 (typepred "PQ")
                 (expand "strictly_increasing?")
                 (inst - "mm" "1+mm")
                 (assert)
                 (flatten)
                 (assert))
                ("2"
                 (typepred "QP")
                 (expand "increasing?")
                 (inst - "i!2" "mm")
                 (assert))))))))
          ("2"
           (case "member(pq,PQ) and member(qp,QP)")
           (("1"
             (flatten)
             (copy -7)
             (inst-cp - "pq")
             (inst - "qp")
             (typepred "QP")
             (copy -6)
             (inst-cp - "qp")
             (inst - "pq")
             (ground))
            ("2"
             (hide 2)
             (split)
             (("1"
               (expand "member")
               (inst?)
               (("1" (assert)) ("2" (assert))))
              ("2"
               (expand "member")
               (inst?)
               (("1" (assert)) ("2" (assert))))))))))))))
    ("2"
     (typepred "QP")
     (skeep)
     (inst -6 "x")
     (assert)
     (split +)
     (("1"
       (flatten)
       (skosimp*)
       (split -)
       (("1" (propax)) ("2" (propax)) ("3" (inst + "i!1") (assert))))
      ("2"
       (flatten)
       (split -)
       (("1" (assert) (replace -1) (skosimp*) (inst + "i!2") (assert))
        ("2" (replace -1) (skosimp*) (inst + "i!2") (assert))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite + "member")
   (lemma "part_in_strict_left")
   (label "partin" -1)
   (hide "partin")
   (skeep)
   (skeep)
   (expand "min")
   (lift-if)
   (ground)
   (("1"
     (hide -1)
     (name "newwid" "width(a, b, partition_union(a, b)(P, Q))")
     (replace -1)
     (name "Qwid" "width(a,b,Q)")
     (replace -1)
     (lemma "width_lem")
     (label "Qwidmax" -1)
     (label "Qwidname" -2)
     (label "newwidname" -3)
     (lemma "width_lem_exists")
     (inst - "a" "b")
     (assert)
     (inst - "partition_union(a, b)(P, Q)")
     (skolem -1 "pqi")
     (label "newidPQdiff" -1)
     (name "PQ" "partition_union(a,b)(P,Q)")
     (label "PQname" -1)
     (replace -1)
     (reveal "partin")
     (inst - "a" "b" "PQ`seq(1+pqi)" "Q")
     (assert)
     (typepred "PQ")
     (inst -5 "1+pqi")
     (assert)
     (flatten)
     (assert)
     (case "a < PQ`seq(1+pqi)")
     (("1"
       (assert)
       (hide-all-but
        ("partin"
         "PQname"
         "newidPQdiff"
         "Qwidmax"
         "Qwidname"
         "newidname"
         +))
       (skolem -1 "ti")
       (flatten)
       (case "Q`seq(ti) <= PQ`seq(pqi) and PQ`seq(pqi) <= Q`seq(1 + ti)")
       (("1"
         (flatten)
         (case "NOT newwid <= Q`seq(1+ti)-Q`seq(ti)")
         (("1" (assert))
          ("2"
           (name "thisid" "Q`seq(1 + ti) - Q`seq(ti)")
           (assert)
           (inst "Qwidmax" "a" "b" "Q" "ti")
           (replace -1)
           (assert))))
        ("2"
         (assert)
         (typepred "PQ")
         (hide (-1 -2 -3 -4 -5))
         (inst - "Q`seq(ti)")
         (case "member(Q`seq(ti),Q)")
         (("1"
           (replace -1)
           (ground)
           (hide -1)
           (skolem -1 "pqti")
           (replace -1)
           (typepred "PQ")
           (hide (-1 -2 -3 -5 -6))
           (expand "increasing?")
           (inst - "pqti" "pqi")
           (assert)
           (typepred "PQ")
           (hide (-1 -2 -3 -5 -6))
           (expand "increasing?")
           (inst - "1+pqi" "pqti")
           (assert))
          ("2" (hide-all-but 1) (expand "member") (inst + "ti"))))))
      ("2"
       (case "PQ`seq(pqi) >= a")
       (("1" (assert))
        ("2"
         (hide-all-but 1)
         (typepred "PQ")
         (inst - "pqi")
         (flatten)
         (assert))))))
    ("2"
     (hide 1)
     (name "newwid" "width(a, b, partition_union(a, b)(P, Q))")
     (replace -1)
     (name "Pwid" "width(a,b,P)")
     (replace -1)
     (lemma "width_lem")
     (label "Pwidmax" -1)
     (label "Pwidname" -2)
     (label "newwidname" -3)
     (lemma "width_lem_exists")
     (inst - "a" "b")
     (assert)
     (inst - "partition_union(a, b)(P, Q)")
     (skolem -1 "pqi")
     (label "newidPQdiff" -1)
     (name "PQ" "partition_union(a,b)(P,Q)")
     (label "PQname" -1)
     (replace -1)
     (reveal "partin")
     (inst - "a" "b" "PQ`seq(1+pqi)" "P")
     (assert)
     (typepred "PQ")
     (inst -5 "1+pqi")
     (assert)
     (flatten)
     (assert)
     (case "a < PQ`seq(1+pqi)")
     (("1"
       (assert)
       (hide-all-but
        ("partin"
         "PQname"
         "newidPQdiff"
         "Pwidmax"
         "Pwidname"
         "newidname"
         +))
       (skolem -1 "ti")
       (flatten)
       (case "P`seq(ti) <= PQ`seq(pqi) and PQ`seq(pqi) <= P`seq(1 + ti)")
       (("1"
         (flatten)
         (case "NOT newwid <= P`seq(1+ti)-P`seq(ti)")
         (("1" (assert))
          ("2"
           (name "thisid" "P`seq(1 + ti) - P`seq(ti)")
           (assert)
           (inst "Pwidmax" "a" "b" "P" "ti")
           (replace -1)
           (assert))))
        ("2"
         (assert)
         (typepred "PQ")
         (hide (-1 -2 -3 -4 -5))
         (inst - "P`seq(ti)")
         (case "member(P`seq(ti),P)")
         (("1"
           (replace -1)
           (ground)
           (hide -1)
           (skolem -1 "pqti")
           (replace -1)
           (typepred "PQ")
           (hide (-1 -2 -3 -5 -6))
           (expand "increasing?")
           (inst - "pqti" "pqi")
           (assert)
           (typepred "PQ")
           (hide (-1 -2 -3 -5 -6))
           (expand "increasing?")
           (inst - "1+pqi" "pqti")
           (assert))
          ("2" (hide-all-but 1) (expand "member") (inst + "ti"))))))
      ("2"
       (case "PQ`seq(pqi) >= a")
       (("1" (assert))
        ("2"
         (hide-all-but 1)
         (typepred "PQ")
         (inst - "pqi")
         (flatten)
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite + "member")
   (skeep)
   (skeep)
   (name "PQ" "partition_union(a, b)(P, Q)")
   (replace -1)
   (hide -1)
   (name "PPQ" "partition_union(a, b)(strictly_sort(P), Q)")
   (replace -1)
   (hide -1)
   (case "FORALL (x:T): member(x,PQ) IFF member(x,PPQ)")
   (("1"
     (label "memberlem" -1)
     (hide "memberlem")
     (name "ml" "min(PQ`length,PPQ`length)")
     (case "FORALL (nn:below(ml)): PQ`seq(nn) = PPQ`seq(nn)")
     (("1"
       (case "PQ`length = PPQ`length")
       (("1"
         (rewrite "fseqs_eq")
         (assert)
         (skeep)
         (inst - "n")
         (expand "min")
         (assert))
        ("2"
         (inst - "ml-1")
         (("1"
           (expand "min")
           (lift-if)
           (ground)
           (("1"
             (replace -2 :dir rl)
             (case "PQ`seq(PPQ`length-1) = b")
             (("1"
               (typepred "PQ")
               (copy -7)
               (expand "strictly_increasing?" -1)
               (inst - "PPQ`length-1" "PQ`length-1")
               (assert))
              ("2" (assert))))
            ("2"
             (replace -1 :dir rl)
             (case "PPQ`seq(PQ`length-1) = b")
             (("1"
               (typepred "PPQ")
               (copy -7)
               (expand "strictly_increasing?" -1)
               (inst - "PQ`length-1" "PPQ`length-1")
               (assert))
              ("2" (assert))))))
          ("2" (expand "min") (lift-if) (ground))))))
      ("2"
       (hide 2)
       (induct "nn")
       (("1" (assert))
        ("2"
         (skolem 1 "nn")
         (assert)
         (flatten)
         (assert)
         (case "PQ`seq(1+nn) <= PPQ`seq(1+nn) AND PPQ`seq(1+nn) <= PQ`seq(1+nn)")
         (("1" (flatten) (assert))
          ("2"
           (hide 2)
           (split +)
           (("1"
             (reveal "memberlem")
             (copy "memberlem")
             (hide "memberlem")
             (inst - "PPQ`seq(1+nn)")
             (case "member(PPQ`seq(1+nn),PPQ)")
             (("1"
               (replace -1)
               (assert)
               (hide -1)
               (skosimp*)
               (replace -1)
               (typepred "PQ")
               (copy -7)
               (expand "strictly_increasing?" -1)
               (inst - "1+nn" "i!1")
               (assert)
               (case "1+nn<=i!1")
               (("1" (assert))
                ("2"
                 (case "PQ`seq(nn) < PQ`seq(i!1)")
                 (("1"
                   (copy -8)
                   (expand "strictly_increasing?" -1)
                   (inst - "i!1" "nn")
                   (assert))
                  ("2"
                   (typepred "PPQ")
                   (copy -7)
                   (expand "strictly_increasing?" -1)
                   (inst - "nn" "1+nn")
                   (assert)
                   (flatten)
                   (assert))))))
              ("2" (hide-all-but 1) (expand "member") (inst?))))
            ("2"
             (reveal "memberlem")
             (copy "memberlem")
             (hide "memberlem")
             (inst - "PQ`seq(1+nn)")
             (case "member(PQ`seq(1+nn),PQ)")
             (("1"
               (replace -1)
               (assert)
               (hide -1)
               (skosimp*)
               (replace -1)
               (typepred "PPQ")
               (copy -7)
               (expand "strictly_increasing?" -1)
               (inst - "1+nn" "i!1")
               (assert)
               (case "1+nn<=i!1")
               (("1" (assert))
                ("2"
                 (case "PPQ`seq(nn) < PPQ`seq(i!1)")
                 (("1"
                   (copy -8)
                   (expand "strictly_increasing?" -1)
                   (inst - "i!1" "nn")
                   (assert))
                  ("2"
                   (typepred "PQ")
                   (copy -7)
                   (expand "strictly_increasing?" -1)
                   (inst - "nn" "1+nn")
                   (assert)
                   (flatten)
                   (assert))))))
              ("2" (hide-all-but 1) (expand "member") (inst?))))))))))))
    ("2"
     (typepred "PQ")
     (label "pqm" -6)
     (typepred "PPQ")
     (label "ppqm" -6)
     (hide-all-but ("pqm" "ppqm" +))
     (skeep)
     (inst - "x")
     (inst - "x")
     (typepred "strictly_sort(P)")
     (inst - "x")
     (ground))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (lemma "partition_union_unique")
   (skeep)
   (inst - "a" "b")
   (assert)
   (skeep)
   (inst - "P" "P" "strictly_sort(P)")
   (("1"
     (assert)
     (hide 2)
     (skeep)
     (ground)
     (("1"
       (typepred "strictly_sort(P)")
       (inst - "x")
       (assert)
       (replace -3)
       (assert))
      ("2"
       (typepred "strictly_sort(P)")
       (inst - "x")
       (assert)
       (replace -3)
       (assert))
      ("3"
       (typepred "strictly_sort(P)")
       (inst - "x")
       (assert)
       (replace -3)
       (assert))))
    ("2"
     (assert)
     (lemma "partition_strictly_sort")
     (inst - "a" "b")
     (assert)
     (inst - "P"))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (decompose-equality +)
   (inst - "x!1")
   (name "pum" "partition_union_map(a,b,P,Q)")
   (replace -1)
   (typepred "pum")
   (inst - "x!1")
   (name "PQ" "partition_union(a,b)(P,Q)")
   (replace -1)
   (typepred "PQ")
   (copy -7)
   (expand "strictly_increasing?")
   (inst-cp - "pm(x!1)" "pum(x!1)")
   (inst - "pum(x!1)" "pm(x!1)")
   (ground))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (name "pum" "partition_union_map(a,b,P,Q)")
   (replace -1)
   (typepred "pum")
   (inst-cp - "ii")
   (inst - "jj")
   (expand "strictly_increasing?")
   (inst - "ii" "jj")
   (assert)
   (flatten)
   (typepred "partition_union(a,b)(P,Q)")
   (expand "strictly_increasing?")
   (inst - "pum(jj)" "pum(ii)")
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (label "altb" -1)
   (skeep)
   (typepred "ii")
   (label "iitp" -1)
   (name "ssm" "strictly_sort_map(P)")
   (replace -1)
   (hide -1)
   (name "pum" "partition_union_map(a,b,P,P)")
   (replace -1)
   (hide -1)
   (typepred "ssm")
   (assert)
   (assert)
   (hide -1)
   (lemma "partition_union_is_strictly_sort")
   (inst - "a" "b")
   (assert)
   (inst - "P")
   (name "SSP" "partition_union(a,b)(P,P)")
   (label "SSPname" -1)
   (replace -1)
   (hide -1)
   (replace -1 :dir rl)
   (inst - "ii")
   (flatten)
   (assert)
   (typepred "pum")
   (inst - "ssm(ii)")
   (assert)
   (reveal "SSPname")
   (replace -1)
   (hide "SSPname")
   (typepred "SSP")
   (copy -7)
   (expand "strictly_increasing?" -1)
   (inst-cp - "ii" "pum(ssm(ii))")
   (inst - "pum(ssm(ii))" "ii")
   (assert)
   (reveal "SSPname")
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (name "pum" "partition_union_map(a,b,P,Q)")
   (replace -1)
   (name "puminv" "partition_union_map_inv(a,b,P,Q)")
   (replace -1)
   (assert)
   (skeep)
   (typepred "ii")
   (typepred "jj")
   (typepred "puminv")
   (inst - "ii")
   (flatten)
   (assert)
   (case "puminv(ii) = P`length-1")
   (("1"
     (replace -1)
     (case "P`length-1=jj")
     (("1" (propax))
      ("2"
       (hide 2)
       (assert)
       (typepred "partition_union(a,b)(P,Q)")
       (expand "strictly_increasing?")
       (inst - "ii" "partition_union(a,b)(P,Q)`length-1")
       (assert)
       (flatten)
       (assert))))
    ("2"
     (assert)
     (case "jj = P`length-1")
     (("1"
       (replace -1)
       (case "pum(P`length-1) = partition_union(a,b)(P,Q)`length-1")
       (("1" (assert) (typepred "P") (inst - "1+puminv(ii)") (ground))
        ("2"
         (hide 3)
         (typepred "partition_union(a,b)(P,Q)")
         (expand "strictly_increasing?")
         (inst - "pum(P`length-1)"
          "partition_union(a, b)(P, Q)`length - 1")
         (assert)
         (flatten)
         (assert)
         (typepred "pum")
         (inst - "P`length-1")
         (assert))))
      ("2"
       (assert)
       (case "pum(jj)<=ii")
       (("1"
         (assert)
         (case "puminv(ii) = jj")
         (("1" (propax))
          ("2"
           (hide 4)
           (typepred "pum")
           (inst-cp - "jj")
           (inst - "jj+1")
           (case "(NOT puminv(ii) < jj) AND (NOT puminv(ii) > jj)")
           (("1" (ground))
            ("2"
             (split +)
             (("1"
               (case "P`seq(jj) > partition_union(a, b)(P, Q)`seq(ii)")
               (("1"
                 (typepred "partition_union(a,b)(P,Q)")
                 (expand "increasing?")
                 (inst - "pum(jj)" "ii")
                 (assert))
                ("2"
                 (typepred "P")
                 (expand "increasing?")
                 (inst - "1+puminv(ii)" "jj")
                 (assert))))
              ("2"
               (case "P`seq(puminv(ii)) >= partition_union(a, b)(P, Q)`seq(pum(jj + 1))")
               (("1"
                 (typepred "partition_union(a,b)(P,Q)")
                 (expand "strictly_increasing?")
                 (inst - "ii" "pum(1+jj)")
                 (assert)
                 (flatten)
                 (assert))
                ("2"
                 (typepred "P")
                 (expand "increasing?")
                 (inst - "1+jj" "puminv(ii)")
                 (assert))))))))))
        ("2" (propax))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite + "member")
   (skeep)
   (skeep)
   (name "SSP" "partition_union(a,b)(P,P)")
   (replace -1)
   (name "sig" "partition_union_map_inv(a,b,P,P)")
   (replace -1)
   (assert)
   (skeep)
   (typepred "ii")
   (typepred "sig")
   (inst - "ii")
   (assert)
   (flatten)
   (assert)
   (case "sig(ii) = P`length-1")
   (("1"
     (assert)
     (replace -1)
     (lemma "partition_union_is_strictly_sort")
     (inst - "a" "b")
     (assert)
     (inst - "P")
     (assert)
     (case "SSP`seq(ii) <= b")
     (("1" (assert))
      ("2"
       (typepred "partition_union(a,b)(P,P)")
       (inst - "ii")
       (flatten)
       (assert))))
    ("2"
     (assert)
     (lemma "partition_union_is_strictly_sort")
     (inst - "a" "b")
     (assert)
     (inst - "P")
     (replace -6)
     (typepred "strictly_sort(P)")
     (inst - "SSP`seq(ii)")
     (case "member(SSP`seq(ii),strictly_sort(P))")
     (("1"
       (replace -1)
       (hide -1)
       (assert)
       (skosimp*)
       (typepred "i!1")
       (replace -3)
       (case "i!1 = sig(ii)")
       (("1" (assert))
        ("2"
         (case "i!1 < sig(ii)")
         (("1"
           (typepred "P")
           (expand "increasing?")
           (inst - "i!1" "sig(ii)")
           (assert))
          ("2"
           (typepred "P")
           (expand "increasing?")
           (inst - "sig(ii)+1" "i!1")
           (assert))))))
      ("2"
       (expand "member" +)
       (inst + "ii")
       (("1" (assert)) ("2" (assert))))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (split +)
   (("1"
     (lemma "is_finite_surj[real]")
     (inst?)
     (assert)
     (hide 2)
     (inst + "N"
      "(LAMBDA (ij:below[N]): IF ij = N-1 THEN xx(ij)-xx(ij-1) ELSE xx(ij+1)-xx(ij) ENDIF)")
     (("1"
       (expand "surjective?")
       (skosimp*)
       (typepred "y!1")
       (skosimp*)
       (inst + "ii!1")
       (lift-if)
       (ground))
      ("2" (skosimp*) (inst + "ij!1") (assert))
      ("3" (skosimp*) (replace -1) (assert) (inst + "N-2") (assert))
      ("4" (skosimp*) (assert))))
    ("2"
     (expand "empty?")
     (inst - "xx(1)-xx(0)")
     (assert)
     (inst + "0")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (case "max[real, <=]
                           ({l: real |
                               EXISTS (ii: below(N!1 - 1)): l = xx!1(ii + 1) - xx!1(ii)})
                        > 0")
   (("1" (assert))
    ("2"
     (hide 2)
     (typepred "P!1")
     (case "EXISTS (ii: below(N!1 - 1)): xx!1(ii + 1) - xx!1(ii) > 0")
     (("1"
       (name "mm"
             "max[real, <=]
                                  ({l: real |
                                      EXISTS (ii: below(N!1 - 1)): l = xx!1(ii + 1) - xx!1(ii)})")
       (("1"
         (replace -1)
         (typepred "mm")
         (skosimp*)
         (inst -2 "xx!1(ii!2 + 1) - xx!1(ii!2)")
         (assert)
         (inst + "ii!2"))
        ("2"
         (hide 2)
         (lemma "width_TCC1")
         (inst?)
         (assert)
         (inst - "N!1")
         (assert))))
      ("2"
       (hide 2)
       (case "FORALL (ii:below(N!1)): xx!1(ii) = a!1")
       (("1" (inst - "N!1-1") (("1" (assert)) ("2" (assert))))
        ("2"
         (induct "ii")
         (("1" (assert))
          ("2"
           (skosimp*)
           (assert)
           (inst + "jb!1")
           (assert)
           (inst - "jb!1+1")
           (inst - "jb!1+1")
           (assert))))))))
    ("3" (lemma "width_TCC1") (inst?) (assert) (inst - "N!1") (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "connected_domain")
   (expand "connected?")
   (inst - "a!1" "b!1" "a!1 + ii!1 * (b!1 - a!1) / (N!1 - 1)")
   (assert)
   (hide 2)
   (assert)
   (split)
   (("1"
     (typepred "b!1")
     (typepred "ii!1")
     (case "ii!1/(N!1-1) > 0")
     (("1" (mult-by -4 "ii!1/(N!1-1)") (assert))
      ("2" (cross-mult 1) (assert))))
    ("2"
     (case "(b!1 * ii!1 - a!1 * ii!1) / (N!1 - 1) <= b!1-a!1")
     (("1" (assert))
      ("2"
       (hide 2)
       (cross-mult 1)
       (case "N!1-1 >= ii!1")
       (("1" (mult-by -1 "b!1-a!1") (assert))
        ("2" (hide 2) (assert))))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (split)
   (("1"
     (assert)
     (skosimp*)
     (ground)
     (name "cv" "(ii!1 * b!1 - ii!1 * a!1) / (N!1 - 1)")
     (case "cv >=0 AND cv <= b!1-a!1")
     (("1"
       (flatten)
       (lemma "connected_domain")
       (expand "connected?")
       (inst - "a!1" "b!1" "a!1+cv")
       (assert)
       (replace -4)
       (assert))
      ("2"
       (hide 2)
       (split)
       (("1"
         (expand "cv" +)
         (cross-mult 1)
         (typepred "b!1")
         (mult-by -2 "ii!1")
         (assert))
        ("2"
         (expand "cv" +)
         (cross-mult 1)
         (case "ii!1<=N!1-1")
         (("1" (mult-by -1 "b!1-a!1") (assert)) ("2" (assert))))))))
    ("2" (skosimp*) (lift-if) (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (split)
   (("1" (assert)) ("2" (ground)) ("3" (lift-if) (ground) (field))
    ("4"
     (expand "increasing?")
     (skosimp*)
     (lift-if)
     (lift-if)
     (assert)
     (case "(b!1-a!1)/(N!1-1)>=0")
     (("1" (mult-by -1 "j!1-i!1") (assert))
      ("2" (hide 2) (cross-mult 1) (assert))))
    ("5"
     (skosimp*)
     (assert)
     (ground)
     (("1"
       (case "i!1/(N!1-1)>0")
       (("1" (mult-by -1 "b!1-a!1") (assert))
        ("2" (cross-mult 1) (assert))))
      ("2"
       (case "i!1/(N!1-1)<=1")
       (("1" (mult-by -1 "b!1-a!1") (assert))
        ("2" (cross-mult 1) (assert))))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "increasing?")
   (split)
   (("1" (expand "concat") (expand "o") (assert))
    ("2" (expand "concat") (expand "o") (assert))
    ("3"
     (expand "concat")
     (expand "o")
     (lift-if)
     (assert)
     (ground)
     (("1"
       (case "delete[T](0,Pbc!1)`length >= 1")
       (("1" (assert))
        ("2" (hide 2) (hide -1) (expand "delete") (assert))))
      ("2" (hide 1) (expand "delete") (assert))))
    ("4"
     (assert)
     (skeep)
     (expand "concat")
     (expand "o")
     (expand "delete")
     (lift-if)
     (lift-if)
     (assert)
     (ground)
     (("1" (lemma "parts_order") (inst?) (assert))
      ("2"
       (typepred "Pab!1")
       (inst - "i")
       (typepred "Pbc!1")
       (inst - "1-Pab!1`length+j")
       (assert)
       (flatten)
       (assert))
      ("3" (lemma "parts_order") (inst?) (assert))))
    ("5"
     (skosimp*)
     (typepred "i!1")
     (expand "concat")
     (expand "o")
     (lift-if)
     (assert)
     (ground)
     (("1" (typepred "Pab!1") (ground) (inst?) (flatten))
      ("2" (typepred "Pab!1") (inst - "i!1") (flatten) (assert))
      ("3"
       (expand "delete")
       (typepred "Pbc!1")
       (inst - "1-Pab!1`length+i!1")
       (("1" (assert)) ("2" (assert))))
      ("4"
       (expand "delete")
       (typepred "Pbc!1")
       (inst - "1-Pab!1`length+i!1")
       (("1" (ground)) ("2" (assert))))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: rs_partition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite + "member")
   (case "(FORALL (aa1:T,(bb1:T|aa1<bb1),aa2:T,(bb2:T|aa2<bb2),P1:partition(aa1,bb1),P2:partition(aa2,bb2)): (EXISTS (PQ:partition(min(aa1,aa2),max(bb1,bb2))): (FORALL (x:T): member(x,PQ) IFF (member(x,P1) or member(x,P2))) AND strictly_increasing?(PQ)))")
   (("1"
     (name "xone"
           "LAMBDA (a:T,(b | a<b)): (LAMBDA (Pone,Ptwo:partition(a,b)): choose({PQ:partition(a,b) | (FORALl (x:T): member[T](x, PQ) IFF
                                                                                                                                       (member[T](x, Pone) OR
                                                                                                                                         member[T](x, Ptwo))) AND strictly_increasing?(PQ)}))")
     (("1" (inst + "xone")) ("2" (hide 2) (skosimp*) (assert))
      ("3"
       (hide 2)
       (skosimp*)
       (expand "nonempty?")
       (inst - "a!1" "b!1" "a!1" "b!1" "Pone!1" "Ptwo!1")
       (skosimp*)
       (expand "empty?")
       (inst -1 "PQ!1")
       (("1" (expand "member") (ground))
        ("2"
         (typepred "PQ!1")
         (expand "min")
         (expand "max")
         (assert))))))
    ("2"
     (hide 2)
     (skeep)
     (name "PQZ" "strictly_sort(concat(P1,P2))")
     (case "NOT (FORALL (x:T): member(x, PQZ) IFF (member(x, P1) OR member(x, P2)))")
     (("1"
       (hide 2)
       (skosimp*)
       (typepred "PQZ")
       (inst - "x!1")
       (replace -2 :dir rl)
       (lemma "member_composition")
       (inst - "P1" "P2" "x!1"))
      ("2"
       (inst + "PQZ")
       (("1" (assert))
        ("2"
         (label "PQZmember" -1)
         (hide "PQZmember")
         (replace -1 + :dir rl)
         (hide -1)
         (case "strictly_sort((P1 o P2))`length > 1")
         (("1"
           (assert)
           (case "strictly_sort((P1 o P2))`seq(0) = min(aa1, aa2)")
           (("1"
             (assert)
             (case "strictly_sort((P1 o P2))`seq(strictly_sort((P1 o P2))`length - 1) =
                                                                                                           max(bb1, bb2)")
             (("1"
               (assert)
               (case "increasing?[T, <=](strictly_sort((P1 o P2)))")
               (("1"
                 (assert)
                 (case "(FORALL (i: below(PQZ`length - 1)):
                                                                                                                                     strictly_sort((P1 o P2))`seq(i) <
                                                                                                                                      strictly_sort((P1 o P2))`seq(1 + i))")
                 (("1"
                   (assert)
                   (case "FORALL (i: below(PQZ`length)):
                                                                                                                                                min(aa1, aa2) <= strictly_sort((P1 o P2))`seq(i) AND
                                                                                                                                                 strictly_sort((P1 o P2))`seq(i) <= max(bb1, bb2)")
                   (("1" (propax))
                    ("2"
                     (hide 2)
                     (copy -2)
                     (skeep)
                     (split +)
                     (("1"
                       (expand "increasing?" -1)
                       (inst - "0" "i")
                       (assert)
                       (typepred "i")
                       (expand "PQZ" -1)
                       (propax))
                      ("2"
                       (expand "increasing?" -1)
                       (inst - "i" "strictly_sort((P1 o P2))`length - 1")
                       (assert)
                       (typepred "i")
                       (expand "PQZ" -1)
                       (assert))))))
                  ("2"
                   (hide 2)
                   (skeep)
                   (typepred "strictly_sort(concat(P1,P2))")
                   (expand "strictly_increasing?")
                   (inst - "i" "i+1")
                   (assert)
                   (split -1)
                   (("1" (flatten) (assert))
                    ("2"
                     (assert)
                     (typepred "i")
                     (expand "PQZ" -1)
                     (assert))))))
                ("2"
                 (hide 2)
                 (assert)
                 (typepred "strictly_sort(concat(P1,P2))")
                 (expand "strictly_increasing?")
                 (expand "increasing?")
                 (skeep)
                 (inst - "i" "j")
                 (assert))))
              ("2"
               (hide 2)
               (typepred "strictly_sort(concat(P1,P2))")
               (case "member(max(bb1,bb2),strictly_sort((P1 o P2)))")
               (("1"
                 (expand "member" -1)
                 (skosimp*)
                 (expand "strictly_increasing?")
                 (inst - "i!1" "strictly_sort((P1 o P2))`length - 1")
                 (assert)
                 (replace -1 :dir rl)
                 (reveal "PQZmember")
                 (name "myx"
                       "seq(strictly_sort((P1 o P2)))(strictly_sort((P1 o P2))`length - 1)")
                 (inst - "myx")
                 (case "NOT member(myx,PQZ)")
                 (("1"
                   (hide-all-but 1)
                   (expand "PQZ")
                   (expand "member")
                   (expand "myx")
                   (inst + "strictly_sort((P1 o P2))`length - 1"))
                  ("2"
                   (replace -1)
                   (assert)
                   (replace -2)
                   (split "PQZmember")
                   (("1"
                     (skosimp -1)
                     (typepred "P1")
                     (expand "increasing?" -)
                     (inst - "i!2" "P1`length-1")
                     (assert))
                    ("2"
                     (assert)
                     (skosimp -1)
                     (typepred "P2")
                     (expand "increasing?" -)
                     (inst - "i!2" "P2`length-1")
                     (assert))))))
                ("2"
                 (inst - "max(bb1,bb2)")
                 (replace -2 :dir rl)
                 (lemma "member_composition")
                 (inst?)
                 (replace -1)
                 (case "member(bb1,P1) AND member(bb2,P2)")
                 (("1" (expand "max" 1) (lift-if) (ground))
                  ("2"
                   (hide-all-but 1)
                   (split)
                   (("1"
                     (typepred "P1")
                     (expand "member")
                     (inst + "P1`length-1")
                     (assert))
                    ("2"
                     (expand "member")
                     (typepred "P2")
                     (inst + "P2`length-1")
                     (assert))))))
                ("3" (expand "max") (lift-if) (ground))))))
            ("2"
             (hide 2)
             (reveal "PQZmember")
             (copy "PQZmember")
             (hide "PQZmember")
             (inst - "min(aa1,aa2)")
             (("1"
               (case "(member(min(aa1, aa2), P1) OR member(min(aa1, aa2), P2))")
               (("1"
                 (replace -1)
                 (assert)
                 (hide -1)
                 (skosimp*)
                 (replace -1)
                 (expand "PQZ")
                 (name "myx" "strictly_sort((P1 o P2))`seq(0)")
                 (replace -1)
                 (name "newx" "strictly_sort((P1 o P2))`seq(i!1)")
                 (replace -1)
                 (typepred "PQZ")
                 (expand "strictly_increasing?")
                 (inst - "0" "i!1")
                 (inst - "myx")
                 (case "NOT member(myx,PQZ)")
                 (("1"
                   (hide-all-but 1)
                   (expand "myx")
                   (expand "PQZ")
                   (expand "member")
                   (inst + "0"))
                  ("2"
                   (lemma "member_composition")
                   (inst - "P1" "P2" "myx")
                   (replace -1)
                   (hide -1)
                   (replace -1)
                   (assert)
                   (expand "PQZ")
                   (replace -4)
                   (replace -5)
                   (split -3)
                   (("1"
                     (skosimp -1)
                     (typepred "P1")
                     (expand "increasing?")
                     (inst - "0" "i!2")
                     (assert))
                    ("2"
                     (skosimp -1)
                     (typepred "P2")
                     (expand "increasing?")
                     (inst - "0" "i!2")
                     (assert))))))
                ("2"
                 (hide-all-but 1)
                 (flatten)
                 (case "member(aa1,P1) AND member(aa2,P2)")
                 (("1" (flatten) (expand "min") (lift-if) (ground))
                  ("2"
                   (hide-all-but 1)
                   (split)
                   (("1"
                     (typepred "P1")
                     (expand "member")
                     (inst + "0")
                     (assert))
                    ("2"
                     (expand "member")
                     (typepred "P2")
                     (inst + "0")
                     (assert))))))))
              ("2" (expand "min") (lift-if) (ground))))))
          ("2"
           (hide 2)
           (case "strictly_sort((P1 o P2))`length /= 1")
           (("1"
             (assert)
             (typepred "strictly_sort(concat(P1,P2))")
             (inst - "P1`seq(0)")
             (case "member(P1`seq(0),concat(P1,P2))")
             (("1" (replace -1) (assert) (skosimp*))
              ("2"
               (lemma "member_composition")
               (inst - "P1" "P2" "P1`seq(0)")
               (assert)
               (replace -1)
               (flatten)
               (inst + "0"))))
            ("2"
             (flatten)
             (typepred "strictly_sort(concat(P1,P2))")
             (inst-cp - "aa1")
             (inst - "bb1")
             (case "aa1 < bb1")
             (("1"
               (case "member(aa1,concat(P1,P2)) and member(bb1,concat(P1,P2))")
               (("1"
                 (flatten)
                 (replace -1)
                 (replace -2)
                 (assert)
                 (skosimp*)
                 (assert))
                ("2"
                 (hide-all-but 1)
                 (case "member(aa1,P1) AND member(bb1,P1)")
                 (("1"
                   (flatten)
                   (lemma "member_composition")
                   (inst-cp - "P1" "P2" "aa1")
                   (inst - "P1" "P2" "bb1")
                   (ground))
                  ("2"
                   (hide 2)
                   (typepred "P1")
                   (expand "member")
                   (split +)
                   (("1" (inst + "0") (assert))
                    ("2" (inst + "P1`length-1") (assert))))))))
              ("2"
               (hide-all-but 1)
               (typepred "P1")
               (case "P1`length-1 = 1")
               (("1" (inst - "0") (assert))
                ("2"
                 (inst-cp -5 "0")
                 (expand "increasing?")
                 (inst - "1" "P1`length-1")
                 (assert))))))))))))))))


