# Proofs

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:
  (""
   (skeep)
   (skeep)
   (lemma "partition_strictly_sort")
   (inst - "a" "b")
   (assert)
   (inst - "P"))


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")
   (name "rr"
         "(LAMBDA (a:T,(b:T|a<b),P,Q:partition(a,b)): choose({pm:[below(P`length)->below(partition_union(a,b)(P,Q)`length)] |
                                 						      FORALL (ii:below(P`length)): P`seq(ii) = partition_union(a,b)(P,Q)`seq(pm(ii))}))")
   (("1" (inst + "rr"))
    ("2"
     (hide 2)
     (skeep)
     (name "PQ" "partition_union(a,b)(P,Q)")
     (replace -1)
     (case "FORALL (ii:below(P`length)): EXISTS (jj:below(PQ`length)): P`seq(ii) = PQ`seq(jj)")
     (("1"
       (expand "nonempty?")
       (expand "empty?")
       (inst -3
        "(LAMBDA (ii:below(P`length)): choose({jj:below(PQ`length)|P`seq(ii) = PQ`seq(jj)}))")
       (("1" (expand "member") (skosimp*) (assert))
        ("2" (skosimp*) (assert))
        ("3"
         (skeep)
         (inst - "ii")
         (expand "nonempty?")
         (expand "empty?")
         (skosimp*)
         (inst - "jj!1")
         (expand "member")
         (propax))))
      ("2"
       (hide 2)
       (skeep)
       (typepred "ii")
       (typepred "PQ")
       (copy -6)
       (inst - "P`seq(ii)")
       (case "member(P`seq(ii),P)")
       (("1" (replace -1) (assert)) ("2" (expand "member") (inst?))))))))


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:
  (""
   (case "FORALL (a:T,(b:T|a<b),P,Q:partition(a,b)): FORALL (jj:below(partition_union(a,b)(P,Q)`length)): EXISTS (ii:below(P`length)): P`seq(ii) <= partition_union(a,b)(P,Q)`seq(jj) AND (ii<P`length-1 IMPLIES partition_union(a,b)(P,Q)`seq(jj) < P`seq(ii+1))")
   (("1"
     (inst +
      "(LAMBDA (a:T, (b:T | a < b), P, Q: partition(a, b)): choose({pm:[below(partition_union(a,b)(P,Q)`length)->below(P`length)] |
                                                     						      FORALL (jj:below(partition_union(a,b)(P,Q)`length)): P`seq(pm(jj)) <= partition_union(a,b)(P,Q)`seq(jj) AND (pm(jj)<P`length-1 IMPLIES partition_union(a,b)(P,Q)`seq(jj) < P`seq(pm(jj)+1))}))")
     (skeep)
     (expand "nonempty?")
     (expand "empty?")
     (name "PQ" "partition_union(a,b)(P,Q)")
     (replace -1)
     (name "rtd"
           "(LAMBDA (jj:below(PQ`length)): choose({ii:below(P`length) | P`seq(ii) <= PQ`seq(jj) AND
                                                                     (ii<P`length-1 IMPLIES PQ`seq(jj) < P`seq(ii + 1))}))")
     (("1"
       (inst - "rtd")
       (("1"
         (expand "member")
         (skeep)
         (expand "rtd" +)
         (assert)
         (assert)
         (flatten)
         (typepred
          "choose({ii: below(P`length) |
                                          P`seq(ii) <= PQ`seq(jj) AND
                                           (ii < P`length - 1 IMPLIES PQ`seq(jj) < P`seq(1 + ii))})")
         (("1" (assert))
          ("2"
           (hide 2)
           (expand "nonempty?")
           (inst - "a" "b" "P" "Q")
           (inst - "jj")
           (skosimp*)
           (expand "empty?")
           (inst - "ii!1")
           (expand "member")
           (ground))))
        ("2" (skosimp*) (ground))))
      ("2"
       (hide -2)
       (skeep)
       (expand "nonempty?")
       (expand "empty?")
       (inst -3 "a" "b" "P" "Q")
       (inst -3 "jj")
       (("1" (skosimp*) (inst - "ii!1") (expand "member") (ground))
        ("2" (typepred "jj") (assert))))))
    ("2"
     (hide 2)
     (skosimp*)
     (typepred "jj!1")
     (name "PQ" "partition_union(a!1,b!1)(P!1,Q!1)")
     (replace -1)
     (hide -1)
     (case "FORALL (ii:below(P!1`length-1)): PQ`seq(jj!1) >= P!1`seq(ii)")
     (("1"
       (case "PQ`seq(jj!1) = b!1")
       (("1" (inst + "P!1`length-1") (assert))
        ("2"
         (inst + "P!1`length-2")
         (assert)
         (case "PQ`seq(jj!1) <= b!1")
         (("1" (assert) (inst - "P!1`length-2") (assert))
          ("2" (typepred "PQ") (inst - "jj!1") (ground))))))
      ("2"
       (induct "ii")
       (("1" (assert) (typepred "PQ") (inst - "jj!1") (assert))
        ("2" (skolem 1 "ii") (flatten) (inst + "ii") (ground))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "xis")
   (inst - "ii")
   (flatten)
   (typepred "P")
   (inst-cp -5 "ii")
   (inst -5 "ii+1")
   (ground))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "Rie_sum")
   (assert)
   (expand "Rie_sum_alt")
   (expand "Rie_sec")
   (assert)
   (case "FORALL (NN: below(length(P!1)-1)):  sigma[below(length(P!1) - 1)]
                                                             (0, NN,
                                                              LAMBDA (n: below(length(P!1) - 1)):
                                                                g!1(P!1`seq(1 + n)) * f!1(xis!1`seq(n)) -
                                                                 g!1(P!1`seq(n)) * f!1(xis!1`seq(n)))
                                                          =
                                                          sigma[upto(length(P!1) - 1)]
                                                              (1, NN+1,
                                                               LAMBDA (n: upto(length(P!1) - 1)):
                                                                 IF n = 0 THEN 0
                                                                 ELSE g!1(P!1`seq(n)) * f!1(xis!1`seq(n - 1)) -
                                                                       g!1(P!1`seq(n - 1)) * f!1(xis!1`seq(n - 1))
                                                                 ENDIF)")
   (("1" (inst?) (assert) (replace -1) (replace -1 :dir rl) (propax))
    ("2"
     (hide 2)
     (induct "NN" 1 "below_induction[length(P!1)-1]")
     (("1" (assert) (expand "sigma") (expand "sigma") (propax))
      ("2" (skosimp*) (expand "sigma" 1) (assert))
      ("3" (hide 2) (skosimp*) (assert))))
    ("3" (hide 2) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite + "member")
   (skeep)
   (skeep)
   (name "XISfun"
         "(LAMBDA (xis:xis?(a,b,P)): (# length := strictly_sort(P)`length-1, seq := (LAMBDA (ii:nat): IF ii < strictly_sort(P)`length-1 THEN xis`seq(strictly_sort_map(P)(ii)) ELSE default[T] ENDIF) #))")
   (("1"
     (label "XISfunname" -1)
     (case "FORALL (xis:xis?(a,b,P)): Rie_sum(a,b,g,P,xis,f) = Rie_sum(a,b,g,strictly_sort(P),XISfun(xis),f)")
     (("1"
       (ground)
       (("1"
         (skeep -)
         (inst - "xis")
         (inst + "XISfun(xis)")
         (("1" (assert))
          ("2"
           (assert)
           (expand "XISfun" +)
           (assert)
           (typepred "strictly_sort(P)")
           (inst - "a")
           (case "member(a,P)")
           (("1" (replace -1) (hide -1) (assert) (skosimp*))
            ("2" (hide-all-but 1) (assert) (inst + "0") (assert))))))
        ("2"
         (skeep -)
         (assert)
         (case "FORALL (xiss:xis?(a,b,strictly_sort(P))): EXISTS (xis:xis?(a,b,P)): xiss = XISfun(xis)")
         (("1"
           (inst - "xis")
           (skolem -1 "xisp")
           (inst - "xisp")
           (inst + "xisp")
           (assert))
          ("2"
           (hide -1)
           (hide -1)
           (hide 2)
           (skeep)
           (name "sig" "partition_union_map(a,b,P,P)")
           (label "signame" -1)
           (typepred "sig")
           (label "sigtp" -1)
           (name "yis"
                 "(# length := P`length-1, seq := (LAMBDA (ii:nat): IF ii < P`length-1 THEN IF sig(ii) = strictly_sort(P)`length-1 THEN b ELSIF sig(ii) = sig(ii+1) THEN P`seq(ii) ELSE xiss`seq(sig(ii)) ENDIF ELSE default[T] ENDIF) #)")
           (("1"
             (label "yisname" -1)
             (lemma "partition_union_is_strictly_sort")
             (inst - "a" "b")
             (assert)
             (inst - "P")
             (label "unionsort" -1)
             (replace "unionsort")
             (stop-rewrite "xis_lem")
             (inst + "yis")
             (("1"
               (expand "XISfun" +)
               (decompose-equality +)
               (("1"
                 (decompose-equality +)
                 (("1"
                   (lift-if)
                   (ground)
                   (("1"
                     (expand "yis" +)
                     (lift-if)
                     (ground)
                     (("1"
                       (name "ssm" "strictly_sort_map(P)")
                       (replace -1)
                       (label "ssmname" -1)
                       (lemma "partition_union_strictly_sort_map_inv")
                       (inst - "a" "b")
                       (assert)
                       (inst - "P" "x!1")
                       (assert))
                      ("2"
                       (hide 2)
                       (name "ssm" "strictly_sort_map(P)")
                       (replace -1)
                       (label "ssmname" -1)
                       (typepred "ssm")
                       (lemma "partition_union_strictly_sort_map_inv")
                       (inst - "a" "b")
                       (assert)
                       (inst - "P" "x!1")
                       (assert)
                       (replace "ssmname")
                       (replace "signame")
                       (replace -1)
                       (inst - "x!1")
                       (flatten)
                       (assert)
                       (typepred "sig")
                       (inst - "1+ssm(x!1)")
                       (assert)
                       (typepred "sig")
                       (inst - "ssm(x!1)")
                       (assert)
                       (case "NOT P`seq(ssm(x!1)) = P`seq(1+ssm(x!1))")
                       (("1" (assert))
                        ("2"
                         (typepred "xiss")
                         (inst - "x!1")
                         (flatten)
                         (assert))))
                      ("3"
                       (name "ssm" "strictly_sort_map(P)")
                       (replace -1)
                       (label "ssmname" -1)
                       (lemma "partition_union_strictly_sort_map_inv")
                       (inst - "a" "b")
                       (assert)
                       (inst - "P" "x!1")
                       (assert))
                      ("4"
                       (name "ssm" "strictly_sort_map(P)")
                       (replace -1)
                       (label "ssmname" -1)
                       (typepred "ssm")
                       (assert)
                       (inst - "x!1")
                       (flatten)
                       (assert)
                       (typepred "strictly_sort(P)")
                       (expand "strictly_increasing?")
                       (inst - "x!1" "strictly_sort(P)`length-1")
                       (assert))))
                    ("2" (typepred "xiss`seq") (inst - "x!1") (assert))))
                  ("2" (skosimp*) (assert))))
                ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
              ("2"
               (split +)
               (("1" (skosimp*) (assert) (expand "yis" +) (propax))
                ("2"
                 (skeep)
                 (split +)
                 (("1"
                   (expand "yis" +)
                   (lift-if)
                   (assert)
                   (split +)
                   (("1"
                     (flatten)
                     (assert)
                     (typepred "xiss")
                     (typepred "sig")
                     (inst - "ii")
                     (assert))
                    ("2"
                     (flatten)
                     (ground)
                     (typepred "xiss")
                     (inst - "sig(ii)")
                     (flatten)
                     (typepred "sig")
                     (inst - "ii")
                     (assert))))
                  ("2"
                   (expand "yis" +)
                   (lift-if)
                   (assert)
                   (ground)
                   (("1"
                     (typepred "sig")
                     (inst - "ii")
                     (typepred "P")
                     (inst - "ii+1")
                     (flatten)
                     (expand "increasing?")
                     (inst - "ii" "1+ii")
                     (assert))
                    ("2"
                     (typepred "P")
                     (expand "increasing?")
                     (inst - "ii" "1+ii")
                     (assert))
                    ("3"
                     (typepred "xiss")
                     (inst - "sig(ii)")
                     (flatten)
                     (case "1+sig(ii) <= sig(1+ii)")
                     (("1"
                       (assert)
                       (typepred "strictly_sort(P)")
                       (expand "strictly_increasing?")
                       (inst - "1+sig(ii)" "sig(1+ii)")
                       (assert)
                       (typepred "sig")
                       (inst - "1+ii")
                       (assert))
                      ("2"
                       (typepred "sig")
                       (inst-cp - "ii")
                       (inst - "ii+1")
                       (assert)
                       (typepred "strictly_sort(P)")
                       (expand "strictly_increasing?")
                       (inst - "sig(1+ii)" "sig(ii)")
                       (assert)
                       (flatten)
                       (typepred "P")
                       (expand "increasing?")
                       (inst - "ii" "1+ii")
                       (assert))))))))))))
            ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))
            ("4" (skosimp*) (assert)) ("5" (skosimp*) (assert))))))))
      ("2"
       (hide ("xispred" "XISfunname"))
       (hide 2)
       (skeep)
       (expand "XISfun")
       (name "yis"
             "(# length := strictly_sort(P)`length-1, seq := (LAMBDA (ii:nat): IF ii < strictly_sort(P)`length-1 THEN xis`seq(strictly_sort_map(P)(ii)) ELSE default[T] ENDIF) #)")
       (("1"
         (replace -1)
         (hide -1)
         (expand "Rie_sum")
         (name "ssp" "strictly_sort(P)")
         (label "sspname" -1)
         (replace "sspname")
         (name "sig" "strictly_sort_map(P)")
         (label "signame" -1)
         (case "FORALL (mm:below(ssp`length-1)): sigma[below(strictly_sort(P)`length - 1)]
                                                                                                                                                                                               (0, mm,
                                                                                                                                                                                                LAMBDA (n: below(strictly_sort(P)`length - 1)):
                                                                                                                                                                                                  f(yis`seq(n)) * g(ssp`seq(1 + n)) -
                                                                                                                                                                                                   f(yis`seq(n)) * g(ssp`seq(n))) = sigma[below(P`length - 1)]
                                                                                                                                                                                              (0, sig(mm),
                                                                                                                                                                                               LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                 f(xis`seq(n)) * g(P`seq(1 + n)) - f(xis`seq(n)) * g(P`seq(n)))")
         (("1"
           (inst - "ssp`length-2")
           (("1"
             (replace -1)
             (hide -1)
             (lemma "sigma_split[below(P`length-1)]")
             (inst -
              "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                   f(xis`seq(n)) * g(P`seq(1 + n)) - f(xis`seq(n)) * g(P`seq(n))"
              "P`length-2" "0" "sig(ssp`length - 2)")
             (("1"
               (assert)
               (case "sig(ssp`length-2) <= P`length-2")
               (("1"
                 (assert)
                 (replace -2)
                 (case "sigma(1 + sig(ssp`length - 2), P`length - 2,
                                                                                                                                                                                                                                                                                                                 LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                                                                                                                                   f(xis`seq(n)) * g(P`seq(1 + n)) -
                                                                                                                                                                                                                                                                                                                    f(xis`seq(n)) * g(P`seq(n))) = 0")
                 (("1" (assert))
                  ("2"
                   (hide 2)
                   (hide -2)
                   (rewrite "sigma_restrict_eq_0")
                   (hide 2)
                   (skeep)
                   (typepred "i")
                   (case "g(P`seq(1+i)) = g(P`seq(i))")
                   (("1" (assert))
                    ("2"
                     (hide 2)
                     (typepred "sig")
                     (hide -1)
                     (inst - "ssp`length-2")
                     (("1"
                       (assert)
                       (flatten)
                       (name "jj" "ssp`length-2")
                       (replace -1)
                       (case "ssp`length-1 = jj+1")
                       (("1"
                         (replace -1)
                         (case "P`seq(1+i) = P`seq(i)")
                         (("1" (assert))
                          ("2"
                           (hide 2)
                           (lemma "strictly_sort_map_between")
                           (inst - "P")
                           (replace "sspname")
                           (replace "signame")
                           (assert)
                           (inst - "jj")
                           (("1"
                             (inst - "i")
                             (assert)
                             (case "P`seq(sig(1+jj)) = P`seq(1+i)")
                             (("1"
                               (assert)
                               (case "1+sig(jj) <= sig(jj+1)")
                               (("1"
                                 (case "sig(jj+1) = P`length-1")
                                 (("1" (assert))
                                  ("2"
                                   (replace -3 :dir rl)
                                   (typepred "sig")
                                   (assert)
                                   (case "NOT P`length = 0")
                                   (("1"
                                     (lemma "fseq_length_zero")
                                     (inst - "ssp")
                                     (assert)
                                     (typepred "ssp")
                                     (inst - "P`seq(0)")
                                     (case "member(P`seq(0),P)")
                                     (("1"
                                       (replace -1)
                                       (hide -1)
                                       (assert)
                                       (skosimp*))
                                      ("2"
                                       (expand "member")
                                       (inst + "0"))))
                                    ("2" (assert))))
                                  ("3"
                                   (lemma "fseq_length_zero")
                                   (inst - "ssp")
                                   (assert)
                                   (typepred "ssp")
                                   (inst - "P`seq(0)")
                                   (case "member(P`seq(0),P)")
                                   (("1"
                                     (replace -1)
                                     (assert)
                                     (skosimp*))
                                    ("2"
                                     (expand "member")
                                     (inst + "0"))))))
                                ("2"
                                 (lemma "strictly_sort_map_increasing")
                                 (inst - "P")
                                 (assert)
                                 (inst - "jj" "1+jj")
                                 (("1" (assert))
                                  ("2"
                                   (assert)
                                   (lemma "fseq_length_zero")
                                   (inst - "ssp")
                                   (assert)
                                   (typepred "ssp")
                                   (inst - "P`seq(0)")
                                   (case "member(P`seq(0),P)")
                                   (("1"
                                     (replace -1)
                                     (assert)
                                     (skosimp*))
                                    ("2"
                                     (expand "member")
                                     (inst + "0"))))
                                  ("3"
                                   (lemma "partition_strictly_sort")
                                   (inst - "a" "b")
                                   (assert)
                                   (inst - "P")
                                   (flatten)
                                   (assert))))
                                ("3"
                                 (lemma "partition_strictly_sort")
                                 (inst - "a" "b")
                                 (assert)
                                 (inst - "P")
                                 (flatten)
                                 (assert))
                                ("4"
                                 (lemma "partition_strictly_sort")
                                 (inst - "a" "b")
                                 (assert)
                                 (inst - "P")
                                 (flatten)
                                 (assert))))
                              ("2"
                               (assert)
                               (lemma "strictly_sort_map_between")
                               (inst - "P")
                               (replace -11)
                               (assert)
                               (replace -3 + :dir rl)
                               (typepred "sig")
                               (assert)
                               (split -)
                               (("1"
                                 (hide -2)
                                 (replace "sspname")
                                 (replace -1)
                                 (assert)
                                 (inst - "jj")
                                 (("1" (inst - "1+i") (assert))
                                  ("2"
                                   (assert)
                                   (lemma "partition_strictly_sort")
                                   (inst - "a" "b")
                                   (assert)
                                   (inst - "P")
                                   (flatten)
                                   (assert))))
                                ("2"
                                 (lemma "partition_strictly_sort")
                                 (inst - "a" "b")
                                 (assert)
                                 (inst - "P")
                                 (flatten)
                                 (assert))))
                              ("3"
                               (lemma "partition_strictly_sort")
                               (inst - "a" "b")
                               (assert)
                               (inst - "P")
                               (assert))))
                            ("2"
                             (lemma "partition_strictly_sort")
                             (inst - "a" "b")
                             (assert)
                             (inst - "P")
                             (assert))))))
                        ("2" (assert))))
                      ("2"
                       (lemma "partition_strictly_sort")
                       (inst - "a" "b")
                       (assert)
                       (inst - "P")
                       (assert))))))))
                ("2"
                 (hide (-1 2))
                 (typepred "sig")
                 (assert)
                 (case "strictly_sort(P)`length >= 1")
                 (("1"
                   (assert)
                   (replace "sspname")
                   (inst-cp - "ssp`length-2")
                   (("1"
                     (inst - "ssp`length-1")
                     (flatten)
                     (assert)
                     (case "NOT sig(ssp`length-2) = P`length-1")
                     (("1" (assert))
                      ("2"
                       (replace -1)
                       (typepred "ssp")
                       (expand "strictly_increasing?")
                       (inst - "ssp`length-2" "ssp`length-1")
                       (("1" (assert))
                        ("2"
                         (lemma "partition_strictly_sort")
                         (inst - "a" "b")
                         (assert)
                         (inst - "P")
                         (assert))))))
                    ("2"
                     (lemma "partition_strictly_sort")
                     (inst - "a" "b")
                     (assert)
                     (inst - "P")
                     (assert))))
                  ("2"
                   (lemma "partition_strictly_sort")
                   (inst - "a" "b")
                   (assert)
                   (inst - "P")
                   (assert))))
                ("3"
                 (lemma "partition_strictly_sort")
                 (inst - "a" "b")
                 (assert)
                 (inst - "P")
                 (assert))))
              ("2"
               (lemma "partition_strictly_sort")
               (inst - "a" "b")
               (assert)
               (inst - "P")
               (assert))))
            ("2"
             (lemma "partition_strictly_sort")
             (inst - "a" "b")
             (assert)
             (("1" (inst - "P") (assert))
              ("2"
               (lemma "partition_strictly_sort")
               (expand "ssp")
               (typepred "strictly_sort(P)")
               (inst-cp - "a")
               (inst - "b")
               (case "member(b,P) and member(a,P)")
               (("1"
                 (flatten)
                 (replace -1)
                 (replace -2)
                 (hide -1)
                 (hide -1)
                 (expand "member")
                 (skosimp*)
                 (assert))
                ("2"
                 (hide-all-but 1)
                 (assert)
                 (split)
                 (("1" (inst + "P`length-1") (assert))
                  ("2" (inst + "0") (assert))))))))))
          ("2"
           (hide 2)
           (label "altb" -3)
           (induct "mm")
           (("1"
             (flatten)
             (expand "sigma")
             (expand "sigma" 1 1)
             (assert)
             (lift-if)
             (assert)
             (case "sigma(0, sig(0) - 1,
                                                                                                                                                                                                                                                         LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                                                                           f(xis`seq(n)) * g(P`seq(1 + n)) -
                                                                                                                                                                                                                                                            f(xis`seq(n)) * g(P`seq(n))) = 0")
             (("1"
               (replace -1)
               (assert)
               (typepred "sig")
               (inst - "0")
               (flatten)
               (assert)
               (replace "sspname")
               (replace -2 :dir rl)
               (replace -3 :dir rl)
               (expand "yis")
               (assert))
              ("2"
               (hide 2)
               (rewrite "sigma_restrict_eq_0")
               (hide 2)
               (skeep)
               (typepred "i")
               (case "P`seq(1+i) = P`seq(i)")
               (("1" (assert))
                ("2"
                 (hide 2)
                 (typepred "sig")
                 (inst - "0")
                 (hide -1)
                 (flatten)
                 (assert)
                 (hide -2)
                 (case "P`seq(sig(0)) = a")
                 (("1"
                   (typepred "P")
                   (copy -4)
                   (case "P`seq(i) = a AND P`seq(1+i) = a")
                   (("1" (flatten) (assert))
                    ("2"
                     (hide 2)
                     (split +)
                     (("1"
                       (expand "increasing?" -1)
                       (inst-cp - "0" "i")
                       (inst - "i" "sig(0)")
                       (assert))
                      ("2"
                       (expand "increasing?" -1)
                       (inst-cp - "0" "1+i")
                       (inst - "1+i" "sig(0)")
                       (assert))))))
                  ("2"
                   (lemma "partition_strictly_sort")
                   (inst - "a" "b")
                   (assert)
                   (inst - "P")
                   (assert))))))))
            ("2"
             (skolem 1 "mm")
             (assert)
             (("1"
               (flatten)
               (expand "sigma" 1 1)
               (replace -2)
               (lemma "strictly_sort_map_increasing")
               (expand "sigma" 1 2)
               (lift-if)
               (ground)
               (expand "yis" +)
               (assert)
               (replace "signame")
               (case "f(xis`seq(sig(1 + mm))) * g(ssp`seq(2 + mm))
                                                                                                                                                                                                                                                                               - f(xis`seq(sig(1 + mm))) * g(ssp`seq(1 + mm)) = f(xis`seq(sig(1 + mm))) * g(P`seq(1 + sig(1 + mm)))
                                                                                                                                                                                                                                                                                - f(xis`seq(sig(1 + mm))) * g(P`seq(sig(1 + mm))) AND sigma[below(P`length - 1)]
                                                                                                                                                                                                                                                                                  (0, sig(mm),
                                                                                                                                                                                                                                                                                   LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                                                                                                     f(xis`seq(n)) * g(P`seq(1 + n)) - f(xis`seq(n)) * g(P`seq(n))) = sigma(0, sig(1 + mm) - 1,
                                                                                                                                                                                                                                                                                     LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                                                                                                       f(xis`seq(n)) * g(P`seq(1 + n)) -
                                                                                                                                                                                                                                                                                        f(xis`seq(n)) * g(P`seq(n)))")
               (("1" (flatten) (assert))
                ("2"
                 (hide 3)
                 (split +)
                 (("1"
                   (typepred "sig")
                   (inst - "1+mm")
                   (flatten)
                   (assert))
                  ("2"
                   (lemma "sigma_split[below(P`length-1)]")
                   (inst -
                    "(LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                                                                                         f(xis`seq(n)) * g(P`seq(1 + n)) -
                                                                                                                                                                                                                                                                          f(xis`seq(n)) * g(P`seq(n)))"
                    "sig(1+mm)-1" "0" "sig(mm)")
                   (assert)
                   (split -)
                   (("1"
                     (replace -1)
                     (hide -1)
                     (case "sigma(1 + sig(mm), sig(1 + mm) - 1,
                                                                                                                                                                                                                                                                                                                                                                          (LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                                                                                                                                                                                             f(xis`seq(n)) * g(P`seq(1 + n)) -
                                                                                                                                                                                                                                                                                                                                                                              f(xis`seq(n)) * g(P`seq(n)))) = 0")
                     (("1" (assert))
                      ("2"
                       (hide 2)
                       (rewrite "sigma_restrict_eq_0")
                       (hide 2)
                       (hide -1)
                       (hide -2)
                       (skeep)
                       (typepred "i")
                       (case "P`seq(i) = P`seq(1+i)")
                       (("1" (assert))
                        ("2"
                         (hide 2)
                         (lemma "strictly_sort_map_between")
                         (inst - "P")
                         (assert)
                         (replace "signame")
                         (inst - "mm")
                         (inst-cp - "i")
                         (inst - "1+i")
                         (assert))))))
                    ("2"
                     (inst - "P")
                     (assert)
                     (inst - "mm" "1+mm")
                     (assert))))))))
              ("2"
               (hide 2)
               (replace -2)
               (case "ssp`length >= 2")
               (("1" (assert))
                ("2"
                 (hide 2)
                 (lemma "partition_strictly_sort")
                 (inst - "a" "b")
                 (assert))))))
            ("3"
             (hide 2)
             (skeep)
             (case "mm < 0")
             (("1" (assert))
              ("2"
               (assert)
               (typepred "sig(mm)")
               (assert)
               (case "NOT sig(mm) = P`length-1")
               (("1" (assert))
                ("2"
                 (typepred "sig")
                 (inst - "mm")
                 (replace "sspname")
                 (assert)
                 (flatten)
                 (typepred "sig")
                 (hide -1)
                 (inst - "ssp`length-1")
                 (flatten)
                 (assert)
                 (typepred "ssp")
                 (expand "strictly_increasing?")
                 (inst - "mm" "ssp`length-1")
                 (ground))))))
            ("4" (skosimp*) (assert)) ("5" (skosimp*) (assert))
            ("6" (skosimp*) (assert))
            ("7"
             (lemma "partition_strictly_sort")
             (inst - "a" "b")
             (assert))))
          ("3"
           (hide 2)
           (skeep)
           (case "mm < 0")
           (("1" (assert))
            ("2"
             (assert)
             (typepred "sig(mm)")
             (assert)
             (case "NOT sig(mm) = P`length-1")
             (("1" (assert))
              ("2"
               (typepred "sig")
               (inst - "mm")
               (replace -6)
               (assert)
               (flatten)
               (typepred "sig")
               (hide -1)
               (inst - "ssp`length-1")
               (flatten)
               (assert)
               (typepred "ssp")
               (expand "strictly_increasing?")
               (inst - "mm" "ssp`length-1")
               (ground))))))
          ("4" (skosimp*) (assert)) ("5" (skosimp*) (assert))))
        ("2" (assert) (skeep) (hide -2) (ground))))
      ("3"
       (hide -1)
       (skeep)
       (assert)
       (hide 2)
       (split +)
       (("1" (skeep) (expand "XISfun") (lift-if) (ground))
        ("2"
         (expand "XISfun")
         (lemma "partition_strictly_sort")
         (inst - "a" "b")
         (assert)
         (inst - "P")
         (ground))
        ("3" (expand "XISfun") (propax))
        ("4"
         (skeep)
         (expand "XISfun")
         (name "sig" "strictly_sort_map(P)")
         (replace -1)
         (typepred "ii")
         (typepred "sig")
         (inst - "ii")
         (flatten)
         (assert)
         (typepred "xis")
         (inst - "sig(ii)")
         (("1" (flatten) (assert))
          ("2"
           (case "sig(ii) = P`length-1")
           (("1"
             (assert)
             (replace -1)
             (lemma "strictly_sort_map_increasing")
             (inst - "P")
             (assert)
             (inst - "ii" "strictly_sort(P)`length-1")
             (assert))
            ("2" (assert))))))))
      ("4"
       (hide 2)
       (skeep)
       (lemma "partition_strictly_sort")
       (inst - "a" "b")
       (assert)
       (inst - "P"))
      ("5" (assert))))
    ("2"
     (hide 2)
     (skeep)
     (lemma "partition_strictly_sort")
     (inst - "a" "b")
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (stop-rewrite "xis_lem")
   (skosimp*)
   (expand "integral?")
   (case-replace "(FORALL (EPS: posreal): abs(A1!1 - A2!1) < 2*EPS)")
   (("1" (inst - "abs(A1!1-A2!1)/2") (("1" (assert)) ("2" (assert))))
    ("2"
     (hide 2)
     (skosimp*)
     (inst - "EPS!1")
     (inst - "EPS!1")
     (skosimp*)
     (name "Delta" "min(delta!1,delta!2)")
     (lemma "partition_exists")
     (inst - "a!1" "b!1" "Delta")
     (assert)
     (skolem -1 "myP")
     (inst - "myP")
     (inst - "myP")
     (assert)
     (name "myxis" "gen_xis(a!1,b!1,myP)")
     (name "RS" "Rie_sum(a!1,b!1,g!1,myP,myxis,f!1)")
     (inst - "RS")
     (("1"
       (inst - "RS")
       (("1" (hide-all-but (-6 -7 +)) (grind))
        ("2"
         (lemma "Riemann?_Rie")
         (inst - "a!1" "b!1" "f!1" "g!1")
         (split -)
         (("1" (inst - "myP" "myxis") (assert)) ("2" (propax))))))
      ("2"
       (lemma "Riemann?_Rie")
       (inst - "a!1" "b!1" "f!1" "g!1")
       (split -)
       (("1" (inst - "myP" "myxis") (assert)) ("2" (propax))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (expand "integrable?")
   (typepred "integral(a!1, b!1, g!1,f!1)")
   (("1"
     (ground)
     (("1"
       (lemma "integral_unique")
       (inst?)
       (inst -1 "integral(a!1, b!1,g!1, f!1)")
       (assert)
       (inst + "s!1"))
      ("2"
       (lemma "integral_unique")
       (inst?)
       (inst -1 "integral(a!1, b!1, g!1,f!1)")
       (assert))))
    ("2" (expand "integrable?") (inst?) (assert) (flatten) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "integral_def")
   (typepred "integral(a!1, b!1, g!1,f!1)")
   (expand "integral?")
   (skosimp*)
   (inst - "epsi!1")
   (skosimp*)
   (inst + "delta!1")
   (skosimp*)
   (inst - "P!1")
   (assert)
   (typepred "integral(a!1, b!1, g!1,f!1)")
   (inst - "R!1")
   (typepred "R!1")
   (hide 2)
   (expand "Riemann_sum?")
   (skosimp*)
   (inst + "xis!1")
   (assert)
   (replace -1)
   (expand "Rie_sum")
   (assert)
   (rewrite "sigma_restrict_eq")
   (hide 2)
   (hide -1)
   (expand "restrict")
   (apply-extensionality :hide? t)
   (inst - "xis!1`seq(x!1)")
   (assert)
   (typepred "xis!1")
   (inst - "x!1")
   (assert)
   (flatten)
   (typepred "P!1")
   (inst-cp -5 "x!1")
   (inst -5 "x!1+1")
   (ground))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite + "member")
   (skeep)
   (label "altb" -1)
   (skeep)
   (name "PQ" "partition_union(a,b)(P,Q)")
   (replace -1)
   (label "PQname" -1)
   (assert)
   (("1"
     (flatten)
     (label "Pinc" -3)
     (skeep)
     (expand "Rie_sum")
     (name "FF"
           "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                 f(xis`seq(n)) * (g(P`seq(1 + n)) - g(P`seq(n)))")
     (label "FFname" -1)
     (replace "FFname")
     (name "sig" "partition_union_map_inv(a, b, P, Q)")
     (replace -1)
     (label "signame" -1)
     (case "NOT sig(partition_union(a, b)(P, Q)`length - 2) = P`length-2")
     (("1"
       (hide 2)
       (typepred "sig")
       (name "kj" "partition_union(a, b)(P, Q)`length - 2")
       (label "kjname" -1)
       (replace "kjname")
       (inst - "kj")
       (("1"
         (assert)
         (flatten)
         (case "sig(kj) = P`length-1")
         (("1"
           (case "partition_union(a, b)(P, Q)`seq(kj) = b")
           (("1"
             (typepred "partition_union(a,b)(P,Q)")
             (expand "strictly_increasing?")
             (inst - "kj" "kj+1")
             (assert))
            ("2"
             (typepred "partition_union(a,b)(P,Q)")
             (inst - "kj")
             (ground))))
          ("2"
           (assert)
           (case "PQ`seq(kj) < P`seq(P`length-2)")
           (("1"
             (case "PQ`seq(kj)<P`seq(P`length-1)")
             (("1"
               (typepred "PQ")
               (copy -6)
               (inst-cp - "P`seq(P`length - 2)")
               (inst - "P`seq(P`length - 1)")
               (case "member(P`seq(P`length-1),P)")
               (("1"
                 (case "member(P`seq(P`length-2),P)")
                 (("1"
                   (replace -1)
                   (replace -2)
                   (hide -1)
                   (hide -1)
                   (assert)
                   (skosimp*)
                   (case "kj < i!2 AND i!2 < i!1")
                   (("1" (flatten) (assert))
                    ("2"
                     (split +)
                     (("1"
                       (case "kj = i!2")
                       (("1" (assert))
                        ("2"
                         (expand "strictly_increasing?")
                         (inst - "i!2" "kj")
                         (assert))))
                      ("2"
                       (label "Pinc" -1)
                       (case "i!2 = i!1")
                       (("1"
                         (assert)
                         (expand "strictly_increasing?" "Pinc")
                         (inst "Pinc" "P`length-2" "P`length-1")
                         (assert))
                        ("2"
                         (hide "Pinc")
                         (assert)
                         (expand "strictly_increasing?")
                         (inst - "i!1" "i!2")
                         (assert)
                         (flatten)
                         (assert)
                         (reveal "Pinc")
                         (expand "strictly_increasing?")
                         (inst "Pinc" "P`length-2" "P`length-1")
                         (assert))))))))
                  ("2" (hide-all-but 1) (assert) (inst?))))
                ("2" (hide-all-but 1) (assert) (inst?))))
              ("2"
               (label "Pinc" -1)
               (expand "strictly_increasing?" "Pinc")
               (inst "Pinc" "P`length-2" "P`length-1")
               (assert))))
            ("2"
             (label "Pinc" -1)
             (expand "strictly_increasing?" "Pinc")
             (inst "Pinc" "1+sig(kj)" "P`length-2")
             (assert))))))
        ("2" (assert))))
      ("2"
       (label "sigm2" -1)
       (name "pum" "partition_union_map(a,b,P,Q)")
       (label "pumname" -1)
       (typepred "pum")
       (label "pumtp" -1)
       (case "NOT (FORALL (nn:below(P`length-1)): sigma[below(P`length - 1)](0, nn, FF) = sigma[below(PQ`length - 1)]
                                                                                                                                             (0, pum(nn+1)-1, (LAMBDA (n: below(PQ`length - 1)):
                                                                                                                                           f(xis`seq(sig(n))) * (g(PQ`seq(1 + n)) -g(PQ`seq(n))))))")
       (("1"
         (hide 2)
         (induct "nn")
         (("1"
           (assert)
           (expand "sigma" 1 1)
           (expand "sigma" 1 1)
           (expand "FF" +)
           (case "FORALL (yy:below(PQ`length - 1)): yy<=pum(1)-1 IMPLIES sigma[below(PQ`length - 1)]
                                                                                                                                                                             (0, yy,
                                                                                                                                                                              (LAMBDA (n: below(PQ`length - 1)):
                                                                                                                                                                                 f(xis`seq(sig(n))) *
                                                                                                                                                                                  g(PQ`seq(1 + n))
                                                                                                                                                                                  -
                                                                                                                                                                                  f(xis`seq(sig(n))) * g(PQ`seq(n)))) = f(xis`seq(0))*(g(PQ`seq(1 + yy))-g(PQ`seq(0)))")
           (("1"
             (inst - "pum(1)-1")
             (("1" (assert) (replace -1) (inst - "1") (assert))
              ("2"
               (assert)
               (assert)
               (inst-cp - "1")
               (inst - "0")
               (assert))))
            ("2"
             (hide 2)
             (induct "yy")
             (("1"
               (assert)
               (flatten)
               (expand "sigma" +)
               (expand "sigma" +)
               (case "sig(0) = 0")
               (("1" (assert))
                ("2"
                 (hide 2)
                 (typepred "sig")
                 (lemma "partition_union_map_inv_def")
                 (inst - "a" "b")
                 (assert)
                 (inst - "P" "Q")
                 (inst - "0" "0")
                 (assert)
                 (typepred "pum")
                 (inst - "0")
                 (typepred "PQ")
                 (expand "strictly_increasing?")
                 (inst - "0" "pum(0)")
                 (assert))))
              ("2"
               (skolem 1 "nn")
               (flatten)
               (assert)
               (expand "sigma" +)
               (replace -2)
               (case "sig(1+nn) = 0")
               (("1" (assert))
                ("2"
                 (hide 2)
                 (hide -2)
                 (lemma "partition_union_map_inv_def")
                 (assert)
                 (inst - "a" "b")
                 (assert)
                 (inst - "P" "Q")
                 (inst - "1+nn" "0")
                 (assert)
                 (hide 2)
                 (typepred "pum")
                 (inst - "0")
                 (typepred "PQ")
                 (expand "strictly_increasing?")
                 (inst - "0" "pum(0)")
                 (assert))))))))
          ("2"
           (skolem 1 "nn")
           (flatten)
           (expand "sigma" + 1)
           (replace -2)
           (hide -2)
           (lemma "sigma_split[below(PQ`length - 1)]")
           (inst -
            "(LAMBDA (n: below(PQ`length - 1)):
                                                                                                                                         f(xis`seq(sig(n))) *(g(PQ`seq(1 + n))-g(PQ`seq(n))))"
            "pum(2+nn)-1" "0" "pum(nn + 1) - 1")
           (assert)
           (case "pum(1 + nn) - 1 <= pum(2 + nn) - 1")
           (("1"
             (replace -1)
             (case "FF(1+nn) = sigma(pum(1 + nn), pum(2 + nn) - 1,
                                                                                                                                                                                                (LAMBDA (n: below(PQ`length - 1)):
                                                                                                                                                                                                   f(xis`seq(sig(n))) *
                                                                                                                                                                                                    g(PQ`seq(1 + n))
                                                                                                                                                                                                    -
                                                                                                                                                                                                    f(xis`seq(sig(n))) *
                                                                                                                                                                                                     g(PQ`seq(n))))")
             (("1" (ground))
              ("2"
               (hide 2)
               (hide -2)
               (expand "FF" +)
               (case "FORALL (yy:below(PQ`length - 1)): pum(1+nn)<=yy AND yy<=pum(2+nn)-1 IMPLIES sigma[below(PQ`length - 1)]
                                                                                                                                                                                                         (pum(1+nn), yy,
                                                                                                                                                                                                          (LAMBDA (n: below(PQ`length - 1)):
                                                                                                                                                                                                             f(xis`seq(sig(n))) *
                                                                                                                                                                                                              g(PQ`seq(1 + n))
                                                                                                                                                                                                              -
                                                                                                                                                                                                              f(xis`seq(sig(n))) * g(PQ`seq(n)))) = f(xis`seq(1+nn))*(g(PQ`seq(1 + yy))-g(PQ`seq(pum(1+nn))))")
               (("1"
                 (inst - "pum(2+nn)-1")
                 (("1"
                   (assert)
                   (split -)
                   (("1"
                     (replace -1)
                     (typepred "pum")
                     (inst-cp - "1+nn")
                     (inst - "2+nn")
                     (assert))
                    ("2"
                     (hide 2)
                     (lemma "partition_union_map_increasing")
                     (inst - "a" "b")
                     (assert)
                     (inst - "P" "Q" "1+nn" "2+nn")
                     (assert))))
                  ("2"
                   (expand "sigma")
                   (assert)
                   (lemma "partition_union_map_increasing")
                   (inst - "a" "b")
                   (assert)
                   (inst - "P" "Q" "1+nn" "2+nn")
                   (assert))))
                ("2"
                 (hide 2)
                 (induct "yy")
                 (("1"
                   (assert)
                   (flatten)
                   (case "pum(1+nn) = 0")
                   (("1"
                     (replace -1)
                     (expand "sigma")
                     (expand "sigma")
                     (lemma "partition_union_map_inv_def")
                     (assert)
                     (inst - "a" "b")
                     (assert)
                     (inst - "P" "Q")
                     (inst - "0" "1+nn")
                     (assert))
                    ("2" (assert))))
                  ("2"
                   (skolem 1 "yy")
                   (flatten)
                   (assert)
                   (split -)
                   (("1"
                     (expand "sigma" +)
                     (replace -1)
                     (assert)
                     (case "sig(1+yy) = 1+nn")
                     (("1" (assert))
                      ("2"
                       (hide 2)
                       (hide -1)
                       (lemma "partition_union_map_inv_def")
                       (assert)
                       (inst - "a" "b")
                       (assert)
                       (inst - "P" "Q")
                       (inst - "1+yy" "1+nn")
                       (assert))))
                    ("2"
                     (case "pum(1+nn) = 1+yy")
                     (("1"
                       (expand "sigma")
                       (expand "sigma")
                       (assert)
                       (case "sig(1+yy) = 1+nn")
                       (("1" (assert))
                        ("2"
                         (lemma "partition_union_map_inv_def")
                         (assert)
                         (inst - "a" "b")
                         (assert)
                         (inst - "P" "Q")
                         (inst - "1+yy" "1+nn")
                         (assert))))
                      ("2" (assert))))))
                  ("3" (hide 2) (assert)) ("4" (assert))))))))
            ("2"
             (lemma "partition_union_map_increasing")
             (hide -2)
             (inst - "a" "b")
             (hide 2)
             (assert)
             (inst - "P" "Q" "1+nn" "2+nn")
             (assert))))
          ("3"
           (hide 2)
           (skeep)
           (assert)
           (case "pum(1+nn) = 0")
           (("1" (inst + "0") (assert)) ("2" (assert))))))
        ("2"
         (inst - "P`length-2")
         (assert)
         (replace -1)
         (case "pum(P`length-1) = PQ`length - 1")
         (("1" (replace -1) (assert))
          ("2"
           (hide 2)
           (hide -1)
           (inst - "P`length-1")
           (typepred "partition_union(a,b)(P,Q)")
           (expand "strictly_increasing?")
           (inst - "pum(P`length-1)" "PQ`length - 1")
           (assert))))
        ("3"
         (assert)
         (skeep)
         (case "pum(1+nn) = 0")
         (("1" (inst + "0") (assert)) ("2" (assert))))))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite + "member")
   (stop-rewrite "xis_lem")
   (skeep)
   (skeep)
   (name "PQ" "partition_union(a,b)(P,Q)")
   (replace -1)
   (label "altb" -2)
   (label "PQname" -1)
   (name "pum" "partition_union_map(a,b,P,Q)")
   (label "pumname" -1)
   (replace -1)
   (assert)
   (skeep)
   (label "Pinc" -4)
   (label "hyplem" -5)
   (name "xis"
         "(# length := P`length-1, seq:= (LAMBDA (nn:nat): IF nn<P`length-1 THEN xispq`seq(pum(nn)) ELSE default[T] ENDIF) #)")
   (("1"
     (label "xisname" -1)
     (inst + "xis")
     (("1"
       (case "pum(P`length-1) = PQ`length-1")
       (("1"
         (label "pumm1" -1)
         (case "pum(0) = 0")
         (("1"
           (label "pum0" -1)
           (expand "Rie_sum")
           (case "FORALL (mm:below(P`length-1)): sigma[below(P`length - 1)]
                                                                                                   (0, mm,
                                                                                                    LAMBDA (n: below(P`length - 1)):
                                                                                                      f(xis`seq(n)) * g(P`seq(1 + n)) - f(xis`seq(n)) * g(P`seq(n))) = sigma[below(PQ`length - 1)]
                                                                                                  (0,pum(mm+1)-1,
                                                                                                   LAMBDA (n: below(PQ`length - 1)):
                                                                                                     f(xispq`seq(n)) * g(PQ`seq(1 + n)) -
                                                                                                      f(xispq`seq(n)) * g(PQ`seq(n)))")
           (("1" (inst - "P`length-2") (assert))
            ("2"
             (hide 2)
             (induct "mm")
             (("1"
               (flatten)
               (assert)
               (expand "sigma" 1 1)
               (expand "sigma" 1 1)
               (assert)
               (case "FORALL (yy:below(PQ`length-1)): yy<= pum(1)-1 IMPLIES sigma[below(PQ`length - 1)]
                                                                                                          (0, yy,
                                                                                                           LAMBDA (n: below(PQ`length - 1)):
                                                                                                             f(xispq`seq(n)) * g(PQ`seq(1 + n)) -
                                                                                                              f(xispq`seq(n)) * g(PQ`seq(n))) = f(xis`seq(0))*(g(PQ`seq(yy+1))-g(PQ`seq(0)))")
               (("1"
                 (inst - "pum(1)-1")
                 (("1"
                   (assert)
                   (replace -1)
                   (hide -1)
                   (typepred "pum")
                   (inst - "1")
                   (assert))
                  ("2" (assert) (typepred "pum") (inst - "1") (assert))))
                ("2"
                 (hide 2)
                 (induct "yy")
                 (("1"
                   (assert)
                   (flatten)
                   (expand "sigma")
                   (expand "sigma")
                   (assert)
                   (expand "xis" +)
                   (assert))
                  ("2"
                   (skolem 1 "nn")
                   (flatten)
                   (assert)
                   (expand "sigma" 1 1)
                   (replace -2)
                   (assert)
                   (expand "xis" +)
                   (assert)
                   (replace "pum0")
                   (inst "hyplem" "0" "1+nn" "0")
                   (assert))))))
              ("2"
               (skolem 1 "mm")
               (flatten)
               (expand "sigma" 1 1)
               (replace -2)
               (hide -2)
               (lemma "sigma_split[below(PQ`length-1)]")
               (inst -
                "LAMBDA (n: below(PQ`length - 1)):
                                                                       f(xispq`seq(n)) * g(PQ`seq(1 + n)) -
                                                                        f(xispq`seq(n)) * g(PQ`seq(n))"
                "pum(2+mm)-1" "0" "pum(mm+1)-1")
               (assert)
               (lemma "partition_union_map_increasing")
               (inst - "a" "b")
               (assert)
               (inst - "P" "Q" "1+mm" "2+mm")
               (assert)
               (hide -1)
               (case "sigma(pum(1 + mm), pum(2 + mm) - 1,
                                                                                            LAMBDA (n: below(PQ`length - 1)):
                                                                                              f(xispq`seq(n)) * g(PQ`seq(1 + n)) -
                                                                                               f(xispq`seq(n)) * g(PQ`seq(n))) = f(xis`seq(1 + mm)) * g(P`seq(2 + mm))
                                                                                     - f(xis`seq(1 + mm)) * g(P`seq(1 + mm))")
               (("1" (assert))
                ("2"
                 (hide 2)
                 (case "FORALL (yy:below(PQ`length-1)): pum(1+mm)<=yy AND yy<=pum(2+mm)-1 IMPLIES
                                                                                       sigma(pum(1 + mm), yy,
                                                                                                   LAMBDA (n: below(PQ`length - 1)):
                                                                                                     f(xispq`seq(n)) * g(PQ`seq(1 + n)) -
                                                                                                      f(xispq`seq(n)) * g(PQ`seq(n))) = f(xis`seq(1+mm))*(g(PQ`seq(1+yy))-g(PQ`seq(pum(1+mm))))")
                 (("1"
                   (inst - "pum(2+mm)-1")
                   (assert)
                   (typepred "pum")
                   (inst-cp - "1+mm")
                   (inst - "2+mm")
                   (assert))
                  ("2"
                   (hide 2)
                   (induct "yy")
                   (("1"
                     (assert)
                     (flatten)
                     (expand "sigma")
                     (assert)
                     (expand "sigma")
                     (case "pum(1+mm) = 0")
                     (("1" (replace -1) (expand "xis" +) (assert))
                      ("2" (assert))))
                    ("2"
                     (skolem 1 "nn")
                     (flatten)
                     (assert)
                     (split -)
                     (("1"
                       (expand "sigma" +)
                       (replace -1)
                       (assert)
                       (hide -1)
                       (expand "xis" +)
                       (assert)
                       (typepred "pum")
                       (inst "hyplem" "1+mm" "pum(1+mm)" "1+nn")
                       (assert))
                      ("2"
                       (case "NOT pum(1+mm) = nn+1")
                       (("1" (assert))
                        ("2"
                         (replace -1)
                         (hide 1)
                         (expand "sigma" +)
                         (expand "sigma" +)
                         (expand "xis" +)
                         (assert))))))))))))
              ("3" (hide 2) (skosimp*) (inst + "0") (assert))))
            ("3" (hide 2) (skosimp*) (inst + "0") (assert))))
          ("2"
           (typepred "pum")
           (inst - "0")
           (typepred "PQ")
           (expand "strictly_increasing?")
           (inst - "0" "pum(0)")
           (assert))))
        ("2"
         (typepred "pum")
         (inst - "P`length-1")
         (typepred "PQ")
         (expand "strictly_increasing?")
         (inst - "pum(P`length-1)" "PQ`length-1")
         (assert))))
      ("2"
       (assert)
       (split +)
       (("1" (skeep) (expand "xis") (lift-if) (ground))
        ("2"
         (skeep)
         (expand "xis" +)
         (assert)
         (typepred "pum")
         (inst - "ii")
         (typepred "xispq")
         (inst - "pum(ii)")
         (("1"
           (assert)
           (ground)
           (case "PQ`seq(1+pum(ii)) <= P`seq(1+ii)")
           (("1" (assert))
            ("2"
             (hide 2)
             (replace "PQname")
             (expand "strictly_increasing?")
             (inst "Pinc" "ii" "1+ii")
             (assert)
             (case "P`seq(ii) < P`seq(1+ii)")
             (("1"
               (hide "Pinc")
               (typepred "PQ")
               (copy -6)
               (inst - "P`seq(1+ii)")
               (case "member(P`seq(1+ii),P)")
               (("1"
                 (replace -1)
                 (hide -1)
                 (assert)
                 (skosimp*)
                 (replace -1)
                 (case "i!1 > pum(ii)")
                 (("1"
                   (expand "strictly_increasing?")
                   (inst - "pum(ii)+1" "i!1")
                   (assert))
                  ("2"
                   (expand "strictly_increasing?")
                   (inst - "i!1" "pum(ii)")
                   (assert))))
                ("2" (hide-all-but 1) (assert) (inst?))))
              ("2" (assert) (ground))))))
          ("2"
           (case "pum(ii) = PQ`length-1")
           (("1"
             (typepred "ii")
             (hide-all-but (-1 -2 "Pinc" "PQname"))
             (typepred "pum")
             (inst - "ii")
             (expand "strictly_increasing?")
             (inst - "ii" "P`length-1")
             (assert))
            ("2" (assert))))))))))
    ("2" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (case "FORALL (a, b:T, f, g: [T->real]):
                                                                                                                                                                           a < b IMPLIES
                                                                                                                                                                            LET CI = LAMBDA (x:T): a <= x AND x <= b IN
                                                                                                                                                                              (increasing?[(CI)](restrict[T, ((CI)), real](g)) IMPLIES
                                                                                                                                                                                (FORALL (P, Q: partition(a, b)): (strictly_increasing?(P) AND strictly_increasing?(Q)) IMPLIES
                                                                                                                                                                                   LET PQ:
                                                                                                                                                                                         {PQ: partition(a, b) |
                                                                                                                                                                                                  (FORALL (x:T):
                                                                                                                                                                                                     member(x, PQ) IFF
                                                                                                                                                                                                      (member(x, P) OR member(x, Q)))
                                                                                                                                                                                                   AND strictly_increasing?(PQ)}
                                                                                                                                                                                         = partition_union(a, b)(P, Q)
                                                                                                                                                                                     IN
                                                                                                                                                                                     FORALL (xispq: xis?(a, b, PQ), xis: xis?(a, b, P)):
                                                                                                                                                                                       EXISTS (xis2: xis?(a, b, P)):
                                                                                                                                                                                         abs(Rie_sum(a, b, g, P, xis, f) -
                                                                                                                                                                                              Rie_sum(a, b, g, PQ, xispq, f))
                                                                                                                                                                                          <=
                                                                                                                                                                                          abs(Rie_sum(a, b, g, P, xis, f) -
                                                                                                                                                                                               Rie_sum(a, b, g, P, xis2, f))))")
   (("1"
     (skeep)
     (assert)
     (flatten)
     (skeep)
     (inst - "a" "b" "f" "g")
     (assert)
     (case "partition_union(a,b)(P,Q) = partition_union(a, b)(strictly_sort(P), strictly_sort(Q))")
     (("1"
       (assert)
       (inst - "strictly_sort(P)" "strictly_sort(Q)")
       (assert)
       (skeep)
       (lemma "Riemann_sum_strictly_sort")
       (inst - "a" "b" "f" "g")
       (assert)
       (inst - "P" "Rie_sum(a, b, g, P, xis, f)")
       (flatten)
       (hide -2)
       (split -)
       (("1"
         (skolem -1 "xissp")
         (inst - "xispq" "xissp")
         (("1"
           (skolem - "xis2sp")
           (lemma "Riemann_sum_strictly_sort")
           (inst - "a" "b" "f" "g")
           (assert)
           (inst - "P" "Rie_sum(a, b, g, strictly_sort(P), xis2sp, f)")
           (flatten)
           (hide -1)
           (split -)
           (("1" (skolem -1 "xis2") (inst + "xis2") (assert))
            ("2"
             (case "partition_union(a,b)(P,Q) = partition_union(a, b)(strictly_sort(P), strictly_sort(Q))")
             (("1" (inst + "xis2sp")) ("2" (propax))))))
          ("2"
           (assert)
           (skeep)
           (replace -2 :dir rl)
           (assert)
           (typepred "xispq")
           (inst - "ii"))))
        ("2" (inst + "xis"))))
      ("2"
       (hide 2)
       (lemma "partition_strictly_sort_union")
       (inst - "a" "b")
       (assert)
       (inst-cp - "P" "Q")
       (inst - "Q" "strictly_sort(P)")
       (lemma "partition_union_sym")
       (inst - "a" "b")
       (assert)
       (inst-cp - "strictly_sort(P)" "Q")
       (inst - "strictly_sort(P)" "strictly_sort(Q)")
       (assert))
      ("3"
       (lemma "partition_strictly_sort")
       (inst - "a" "b")
       (assert)
       (inst - "Q"))
      ("4"
       (lemma "partition_strictly_sort")
       (inst - "a" "b")
       (assert)
       (inst - "P"))))
    ("2"
     (hide 2)
     (case "FORALL (a, b:T, f, g: [T->real]):
                                                                                                                                                                                                       a < b IMPLIES
                                                                                                                                                                                                        LET CI = LAMBDA (x:T): a <= x AND x <= b IN
                                                                                                                                                                                                          (increasing?[(CI)](restrict[T, ((CI)), real](g)) IMPLIES
                                                                                                                                                                                                            (FORALL (P, Q: partition(a, b)):
                                                                                                                                                                                                               (strictly_increasing?(P) AND strictly_increasing?(Q))
                                                                                                                                                                                                                IMPLIES
                                                                                                                                                                                                                LET PQ:
                                                                                                                                                                                                                      {PQ: partition(a, b) |
                                                                                                                                                                                                                               (FORALL (x:T):
                                                                                                                                                                                                                                  member(x, PQ) IFF
                                                                                                                                                                                                                                   (member(x, P) OR member(x, Q)))
                                                                                                                                                                                                                                AND strictly_increasing?(PQ)}
                                                                                                                                                                                                                      = partition_union(a, b)(P, Q)
                                                                                                                                                                                                                  IN
                                                                                                                                                                                                                  FORALL (xispq: xis?(a, b, PQ), xis: xis?(a, b, P)):Rie_sum(a, b, g, P, xis, f) >=
                                                                                                                                                                                                                           Rie_sum(a, b, g, PQ, xispq, f) IMPLIES
                                                                                                                                                                                                                    EXISTS (xis2: xis?(a, b, P)):
                                                                                                                                                                                                                           Rie_sum(a, b, g, PQ, xispq, f) >=
                                                                                                                                                                                                                            Rie_sum(a, b, g, P, xis2, f)))")
     (("1"
       (skeep)
       (assert)
       (flatten)
       (skeep)
       (skeep)
       (case "Rie_sum(a, b, g, P, xis, f) >=
                                                                                                                                                                                                                                                      Rie_sum(a, b, g, partition_union(a, b)(P, Q), xispq, f)")
       (("1"
         (inst - "a" "b" "f" "g")
         (assert)
         (inst - "P" "Q")
         (assert)
         (inst - "xispq" "xis")
         (assert)
         (skosimp*)
         (inst + "xis2!1")
         (expand "abs")
         (lift-if)
         (ground))
        ("2"
         (inst - "a" "b" "(LAMBDA x: -f(x))" "g")
         (assert)
         (inst - "P" "Q")
         (assert)
         (inst - "xispq" "xis")
         (case "FORALL (ZZ:partition(a,b),xizz:xis?(a,b,ZZ)): Rie_sum(a,b,g,ZZ,xizz,(LAMBDA x:-f(x))) = -Rie_sum(a,b,g,ZZ,xizz,f)")
         (("1"
           (split -)
           (("1"
             (skeep -)
             (inst + "xis2")
             (inst-cp - "P" "xis")
             (inst-cp - "partition_union(a,b)(P,Q)" "xispq")
             (inst - "P" "xis2")
             (expand "abs")
             (lift-if)
             (ground))
            ("2"
             (inst-cp - "P" "xis")
             (inst-cp - "partition_union(a,b)(P,Q)" "xispq")
             (assert))))
          ("2"
           (hide-all-but 1)
           (skeep)
           (expand "Rie_sum")
           (lemma "sigma_scal[below(ZZ`length-1)]")
           (inst -
            "LAMBDA (n: below(ZZ`length - 1)):
                                                                                                                                                                                                                                 g(ZZ`seq(1 + n)) * f(xizz`seq(n)) -
                                                                                                                                                                                                                                  g(ZZ`seq(n)) * f(xizz`seq(n))"
            "-1" "ZZ`length-2" "0")
           (assert))))))
      ("2"
       (hide 2)
       (skeep)
       (assert)
       (flatten)
       (label "altb" -1)
       (label "ginc" -2)
       (skeep)
       (label "Pinc" -3)
       (label "Qinc" -4)
       (skeep)
       (label "RSge" -5)
       (name "PQ" "partition_union(a,b)(P,Q)")
       (label "PQname" -1)
       (replace "PQname")
       (name "pum" "partition_union_map(a,b,P,Q)")
       (label "pumname" -1)
       (name "sig" "partition_union_map_inv(a,b,P,Q)")
       (label "signame" -1)
       (case "sig(0) = 0 AND pum(0) = 0")
       (("1"
         (flatten)
         (label "sig0" -1)
         (label "pum0" -2)
         (case "FORALL (ii:below(P`length-1)): EXISTS (jj:below(PQ`length-1)): (pum(ii)<=jj AND jj<pum(ii+1) AND (FORALL (zz:below(PQ`length-1)): pum(ii)<=zz AND zz<pum(ii+1) IMPLIES f(xispq`seq(zz)) >= f(xispq`seq(jj))))")
         (("1"
           (name "xis2"
                 "(# length := P`length-1, seq := (LAMBDA (ii:nat): IF ii<P`length-1 THEN LET jj = choose({jj:below(PQ`length-1) | (pum(ii) <= jj AND
                                                                                                                                                                                                jj < pum(ii + 1) AND
                                                                                                                                                                                                 (FORALL (zz: below(PQ`length - 1)):
                                                                                                                                                                                                    pum(ii) <= zz AND zz < pum(ii + 1) IMPLIES
                                                                                                                                                                                                     f(xispq`seq(zz)) >= f(xispq`seq(jj))))}) IN xispq`seq(jj) ELSE default[T] ENDIF) #)")
           (("1"
             (stop-rewrite "xis_lem")
             (inst + "xis2")
             (("1"
               (hide -1)
               (lemma "Rie_sum_extend_union")
               (inst - "a" "b" "f" "g")
               (assert)
               (("1"
                 (inst - "P" "Q")
                 (assert)
                 (inst - "xis2")
                 (("1"
                   (replace -1 +)
                   (hide -1)
                   (expand "Rie_sum" +)
                   (case "FORALL (nn:nat): nn<= PQ`length-2 IMPLIES sigma[below(PQ`length - 1)]
                                                                                                                                                                                                                                                                                              (0, nn,
                                                                                                                                                                                                                                                                                               LAMBDA (n: below(PQ`length - 1)):
                                                                                                                                                                                                                                                                                                 f(xispq`seq(n)) * g(PQ`seq(1 + n)) -
                                                                                                                                                                                                                                                                                                  f(xispq`seq(n)) * g(PQ`seq(n)))
                                                                                                                                                                                                                                                                                           >=
                                                                                                                                                                                                                                                                                           sigma[below(partition_union(a, b)(P, Q)`length - 1)]
                                                                                                                                                                                                                                                                                               (0, nn,
                                                                                                                                                                                                                                                                                                LAMBDA (n: below(partition_union(a, b)(P, Q)`length - 1)):
                                                                                                                                                                                                                                                                                                  f(xis2`seq(partition_union_map_inv(a, b, P, Q)(n))) *
                                                                                                                                                                                                                                                                                                   g(partition_union(a, b)(P, Q)`seq(1 + n))
                                                                                                                                                                                                                                                                                                   -
                                                                                                                                                                                                                                                                                                   f(xis2`seq(partition_union_map_inv(a, b, P, Q)(n))) *
                                                                                                                                                                                                                                                                                                    g(partition_union(a, b)(P, Q)`seq(n)))")
                   (("1" (inst - "PQ`length-2") (assert))
                    ("2"
                     (hide 2)
                     (induct "nn")
                     (("1"
                       (flatten)
                       (expand "sigma" +)
                       (expand "sigma" +)
                       (replace "signame")
                       (replace "PQname")
                       (expand "xis2" +)
                       (assert)
                       (name "rr"
                             "choose({jj: below(PQ`length - 1) |
                                                                                                                                                                                                                                                                                                                                    jj < pum(1 + sig(0)) AND
                                                                                                                                                                                                                                                                                                                                     (FORALL (zz: below(PQ`length - 1)):
                                                                                                                                                                                                                                                                                                                                        zz < pum(1 + sig(0)) IMPLIES
                                                                                                                                                                                                                                                                                                                                         f(xispq`seq(zz)) >= f(xispq`seq(jj)))})")
                       (("1"
                         (replace -1)
                         (typepred "rr")
                         (inst - "0")
                         (assert)
                         (case "g(PQ`seq(1)) >= g(PQ`seq(0))")
                         (("1"
                           (mult-by -4 "g(PQ`seq(1))-g(PQ`seq(0))")
                           (assert))
                          ("2"
                           (hide 2)
                           (expand "increasing?" "ginc")
                           (inst "ginc" "PQ`seq(0)" "PQ`seq(1)")
                           (("1"
                             (assert)
                             (expand "restrict")
                             (typepred "PQ")
                             (expand "increasing?")
                             (inst - "0" "1")
                             (assert))
                            ("2" (typepred "PQ") (inst - "1"))))))
                        ("2"
                         (hide 2)
                         (expand "nonempty?")
                         (expand "empty?")
                         (inst -3 "sig(0)")
                         (skosimp*)
                         (inst - "jj!1")
                         (expand "member")
                         (assert))))
                      ("2"
                       (skeep)
                       (assert)
                       (expand "sigma" +)
                       (case "f(xispq`seq(1 + j)) * g(PQ`seq(2 + j))
                                                                                                                                                                                                                                                                                                                  - f(xispq`seq(1 + j)) * g(PQ`seq(1 + j))>=f(xis2`seq(partition_union_map_inv(a, b, P, Q)(1 + j))) *
                                                                                                                                                                                                                                                                                                                    g(partition_union(a, b)(P, Q)`seq(2 + j))
                                                                                                                                                                                                                                                                                                                   -
                                                                                                                                                                                                                                                                                                                   f(xis2`seq(partition_union_map_inv(a, b, P, Q)(1 + j))) *
                                                                                                                                                                                                                                                                                                                    g(partition_union(a, b)(P, Q)`seq(1 + j))")
                       (("1" (assert))
                        ("2"
                         (hide 2)
                         (hide -1)
                         (replace "PQname")
                         (replace "signame")
                         (case "sig(1 + j) < P`length - 1")
                         (("1"
                           (expand "xis2" +)
                           (assert)
                           (name "rr"
                                 "choose({jj: below(PQ`length - 1) |
                                                                                                                                                                                                                                                                                                                                                                                (pum(sig(1 + j)) <= jj AND
                                                                                                                                                                                                                                                                                                                                                                                  jj < pum(1 + sig(1 + j)) AND
                                                                                                                                                                                                                                                                                                                                                                                   (FORALL (zz: below(PQ`length - 1)):
                                                                                                                                                                                                                                                                                                                                                                                      pum(sig(1 + j)) <= zz AND
                                                                                                                                                                                                                                                                                                                                                                                       zz < pum(1 + sig(1 + j))
                                                                                                                                                                                                                                                                                                                                                                                       IMPLIES
                                                                                                                                                                                                                                                                                                                                                                                       f(xispq`seq(zz)) >= f(xispq`seq(jj))))})")
                           (("1"
                             (replace -1)
                             (typepred "rr")
                             (case "g(PQ`seq(2+j))>=g(PQ`seq(1+j))")
                             (("1"
                               (inst - "1+j")
                               (assert)
                               (split -)
                               (("1"
                                 (mult-by
                                  -1
                                  "g(PQ`seq(2+j))-g(PQ`seq(1+j))")
                                 (assert))
                                ("2"
                                 (hide 2)
                                 (typepred "pum")
                                 (inst - "sig(1+j)")
                                 (case "P`seq(sig(1+j)) <= PQ`seq(1+j)")
                                 (("1"
                                   (typepred "PQ")
                                   (expand "strictly_increasing?")
                                   (inst - "1+j" "pum(sig(1+j))")
                                   (assert)
                                   (ground))
                                  ("2"
                                   (hide 2)
                                   (typepred "sig")
                                   (inst - "1+j")
                                   (ground))))
                                ("3"
                                 (hide 2)
                                 (typepred "pum")
                                 (inst - "1+sig(1+j)")
                                 (case "P`seq(1+sig(1+j)) > PQ`seq(1+j)")
                                 (("1"
                                   (typepred "PQ")
                                   (expand "strictly_increasing?")
                                   (inst - "pum(1+sig(1+j))" "1+j")
                                   (ground))
                                  ("2"
                                   (hide 2)
                                   (typepred "sig")
                                   (inst - "1+j")
                                   (ground))))))
                              ("2"
                               (hide 2)
                               (expand "increasing?" "ginc")
                               (inst "ginc" "PQ`seq(1+j)" "PQ`seq(2+j)")
                               (("1"
                                 (expand "restrict")
                                 (assert)
                                 (typepred "PQ")
                                 (expand "increasing?")
                                 (inst - "1+j" "2+j")
                                 (assert))
                                ("2" (typepred "PQ") (inst - "2+j"))
                                ("3" (typepred "PQ") (inst - "1+j"))))))
                            ("2"
                             (hide 2)
                             (expand "nonempty?")
                             (expand "empty?")
                             (inst -4 "sig(1+j)")
                             (skosimp*)
                             (inst - "jj!1")
                             (expand "member")
                             (assert))))
                          ("2"
                           (hide 2)
                           (case "sig(1+j) = P`length-1")
                           (("1"
                             (typepred "sig")
                             (inst - "1+j")
                             (assert)
                             (typepred "PQ")
                             (expand "strictly_increasing?")
                             (inst - "1+j" "PQ`length-1")
                             (assert)
                             (ground))
                            ("2" (assert))))))))
                      ("3" (hide 2) (skosimp*) (assert))
                      ("4" (hide 3) (skosimp*) (assert))
                      ("5" (hide 2) (skosimp*) (assert))
                      ("6" (hide 3) (skosimp*) (assert))))
                    ("3" (hide 2) (skosimp*) (assert))
                    ("4" (hide 2) (skosimp*) (assert))))
                  ("2"
                   (assert)
                   (hide 2)
                   (expand "xis2")
                   (hide -1)
                   (typepred "P")
                   (assert))))
                ("2" (hide -1) (hide -1) (skosimp*) (assert) (ground))))
              ("2"
               (assert)
               (hide -1)
               (label "exlem" -1)
               (hide -1)
               (split)
               (("1" (skosimp*) (expand "xis2" +) (lift-if) (ground))
                ("2"
                 (skosimp*)
                 (expand "xis2")
                 (name "rr"
                       "choose({jj: below(PQ`length - 1) |
                                                                                                                                                                                                                                                               (pum(ii!1) <= jj AND
                                                                                                                                                                                                                                                                 jj < pum(1 + ii!1) AND
                                                                                                                                                                                                                                                                  (FORALL (zz: below(PQ`length - 1)):
                                                                                                                                                                                                                                                                     pum(ii!1) <= zz AND zz < pum(1 + ii!1) IMPLIES
                                                                                                                                                                                                                                                                      f(xispq`seq(zz)) >= f(xispq`seq(jj))))})")
                 (("1"
                   (replace -1)
                   (typepred "rr")
                   (typepred "xispq")
                   (inst - "rr")
                   (("1"
                     (replace "PQname")
                     (flatten)
                     (case "PQ`seq(rr) >= P`seq(ii!1) AND PQ`seq(1+rr) <= P`seq(1+ii!1)")
                     (("1" (ground))
                      ("2"
                       (hide 2)
                       (hide -1)
                       (hide -1)
                       (hide -1)
                       (split +)
                       (("1"
                         (typepred "pum")
                         (inst - "ii!1")
                         (replace "PQname")
                         (typepred "PQ")
                         (expand "increasing?")
                         (inst - "pum(ii!1)" "rr")
                         (assert))
                        ("2"
                         (typepred "pum")
                         (inst - "1+ii!1")
                         (typepred "PQ")
                         (expand "increasing?")
                         (inst - "1+rr" "pum(1+ii!1)")
                         (assert))))))
                    ("2" (assert))))
                  ("2"
                   (hide 2)
                   (expand "nonempty?")
                   (expand "empty?")
                   (reveal "exlem")
                   (inst - "ii!1")
                   (skosimp*)
                   (inst -4 "jj!1")
                   (expand "member")
                   (assert))))))))
            ("2"
             (hide 2)
             (skosimp*)
             (expand "nonempty?")
             (inst - "ii!1")
             (skosimp*)
             (expand "empty?")
             (inst - "jj!1")
             (expand "member")
             (stop-rewrite "xis_lem")
             (replace -2)
             (replace -3)
             (replace -4)
             (propax))
            ("3" (hide 2) (skosimp*) (assert))
            ("4" (hide 2) (skosimp*) (assert)) ("5" (skosimp*) (assert))
            ("6" (skosimp*) (assert))))
          ("2"
           (hide 2)
           (skeep)
           (typepred "ii")
           (label "iitp" -1)
           (case "FORALL (qq:below(PQ`length-1)): pum(ii)<=qq AND qq<pum(ii+1) IMPLIES (EXISTS (jj:below(PQ`length-1)): (pum(ii)<=jj AND jj<=qq AND (FORALL (zz:below(PQ`length-1)): pum(ii)<=zz AND zz<=qq IMPLIES f(xispq`seq(zz)) >= f(xispq`seq(jj)))))")
           (("1"
             (inst - "pum(ii+1)-1")
             (("1"
               (assert)
               (split -)
               (("1"
                 (skosimp*)
                 (inst + "jj!1")
                 (assert)
                 (skosimp*)
                 (inst - "zz!1")
                 (assert))
                ("2"
                 (hide 2)
                 (lemma "partition_union_map_increasing")
                 (inst - "a" "b")
                 (assert)
                 (inst - "P" "Q" "ii" "1+ii")
                 (assert))))
              ("2"
               (hide 2)
               (typepred "pum(1+ii)")
               (assert)
               (lemma "partition_union_map_increasing")
               (inst - "a" "b")
               (assert)
               (inst - "P" "Q" "0" "1+ii")
               (assert))))
            ("2"
             (hide 2)
             (induct "qq")
             (("1"
               (flatten)
               (inst + "0")
               (("1" (assert) (skosimp*) (assert)) ("2" (assert))))
              ("2"
               (skolem 1 "rr")
               (flatten)
               (label "iirr1" -3)
               (label "rr1ii1" -4)
               (label "rrlt" -1)
               (case "pum(ii) <= rr AND rr < pum(ii + 1)")
               (("1"
                 (replace -1)
                 (flatten)
                 (label "iirr" -1)
                 (label "rrii1" -2)
                 (skosimp*)
                 (label "iijj" -4)
                 (label "jjrr" -5)
                 (case "f(xispq`seq(rr+1)) < f(xispq`seq(jj!1))")
                 (("1"
                   (inst + "rr+1")
                   (("1"
                     (replace "iirr1")
                     (split +)
                     (("1" (hide -) (assert))
                      ("2" (skosimp*) (inst - "zz!1") (ground))))
                    ("2" (assert))))
                  ("2"
                   (inst + "jj!1")
                   (replace "iijj")
                   (split +)
                   (("1" (hide -6) (ground))
                    ("2" (skosimp*) (inst - "zz!1") (ground))))))
                ("2"
                 (case "pum(ii) = rr+1")
                 (("1"
                   (inst + "rr+1")
                   (("1"
                     (hide-all-but (-1 +))
                     (assert)
                     (skosimp*)
                     (assert))
                    ("2" (assert))))
                  ("2" (hide 3) (hide -2) (ground))))))
              ("3" (hide-all-but 1) (ground))))))))
        ("2"
         (hide-all-but (1 "pumname" "signame" "altb" "Pinc"))
         (lemma "partition_union_map_inv_def")
         (assert)
         (inst - "a" "b")
         (assert)
         (inst - "P" "Q")
         (inst - "0" "0")
         (("1"
           (assert)
           (replace "pumname")
           (replace "signame")
           (case "pum(0) = 0")
           (("1"
             (assert)
             (ground)
             (hide 2)
             (typepred "pum")
             (inst - "1")
             (expand "strictly_increasing?")
             (inst - "0" "1")
             (ground))
            ("2"
             (hide 2)
             (hide -1)
             (typepred "pum")
             (inst - "0")
             (reveal "PQname")
             (typepred "PQ")
             (expand "strictly_increasing?")
             (inst - "0" "pum(0)")
             (ground))))
          ("2" (assert))))
        ("3" (assert))))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: rs_integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (ground)
   (("1"
     (expand "o")
     (expand "partjoin")
     (expand "o")
     (expand "delete")
     (assert))
    ("2"
     (skeep)
     (ground)
     (("1"
       (expand "o")
       (lift-if)
       (assert)
       (ground)
       (("1"
         (expand "partjoin")
         (expand "o")
         (typepred "xab")
         (inst?)
         (ground))
        ("2"
         (expand "partjoin")
         (expand "o")
         (lift-if)
         (assert)
         (ground)
         (("1"
           (typepred "Pab")
           (inst -6 "ii")
           (flatten)
           (typepred "xbc")
           (inst -2 "ii-xab`length")
           (flatten)
           (assert))
          ("2"
           (expand "delete")
           (assert)
           (typepred "xbc")
           (inst - "ii-xab`length")
           (flatten)
           (assert))
          ("3" (expand "delete") (assert))))
        ("3"
         (typepred "ii")
         (expand "partjoin" -)
         (expand "o")
         (expand "delete")
         (assert))))
      ("2"
       (expand "o")
       (expand "partjoin")
       (expand "o")
       (expand "delete")
       (assert)
       (lift-if)
       (lift-if)
       (assert)
       (ground)
       (("1" (typepred "xab") (inst - "ii") (ground))
        ("2" (typepred "xbc") (inst - "ii-xab`length") (ground))))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: rs_integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "P!1")
   (inst -6 "n!1+1")
   (("1"
     (flatten)
     (assert)
     (lemma "connected_domain")
     (expand "connected?")
     (inst - "a!1" "b!1" "P!1`seq(1+n!1)")
     (assert))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: rs_integral_def
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" "P!1`seq(n!1)")
   (assert)
   (typepred "P!1")
   (inst - "n!1")
   (inst - "n!1"))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: rs_integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (lemma "partition_strictly_sort")
   (assert)
   (skeep)
   (skeep)
   (inst - "a" "b")
   (assert)
   (inst - "P"))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: rs_integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (assert)
   (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 - "aa!1" "bb!1" "(aa!1+bb!1)/2")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: rs_integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (split)
   (("1"
     (skosimp*)
     (split)
     (("1"
       (assert)
       (expand "pick_one")
       (typepred "P!1")
       (inst - "x1!1")
       (inst - "x1!1")
       (assert))
      ("2"
       (expand "finseq_appl")
       (expand "pick_one")
       (typepred "P!1")
       (inst - "1+x1!1")
       (("1" (inst - "1+x1!1") (assert)) ("2" (assert))))))
    ("2"
     (expand "xis?")
     (skosimp*)
     (split)
     (("1"
       (expand "finseq_appl")
       (expand "pick_one")
       (typepred "x_in(P!1`seq(ii!1), P!1`seq(1 + ii!1))")
       (propax))
      ("2"
       (expand "finseq_appl")
       (expand "pick_one")
       (typepred "x_in(P!1`seq(ii!1), P!1`seq(1 + ii!1))")
       (propax))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: rs_integral_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (inst +
    "(LAMBDA (d: [a: T, b: {x: T | a < x}, g:[T->real],{f | integrable?(a, b, g,f)}]):  choose({S: real | integral?(d`1, d`2, d`3, d`4,S)}))")
   (skosimp*)
   (typepred "d!1`4")
   (expand "integrable?")
   (expand "nonempty?")
   (skosimp*)
   (expand "empty?")
   (expand "member")
   (inst?))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_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*(g!1(b!1)-g!1(a!1))")
   (("1" (assert) (expand "abs") (assert))
    ("2"
     (hide 2)
     (typepred "R!1")
     (expand "Riemann_sum?")
     (skosimp*)
     (replace -1)
     (hide -1)
     (assert)
     (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)):             g!1(seq(P!1)(1 + n)) * D!1 - g!1(seq(P!1)(n)) * D!1) =   D!1*g!1(seq(P!1)(n)) - D!1*g!1(seq(P!1)(0))")
     (("1" (inst -1 "length(P!1)-1") (assert))
      ("2"
       (hide 2)
       (induct "n" 1 "below_induction[length(P!1)]")
       (("1" (assert))
        ("2"
         (skosimp*)
         (assert)
         (case-replace "jb!1 = 0")
         (("1" (hide -3) (expand "sigma") (assert))
          ("2" (assert) (expand "sigma" 2) (replace -2) (assert))))
        ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))))
      ("3" (hide 2) (skosimp*) (assert))
      ("4" (hide 2) (skosimp*) (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_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,g!1, const_fun(D!1))")
   (expand "integral?")
   (skosimp*)
   (inst -1 "epsi!1")
   (skosimp*)
   (inst + "delta!1")
   (skosimp*)
   (inst?)
   (assert)
   (replace -3)
   (typepred "R!1")
   (inst -2 "R!1")
   (("1" (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)
       (inst?)
       (("1" (assert))
        ("2"
         (typepred "xis!1")
         (inst - "x!1")
         (typepred "P!1")
         (inst-cp - "x!1")
         (inst - "x!1+1")
         (ground))))
      ("2" (hide 2) (skosimp*) (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_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" "g!1")
     (expand "const_fun")
     (flatten)
     (assert))
    ("2"
     (rewrite "integral_def")
     (typepred "integral(a!1, b!1, g!1,f!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,g!1, P!1, xis!1, D!1 * f!1) = D!1*Rie_sum(a!1, b!1, g!1,P!1, xis!1, f!1)")
       (("1"
         (expand "Rie_sum")
         (assert)
         (replace -1)
         (hide -1)
         (inst -
          "sigma[below(length(P!1) - 1)]
                                                        (0, length(P!1) - 2,
                                                         LAMBDA (n: below(length(P!1) - 1)):
                                                           g!1(P!1`seq(1 + n)) * f!1(xis!1(n)) -
                                                            g!1(P!1`seq(n)) * f!1(xis!1(n)))")
         (("1"
           (cross-mult -1)
           (("1"
             (assert)
             (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))))
          ("2" (hide-all-but (1 2)) (grind))
          ("3" (hide 3) (skosimp*) (assert))))
        ("2"
         (hide 2)
         (hide 2)
         (expand "Rie_sum")
         (assert)
         (lemma "sigma_scal[below(length(P!1) - 1)]")
         (("1" (inst?) (assert) (expand "*") (propax))
          ("2" (assert) (skosimp*) (assert))))))
      ("2"
       (case "epsi!1 / abs(D!1) > 0")
       (("1" (assert)) ("2" (hide-all-but (1 3)) (cross-mult 1) (assert))
        ("3" (lemma "abs_eq_0") (inst?) (assert))))
      ("3" (lemma "abs_eq_0") (inst?) (assert))))))


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


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_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, g!1, f!1)")
   (typepred "integral(a!1, b!1, g!1, h!1)")
   (name-replace "I1" "integral(a!1, b!1, g!1, f!1)")
   (name-replace "I2" "integral(a!1, b!1, g!1, h!1)")
   (expand "integral?")
   (skosimp*)
   (inst -1 "epsi!1/2")
   (inst - "epsi!1/2")
   (skosimp*)
   (inst + "min(delta!1,delta!2)")
   (skosimp*)
   (inst - "P!1")
   (inst - "P!1")
   (split -1)
   (("1"
     (split -2)
     (("1"
       (hide -4 -5 -6)
       (typepred "R!1")
       (expand "Riemann_sum?")
       (skosimp*)
       (replace -1)
       (hide -1)
       (case-replace
        "Rie_sum(a!1, b!1, g!1, P!1, xis!1, LAMBDA x: f!1(x) + h!1(x)) =                       Rie_sum(a!1, b!1, g!1,P!1, xis!1, f!1) + Rie_sum(a!1, b!1, g!1,P!1, xis!1, h!1)")
       (("1"
         (hide -1)
         (inst - "Rie_sum(a!1, b!1, g!1, P!1, xis!1, f!1)")
         (("1"
           (inst - "Rie_sum(a!1, b!1, g!1, P!1, xis!1, h!1)")
           (("1"
             (lemma "triangle")
             (inst -1 "I1 - Rie_sum(a!1, b!1,g!1, P!1, xis!1, f!1)"
              "I2 - Rie_sum(a!1, b!1, g!1,P!1, xis!1, h!1)")
             (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?) (assert)) ("2" (hide 2) (skosimp*) (assert))))))
      ("2" (assert))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_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, g!1, f!1)")
   (typepred "integral(a!1, b!1, h!1, f!1)")
   (name-replace "I1" "integral(a!1, b!1, g!1, f!1)")
   (name-replace "I2" "integral(a!1, b!1, h!1, f!1)")
   (expand "integral?")
   (skosimp*)
   (inst -1 "epsi!1/2")
   (inst - "epsi!1/2")
   (skosimp*)
   (inst + "min(delta!1,delta!2)")
   (skosimp*)
   (inst - "P!1")
   (inst - "P!1")
   (split -1)
   (("1"
     (split -2)
     (("1"
       (hide -4 -5 -6)
       (typepred "R!1")
       (expand "Riemann_sum?")
       (skosimp*)
       (replace -1)
       (hide -1)
       (case-replace
        "Rie_sum(a!1, b!1, LAMBDA x: g!1(x) + h!1(x), P!1, xis!1, f!1) =                       Rie_sum(a!1, b!1, g!1,P!1, xis!1, f!1) + Rie_sum(a!1, b!1, h!1,P!1, xis!1, f!1)")
       (("1"
         (hide -1)
         (inst - "Rie_sum(a!1, b!1, g!1, P!1, xis!1, f!1)")
         (("1"
           (inst - "Rie_sum(a!1, b!1, h!1, P!1, xis!1, f!1)")
           (("1"
             (lemma "triangle")
             (inst -1 "I1 - Rie_sum(a!1, b!1,g!1, P!1, xis!1, f!1)"
              "I2 - Rie_sum(a!1, b!1, h!1,P!1, xis!1, f!1)")
             (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?) (assert)) ("2" (hide 2) (skosimp*) (assert))))))
      ("2" (assert))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_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" "g!1" "v1!1")
   (assert)
   (lemma "integral_def")
   (inst - "a!1" "b!1" "h!1" "g!1" "v2!1")
   (assert)
   (flatten)
   (assert)
   (inst - "g!1")
   (assert)
   (flatten)
   (assert))


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


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_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" "-h!1")
   (assert)
   (split -1)
   (("1"
     (flatten)
     (assert)
     (expand "-")
     (assert)
     (assert)
     (replace -2)
     (assert)
     (lemma "integral_scal")
     (inst?)
     (assert)
     (flatten)
     (case-replace "(LAMBDA (x: T): -h!1(x)) = -1 * h!1")
     (("1" (assert))
      ("2" (apply-extensionality 1 :hide? t) (expand "*") (assert))))
    ("2"
     (hide 2)
     (lemma "integral_scal")
     (inst -1 "-1" "a!1" "b!1" "h!1" "g!1")
     (assert)
     (flatten)
     (assert)
     (case-replace "-h!1 = -1*h!1")
     (apply-extensionality 1 :hide? t)
     (expand "*")
     (assert)
     (expand "-")
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "integral_sum_g")
   (inst -1 "a!1" "b!1" "f!1" "g!1" "-h!1")
   (assert)
   (split -1)
   (("1"
     (flatten)
     (assert)
     (case "(LAMBDA x: (-h!1)(x) + g!1(x)) = (LAMBDA x: g!1(x) - h!1(x))")
     (("1"
       (assert)
       (replace -1)
       (lemma "integral_scal_g")
       (inst - "-1" "a!1" "b!1" "f!1" "h!1")
       (assert)
       (flatten)
       (case "-1*h!1 = -h!1")
       (("1" (assert))
        ("2"
         (hide-all-but 1)
         (expand "*")
         (decompose-equality)
         (expand "-")
         (assert))))
      ("2" (hide-all-but 1) (grind))))
    ("2"
     (lemma "integral_scal_g")
     (inst - "-1" "a!1" "b!1" "f!1" "h!1")
     (assert)
     (flatten)
     (case "-1*h!1 = -h!1")
     (("1" (assert))
      ("2" (hide-all-but 1) (decompose-equality) (grind))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (typepred "integral(a!1, b!1,g!1, f!1)")
   (expand "integral?")
   (case "FORALL (eps: posreal): integral(a!1, b!1, g!1, f!1) >= -eps")
   (("1"
     (hide -2 -3 -5)
     (inst -1 "-integral(a!1, b!1, g!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, g!1, eq_partition(a!1, b!1, NM), gen_xis(a!1, b!1, eq_partition(a!1, b!1, NM)), f!1)")
         (("1"
           (name-replace "II" "integral(a!1, b!1, g!1, f!1)")
           (case "Rie_sum(a!1, b!1, g!1, eq_partition(a!1, b!1, NM), gen_xis(a!1,b!1,eq_partition(a!1, b!1, NM)), f!1) >= 0")
           (("1" (expand "abs") (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?)
                 (("1"
                   (case "g!1(NN`seq(1 + i!2)) - g!1(NN`seq(i!2)) >= 0")
                   (("1"
                     (mult-by -1 "f!1(gen_xis(a!1, b!1, NN)`seq(i!2))")
                     (assert))
                    ("2"
                     (hide 2)
                     (typepred "NN")
                     (inst - "i!2")
                     (assert)
                     (expand "increasing?")
                     (assert)
                     (inst -9 "seq(NN)(i!2)" "seq(NN)(1+i!2)")
                     (assert)
                     (inst?)
                     (assert))))
                  ("2"
                   (assert)
                   (hide 2)
                   (typepred "gen_xis(a!1, b!1, NN)")
                   (inst - "i!2")
                   (flatten)
                   (typepred "NN")
                   (inst-cp - "i!2")
                   (inst - "i!2+1")
                   (ground))))
                ("2" (assert))))
              ("2" (hide 2) (skosimp*) (assert))))))
          ("2"
           (lemma "Riemann?_Rie")
           (inst -1 "a!1" "b!1" "f!1" "g!1")
           (split -)
           (("1" (inst?)) ("2" (propax))))
          ("3" (expand "max" -1) (lift-if) (ground))))
        ("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" (mult-by -1 "delta!1") (assert)) ("2" (assert))))
          ("2" (assert))))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_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" "g!1")
   (lemma "integral_diff")
   (inst -1 "a!1" "b!1" "_" "g!1" "_")
   (lemma "integral_ge_0")
   (inst -1 "a!1" "b!1" "(LAMBDA (t:T): M!1 - f!1(t))" "g!1")
   (assert)
   (case "integrable?(a!1, b!1, g!1,(LAMBDA (t: T): M!1 - f!1(t)))")
   (("1"
     (assert)
     (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)
     (inst -2 "M!1")
     (flatten)
     (assert)
     (expand "const_fun")
     (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_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" "g!1")
   (lemma "integral_diff")
   (inst -1 "a!1" "b!1" "_" "g!1" "_")
   (lemma "integral_ge_0")
   (inst -1 "a!1" "b!1" "(LAMBDA (t:T): f!1(t) - m!1)" "g!1")
   (assert)
   (case "integrable?(a!1, b!1, g!1,(LAMBDA (t: T): f!1(t) - m!1))")
   (("1"
     (assert)
     (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))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "integral_diff")
   (inst - "a!1" "b!1" "h!1" "g!1" "f!1")
   (assert)
   (flatten)
   (case "integral(a!1, b!1, g!1, LAMBDA x: h!1(x) - f!1(x)) >= 0")
   (("1" (assert))
    ("2"
     (hide 2)
     (lemma "integral_bound_below")
     (inst - "a!1" "b!1" "LAMBDA x: h!1(x) - f!1(x)" "g!1" "0")
     (assert))
    ("3" (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_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,g!1, P1!1, xis1!1, f!1)")
   (replace -1)
   (name "R2" "Rie_sum(a!1, b!1, g!1,P2!1, xis2!1, f!1)")
   (replace -1)
   (case-replace "R1 - R2 = (R1 - S!1) - (R2 - S!1)")
   (("1"
     (lemma "triangle")
     (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")
             (inst - "a!1" "b!1" "f!1" "g!1")
             (split -1)
             (("1" (inst - "P2!1" "xis2!1") (assert)) ("2" (propax))))))
          ("2"
           (lemma "Riemann?_Rie")
           (inst - "a!1" "b!1" "f!1" "g!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: rs_integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: DEbugging PVS 3.2
script:
  (""
   (auto-rewrite + "member")
   (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)
           (lift-if)
           (ground))))
        ("2"
         (hide-all-but 1)
         (expand "abs")
         (lift-if)
         (lift-if)
         (lift-if)
         (ground))))
      ("2" (assert))))
    ("2"
     (case "  FORALL (n: nat): nonempty?({S: real |  EXISTS (P: partition(a!1, b!1),xis:xis?(a!1,b!1,P)):  width(a!1, b!1, P) < 1 / (1 + n) AND  S = Rie_sum(a!1, b!1, g!1,P, xis, f!1)})")
     (("1"
       (name "SS"
             "(LAMBDA (n: nat): choose({S:real| EXISTS (P: partition(a!1,b!1),
                                                                                                                                                                             xis: xis?(a!1, b!1, P)):
                                                                                                                                          width(a!1,b!1,P) < 1/(n+1) AND
                                                                                                                                                 S = Rie_sum(a!1, b!1, g!1,P, xis, f!1)})                                    )")
       (("1"
         (case "cauchy(SS)")
         (("1"
           (lemma "convergence_cauchy2")
           (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, g!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 "ST" "Rie_sum(a!1, b!1,g!1, P!1, xis!1, f!1)")
                 (replace -1)
                 (case-replace "abs(l!1 - ST) = abs(ST - l!1)")
                 (("1"
                   (case-replace
                    "ST- l!1 = (ST - SS(NN))  + (SS(NN) - l!1)")
                   (("1"
                     (lemma "triangle")
                     (inst - "ST- SS(NN)" "SS(NN) - l!1")
                     (inst -13 "ST" "SS(NN)")
                     (("1" (assert))
                      ("2"
                       (hide 2)
                       (case "SS(NN) = Rie_sum(a!1, b!1, g!1,P!2, xis!2, f!1)")
                       (("1"
                         (replace -1)
                         (hide-all-but 1)
                         (lemma "Riemann?_Rie")
                         (inst - "a!1" "b!1" "f!1" "g!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" "g!1")
                       (split -1)
                       (("1" (inst?)) ("2" (assert))))))
                    ("2" (assert))))
                  ("2" (hide-all-but 1) (grind))))
                ("2"
                 (assert)
                 (hide 2)
                 (case "1 / (1 + NN) < delta!1")
                 (("1" (assert))
                  ("2"
                   (hide 2)
                   (cross-mult 1)
                   (typepred "NN")
                   (cross-mult -2))))))
              ("2" (inst -5 "NN"))))
            ("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,g!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, g!1,P, xis, f!1)})")
               (("1"
                 (skosimp*)
                 (assert)
                 (inst - "P!1" "P!2")
                 (split -10)
                 (("1"
                   (assert)
                   (hide -2 -4 -8)
                   (inst?)
                   (("1"
                     (hide 2)
                     (replace -5 :dir RL)
                     (beta)
                     (replace -1)
                     (expand "Riemann_sum?")
                     (inst?))
                    ("2"
                     (hide 2)
                     (replace -5 :dir RL)
                     (beta)
                     (replace -2)
                     (expand "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(a!1, b!1,g!1, eq_partition(a!1,b!1,NP), gen_xis(a!1,b!1,eq_partition(a!1,b!1,NP)), f!1)")
         (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"
           (assert)
           (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: f_proof
decl_type: formula
library: analysis
theory: rs_integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (case "FORALL (a, b:T, f, g: [T -> real]):
                                                                                a < b AND
                                                                                 increasing?[(LAMBDA (x:T): a <= x AND x <= b)]
                                                                                     (restrict[T, (LAMBDA (x:T): a <= x AND x <= b), real]
                                                                                          (g))
                                                                                 IMPLIES
                                                                                 (integrable?(a, b, g, f) IFF
                                                                                   (FORALL (epsi: posreal):
                                                                                      EXISTS (delta: posreal):
                                                                                        FORALL (P: partition(a, b)):
                                                                                          width(a, b, P) < delta IMPLIES
                                                                                           (FORALL (RS1: (Riemann_sum?(a, b, P, g, f)),
                                                                                                    RS2: (Riemann_sum?(a, b, P, g, f))):
                                                                                              abs(RS1 - RS2) < epsi)))")
   (("1"
     (skolem 1 ("a" "b" "f" "gg"))
     (flatten)
     (assert)
     (expand "monotonic?")
     (flatten)
     (split -)
     (("1" (inst?) (assert))
      ("2"
       (case "NOT increasing?[(closed_intv(a,b))](-gg)")
       (("1"
         (hide-all-but (-1 1))
         (expand "increasing?")
         (expand "decreasing?")
         (skeep)
         (inst - "x" "y")
         (assert)
         (expand "restrict")
         (expand "-")
         (assert))
        ("2"
         (hide -2)
         (inst - "a" "b" "f" "-gg")
         (assert)
         (split +)
         (("1"
           (flatten)
           (case "integrable?(a,b,-gg,f)")
           (("1"
             (assert)
             (hide -5)
             (skeep)
             (inst - "epsi")
             (skeep -4)
             (inst + "delta")
             (skeep)
             (inst - "P")
             (assert)
             (skolem 1 ("RSS1" "RSS2"))
             (typepred "RSS1")
             (typepred "RSS2")
             (expand "Riemann_sum?")
             (skolem -1 "xis2")
             (skolem -2 "xis1")
             (name "RSP1" "Rie_sum(a,b,-gg,P,xis1,f)")
             (name "RSP2" "Rie_sum(a,b,-gg,P,xis2,f)")
             (case "RSP1 = -RSS1 AND RSP2 = -RSS2")
             (("1"
               (flatten)
               (inst - "RSP1" "RSP2")
               (("1" (hide-all-but (-1 -2 -11 +)) (grind))
                ("2"
                 (replace -3 + :dir rl)
                 (lemma "Riemann?_Rie")
                 (inst - "a" "b" "f" "-gg")
                 (split -)
                 (("1" (inst - "P" "xis2")) ("2" (propax))))
                ("3"
                 (replace -4 + :dir rl)
                 (lemma "Riemann?_Rie")
                 (inst - "a" "b" "f" "-gg")
                 (split -)
                 (("1" (inst - "P" "xis1")) ("2" (propax))))))
              ("2"
               (replace -1 1 :dir rl)
               (replace -2 1 :dir rl)
               (replace -3 1)
               (replace -4 1)
               (hide-all-but 1)
               (expand "Rie_sum")
               (split +)
               (("1"
                 (lemma "sigma_scal[below(P`length-1)]")
                 (("1"
                   (inst -
                    "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                     f(xis1`seq(n)) * gg(P`seq(1 + n)) -
                                                                                                                                                                                                      f(xis1`seq(n)) * gg(P`seq(n))"
                    "-1" "P`length-2" "0")
                   (replace -1 :dir rl)
                   (hide -1)
                   (lemma "sigma_restrict_eq[below(P`length-1)]")
                   (inst?)
                   (assert)
                   (hide 2)
                   (expand "restrict")
                   (expand "-")
                   (assert))
                  ("2" (skosimp*) (assert))))
                ("2"
                 (lemma "sigma_scal[below(P`length-1)]")
                 (("1"
                   (inst -
                    "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                     f(xis2`seq(n)) * gg(P`seq(1 + n)) -
                                                                                                                                                                                                      f(xis2`seq(n)) * gg(P`seq(n))"
                    "-1" "P`length-2" "0")
                   (replace -1 :dir rl)
                   (hide -)
                   (lemma "sigma_restrict_eq[below(P`length-1)]")
                   (inst?)
                   (assert)
                   (hide 2)
                   (expand "restrict")
                   (expand "-")
                   (assert))
                  ("2" (skosimp*) (assert))))))))
            ("2"
             (hide-all-but (-1 1))
             (lemma "integral_scal_g")
             (inst - "-1" "a" "b" "f" "gg")
             (assert)
             (flatten)
             (assert)
             (expand "-")
             (expand "*")
             (assert))))
          ("2"
           (flatten)
           (case "integrable?(a,b,-gg,f)")
           (("1"
             (hide-all-but (-1 1))
             (lemma "integral_scal_g")
             (inst - "-1" "a" "b" "f" "-gg")
             (assert)
             (flatten)
             (expand "-")
             (expand "*")
             (case "gg = (LAMBDA (x_1:T): -1 * -gg(x_1))")
             (("1" (assert)) ("2" (decompose-equality 1))))
            ("2"
             (hide 2)
             (assert)
             (hide -3)
             (hide 1)
             (skeep)
             (inst - "epsi")
             (skeep -1)
             (inst + "delta")
             (skeep)
             (inst - "P")
             (assert)
             (skolem 1 ("RSS1" "RSS2"))
             (typepred "RSS1")
             (typepred "RSS2")
             (expand "Riemann_sum?")
             (skolem -1 "xis2")
             (skolem -2 "xis1")
             (name "RSP1" "Rie_sum(a,b,gg,P,xis1,f)")
             (name "RSP2" "Rie_sum(a,b,gg,P,xis2,f)")
             (case "RSP1 = -RSS1 AND RSP2 = -RSS2")
             (("1"
               (flatten)
               (inst - "RSP1" "RSP2")
               (("1" (hide-all-but (-1 -2 -7 +)) (grind))
                ("2"
                 (lemma "Riemann?_Rie")
                 (inst - "a" "b" "f" "gg")
                 (split -)
                 (("1" (inst - "P" "xis2") (assert)) ("2" (propax))))
                ("3"
                 (lemma "Riemann?_Rie")
                 (inst - "a" "b" "f" "gg")
                 (split -)
                 (("1" (inst - "P" "xis1") (assert)) ("2" (propax))))))
              ("2"
               (replace -1 1 :dir rl)
               (replace -2 1 :dir rl)
               (replace -3 1)
               (replace -4 1)
               (hide-all-but 1)
               (expand "Rie_sum")
               (split +)
               (("1"
                 (lemma "sigma_scal[below(P`length-1)]")
                 (("1"
                   (inst -
                    "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                     (-gg)(P`seq(1 + n)) * f(xis1`seq(n)) -
                                                                                                                                                                                                      (-gg)(P`seq(n)) * f(xis1`seq(n))"
                    "-1" "P`length-2" "0")
                   (replace -1 :dir rl)
                   (hide -1)
                   (lemma "sigma_restrict_eq[below(P`length-1)]")
                   (inst?)
                   (assert)
                   (hide 2)
                   (expand "restrict")
                   (expand "-")
                   (assert))
                  ("2" (skosimp*) (assert))))
                ("2"
                 (lemma "sigma_scal[below(P`length-1)]")
                 (("1"
                   (inst -
                    "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                     (-gg)(P`seq(1 + n)) * f(xis2`seq(n)) -
                                                                                                                                                                                                      (-gg)(P`seq(n)) * f(xis2`seq(n))"
                    "-1" "P`length-2" "0")
                   (replace -1 :dir rl)
                   (hide -)
                   (lemma "sigma_restrict_eq[below(P`length-1)]")
                   (inst?)
                   (assert)
                   (hide 2)
                   (expand "restrict")
                   (expand "-")
                   (assert))
                  ("2" (skosimp*) (assert))))))))))))))))
    ("2"
     (hide 2)
     (skolem 1 ("a" "b" "f" "gg"))
     (flatten)
     (label "gincreasing?" -2)
     (hide "gincreasing?")
     (ground)
     (("1"
       (rewrite "integrable_lem")
       (skeep)
       (inst - "epsi")
       (skeep -1)
       (inst + "delta")
       (skeep)
       (inst - "P" "P")
       (assert))
      ("2"
       (case "FORALL (epsi:posreal): EXISTS (delta: posreal):
                                                                                                                                 FORALL (P1, P2: partition(a,b)):
                                                                                                                                   width(a, b, P1) < delta IMPLIES
                                                                                                                                    (FORALL (RS1: (Riemann_sum?(a, b, P1, gg, f)),
                                                                                                                                             RS2: (Riemann_sum?(a, b, partition_union(a,b)(P1,P2), gg, f))):
                                                                                                                                       abs(RS1 - RS2) < epsi)")
       (("1"
         (hide -2)
         (rewrite "integrable_lem")
         (skeep)
         (inst - "epsi/2")
         (skeep -1)
         (inst + "delta")
         (skeep)
         (inst-cp - "P1" "P2")
         (inst - "P2" "P1")
         (assert)
         (case "EXISTS (RS12: (Riemann_sum?(a, b, partition_union(a, b)(P1, P2), gg,f))): TRUE")
         (("1"
           (skeep -1)
           (skosimp*)
           (inst - "RS2!1" "RS12")
           (("1" (inst - "RS1!1" "RS12") (hide -3) (hide -3) (grind))
            ("2"
             (typepred "RS12")
             (lemma "partition_union_sym")
             (inst - "a" "b")
             (assert)
             (inst - "P1" "P2")
             (assert))))
          ("2"
           (lemma "Riemann?_Rie")
           (inst - "a" "b" "f" "gg")
           (split -)
           (("1"
             (inst - "partition_union(a,b)(P1,P2)"
              "gen_xis(a,b,partition_union(a,b)(P1,P2))")
             (inst +
              "Rie_sum(a, b, gg, partition_union(a, b)(P1, P2),
                                                                                                                                                               gen_xis(a, b, partition_union(a, b)(P1, P2)), f)"))
            ("2" (propax))))))
        ("2"
         (hide 2)
         (lemma "Rie_sum_diff_extend_union")
         (skeep)
         (inst -2 "epsi")
         (skeep -2)
         (inst + "delta")
         (skolem 1 ("P" "Q"))
         (inst - "a" "b" "f" "gg")
         (assert)
         (reveal "gincreasing?")
         (replace "gincreasing?")
         (hide "gincreasing?")
         (inst - "P" "Q")
         (flatten)
         (skolem 1 ("RSS1" "RSS2"))
         (typepred "RSS1")
         (typepred "RSS2")
         (expand "Riemann_sum?")
         (skolem -1 "xispq")
         (skolem -2 "xis")
         (inst - "xispq" "xis")
         (skeep -3)
         (inst - "P")
         (assert)
         (inst - "RSS1" "Rie_sum(a, b, gg, P, xis2, f)")
         (("1" (assert))
          ("2"
           (lemma "Riemann?_Rie")
           (inst - "a" "b" "f" "gg")
           (split -)
           (("1" (inst - "P" "xis2")) ("2" (propax))))))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_integral_prep
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (case "FORALL (a, b:T, f, g: [T -> real]):
                                                                                       a < b AND
                                                                                        increasing?[(LAMBDA (x:T): a <= x AND x <= b)]
                                                                                            (restrict[T, (LAMBDA (x:T): a <= x AND x <= b), real]
                                                                                                 (g))
                                                                                        IMPLIES
                                                                                        (integrable?(a, b, g, f) IFF
                                                                                          (FORALL (epsi: posreal):
                                                                                             EXISTS (delta: posreal):
                                                                                               FORALL (P: partition(a, b)):
                                                                                                 width(a, b, P) < delta IMPLIES
                                                                                                  (FORALL (RS1: (Riemann_sum?(a, b, P, g, f)),
                                                                                                           RS2: (Riemann_sum?(a, b, P, g, f))):
                                                                                                     abs(RS1 - RS2) < epsi)))")
   (("1"
     (skolem 1 ("a" "b" "f" "gg"))
     (flatten)
     (assert)
     (expand "monotonic?")
     (flatten)
     (split -)
     (("1" (inst?) (assert))
      ("2"
       (case "NOT increasing?[(closed_intv(a,b))](-gg)")
       (("1"
         (hide-all-but (-1 1))
         (expand "increasing?")
         (expand "decreasing?")
         (skeep)
         (inst - "x" "y")
         (assert)
         (expand "restrict")
         (expand "-")
         (assert))
        ("2"
         (hide -2)
         (inst - "a" "b" "f" "-gg")
         (assert)
         (split +)
         (("1"
           (flatten)
           (case "integrable?(a,b,-gg,f)")
           (("1"
             (assert)
             (hide -5)
             (skeep)
             (inst - "epsi")
             (skeep -4)
             (inst + "delta")
             (skeep)
             (inst - "P")
             (assert)
             (skolem 1 ("RSS1" "RSS2"))
             (typepred "RSS1")
             (typepred "RSS2")
             (expand "Riemann_sum?")
             (skolem -1 "xis2")
             (skolem -2 "xis1")
             (name "RSP1" "Rie_sum(a,b,-gg,P,xis1,f)")
             (name "RSP2" "Rie_sum(a,b,-gg,P,xis2,f)")
             (case "RSP1 = -RSS1 AND RSP2 = -RSS2")
             (("1"
               (flatten)
               (inst - "RSP1" "RSP2")
               (("1" (hide-all-but (-1 -2 -11 +)) (grind))
                ("2"
                 (replace -3 + :dir rl)
                 (lemma "Riemann?_Rie")
                 (inst - "a" "b" "f" "-gg")
                 (split -)
                 (("1" (inst - "P" "xis2")) ("2" (propax))))
                ("3"
                 (replace -4 + :dir rl)
                 (lemma "Riemann?_Rie")
                 (inst - "a" "b" "f" "-gg")
                 (split -)
                 (("1" (inst - "P" "xis1")) ("2" (propax))))))
              ("2"
               (replace -1 1 :dir rl)
               (replace -2 1 :dir rl)
               (replace -3 1)
               (replace -4 1)
               (hide-all-but 1)
               (expand "Rie_sum")
               (split +)
               (("1"
                 (lemma "sigma_scal[below(P`length-1)]")
                 (("1"
                   (inst -
                    "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                                       f(xis1`seq(n)) * gg(P`seq(1 + n)) -
                                                                                                                                                                                                                        f(xis1`seq(n)) * gg(P`seq(n))"
                    "-1" "P`length-2" "0")
                   (replace -1 :dir rl)
                   (hide -1)
                   (lemma "sigma_restrict_eq[below(P`length-1)]")
                   (inst?)
                   (assert)
                   (hide 2)
                   (expand "restrict")
                   (expand "-")
                   (assert))
                  ("2" (skosimp*) (assert))))
                ("2"
                 (lemma "sigma_scal[below(P`length-1)]")
                 (("1"
                   (inst -
                    "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                                       f(xis2`seq(n)) * gg(P`seq(1 + n)) -
                                                                                                                                                                                                                        f(xis2`seq(n)) * gg(P`seq(n))"
                    "-1" "P`length-2" "0")
                   (replace -1 :dir rl)
                   (hide -)
                   (lemma "sigma_restrict_eq[below(P`length-1)]")
                   (inst?)
                   (assert)
                   (hide 2)
                   (expand "restrict")
                   (expand "-")
                   (assert))
                  ("2" (skosimp*) (assert))))))))
            ("2"
             (hide-all-but (-1 1))
             (lemma "integral_scal_g")
             (inst - "-1" "a" "b" "f" "gg")
             (assert)
             (flatten)
             (assert)
             (expand "-")
             (expand "*")
             (assert))))
          ("2"
           (flatten)
           (case "integrable?(a,b,-gg,f)")
           (("1"
             (hide-all-but (-1 1))
             (lemma "integral_scal_g")
             (inst - "-1" "a" "b" "f" "-gg")
             (assert)
             (flatten)
             (expand "-")
             (expand "*")
             (case "gg = (LAMBDA (x_1:T): -1 * -gg(x_1))")
             (("1" (assert)) ("2" (decompose-equality 1))))
            ("2"
             (hide 2)
             (assert)
             (hide -3)
             (hide 1)
             (skeep)
             (inst - "epsi")
             (skeep -1)
             (inst + "delta")
             (skeep)
             (inst - "P")
             (assert)
             (skolem 1 ("RSS1" "RSS2"))
             (typepred "RSS1")
             (typepred "RSS2")
             (expand "Riemann_sum?")
             (skolem -1 "xis2")
             (skolem -2 "xis1")
             (name "RSP1" "Rie_sum(a,b,gg,P,xis1,f)")
             (name "RSP2" "Rie_sum(a,b,gg,P,xis2,f)")
             (case "RSP1 = -RSS1 AND RSP2 = -RSS2")
             (("1"
               (flatten)
               (inst - "RSP1" "RSP2")
               (("1" (hide-all-but (-1 -2 -7 +)) (grind))
                ("2"
                 (lemma "Riemann?_Rie")
                 (inst - "a" "b" "f" "gg")
                 (split -)
                 (("1" (inst - "P" "xis2") (assert)) ("2" (propax))))
                ("3"
                 (lemma "Riemann?_Rie")
                 (inst - "a" "b" "f" "gg")
                 (split -)
                 (("1" (inst - "P" "xis1") (assert)) ("2" (propax))))))
              ("2"
               (replace -1 1 :dir rl)
               (replace -2 1 :dir rl)
               (replace -3 1)
               (replace -4 1)
               (hide-all-but 1)
               (expand "Rie_sum")
               (split +)
               (("1"
                 (lemma "sigma_scal[below(P`length-1)]")
                 (("1"
                   (inst -
                    "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                                       (-gg)(P`seq(1 + n)) * f(xis1`seq(n)) -
                                                                                                                                                                                                                        (-gg)(P`seq(n)) * f(xis1`seq(n))"
                    "-1" "P`length-2" "0")
                   (replace -1 :dir rl)
                   (hide -1)
                   (lemma "sigma_restrict_eq[below(P`length-1)]")
                   (inst?)
                   (assert)
                   (hide 2)
                   (expand "restrict")
                   (expand "-")
                   (assert))
                  ("2" (skosimp*) (assert))))
                ("2"
                 (lemma "sigma_scal[below(P`length-1)]")
                 (("1"
                   (inst -
                    "LAMBDA (n: below(P`length - 1)):
                                                                                                                                                                                                                       (-gg)(P`seq(1 + n)) * f(xis2`seq(n)) -
                                                                                                                                                                                                                        (-gg)(P`seq(n)) * f(xis2`seq(n))"
                    "-1" "P`length-2" "0")
                   (replace -1 :dir rl)
                   (hide -)
                   (lemma "sigma_restrict_eq[below(P`length-1)]")
                   (inst?)
                   (assert)
                   (hide 2)
                   (expand "restrict")
                   (expand "-")
                   (assert))
                  ("2" (skosimp*) (assert))))))))))))))))
    ("2"
     (hide 2)
     (skolem 1 ("a" "b" "f" "gg"))
     (flatten)
     (label "gincreasing?" -2)
     (hide "gincreasing?")
     (ground)
     (("1"
       (rewrite "integrable_lem")
       (skeep)
       (inst - "epsi")
       (skeep -1)
       (inst + "delta")
       (skeep)
       (inst - "P" "P")
       (assert))
      ("2"
       (case "FORALL (epsi:posreal): EXISTS (delta: posreal):
                                                                                                                                            FORALL (P1, P2: partition(a,b)):
                                                                                                                                              width(a, b, P1) < delta IMPLIES
                                                                                                                                               (FORALL (RS1: (Riemann_sum?(a, b, P1, gg, f)),
                                                                                                                                                        RS2: (Riemann_sum?(a, b, partition_union(a,b)(P1,P2), gg, f))):
                                                                                                                                                  abs(RS1 - RS2) < epsi)")
       (("1"
         (hide -2)
         (rewrite "integrable_lem")
         (skeep)
         (inst - "epsi/2")
         (skeep -1)
         (inst + "delta")
         (skeep)
         (inst-cp - "P1" "P2")
         (inst - "P2" "P1")
         (assert)
         (case "EXISTS (RS12: (Riemann_sum?(a, b, partition_union(a, b)(P1, P2), gg,f))): TRUE")
         (("1"
           (skeep -1)
           (skosimp*)
           (inst - "RS2!1" "RS12")
           (("1" (inst - "RS1!1" "RS12") (hide -3) (hide -3) (grind))
            ("2"
             (typepred "RS12")
             (lemma "partition_union_sym")
             (inst - "a" "b")
             (assert)
             (inst - "P1" "P2")
             (assert))))
          ("2"
           (lemma "Riemann?_Rie")
           (inst - "a" "b" "f" "gg")
           (split -)
           (("1"
             (inst - "partition_union(a,b)(P1,P2)"
              "gen_xis(a,b,partition_union(a,b)(P1,P2))")
             (inst +
              "Rie_sum(a, b, gg, partition_union(a, b)(P1, P2),
                                                                                                                                                                           gen_xis(a, b, partition_union(a, b)(P1, P2)), f)"))
            ("2" (propax))))))
        ("2"
         (hide 2)
         (lemma "Rie_sum_diff_extend_union")
         (skeep)
         (inst -2 "epsi")
         (skeep -2)
         (inst + "delta")
         (skolem 1 ("P" "Q"))
         (inst - "a" "b" "f" "gg")
         (assert)
         (reveal "gincreasing?")
         (replace "gincreasing?")
         (hide "gincreasing?")
         (inst - "P" "Q")
         (flatten)
         (skolem 1 ("RSS1" "RSS2"))
         (typepred "RSS1")
         (typepred "RSS2")
         (expand "Riemann_sum?")
         (skolem -1 "xispq")
         (skolem -2 "xis")
         (inst - "xispq" "xis")
         (skeep -3)
         (inst - "P")
         (assert)
         (inst - "RSS1" "Rie_sum(a, b, gg, P, xis2, f)")
         (("1" (assert))
          ("2"
           (lemma "Riemann?_Rie")
           (inst - "a" "b" "f" "gg")
           (split -)
           (("1" (inst - "P" "xis2")) ("2" (propax))))))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: bounded_variation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (lemma "partition_union_is_strictly_sort")
   (inst - "a" "b")
   (assert)
   (inst - "P")
   (case "FORALL (ff:[T->real]): variation_on(a, b, P)(ff) = variation_on(a, b, strictly_sort(P))(ff)")
   (("1" (decompose-equality +))
    ("2"
     (hide 2)
     (skeep)
     (name "ssm" "strictly_sort_map(P)")
     (label "ssmname" -1)
     (label "ssunion" -2)
     (label "altb" -3)
     (name "SSP" "strictly_sort(P)")
     (replace -1)
     (label "SSPname" -1)
     (expand "variation_on")
     (case "FORALL (nn:below(SSP`length-1)): sigma[below(P`length - 1)]
                                                         (0, ssm(nn),
                                                          LAMBDA (n: below(P`length - 1)):
                                                            abs(ff(P`seq(1 + n)) - ff(P`seq(n))))
                                                      =
                                                      sigma[below(SSP`length - 1)]
                                                          (0, nn,
                                                           LAMBDA (n: below(SSP`length - 1)):
                                                             abs(ff(SSP`seq(1 + n)) - ff(SSP`seq(n))))")
     (("1"
       (inst - "SSP`length-2")
       (("1"
         (lemma "sigma_split[below(P`length-1)]")
         (("1"
           (inst -
            "LAMBDA (n: below(P`length - 1)):
                                                                 abs(ff(P`seq(1 + n)) - ff(P`seq(n)))"
            "P`length-2" "0" "ssm(SSP`length - 2)")
           (("1"
             (case "sigma(ssm(SSP`length - 2) + 1, P`length - 2,
                                                                                                      LAMBDA (n: below(P`length - 1)):
                                                                                                        abs(ff(P`seq(1 + n)) - ff(P`seq(n)))) = 0")
             (("1"
               (assert)
               (("1"
                 (case "ssm(SSP`length-2) = P`length-1")
                 (("1"
                   (assert)
                   (lemma "strictly_sort_map_increasing")
                   (inst - "P")
                   (assert)
                   (inst - "SSP`length-2" "SSP`length-1")
                   (assert)
                   (replace "ssmname")
                   (assert))
                  ("2" (assert))))
                ("2"
                 (case "SSP`length >= 2")
                 (("1" (assert))
                  ("2"
                   (hide-all-but 1)
                   (expand "SSP")
                   (lemma "partition_strictly_sort")
                   (inst - "a" "b")
                   (assert)
                   (inst - "P")
                   (ground))))))
              ("2"
               (hide 2)
               (rewrite "sigma_restrict_eq_0")
               (("1"
                 (hide 2)
                 (hide -1)
                 (hide -1)
                 (skosimp*)
                 (typepred "i!1")
                 (typepred "ssm")
                 (assert)
                 (inst - "SSP`length-2")
                 (assert)
                 (flatten)
                 (lemma "partition_strictly_sort")
                 (inst - "a" "b")
                 (assert)
                 (inst - "P")
                 (flatten)
                 (assert)
                 (typepred "P")
                 (expand "increasing?")
                 (inst-cp - "i!1" "1+i!1")
                 (assert)
                 (inst - "1 + ssm(SSP`length - 2)" "i!1")
                 (assert)
                 (inst-cp - "i!1+1")
                 (inst - "i!1")
                 (assert)
                 (flatten)
                 (assert)
                 (expand "abs")
                 (lift-if)
                 (ground))
                ("2"
                 (hide-all-but 1)
                 (case "strictly_sort(P)`length >= 2")
                 (("1" (expand "SSP") (assert))
                  ("2"
                   (hide 2)
                   (lemma "partition_strictly_sort")
                   (inst - "a" "b")
                   (assert)
                   (inst - "P")
                   (ground))))))
              ("3"
               (assert)
               (("1" (flatten) (inst + "0") (assert))
                ("2"
                 (hide-all-but 1)
                 (case "strictly_sort(P)`length>=2")
                 (("1" (expand "SSP") (assert))
                  ("2"
                   (hide 2)
                   (lemma "partition_strictly_sort")
                   (inst - "a" "b")
                   (assert)
                   (inst - "P")
                   (ground))))))
              ("4"
               (hide-all-but 1)
               (expand "SSP")
               (lemma "partition_strictly_sort")
               (inst - "a" "b")
               (assert)
               (inst - "P")
               (ground))))
            ("2"
             (hide-all-but 1)
             (expand "SSP")
             (lemma "partition_strictly_sort")
             (inst - "a" "b")
             (assert)
             (inst - "P")
             (ground))))
          ("2" (skosimp*) (assert))))
        ("2"
         (hide-all-but 1)
         (expand "SSP")
         (lemma "partition_strictly_sort")
         (inst - "a" "b")
         (assert)
         (inst - "P")
         (ground))))
      ("2"
       (hide 2)
       (induct "nn")
       (("1"
         (flatten)
         (expand "sigma" +)
         (assert)
         (("1"
           (lift-if)
           (assert)
           (case "sigma(0, ssm(0) - 1,
                                                                                          LAMBDA (n: below(P`length - 1)):
                                                                                            abs(ff(P`seq(1 + n)) - ff(P`seq(n)))) = 0")
           (("1"
             (replace -1)
             (typepred "ssm")
             (assert)
             (inst - "0")
             (assert)
             (flatten)
             (replace "SSPname")
             (assert))
            ("2"
             (hide 2)
             (rewrite "sigma_restrict_eq_0")
             (hide 2)
             (skosimp*)
             (typepred "i!1")
             (case "P`seq(1+i!1) = a")
             (("1"
               (typepred "P")
               (expand "increasing?")
               (inst - "i!1" "1+i!1")
               (assert)
               (inst - "i!1")
               (flatten)
               (assert)
               (expand "abs")
               (assert))
              ("2"
               (hide 2)
               (typepred "ssm")
               (inst - "0")
               (assert)
               (flatten)
               (replace "SSPname")
               (typepred "P")
               (expand "increasing?")
               (inst - "i!1+1" "ssm(0)")
               (assert)
               (inst - "1+i!1")
               (assert))))
            ("3" (hide 2) (skosimp*) (assert))))
          ("2"
           (hide-all-but 1)
           (case "strictly_sort(P)`length>=2")
           (("1" (expand "SSP") (assert))
            ("2"
             (hide 2)
             (lemma "partition_strictly_sort")
             (inst - "a" "b")
             (assert)
             (inst - "P")
             (ground))))))
        ("2"
         (skolem 1 "mm")
         (assert)
         (flatten)
         (expand "sigma" +)
         (lift-if)
         (assert)
         (typepred "ssm(1+mm)")
         (assert)
         (replace -3 :dir rl)
         (lemma "sigma_split[below(P`length-1)]")
         (("1"
           (inst -
            "LAMBDA (n: below(P`length - 1)):
                                                                   abs(ff(P`seq(1 + n)) - ff(P`seq(n)))"
            "ssm(1+mm)-1" "0" "ssm(mm)")
           (assert)
           (case "ssm(mm)<=ssm(1+mm)-1")
           (("1"
             (assert)
             (hide -1)
             (case "ff(P`seq(1 + ssm(1 + mm))) - ff(P`seq(ssm(1 + mm))) = ff(SSP`seq(2 + mm)) - ff(SSP`seq(1 + mm))")
             (("1"
               (case "sigma(1 + ssm(mm), ssm(1 + mm) - 1,
                                                                                                               LAMBDA (n: below(P`length - 1)):
                                                                                                                 abs(ff(P`seq(1 + n)) - ff(P`seq(n)))) = 0")
               (("1" (assert))
                ("2"
                 (hide 2)
                 (hide -2)
                 (hide -4)
                 (rewrite "sigma_restrict_eq_0")
                 (hide 2)
                 (skosimp*)
                 (typepred "i!1")
                 (case "P`seq(i!1) = P`seq(1+i!1)")
                 (("1" (expand "abs" +) (lift-if) (ground))
                  ("2"
                   (hide 2)
                   (lemma "strictly_sort_map_between")
                   (inst - "P")
                   (replace "SSPname")
                   (assert)
                   (replace "ssmname")
                   (inst - "mm")
                   (inst-cp - "i!1")
                   (inst - "i!1+1")
                   (assert))))))
              ("2"
               (hide 2)
               (case "P`seq(1+ssm(1+mm)) = SSP`seq(2+mm)")
               (("1" (typepred "ssm") (inst - "1+mm") (assert))
                ("2"
                 (hide 2)
                 (hide -1)
                 (hide -3)
                 (typepred "ssm")
                 (assert)
                 (inst - "1+mm")
                 (assert))))))
            ("2"
             (hide 2)
             (hide -1)
             (hide -3)
             (lemma "strictly_sort_map_increasing")
             (inst - "P")
             (assert)
             (inst - "mm" "1+mm")
             (assert))))
          ("2" (hide 2) (skosimp*) (assert))))
        ("3" (hide 2) (skosimp*) (assert))
        ("4" (hide 2) (skosimp*) (assert))
        ("5"
         (hide 2)
         (skosimp*)
         (assert)
         (hide 2)
         (assert)
         (assert)
         (typepred "nn!2")
         (typepred "SSP")
         (expand "strictly_increasing?")
         (inst - "nn!2" "SSP`length-1")
         (assert)
         (flatten)
         (case "P`seq(ssm(nn!2)) < b")
         (("1" (assert))
          ("2" (typepred "ssm") (inst - "nn!2") (flatten) (assert))))
        ("6" (hide 2) (skosimp*) (assert)) ("7" (hide 2) (assert))))
      ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))
      ("5"
       (hide 2)
       (skosimp*)
       (hide 2)
       (assert)
       (assert)
       (assert)
       (case "NOT ssm(nn!1) = P`length-1")
       (("1" (assert))
        ("2"
         (hide +)
         (typepred "nn!1")
         (typepred "ssm")
         (inst - "nn!1")
         (assert)
         (flatten)
         (replace "SSPname")
         (replace -5)
         (assert)
         (typepred "SSP")
         (expand "strictly_increasing?")
         (inst - "nn!1" "SSP`length-1")
         (assert))))
      ("6" (hide 2) (skosimp*) (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: bounded_variation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "monotonic?")
   (split -)
   (("1"
     (expand "bounded_variation?")
     (case "NOT f(bb) - f(a) >= 0")
     (("1"
       (hide 2)
       (expand "increasing?")
       (inst - "a" "bb")
       (assert)
       (expand "restrict")
       (assert))
      ("2"
       (assert)
       (inst + "f(bb)-f(a)")
       (skeep)
       (expand "variation_on")
       (case "FORALL (mm:below(P`length-1)): sigma[below(P`length - 1)]
                                             (0, mm,
                                              LAMBDA (n: below(P`length-1)): abs(f(P`seq(1 + n)) - f(P`seq(n)))) = f(P`seq(mm+1)) -f(P`seq(0))")
       (("1" (inst - "P`length-2") (assert))
        ("2"
         (hide 2)
         (induct "mm")
         (("1"
           (assert)
           (expand "sigma")
           (expand "sigma")
           (expand "increasing?")
           (inst - "P`seq(0)" "P`seq(1)")
           (("1"
             (assert)
             (expand "restrict")
             (typepred "P")
             (expand "increasing?")
             (inst - "0" "1")
             (assert)
             (expand "abs")
             (propax))
            ("2" (typepred "P") (inst - "1"))))
          ("2"
           (skolem 1 "nn")
           (assert)
           (flatten)
           (expand "sigma" +)
           (replace -2)
           (expand "increasing?")
           (inst - "P`seq(1+nn)" "P`seq(2+nn)")
           (("1"
             (expand "restrict")
             (typepred "P")
             (expand "increasing?")
             (inst - "1+nn" "2+nn")
             (ground)
             (expand "abs" +)
             (propax))
            ("2" (typepred "P") (inst - "2+nn") (assert))
            ("3" (typepred "P") (inst - "1+nn"))))
          ("3" (skosimp*) (assert))))
        ("3" (skosimp*) (assert))))))
    ("2"
     (expand "bounded_variation?")
     (case "NOT f(a)-f(bb) >= 0")
     (("1"
       (expand "decreasing?")
       (inst - "a" "bb")
       (expand "restrict")
       (assert))
      ("2"
       (inst + "f(a)-f(bb)")
       (skeep)
       (expand "variation_on")
       (case "FORALL (mm:below(P`length-1)): sigma[below(P`length - 1)]
                                             (0, mm,
                                              LAMBDA (n: below(P`length-1)): abs(f(P`seq(1 + n)) - f(P`seq(n)))) = f(P`seq(0)) -f(P`seq(mm+1))")
       (("1" (inst - "P`length-2") (assert))
        ("2"
         (hide 2)
         (induct "mm")
         (("1"
           (assert)
           (expand "sigma")
           (expand "sigma")
           (expand "decreasing?")
           (inst - "P`seq(0)" "P`seq(1)")
           (("1"
             (assert)
             (expand "restrict")
             (typepred "P")
             (expand "increasing?")
             (inst - "0" "1")
             (assert)
             (expand "abs")
             (lift-if)
             (ground))
            ("2" (typepred "P") (inst - "1"))))
          ("2"
           (skolem 1 "nn")
           (assert)
           (flatten)
           (expand "sigma" +)
           (replace -2)
           (expand "decreasing?")
           (inst - "P`seq(1+nn)" "P`seq(2+nn)")
           (("1"
             (expand "restrict")
             (typepred "P")
             (expand "increasing?")
             (inst - "1+nn" "2+nn")
             (ground)
             (expand "abs" +)
             (lift-if)
             (ground))
            ("2" (typepred "P") (inst - "2+nn") (assert))
            ("3" (typepred "P") (inst - "1+nn"))))
          ("3" (skosimp*) (assert))))
        ("3" (skosimp*) (assert))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: bounded_variation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "bounded_variation?")
   (skosimp*)
   (expand "bounded_on?")
   (inst + "abs(f(a)) + M!1")
   (skosimp*)
   (name "P"
         "(# length := 3, seq := (LAMBDA (n:nat): If n = 0 THEN a ELSIF n = 1 then x!1 ELSIF n = 2 THEN b ELSE default[T] ENDIF) #)")
   (inst - "P")
   (("1"
     (expand "variation_on")
     (replace -1 :dir rl)
     (assert)
     (("1"
       (expand "sigma")
       (expand "sigma")
       (expand "sigma")
       (hide -1)
       (grind))
      ("2" (assert))))
    ("2"
     (assert)
     (replace -1 :dir rl)
     (assert)
     (hide -1)
     (split +)
     (("1" (skeep) (lift-if) (ground))
      ("2"
       (expand "increasing?")
       (skeep)
       (lift-if)
       (lift-if)
       (assert)
       (ground))
      ("3" (skeep) (lift-if) (ground))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: bounded_variation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skosimp*)
   (name "P"
         "(# length := 3, seq := (LAMBDA (n:nat): If n = 0 THEN a ELSIF n = 1 then x!1 ELSIF n = 2 THEN b ELSE default[T] ENDIF) #)")
   (inst - "P")
   (("1"
     (expand "variation_on")
     (replace -1 :dir rl)
     (assert)
     (("1"
       (expand "sigma")
       (expand "sigma")
       (expand "sigma")
       (hide -1)
       (grind))
      ("2" (assert))))
    ("2"
     (assert)
     (replace -1 :dir rl)
     (assert)
     (hide -1)
     (split +)
     (("1" (skeep) (lift-if) (ground))
      ("2"
       (expand "increasing?")
       (skeep)
       (lift-if)
       (lift-if)
       (assert)
       (ground))
      ("3" (skeep) (lift-if) (ground))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: bounded_variation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "bounded_variation?")
   (skosimp*)
   (inst + "M!1+M!2")
   (skeep)
   (inst - "P")
   (inst - "P")
   (expand "variation_on")
   (name "FF"
         "LAMBDA (n: below(P`length - 1)):
                             abs(f(P`seq(1 + n)) - f(P`seq(n)))")
   (replace -1)
   (name "GG"
         "LAMBDA (n: below(P`length - 1)):
                             abs(g(P`seq(1 + n)) - g(P`seq(n)))")
   (replace -1)
   (name "FG"
         "LAMBDA (n: below(P`length - 1)):
                             abs(f(P`seq(1 + n)) + g(P`seq(1 + n)) - f(P`seq(n)) -
                                  g(P`seq(n)))")
   (replace -1)
   (lemma "sigma[below(P`length-1)].sigma_le")
   (("1"
     (inst - "FG" "LAMBDa (n:below(P`length-1)): FF(n) + GG(n)"
      "P`length-2" "0")
     (assert)
     (split -)
     (("1"
       (lemma "sigma[below(P`length-1)].sigma_sum")
       (inst - "FF" "GG" "P`length-2" "0")
       (assert))
      ("2"
       (skolem 1 "mm")
       (expand "FG" 1)
       (expand "GG" 1)
       (expand "FF" 1)
       (hide-all-but 1)
       (grind))))
    ("2" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: bounded_variation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "bounded_variation?")
   (skosimp*)
   (inst + "abs(D)*M!1")
   (skeep)
   (inst - "P")
   (expand "variation_on")
   (name "FF"
         "LAMBDA (n: below(P`length - 1)):
                                      abs(f(P`seq(1 + n)) - f(P`seq(n)))")
   (lemma "sigma[below(P`length-1)].sigma_scal")
   (("1"
     (inst - "FF" "abs(D)" "P`length-2" "0")
     (assert)
     (case "(LAMBDA (i: below(P`length - 1)): abs(D) * FF(i)) = (LAMBDA (n: below(P`length - 1)):
                                            abs(D * f(P`seq(1 + n)) - D * f(P`seq(n))))")
     (("1"
       (assert)
       (mult-by -5 "abs(D)")
       (("1" (assert)) ("2" (skosimp*) (assert))))
      ("2"
       (hide 2)
       (decompose-equality)
       (expand "FF" +)
       (hide -)
       (lemma "abs_mult")
       (inst - "D" "f(P`seq(1 + x!1)) - f(P`seq(x!1))")
       (assert))))
    ("2" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: bounded_variation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "BV_scal")
   (inst - "-1" "a" "b" "g")
   (assert)
   (lemma "BV_add")
   (inst - "a" "b" "f" "LAMBDA (x: T): -1 * g(x)")
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: bounded_variation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "altb" -1)
   (label "fBV" -2)
   (label "gBV" -3)
   (lemma "BV_bounded")
   (inst-cp - "a" "b" "f")
   (inst - "a" "b" "g")
   (assert)
   (label "fbounded" -2)
   (label "gbounded" -1)
   (expand "bounded_on?")
   (skolem "gbounded" "gM")
   (skolem "fbounded" "fM")
   (expand "bounded_variation?")
   (skolem "fBV" "fB")
   (skolem "gBV" "gB")
   (inst + "gM*fB + fM*gB")
   (("1"
     (skeep)
     (inst "fBV" "P")
     (inst "gBV" "P")
     (expand "variation_on")
     (name "FG"
           "LAMBDA (n: below(P`length - 1)):
                                 abs(f(P`seq(1 + n)) * g(P`seq(1 + n)) -
                                      f(P`seq(n)) * g(P`seq(n)))")
     (replace -1)
     (name "FF"
           "LAMBDA (n: below(P`length - 1)):
                                 abs(f(P`seq(1 + n)) - f(P`seq(n)))")
     (replace -1)
     (name "GG"
           "LAMBDA (n: below(P`length - 1)):
                                 abs(g(P`seq(1 + n)) - g(P`seq(n)))")
     (replace -1)
     (label "FGname" -3)
     (label "FFname" -2)
     (label "GGname" -1)
     (case "FORALL (mm:below(P`length-1)): FG(mm) <= fM*GG(mm) + gM*FF(mm)")
     (("1"
       (lemma "sigma[below(P`length-1)].sigma_le")
       (("1"
         (inst - "FG"
          "(LAMBDA (mm:below(P`length-1)): fM * GG(mm) + gM * FF(mm))"
          "P`length-2" "0")
         (assert)
         (split -)
         (("1"
           (lemma "sigma[below(P`length-1)].sigma_sum")
           (inst - "(LAMBDA (mm:below(P`length-1)): fM*GG(mm))"
            "(LAMBDA (mm:below(P`length-1)): gM*FF(mm))" "P`length-2"
            "0")
           (replace -1 :dir rl)
           (lemma "sigma[below(P`length-1)].sigma_scal")
           (copy -1)
           (inst - "GG" "fM" "P`length-2" "0")
           (inst - "FF" "gM" "P`length-2" "0")
           (assert)
           (replace -2)
           (copy "fBV")
           (mult-by -1 "gM")
           (("1"
             (copy "gBV")
             (mult-by -1 "fM")
             (("1" (assert)) ("2" (skosimp*) (assert))
              ("3" (inst "fbounded" "a") (assert))))
            ("2" (skosimp*) (assert))
            ("3" (inst "gbounded" "a") (assert))))
          ("2" (hide 2) (assert) (skeep) (inst - "n"))))
        ("2" (skosimp*) (assert))))
      ("2"
       (hide 2)
       (skeep)
       (case "FG(mm) <= abs(g(P`seq(mm+1))*(f(P`seq(mm+1))-f(P`seq(mm)))) + abs(f(P`seq(mm))*(g(P`seq(mm+1))-g(P`seq(mm))))")
       (("1"
         (rewrite "abs_mult")
         (rewrite "abs_mult")
         (inst "gbounded" "P`seq(1+mm)")
         (("1"
           (inst "fbounded" "P`seq(mm)")
           (("1"
             (copy "gbounded")
             (mult-by -1 "abs((f(P`seq(1 + mm)) - f(P`seq(mm))))")
             (copy "fbounded")
             (mult-by -1 "abs((g(P`seq(1 + mm)) - g(P`seq(mm))))")
             (assert)
             (expand "GG" +)
             (expand "FF" +)
             (assert))
            ("2" (typepred "P") (inst - "mm"))))
          ("2" (typepred "P") (inst - "1+mm"))))
        ("2" (hide 2) (expand "FG" +) (hide -) (grind))))))
    ("2"
     (assert)
     (case "gM >= 0 AND fM >= 0")
     (("1"
       (case "fB >= 0 AND gB >= 0")
       (("1"
         (flatten)
         (lemma "nnreal_times_nnreal_is_nnreal")
         (inst-cp - "fM" "gB")
         (inst - "gM" "fB")
         (assert))
        ("2"
         (hide 2)
         (name "P"
               "(# length := 2, seq:= (LAMBDA (mm:nat): if mm = 0 THEN a elsif mm = 1 then b else default[T] endif) #)")
         (inst "fBV" "P")
         (("1" (inst "gBV" "P") (("1" (assert)) ("2" (assert))))
          ("2" (assert))))))
      ("2" (inst - "a") (inst - "a") (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: bounded_variation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite + "member")
   (skeep)
   (skeep)
   (name "Pab"
         "(# length := Pcd`length+2, seq:= (LAMBDA (nn:nat): IF nn = 0 THEN a ELSIF nn = Pcd`length+1 THEN b ELSIF nn<Pcd`length+2 THEN Pcd`seq(nn-1) ELSE default ENDIF) #)")
   (("1"
     (inst + "Pab")
     (("1"
       (hide -1)
       (expand "Pab" +)
       (expand "variation_on")
       (expand "sigma" + 2)
       (case "sigma[below(Pcd`length - 1)]
                                             (0, Pcd`length - 2,
                                              LAMBDA (n: below(Pcd`length - 1)):
                                                abs(f(Pcd`seq(1 + n)) - f(Pcd`seq(n)))) <= sigma(0, Pcd`length - 1,
                                                 LAMBDA (n: below(1 + Pcd`length)):
                                                   abs(IF n = Pcd`length THEN f(b) ELSE f(Pcd`seq(n)) ENDIF -
                                                        IF n = 0 THEN f(a) ELSE f(Pcd`seq(n - 1)) ENDIF))")
       (("1" (assert))
        ("2"
         (hide 2)
         (lemma "sigma_split[below(1+Pcd`length)]")
         (inst -
          "LAMBDA (n: below(1 + Pcd`length)):
                                         abs(IF n = Pcd`length THEN f(b) ELSE f(Pcd`seq(n)) ENDIF -
                                              IF n = 0 THEN f(a) ELSE f(Pcd`seq(n - 1)) ENDIF)"
          "Pcd`length-1" "0" "0")
         (("1"
           (assert)
           (expand "sigma" - 2)
           (expand "sigma" - 2)
           (case "sigma[below(Pcd`length - 1)]
                                                         (0, Pcd`length - 2,
                                                          LAMBDA (n: below(Pcd`length - 1)):
                                                            abs(f(Pcd`seq(1 + n)) - f(Pcd`seq(n))))
                                                      = sigma[below(1+Pcd`length)](1, Pcd`length - 1,
                                                             LAMBDA (n: below(1 + Pcd`length)):
                                                               abs(IF n = Pcd`length THEN f(b) ELSE f(Pcd`seq(n)) ENDIF -
                                                                    IF n = 0 THEN f(a) ELSE f(Pcd`seq(n - 1)) ENDIF))")
           (("1" (assert))
            ("2"
             (hide 2)
             (hide -1)
             (case "FORALL (nn:nat): nn <= Pcd`length-2 IMPLIES sigma[below(Pcd`length - 1)]
                                                               (0, nn,
                                                                LAMBDA (n: below(Pcd`length - 1)):
                                                                  abs(f(Pcd`seq(1 + n)) - f(Pcd`seq(n))))
                                                            =
                                                            sigma[below(1 + Pcd`length)]
                                                                (1, 1+nn,
                                                                 LAMBDA (n: below(1 + Pcd`length)):
                                                                   abs(IF n = Pcd`length THEN f(b) ELSE f(Pcd`seq(n)) ENDIF -
                                                                        IF n = 0 THEN f(a) ELSE f(Pcd`seq(n - 1)) ENDIF))")
             (("1" (inst - "Pcd`length-2") (assert))
              ("2"
               (hide 2)
               (induct "nn")
               (("1" (expand "sigma") (expand "sigma") (propax))
                ("2"
                 (skolem 1 "nn")
                 (flatten)
                 (assert)
                 (expand "sigma" +)
                 (propax))
                ("3" (hide 2) (skosimp*) (assert))
                ("4" (hide 2) (skosimp*) (assert))
                ("5" (hide 2) (skosimp*) (assert))
                ("6" (hide 2) (skosimp*) (assert))
                ("7" (hide 2) (skosimp*) (assert))))
              ("3" (hide 2) (skosimp*) (assert))
              ("4" (hide 2) (skosimp*) (assert))
              ("5" (hide 2) (skosimp*) (assert))
              ("6" (hide 2) (skosimp*) (assert))
              ("7" (hide 2) (skosimp*) (assert))))))
          ("2" (hide 2) (skosimp*) (assert))))
        ("3" (hide 2) (skosimp*) (assert))
        ("4" (hide 2) (skosimp*) (assert))
        ("5" (hide 2) (skosimp*) (assert))))
      ("2"
       (assert)
       (assert)
       (expand "Pab" +)
       (split +)
       (("1" (skeep) (lift-if) (ground))
        ("2"
         (expand "increasing?")
         (skosimp*)
         (lift-if)
         (lift-if)
         (lift-if)
         (lift-if)
         (lift-if)
         (assert)
         (ground)
         (("1" (typepred "Pcd") (inst - "j!1-1") (ground))
          ("2" (typepred "Pcd") (inst - "i!1-1") (ground))
          ("3"
           (typepred "Pcd")
           (expand "increasing?")
           (inst - "i!1-1" "j!1-1")
           (ground))))
        ("3"
         (skeep)
         (lift-if)
         (assert)
         (typepred "Pcd")
         (inst - "i-1")
         (("1" (ground))
          ("2" (assert) (typepred "i") (expand "Pab" -1) (ground))))))))
    ("2" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: bounded_variation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "bounded_variation?")
   (skosimp*)
   (inst + "M!1")
   (skosimp*)
   (lemma "variation_on_subset")
   (inst - "a" "b" "c" "d" "f")
   (assert)
   (inst - "P!1")
   (skosimp*)
   (inst - "Pab!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: bounded_variation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skosimp 1)
   (skeep 2)
   (typepred "x!1")
   (name "MM" "total_variation(a,b,f)(x!1)")
   (("1"
     (replace -1)
     (case "epsi > MM")
     (("1"
       (lemma "partition_exists")
       (inst - "a" "x!1" "1")
       (assert)
       (skeep -)
       (inst + "P")
       (assert))
      ("2"
       (typepred "MM")
       (inst - "MM-epsi")
       (("1" (assert)) ("2" (assert))))))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: bounded_variation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (auto-rewrite + "member")
   (skeep)
   (name "CI" "closed_intv(a,b)")
   (("1"
     (replace -1)
     (label "CIname" -1)
     (ground)
     (("1"
       (label "fBV" -1)
       (label "altb" -3)
       (name "gg"
             "(LAMBDA (x:T): IF CI(x) THEN total_variation(a,b,f)(x) ELSE f(x) ENDIF)")
       (("1"
         (name "hh"
               "(LAMBDA (x:T): IF CI(x) THEN total_variation(a,b,f)(x)-f(x) ELSE 0 ENDIF)")
         (inst + "gg" "hh")
         (case "NOT increasing?[(CI)](restrict[T, (CI), real](gg))")
         (("1"
           (hide 2)
           (hide (-1 -2))
           (expand "increasing?")
           (skosimp*)
           (case "y!1 = a or x!1 = a")
           (("1"
             (split -)
             (("1"
               (expand "restrict")
               (typepred "x!1")
               (typepred "y!1")
               (expand "CI")
               (ground))
              ("2"
               (typepred "total_variation(a, b, f)(x!1)")
               (("1" (expand "restrict") (expand "gg") (assert))
                ("2" (assert))))))
            ("2"
             (assert)
             (flatten)
             (lemma "total_variation_approx")
             (inst - "a" "b" "f")
             (assert)
             (inst - "x!1")
             (("1"
               (assert)
               (inst -
                "total_variation(a, b, f)(x!1) - total_variation(a, b, f)(y!1)")
               (("1"
                 (skosimp*)
                 (assert)
                 (lemma "variation_on_subset")
                 (inst - "a" "y!1" "a" "x!1" "f")
                 (assert)
                 (split -)
                 (("1"
                   (inst - "P!1")
                   (skeep -)
                   (typepred "total_variation(a,b,f)(y!1)")
                   (split -3)
                   (("1" (inst - "Pab") (assert))
                    ("2" (typepred "y!1") (expand "CI") (ground))))
                  ("2" (typepred "x!1") (expand "CI") (ground))))
                ("2" (expand "restrict") (expand "gg") (assert))
                ("3" (typepred "y!1") (expand "CI") (propax))
                ("4" (typepred "x!1") (expand "CI") (propax))))
              ("2" (typepred "x!1") (expand "CI") (propax))))))
          ("2"
           (label "gginc" -1)
           (hide (-2 -3))
           (split +)
           (("1"
             (decompose-equality)
             (expand "gg" +)
             (expand "hh" +)
             (lift-if)
             (assert))
            ("2" (propax))
            ("3"
             (expand "increasing?" +)
             (skosimp*)
             (expand "restrict")
             (typepred "x!1")
             (typepred "y!1")
             (expand "CI" -)
             (flatten)
             (expand "hh")
             (name "epsi"
                   "total_variation(a, b, f)(x!1) - f(x!1) - total_variation(a, b, f)(y!1) + f(y!1)")
             (case "f(x!1) >= f(y!1)")
             (("1"
               (case "total_variation(a,b,f)(x!1) <= total_variation(a,b,f)(y!1)")
               (("1" (assert))
                ("2"
                 (hide 2)
                 (expand "increasing?")
                 (inst - "x!1" "y!1")
                 (assert)
                 (expand "gg")
                 (propax))))
              ("2"
               (case "NOT f(x!1)<f(y!1)")
               (("1" (assert))
                ("2"
                 (hide 1)
                 (label "fxylt" -1)
                 (lemma "total_variation_approx")
                 (inst - "a" "b" "f")
                 (assert)
                 (inst - "x!1")
                 (assert)
                 (case "a<x!1")
                 (("1"
                   (assert)
                   (label "altx" -1)
                   (inst - "epsi")
                   (skolem -2 "Pax")
                   (case "variation_on(a,x!1,Pax)(f) + f(y!1)-f(x!1) <= total_variation(a,b,f)(y!1)")
                   (("1" (assert))
                    ("2"
                     (hide 2)
                     (case "EXISTS (Pay:partition(a,y!1)): variation_on(a, x!1, Pax)(f) + f(y!1) - f(x!1) = variation_on(a,y!1,Pay)(f)")
                     (("1"
                       (skeep -)
                       (replace -1)
                       (typepred "total_variation(a,b,f)(y!1)")
                       (assert)
                       (inst - "Pay"))
                      ("2"
                       (hide 2)
                       (name "Pay"
                             "(# length := Pax`length+1, seq:= (LAMBDA (nn:nat): IF nn>=Pax`length+1 THEN default[T] ELSIF nn = Pax`length THEN y!1 ELSE Pax`seq(nn) ENDIF) #)")
                       (inst + "Pay")
                       (("1"
                         (expand "variation_on" +)
                         (expand "sigma" + 2)
                         (assert)
                         (("1"
                           (expand "Pay" +)
                           (assert)
                           (expand "abs" + 2)
                           (case "FORALL (mm:below(Pax`length-1)): sigma[below(Pax`length - 1)]
                                                                                                                                                               (0, mm,
                                                                                                                                                                LAMBDA (n: below(Pax`length - 1)):
                                                                                                                                                                  abs(f(Pax`seq(1 + n)) - f(Pax`seq(n))))
                                                                                                                                                            =
                                                                                                                                                            sigma(0, mm,
                                                                                                                                                                  LAMBDA (n: below(Pay`length - 1)):
                                                                                                                                                                    abs(IF 1 + n = Pax`length THEN f(y!1)
                                                                                                                                                                        ELSE f(Pax`seq(1 + n))
                                                                                                                                                                        ENDIF
                                                                                                                                                                         - f(Pax`seq(n))))")
                           (("1" (inst - "Pax`length-2") (assert))
                            ("2"
                             (hide 2)
                             (induct "mm")
                             (("1"
                               (assert)
                               (expand "sigma")
                               (expand "sigma")
                               (propax))
                              ("2"
                               (skolem 1 "mm")
                               (flatten)
                               (expand "sigma" +)
                               (assert))
                              ("3" (hide 2) (skosimp*) (assert))
                              ("4" (hide 2) (skosimp*) (assert))))
                            ("3" (hide 2) (skosimp*) (assert))
                            ("4" (hide 2) (skosimp*) (assert))))
                          ("2" (hide 2) (expand "Pay" +) (propax))))
                        ("2"
                         (assert)
                         (expand "Pay" +)
                         (assert)
                         (split +)
                         (("1" (skeep) (lift-if) (assert))
                          ("2"
                           (expand "increasing?")
                           (skeep)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (assert)
                           (typepred "Pax")
                           (inst - "i")
                           (assert)
                           (flatten)
                           (expand "increasing?")
                           (inst - "i" "j")
                           (ground))
                          ("3"
                           (skeep)
                           (lift-if)
                           (assert)
                           (typepred "Pax")
                           (inst - "i")
                           (("1" (ground)) ("2" (assert))))))))))))
                  ("2"
                   (case "a = x!1")
                   (("1"
                     (hide -2)
                     (case "total_variation(a,b,f)(x!1) = 0")
                     (("1"
                       (replace -1)
                       (assert)
                       (name "Pxy"
                             "(# length := 2, seq := (LAMBDA (nn:nat): IF nn=0 THEN a ELSIF nn = 1 THEN y!1 ELSE default[T] ENDIF) #)")
                       (typepred "total_variation(a,b,f)(y!1)")
                       (assert)
                       (inst - "Pxy")
                       (("1"
                         (case "variation_on(a,y!1,Pxy)(f) = abs(f(y!1)-f(x!1))")
                         (("1" (expand "abs") (assert))
                          ("2"
                           (expand "Pxy" +)
                           (expand "variation_on" +)
                           (expand "sigma" +)
                           (expand "sigma" +)
                           (replace -7)
                           (propax))))
                        ("2"
                         (hide 3)
                         (split +)
                         (("1" (skeep) (assert) (expand "Pxy") (propax))
                          ("2" (expand "Pxy") (propax))
                          ("3" (expand "Pxy") (propax))
                          ("4"
                           (expand "increasing?")
                           (skeep)
                           (expand "Pxy")
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (assert))
                          ("5"
                           (skeep)
                           (expand "Pxy")
                           (lift-if)
                           (ground))))))
                      ("2"
                       (typepred "total_variation(a,b,f)(x!1)")
                       (assert))))
                    ("2" (assert))))))))))))))
        ("2" (hide 2) (skeep) (expand "CI") (propax))))
      ("2"
       (skeep -)
       (lemma "BV_sub")
       (inst - "a" "b" "g" "h")
       (assert)
       (lemma "monotonic_BV")
       (inst-cp - "a" "g" "b")
       (inst - "a" "h" "b")
       (split +)
       (("1"
         (assert)
         (expand "monotonic?" +)
         (flatten)
         (expand "increasing?")
         (skosimp*)
         (inst - "x!1" "y!1")
         (("1" (assert) (expand "restrict") (propax))
          ("2" (expand "CI") (propax)) ("3" (expand "CI") (propax))))
        ("2"
         (assert)
         (expand "monotonic?" +)
         (flatten)
         (expand "increasing?")
         (skosimp*)
         (inst - "x!1" "y!1")
         (("1"
           (inst - "x!1" "y!1")
           (("1" (assert) (expand "restrict") (propax))
            ("2" (expand "CI") (propax)) ("3" (expand "CI") (propax))))
          ("2" (expand "CI") (propax)) ("3" (expand "CI") (propax))))))))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: bounded_variation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (a: T, b: {b | a < b}, f:(bounded_variation?(a, b)), x:(closed_intv(a,b))): EXISTS (M:nnreal): (x = a IMPLIES M = 0) AND
                                      				(x>a IMPLIES FORALL (P:partition(a,x)): variation_on(a,x,P)(f)<=M) AND
                                      				(FORALL (M1: nnreal): M1 < M IMPLIES EXISTS (P:partition(a,x)):
                                      					variation_on(a,x,P)(f) > M1)")
   (("1"
     (inst +
      "(LAMBDA (a: T, b: {b | a < b}, f: (bounded_variation?(a, b))): (LAMBDA (x:(closed_intv(a,b))): choose({M:nnreal | (x = a IMPLIES M = 0) AND
                                 (x > a IMPLIES
                                   (FORALL (P: partition(a, x)): variation_on(a, x, P)(f) <= M))
                                  AND
                                  (FORALL (M1: nnreal):
                                     M1 < M IMPLIES
                                      (EXISTS (P: partition(a, x)):
                                         variation_on(a, x, P)(f) > M1))})))")
     (("1"
       (skeep)
       (inst - "a" "b" "f" "x")
       (expand "nonempty?")
       (expand "empty?")
       (skosimp*)
       (inst - "M!1")
       (expand "member")
       (ground))
      ("2" (skeep) (skeep) (skeep) (assert))
      ("3" (skeep) (skeep) (lemma "not_one_element") (assert))))
    ("2"
     (hide 2)
     (skosimp*)
     (case "NOT a!1<x!1")
     (("1" (assert) (inst + "0") (assert))
      ("2"
       (assert)
       (name "Aset"
             "{M : nnreal | FORALL (P: partition(a!1, x!1)):
                                                         variation_on(a!1, x!1, P)(f!1) <= M}")
       (name "MM" "glb(Aset)")
       (("1"
         (inst + "MM")
         (("1"
           (typepred "MM")
           (expand "greatest_lower_bound?")
           (flatten)
           (split)
           (("1"
             (skosimp*)
             (inst?)
             (assert)
             (hide 1)
             (expand "lower_bound?" +)
             (skeep)
             (typepred "s")
             (expand "extend" -1)
             (ground)
             (expand "Aset" -2)
             (inst - "P!1"))
            ("2"
             (skeep)
             (expand "lower_bound?" -2)
             (inst - "M1")
             (("1" (assert))
              ("2"
               (expand "extend" +)
               (expand "Aset" +)
               (skosimp*)
               (inst + "P!1")
               (assert))))))
          ("2"
           (typepred "MM")
           (expand "greatest_lower_bound?")
           (flatten)
           (inst - "0")
           (assert)
           (expand "lower_bound?" +)
           (skeep)
           (typepred "s")
           (expand "extend" -1)
           (ground))))
        ("2"
         (hide 2)
         (name "MZ" "glb(extend[real, nnreal, bool, FALSE](Aset))")
         (replace -1)
         (expand "greatest_lower_bound?")
         (split)
         (("1"
           (expand "lower_bound?" +)
           (skeep)
           (typepred "s")
           (typepred "MZ")
           (expand "greatest_lower_bound?")
           (flatten)
           (expand "lower_bound?" -1)
           (inst - "s")
           (expand "extend")
           (propax))
          ("2"
           (typepred "MZ")
           (expand "greatest_lower_bound?")
           (flatten)
           (skeep)
           (inst - "y")
           (assert)
           (expand "lower_bound?" (+ -2))
           (skeep)
           (inst - "s")
           (typepred "s")
           (assert)
           (expand "extend" -1)
           (ground))))
        ("3"
         (hide 2)
         (split +)
         (("1"
           (expand "nonempty?")
           (expand "empty?")
           (typepred "f!1")
           (expand "bounded_variation?")
           (skosimp*)
           (inst -2 "M!1")
           (expand "member")
           (expand "extend")
           (expand "Aset" +)
           (skeep)
           (lemma "variation_on_subset")
           (inst - "a!1" "b!1" "a!1" "x!1" "f!1")
           (assert)
           (inst - "P")
           (skosimp*)
           (inst - "Pab!1")
           (assert))
          ("2"
           (expand "bounded_below?")
           (inst + "0")
           (expand "lower_bound?")
           (skeep)
           (typepred "s")
           (expand "extend")
           (assert))))))))
    ("3" (hide 2) (skeep) (skeep) (skeep) (assert))
    ("4" (hide 2) (skeep) (skeep) (lemma "not_one_element") (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: prelude_sets_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("A" "B"))
   (rewrite "difference_intersection")
   (rewrite "demorgan2")
   (rewrite "complement_complement"))


proof_type: f_proof
decl_type: formula
library: analysis
theory: prelude_sets_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (apply-extensionality 1 :hide? t)
   (lemma "Intersection_member" ("x" "x!1"))
   (inst-cp - "A!1")
   (expand "intersection")
   (expand "member")
   (inst - "rest(A!1)")
   (case-replace "Intersection(A!1)(x!1)")
   (("1"
     (simplify -3)
     (flatten)
     (hide -2)
     (split -2)
     (("1" (inst - "choose(A!1)") (assert))
      ("2"
       (hide 2)
       (skosimp*)
       (typepred "a!1")
       (lemma "rest_subset" ("a" "A!1"))
       (expand "subset?")
       (expand "member")
       (inst -1 "a!1")
       (assert)
       (inst - "a!1"))))
    ("2"
     (assert)
     (flatten)
     (replace -4)
     (skosimp*)
     (case-replace "choose(A!1)=a!1")
     (assert)
     (inst - "a!1")
     (expand "rest")
     (expand "nonempty?")
     (assert)
     (expand "remove")
     (expand "member")
     (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: prelude_sets_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (name "N" "card(A!1)")
   (("1"
     (case "FORALL (A:setofsets[T],n:nat): subset?(A,A!1) & card(A) <= n => P!1(Intersection(A))")
     (("1" (inst - "A!1" "N") (assert) (rewrite "subset_reflexive"))
      ("2"
       (hide 2)
       (induct "n")
       (("1"
         (skosimp*)
         (expand "<=" -2)
         (split -2)
         (("1" (assert))
          ("2"
           (rewrite "card_is_0" -1)
           (("1"
             (replace -1 1)
             (lemma "Intersection_empty_full[T]")
             (hide-all-but (-1 -5 1))
             (rewrite "fullset_is_full?")
             (assert))
            ("2"
             (lemma "finite_subset" ("s" "A!2" "A" "A!1"))
             (assert))))))
        ("2"
         (skosimp*)
         (expand "<=" -3)
         (split -3)
         (("1" (inst - "A!2") (assert))
          ("2"
           (lemma "finite_subset" ("s" "A!2" "A" "A!1"))
           (assert)
           (lemma "nonempty_card" ("S" "A!2"))
           (assert)
           (lemma "card_rest" ("S" "A!2"))
           (split -1)
           (("1"
             (lemma "rest_subset" ("a" "A!2"))
             (lemma "subset_transitive"
              ("a" "rest(A!2)" "b" "A!2" "c" "A!1"))
             (assert)
             (inst - "rest(A!2)")
             (assert)
             (lemma "choose_member" ("a" "A!2"))
             (split -1)
             (("1"
               (expand "member")
               (inst - "choose(A!2)")
               (("1"
                 (inst - "choose(A!2)" "Intersection(rest(A!2))")
                 (assert)
                 (lemma "Intersection_split" ("A" "A!2"))
                 (assert))
                ("2"
                 (expand "subset?")
                 (inst -9 "choose(A!2)")
                 (expand "member")
                 (propax))))
              ("2" (expand "nonempty?") (propax))))
            ("2" (expand "nonempty?") (propax))))))
        ("3"
         (hide 2)
         (skosimp*)
         (lemma "finite_subset" ("s" "A!2" "A" "A!1"))
         (assert))))
      ("3"
       (hide 2)
       (skosimp*)
       (lemma "finite_subset" ("s" "A!2" "A" "A!1"))
       (assert))))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: prelude_sets_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (apply-extensionality 1 :hide? t)
   (expand "union")
   (lemma "Union_member" ("x" "x!1" "A" "A!1"))
   (lemma "Union_member" ("x" "x!1" "A" "rest(A!1)"))
   (expand "member")
   (case-replace "Union(A!1)(x!1)")
   (("1"
     (simplify -3)
     (skolem!)
     (case "choose(A!1) = a!1")
     (("1" (assert))
      ("2"
       (flatten 2)
       (replace -2 3)
       (inst + "a!1")
       (expand "rest")
       (expand "nonempty?")
       (assert)
       (expand "remove")
       (expand "member")
       (propax))))
    ("2"
     (assert)
     (split -2)
     (("1" (inst + "choose(A!1)"))
      ("2"
       (assert)
       (skolem!)
       (typepred "a!1")
       (lemma "rest_subset" ("a" "A!1"))
       (expand "subset?")
       (expand "member")
       (inst - "a!1")
       (assert)
       (inst + "a!1"))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: prelude_sets_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "Intersection_finite")
   (inst - "Complement(A!1)" "lambda (x:set[T]): P!1(complement(x))")
   (rewrite "Demorgan2" -1)
   (rewrite "Complement_Complement")
   (rewrite "complement_fullset" -1)
   (replace -2)
   (split -1)
   (("1" (propax))
    ("2"
     (hide-all-but (-2 1))
     (expand "is_finite")
     (skolem!)
     (inst + "N!1" "lambda (a:(Complement(A!1))): f!1(complement(a))")
     (("1"
       (expand "injective?")
       (skosimp*)
       (typepred "x1!1")
       (typepred "x2!1")
       (expand "Complement")
       (skosimp*)
       (replace -1)
       (replace -2)
       (rewrite "complement_complement")
       (rewrite "complement_complement")
       (typepred "b!1")
       (typepred "b!2")
       (inst - "b!2" "b!1")
       (assert))
      ("2"
       (hide -1)
       (skolem!)
       (typepred "a!1")
       (expand "Complement")
       (skolem!)
       (typepred "b!1")
       (replace -2)
       (rewrite "complement_complement"))))
    ("3"
     (hide-all-but (1 -3))
     (skosimp*)
     (typepred "a!1")
     (expand "Complement")
     (skolem!)
     (typepred "b!1")
     (inst - "b!1")
     (replace -2)
     (rewrite "complement_complement"))
    ("4"
     (hide-all-but (1 -4))
     (skosimp*)
     (inst - "complement(a!1)" "complement(b!1)")
     (assert)
     (rewrite "demorgan2" 1))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: prelude_sets_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "F!1")
   (name "N" "card(F!1)")
   (case-replace "N=0")
   (("1" (rewrite "card_is_0" -2) (replace -2) (hide -2 -3 -1) (assert))
    ("2"
     (expand "is_finite")
     (skosimp*)
     (inst + "N!1" "lambda (a:(Complement(F!1))): f!1(complement(a))")
     (("1"
       (hide -1 1)
       (expand "injective?")
       (skosimp*)
       (inst - "complement(x1!1)" "complement(x2!1)")
       (("1" (assert) (rewrite "complement_equal"))
        ("2"
         (typepred "x2!1")
         (expand "Complement")
         (skolem!)
         (replace -1)
         (rewrite "complement_complement")
         (assert))
        ("3"
         (typepred "x1!1")
         (expand "Complement")
         (skolem!)
         (replace -1)
         (rewrite "complement_complement")
         (assert))))
      ("2" (hide-all-but 1) (grind) (rewrite "complement_complement"))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: prelude_sets_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (inst +
    "(lambda (i:posint): choose({s: T |S!1(s) AND f!1(s) < 1/i}))")
   (("1"
     (skosimp*)
     (inst - "1/n!1")
     (skosimp*)
     (typepred "choose({s: T | S!1(s) AND f!1(s) < 1 / n!1})")
     (("1" (propax))
      ("2"
       (hide 2)
       (expand "nonempty?")
       (expand "empty?")
       (expand "member")
       (inst?)
       (assert))))
    ("2"
     (skosimp*)
     (inst - "1/i!1")
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (skosimp*)
     (inst - "s!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_spaces
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "open?")
   (expand "interior")
   (apply-extensionality :hide? t)
   (lemma "empty_no_members" ("x" "x!1"))
   (expand "member")
   (replace 1 2)
   (assert)
   (expand "extend")
   (propax))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_spaces
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "closed?")
   (expand "open?")
   (rewrite "complement_emptyset")
   (expand "interior")
   (apply-extensionality :hide? t)
   (lemma "fullset_member" ("x" "x!1"))
   (expand "member")
   (replace -1)
   (expand "extend")
   (expand "interior_point?")
   (assert)
   (inst + "1")
   (expand "subset?")
   (expand "member")
   (expand "ball")
   (skosimp)
   (expand "fullset")
   (propax))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_spaces
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (expand "open?")
     (expand "open_in?")
     (split)
     (("1"
       (expand "interior")
       (skosimp*)
       (decompose-equality)
       (inst - "s!1")
       (expand "interior_point?")
       (skosimp*)
       (inst?)
       (expand "subset?")
       (expand "intersection")
       (expand "member")
       (expand "fullset")
       (propax))
      ("2"
       (expand "fullset")
       (expand "subset?")
       (expand "member")
       (propax))))
    ("2"
     (auto-rewrite-theory "sets[T]")
     (expand "open_in?")
     (expand "open?")
     (assert)
     (expand "interior")
     (expand "interior_point?")
     (apply-extensionality :hide? t)
     (case "A!1(x!1)")
     (("1" (inst - "x!1") (skosimp*) (iff) (prop) (inst? +))
      ("2" (iff) (prop))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_spaces
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "closed_in?")
   (lemma open_in_fullset)
   (lemma "complement_closed")
   (inst - "A!1")
   (replace -1)
   (hide -1)
   (inst - "complement(A!1)")
   (replace -1)
   (lemma "intersection_full[T]")
   (inst - "complement(A!1)")
   (replace -1)
   (lemma "subset_fullset[T]")
   (inst - "A!1")
   (prop))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_spaces
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "open?")
   (expand "interior")
   (apply-extensionality)
   (hide 2)
   (case "ball(x!1,r!1)(x!2)")
   (("1"
     (assert)
     (expand "interior_point?")
     (expand "subset?")
     (expand "ball")
     (expand "member")
     (inst + "r!1 - d(x!1,x!2)")
     (("1"
       (skosimp*)
       (lemma "fullset_metric_space")
       (expand "metric_space?")
       (assert)
       (flatten)
       (expand "space_triangle?")
       (inst - "x!1" "x!2" "x!3")
       (("1" (assert)) ("2" (expand "fullset") (propax))
        ("3" (expand "fullset") (propax))
        ("4" (expand "fullset") (propax))))
      ("2" (assert))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_spaces
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "extend")
   (expand "closed?")
   (expand "Complement")
   (expand "every")
   (skosimp*)
   (typepred "x!1")
   (skosimp*)
   (typepred "b!1")
   (replace -3)
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_spaces
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "extend")
   (expand "closed?")
   (expand "Complement")
   (expand "every")
   (skosimp*)
   (typepred "x!1")
   (skolem!)
   (typepred "b!1")
   (replace -3)
   (propax))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_spaces
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (name "ZS" "extend[setof[T], open_set, bool, FALSE](XS!1)")
   (replace -1)
   (name "Y" "Union(ZS)")
   (case "FORALL (x:T): Y(x) IFF (EXISTS (a:(ZS)): a(x))")
   (("1"
     (expand "open?")
     (replace -2)
     (apply-extensionality 1 :hide? t)
     (inst - "x!1")
     (case "Y(x!1)")
     (("1"
       (expand "interior")
       (expand "extend")
       (replace -1)
       (simplify -2)
       (skolem!)
       (typepred "a!1")
       (replace -5 -1 rl)
       (simplify -1)
       (case "open?(a!1)")
       (("1"
         (assert)
         (expand "open?")
         (expand "interior")
         (expand "extend")
         (copy -4)
         (replace -2 -1 rl)
         (simplify -1)
         (expand "interior_point?")
         (skolem!)
         (inst + "r!1")
         (lemma "Union_subset" ("a" "a!1" "A" "ZS"))
         (replace -7)
         (hide-all-but (-1 -2 1))
         (expand "subset?")
         (skosimp*)
         (expand "member")
         (inst - "x!2")
         (inst - "x!2")
         (assert))
        ("2" (assert))))
      ("2" (assert) (expand "interior") (expand "extend") (propax))))
    ("2"
     (hide 2)
     (skosimp*)
     (prop)
     (("1" (hide -3) (expand "Y") (expand "Union") (propax))
      ("2" (expand "Y" 1) (expand "Union") (propax))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_spaces
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "FS!1")
   (lemma "Intersection_finite[T]"
    ("P" "open?" "A" "(extend[setof[T], open_set, bool, FALSE](FS!1))"))
   (split -1)
   (("1" (propax))
    ("2"
     (hide 2)
     (expand "open?")
     (expand "interior")
     (expand "extend")
     (apply-extensionality 1 :hide? t)
     (case "fullset[T](x!1)")
     (("1"
       (assert)
       (expand "interior_point?")
       (inst + "1")
       (hide -2)
       (grind))
      ("2" (assert))))
    ("3"
     (hide 2)
     (lemma "finite_extend[setof[T],open_set]" ("a" "FS!1"))
     (propax))
    ("4"
     (hide -1 2)
     (skosimp*)
     (typepred "a!1")
     (expand "extend")
     (assert))
    ("5"
     (hide -1 2)
     (skosimp*)
     (expand "open?")
     (apply-extensionality 1 :hide? t)
     (expand "intersection")
     (expand "member")
     (expand "interior")
     (expand "extend")
     (case "a!1(x!1) AND b!1(x!1)")
     (("1"
       (assert)
       (replace -1 1)
       (expand "interior_point?")
       (copy -1)
       (replace -3 -2 rl)
       (replace -4 -2 rl)
       (hide -3 -4)
       (simplify -2)
       (flatten)
       (assert)
       (skosimp*)
       (inst + "min(r!1,r!2)")
       (expand "subset?")
       (expand "member")
       (skosimp*)
       (expand "ball")
       (inst - "x!2")
       (inst - "x!2")
       (grind))
      ("2" (replace 1) (propax))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_spaces
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "FS!1")
   (expand "closed?")
   (rewrite "Demorgan1")
   (name "CFS"
         "(Complement(extend[setof[T],
                                                    closed_set,
                                                    bool,
                                                    FALSE]
                                             (FS!1)))")
   (replace -1 1)
   (case "is_finite[open_set](CFS)")
   (("1"
     (lemma "open_Intersection_open"
      ("FS" "restrict[set[T], open_set, boolean](CFS)"))
     (expand "open?")
     (apply-extensionality 1 :hide? t)
     (expand "interior")
     (expand "extend")
     (case "Intersection(CFS)(x!1)")
     (("1"
       (assert)
       (rewrite "extensionality_postulate[T,bool]" -2 :dir rl)
       (inst - "x!1")
       (expand "restrict")
       (expand "extend")
       (expand "interior_point?")
       (case-replace
        "Intersection(LAMBDA (t: setof[T]):
                                IF open?(t) THEN CFS(t) ELSE FALSE ENDIF)
                             (x!1)")
       (("1"
         (skosimp*)
         (inst + "r!1")
         (expand "subset?")
         (skosimp*)
         (inst - "x!2")
         (assert)
         (expand "Intersection")
         (skosimp*)
         (inst -4 "a!1")
         (case "open?[T, d](a!1)")
         (("1" (assert))
          ("2"
           (assert)
           (typepred "a!1")
           (replace -6 -1 rl)
           (expand "Complement" -1)
           (skosimp*)
           (replace -1)
           (typepred "b!1")
           (assert)
           (expand "closed?")
           (propax))))
        ("2"
         (hide 2 -2)
         (expand "Intersection")
         (skosimp*)
         (typepred "a!1")
         (assert)
         (inst - "a!1"))))
      ("2" (assert))))
    ("2"
     (hide 2)
     (expand "is_finite")
     (skolem!)
     (inst + "N!1"
      "lambda (a:(restrict[set[T], open_set, boolean](CFS))): f!1(complement(a))")
     (("1"
       (expand "injective?")
       (skosimp*)
       (typepred "x1!1")
       (typepred "x2!1")
       (expand "restrict")
       (replace -6 * rl)
       (hide -6)
       (expand "Complement")
       (skosimp*)
       (inst - "b!2" "b!1")
       (("1"
         (replace -4 -5)
         (replace -2 -5)
         (rewrite "complement_complement")
         (rewrite "complement_complement")
         (assert))
        ("2"
         (expand "closed?")
         (assert)
         (typepred "b!1")
         (expand "extend")
         (propax))
        ("3"
         (expand "closed?")
         (typepred "b!2")
         (expand "extend")
         (assert)
         (assert))))
      ("2"
       (skosimp*)
       (typepred "a!1")
       (expand "closed?")
       (rewrite "complement_complement")
       (assert)
       (replace -3 -2 rl)
       (expand "restrict")
       (expand "Complement")
       (skosimp*)
       (typepred "b!1")
       (expand "extend")
       (expand "closed?")
       (replace -3 * rl)
       (assert)
       (replace -3 1)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_spaces
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "closed?")
   (rewrite "Demorgan2")
   (name "CXS"
         "(Complement(extend[setof[T], closed_set, bool, FALSE]
                                          (XS!1)))")
   (replace -1)
   (lemma "open_Union_open"
    ("XS" "restrict[set[T], open_set, boolean](CXS)"))
   (expand "open?")
   (apply-extensionality 1 :hide? t)
   (expand "interior")
   (expand "extend")
   (case "Union(CXS)(x!1)")
   (("1"
     (assert)
     (rewrite "extensionality_postulate[T,bool]" -2 :dir rl)
     (inst - "x!1")
     (expand "interior_point?")
     (expand "restrict")
     (expand "extend")
     (case-replace
      "Union(LAMBDA (t: setof[T]): IF open?(t) THEN CXS(t) ELSE FALSE ENDIF)(x!1)")
     (("1"
       (skosimp*)
       (inst + "r!1")
       (expand "subset?")
       (skosimp*)
       (inst - "x!2")
       (assert)
       (expand "Union")
       (skosimp*)
       (typepred "a!3")
       (assert)
       (inst + "a!3"))
      ("2"
       (expand "Union")
       (skosimp*)
       (typepred "a!1")
       (hide 2)
       (inst + "a!1")
       (replace -4 -1 rl)
       (hide -3 -4)
       (expand "Complement")
       (skosimp*)
       (typepred "b!1")
       (expand "closed?")
       (replace -3 * rl)
       (assert))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_spaces
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "A!1")
   (typepred "B!1")
   (expand "closed?")
   (expand "open?")
   (expand "difference")
   (expand "interior")
   (expand "extend")
   (apply-extensionality 1 :hide? t)
   (case-replace "A!1(x!1)")
   (("1"
     (case-replace "NOT B!1(x!1)")
     (("1"
       (assert)
       (expand "interior_point?")
       (replace -3 -1 rl)
       (simplify -1)
       (expand "complement")
       (rewrite "extensionality_postulate[T,bool]" -2 :dir rl)
       (inst - "x!1")
       (assert)
       (skosimp*)
       (inst + "min(r!1,r!2)")
       (hide -3)
       (expand "subset?")
       (skosimp*)
       (inst - "x!2")
       (inst - "x!2")
       (assert)
       (expand "ball")
       (expand "min")
       (case "r!1>r!2")
       (("1" (assert) (assert)) ("2" (assert) (assert))))
      ("2" (assert))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_spaces
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "A!1")
   (typepred "B!1")
   (expand "closed?")
   (rewrite "difference_intersection")
   (rewrite "demorgan2")
   (lemma "open_Union_open"
    ("XS" "{X:open_set | X = A!1 OR X = complement(B!1)}"))
   (case-replace
    "Union(extend[setof[T], open_set, bool, FALSE]
                          ({X: open_set | X = A!1 OR X = complement(B!1)})) = union(complement(B!1), A!1)")
   (hide -1 2)
   (apply-extensionality 1 :hide? t)
   (expand "Union")
   (expand "union")
   (expand "member")
   (expand "complement")
   (case "(NOT member(x!1, B!1) OR A!1(x!1))")
   (("1"
     (replace -1)
     (split -1)
     (("1"
       (expand "member")
       (inst + "complement(B!1)")
       (("1" (expand "complement") (expand "member") (propax))
        ("2" (expand "extend") (propax))))
      ("2" (inst + "A!1") (expand "extend") (propax))))
    ("2"
     (replace 1 2)
     (assert)
     (skosimp)
     (typepred "a!1")
     (expand "extend")
     (case "open?(a!1)")
     (("1" (assert) (expand "complement") (replace -2 -4) (assert))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_spaces
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (prop)
   (("1"
     (inst + "A!1")
     (lemma "intersection_subset2" ("a" "A!1" "b" "S!1"))
     (assert))
    ("2"
     (skolem!)
     (flatten)
     (expand "open?")
     (expand "interior")
     (expand "extend")
     (apply-extensionality 1 :hide? t)
     (case-replace "A!1(x!1)")
     (("1"
       (expand "subset?")
       (copy -1)
       (replace -5 -1)
       (expand "intersection" -1)
       (expand "member")
       (flatten -1)
       (copy -1)
       (replace -6 -1 rl)
       (simplify -1)
       (assert)
       (expand "interior_point?")
       (hide -6)
       (skosimp -1)
       (inst + "r!1")
       (replace -6 1)
       (expand "subset?")
       (expand "member")
       (skosimp*)
       (expand "intersection")
       (inst -1 "x!2")
       (inst -6 "x!2")
       (expand "member")
       (assert))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: compactness
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "open_cover?")
   (expand "extend")
   (split +)
   (("1"
     (expand "subset?")
     (skosimp*)
     (assert)
     (expand "Union")
     (case "EXISTS (n: posnat): n > d(p!1,x!1)")
     (("1"
       (skosimp*)
       (inst + "ball(p!1,n!1)")
       (("1" (expand "ball") (assert))
        ("2"
         (ground)
         (("1" (expand "nBalls") (expand "restrict") (inst?))
          ("2" (lemma "ball_open") (inst?))))))
      ("2"
       (hide 2)
       (lemma "axiom_of_archimedes")
       (inst?)
       (skosimp*)
       (inst + "i!1")
       (("1" (assert)) ("2" (assert))))))
    ("2" (skosimp*) (ground))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: compactness
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "compact?")
   (inst - "ball_covering(H!1)")
   (prop)
   (skosimp*)
   (expand "finite_cover?")
   (prop)
   (lemma "is_finite_surj[set[T]]")
   (inst - "YS!1")
   (skosimp*)
   (prop)
   (skosimp*)
   (expand "surjective?")
   (inst + "N!1" "(LAMBDA (n: below[N!1]): reverse_ball(H!1,f!1(n)))")
   (("1"
     (expand "open_cover?" +)
     (expand "subset?")
     (expand "member")
     (expand "Union")
     (expand "ball_covering" +)
     (prop)
     (("1"
       (skosimp*)
       (expand "open_cover?")
       (prop)
       (expand "subset?")
       (expand "member")
       (expand "Union")
       (case "FORALL (x: T): S!1(x) => (EXISTS (a: (YS!1)): a(x))")
       (("1"
         (inst - "x!1")
         (prop)
         (skosimp*)
         (typepred "a!1")
         (inst + "ball(reverse_ball(H!1,a!1)`1,reverse_ball(H!1,a!1)`2)")
         (("1" (typepred "reverse_ball(H!1,a!1)") (assert))
          ("2"
           (expand "ball_covering")
           (inst + "reverse_ball(H!1,a!1)")
           (("1" (inst - "a!1") (skosimp*) (inst + "x!2") (assert))
            ("2"
             (prop)
             (("1"
               (expand "nonempty?")
               (expand "empty?")
               (inst - "x!1")
               (expand "member")
               (propax))
              ("2"
               (case "FORALL (x: set[T]): YS!1(x) => (EXISTS (h: (H!1)): x = ball(h`1, h`2))")
               (("1"
                 (inst - "a!1")
                 (prop)
                 (expand "ball_covering")
                 (propax))
                ("2" (propax))))))))
          ("3"
           (prop)
           (("1"
             (expand "nonempty?")
             (expand "empty?")
             (inst - "x!1")
             (expand "member")
             (propax))
            ("2"
             (expand "ball_covering")
             (case "FORALL (x: set[T]): YS!1(x) => (EXISTS (h: (H!1)): x = ball(h`1, h`2))")
             (("1" (inst - "a!1") (prop)) ("2" (propax))))))))
        ("2" (propax))))
      ("2"
       (skosimp*)
       (lemma "ball_open")
       (inst - "h!1`2" "h!1`1")
       (assert))))
    ("2"
     (skosimp*)
     (typepred "n!1")
     (prop)
     (("1"
       (expand "nonempty?")
       (expand "empty?")
       (expand "member")
       (typepred "f!1(n!1)")
       (expand "subset?")
       (case "FORALL (x: set[T]):
                     member(x, YS!1) => member(x, ball_covering(H!1))")
       (("1"
         (inst - "f!1(n!1)")
         (expand "member")
         (expand "ball_covering")
         (skosimp*)
         (inst - "h!1`1")
         (expand "ball")
         (assert)
         (decompose-equality)
         (inst - "h!1`1")
         (lemma "fullset_metric_space")
         (expand "metric_space?")
         (prop)
         (expand "space_zero?")
         (inst - "h!1`1" "h!1`1")
         (("1" (prop) (assert)) ("2" (expand "fullset") (propax))))
        ("2" (propax))))
      ("2"
       (typepred "f!1(n!1)")
       (expand "subset?")
       (case "FORALL (x: set[T]):
                     member(x, YS!1) => member(x, ball_covering(H!1))")
       (("1" (inst - "f!1(n!1)") (expand "member") (propax))
        ("2" (propax))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: compactness
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (assert)
   (flatten)
   (typepred "idxCover(S!1, H!1)")
   (("1"
     (expand "ball_covering")
     (expand "open_cover?")
     (flatten)
     (hide -2)
     (expand "subset?")
     (assert)
     (inst?)
     (assert)
     (expand "Union")
     (skosimp*)
     (typepred "a!1")
     (skosimp*)
     (typepred "h!1")
     (skosimp*)
     (inst + "n!1")
     (assert)
     (inst + "h!1")
     (assert))
    ("2" (propax)) ("3" (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: compactness
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (case "FORALL (n: below(N!1)): nonempty?[nat]({M: nat| FORALL (m: above(M)): P!1(m, n)})")
   (("1"
     (case "is_finite[nat]({x: nat | EXISTS (n: below(N!1)): x = min_nat[nat].min({M: nat | FORALL (m: above(M)): P!1(m, n)})})")
     (("1"
       (name "f"
             "(LAMBDA (n:below(N!1)): min_nat[nat].min({M: nat | FORALL (m: above(M)): P!1(m,n)}))")
       (swap-rel -1)
       (inst + "max({K: nat | EXISTS (n1: below(N!1)): K = f(n1)})")
       (("1"
         (skosimp*)
         (typepred "m!1")
         (typepred "n!1")
         (replace -3)
         (typepred
          "max({K: nat |
                                                      EXISTS (n1: below(N!1)):
                                                        K =
                                                         (LAMBDA (n: below(N!1)):
                                                            min_nat[nat].min({M: nat | FORALL (m: above(M)): P!1(m, n)}))
                                                             (n1)})")
         (("1"
           (skosimp*)
           (inst -
            "min_nat[nat].min({M: nat | FORALL (m: above(M)): P!1(m, n!1)})")
           (("1"
             (inst - "n!1")
             (prop)
             (("1"
               (swap-rel -1)
               (("1"
                 (add-formulas -1 -4)
                 (("1"
                   (assert)
                   (both-sides "-"
                    "max({K: nat |
                                                                                                                  EXISTS (n1: below(N!1)):
                                                                                                                    K = min_nat[nat].min({M: nat | FORALL (m: above(M)): P!1(m, n1)})})"
                    -1)
                   (assert)
                   (typepred
                    "min_nat[nat].min({M: nat | FORALL (m: above(M)): P!1(m, n!1)})")
                   (inst - "m!1"))
                  ("2"
                   (expand "empty?")
                   (expand "member")
                   (prop)
                   (inst -
                    "min_nat[nat].min
                                        ({M: nat | FORALL (m: above(M)): P!1(m, n!1)})")
                   (inst + "n!1"))
                  ("3"
                   (prop)
                   (expand "empty?")
                   (expand "nonempty?")
                   (expand "empty?")
                   (expand "member")
                   (inst -
                    "min_nat[nat].min
                                        ({M: nat | FORALL (m: above(M)): P!1(m, n!1)})")
                   (("1" (inst + "n!1"))
                    ("2"
                     (expand "nonempty?")
                     (expand "empty?")
                     (expand "member")
                     (propax))))))
                ("2"
                 (prop)
                 (expand "nonempty?")
                 (expand "empty?")
                 (expand "member")
                 (inst -
                  "min_nat[nat].min
                                      ({M: nat | FORALL (m: above(M)): P!1(m, n!1)})")
                 (("1" (inst + "n!1"))
                  ("2"
                   (expand "nonempty?")
                   (expand "empty?")
                   (expand "member")
                   (propax))))))
              ("2" (inst + "n!1"))))
            ("2"
             (expand "nonempty?")
             (expand "empty?")
             (expand "member")
             (case "FORALL (n: below(N!1)):
                           EXISTS (M: nat): FORALL (m: above(M)): P!1(m, n)")
             (("1" (inst - "n!1") (skosimp*) (inst -2 "M!1"))
              ("2" (propax))))))
          ("2"
           (prop)
           (expand "empty?")
           (expand "member")
           (inst -
            "min_nat[nat].min
                                ({M: nat | FORALL (m: above(M)): P!1(m, n!1)})")
           (("1" (inst + "n!1"))
            ("2"
             (expand "nonempty?")
             (expand "empty?")
             (expand "member")
             (case "FORALL (n: below(N!1)):
                           EXISTS (M: nat): FORALL (m: above(M)): P!1(m, n)")
             (("1" (inst - "n!1") (skosimp*) (inst -2 "M!1"))
              ("2" (propax))))))
          ("3" (skosimp*) (inst-cp - "n!2"))))
        ("2"
         (prop)
         (("1" (replace -1) (assert))
          ("2"
           (expand "empty?")
           (expand "member")
           (inst - "f(0)")
           (inst + "0"))))))
      ("2"
       (lemma "is_finite_surj[nat]")
       (inst -
        "{x: nat |
                      EXISTS (n: below(N!1)):
                        x =
                         min_nat[nat].min
                             ({M: nat | FORALL (m: above(M)): P!1(m, n)})}")
       (prop)
       (inst + "N!1"
        "(LAMBDA (n: below(N!1)): min_nat[nat].min
                                      ({M: nat |
                                          FORALL (m: above(M)): P!1(m, n)}))")
       (("1"
         (expand "surjective?")
         (skosimp*)
         (typepred "y!1")
         (skosimp*)
         (inst + "n!1")
         (assert))
        ("2" (skosimp*) (inst + "n!1"))))
      ("3" (propax))))
    ("2"
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (skosimp*)
     (inst -2 "n!1")
     (skosimp*)
     (inst - "M!1"))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: compactness
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "max_min_finite_scaf")
   (name "K"
         "{h: [T,posreal] | EXISTS (M: nat): FORALL (m: above(M)): d(seq!1(m),h`1) > h`2}")
   (name "IC" "idxCover(S!1,K)")
   (("1"
     (name "PT"
           "(LAMBDA (j: nat, n: below(IC`1)): (d(seq!1(j), IC`2(n)`1) > IC`2(n)`2))")
     (inst - "IC`1" "PT")
     (("1"
       (replace -1 - rl)
       (assert)
       (prop)
       (("1"
         (skosimp*)
         (lemma "idxCover_def")
         (inst - "K" "S!1" "seq!1(TOTAL_M!1 + 1)")
         (assert)
         (prop)
         (("1"
           (skosimp*)
           (typepred "n!1")
           (case-replace "idxCover(S!1, K) = IC")
           (inst - "TOTAL_M!1+1" "n!1")
           (expand "ball")
           (lemma "fullset_metric_space")
           (expand "metric_space?")
           (expand "space_symmetric?")
           (prop)
           (inst - "seq!1(TOTAL_M!1 + 1)" "IC`2(n!1)`1")
           (("1" (replace -2) (assert)) ("2" (expand "fullset") (propax))
            ("3" (expand "fullset") (propax))))
          ("2"
           (expand "open_cover?")
           (prop)
           (("1"
             (expand "subset?")
             (expand "Union")
             (expand "member")
             (skosimp*)
             (inst 2 "x!1")
             (skosimp*)
             (inst + "ball(x!1,epsilon!1/2)")
             (("1"
               (expand "ball")
               (lemma "fullset_metric_space")
               (expand "metric_space?")
               (expand "space_zero?")
               (prop)
               (inst - "x!1" "x!1")
               (("1" (prop) (replace -1) (assert))
                ("2" (expand "fullset") (propax))))
              ("2"
               (expand "ball_covering")
               (inst + "(x!1,epsilon!1/2)")
               (expand "K")
               (inst + "N!1")
               (skosimp*)
               (inst + "m!1")
               (assert))))
            ("2"
             (skosimp*)
             (expand "ball_covering")
             (skosimp*)
             (lemma "ball_open")
             (inst - "h!1`2" "h!1`1")
             (replace -2 +)
             (propax))))))
        ("2"
         (typepred "IC")
         (skosimp*)
         (typepred "IC`2(n!1)")
         (case "K = ({h: [T, posreal] |
                         EXISTS (M: nat): FORALL (m: above(M)): d(seq!1(m), h`1) > h`2})")
         (("1" (replace -1) (assert)) ("2" (assert))))))
      ("2"
       (expand "nonempty?")
       (expand "empty?")
       (expand "member")
       (skosimp*)
       (lemma "idxCover_def")
       (inst -
        "{h: [T, posreal] |
                  EXISTS (M: nat): FORALL (m: above(M)): d(seq!1(m), h`1) > h`2}"
        "S!1" "x!1")
       (assert)
       (prop)
       (("1" (skosimp*))
        ("2"
         (expand "open_cover?")
         (expand "subset?")
         (expand "member")
         (prop)
         (("1"
           (skosimp*)
           (expand "Union")
           (inst 3 "x!2")
           (skosimp*)
           (inst + "ball(x!2,epsilon!1/2)")
           (("1"
             (expand "ball")
             (lemma "fullset_metric_space")
             (expand "metric_space?")
             (expand "space_zero?")
             (prop)
             (inst - "x!2" "x!2")
             (("1" (prop) (replace -1) (assert))
              ("2" (expand "fullset") (propax))))
            ("2"
             (expand "ball_covering")
             (inst + "(x!2,epsilon!1/2)")
             (inst + "N!1")
             (skosimp*)
             (inst + "m!1")
             (assert))))
          ("2"
           (skosimp*)
           (expand "ball_covering")
           (skosimp*)
           (lemma "ball_open")
           (inst - "h!1`2" "h!1`1")
           (assert))))))))
    ("2"
     (expand "open_cover?")
     (prop)
     (("1"
       (expand "subset?")
       (skosimp*)
       (expand "member")
       (expand "Union")
       (inst 2 "x!1")
       (skosimp*)
       (inst + "ball(x!1,epsilon!1/2)")
       (("1"
         (expand "ball")
         (lemma "fullset_metric_space")
         (expand "metric_space?")
         (expand "space_zero?")
         (prop)
         (inst - "x!1" "x!1")
         (("1" (prop) (replace -1) (assert))
          ("2" (expand "fullset") (propax))))
        ("2"
         (expand "ball_covering")
         (inst + "(x!1,epsilon!1/2)")
         (replace -2 + rl)
         (assert)
         (inst + "N!1")
         (skosimp*)
         (inst + "m!1")
         (assert))))
      ("2"
       (skosimp*)
       (expand "ball_covering")
       (skosimp*)
       (lemma "ball_open")
       (inst - "h!1`2" "h!1`1")
       (assert))))
    ("3" (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: compactness
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skosimp*)
   (label "comps" -1)
   (label "inc" -2)
   (label "oc" -3)
   (label "fp" 1)
   (case "FORALL (i,j: nat): i<=j IMPLIES subset?(seq!1(i),seq!1(j))")
   (("1"
     (label "ijcase" -1)
     (name "YS!1" "{AZ: set[T] | EXISTS (k: nat): AZ = seq!1(k)}")
     (label "ysname" -1)
     (expand "compact?")
     (inst - "YS!1")
     (split)
     (("1"
       (skosimp*)
       (label "ys2fc" -2)
       (name "ysenum"
             "(lambda (a: (YS!2)): min_nat.min({j: nat | seq!1(j) = a}))")
       (("1"
         (label "ysenumname" -1)
         (name "K" "max({j: nat| EXISTS (a: (YS!2)): j = ysenum(a)})")
         (("1"
           (label "kname" -1)
           (inst + "K")
           (case "FORALL (a: (YS!2)): subset?(a,seq!1(K))")
           (("1"
             (label "kdef" -1)
             (copy "ys2fc")
             (hide "ys2fc")
             (expand "finite_cover?")
             (flatten)
             (label "isfin" -1)
             (label "ysoc" -2)
             (expand "open_cover?" "ysoc")
             (flatten)
             (hide -3)
             (expand "subset?")
             (skosimp*)
             (inst - "x!1")
             (assert)
             (expand "Union")
             (skosimp*)
             (inst - "a!1")
             (inst - "x!1")
             (assert))
            ("2"
             (skosimp*)
             (expand "subset?")
             (expand "member")
             (skosimp*)
             (inst "ijcase" "ysenum(a!1)" "K")
             (split)
             (("1" (inst - "x!1") (assert))
              ("2"
               (typepred "K")
               (inst - "ysenum(a!1)")
               (skosimp*)
               (prop)
               (inst + "a!1"))))))
          ("2"
           (split)
           (("1"
             (expand "finite_cover?")
             (lemma "is_finite_surj")
             (inst - "{j: nat | EXISTS (a: (YS!2)): j = ysenum(a)}")
             (assert)
             (hide (2 3 4 5))
             (flatten)
             (label "ifys" -3)
             (lemma "is_finite_surj[set[T]]")
             (inst - "YS!2")
             (assert)
             (skosimp*)
             (inst + "N!1" "ysenum o f!1")
             (("1"
               (expand "surjective?")
               (skosimp*)
               (typepred "y!1")
               (skosimp*)
               (replace -1)
               (hide -1)
               (expand "o")
               (inst - "a!1")
               (skosimp*)
               (inst + "x!1")
               (assert))
              ("2" (skosimp*) (expand "o") (inst + "f!1(x1!1)"))))
            ("2"
             (expand "empty?")
             (expand "member")
             (case "not empty?(YS!2)")
             (("1"
               (expand "empty?")
               (skosimp*)
               (expand "member")
               (inst - "ysenum(x!1)")
               (inst + "x!1"))
              ("2"
               (expand "empty?")
               (expand "member")
               (expand "finite_cover?")
               (expand "open_cover?")
               (flatten)
               (expand "subset?" "ys2fc")
               (inst + "0")
               (expand "subset?")
               (expand "member" +)
               (skosimp*)
               (inst "ys2fc" "x!1")
               (expand "member" "ys2fc")
               (assert)
               (expand "Union")
               (skosimp*)
               (typepred "a!1")
               (inst - "a!1"))))))))
        ("2"
         (skosimp*)
         (expand "nonempty?")
         (expand "empty?")
         (expand "member")
         (expand "subset?")
         (inst "comps" "a!1")
         (expand "member")
         (replace "ysname" - rl)
         (assert)
         (skosimp*)
         (inst - "k!1")
         (assert))))
      ("2"
       (expand "open_cover?")
       (flatten)
       (assert)
       (skosimp*)
       (replace "ysname" - rl)
       (assert)
       (skosimp*)
       (inst "oc" "C!1")
       (assert))))
    ("2"
     (hide-all-but ("inc" 1))
     (skosimp*)
     (name "K"
           "min_nat.min({r: nat | r>=i!1 AND not subset?(seq!1(i!1),seq!1(r))})")
     (("1"
       (name "rset"
             "{r: nat | r >= i!1 AND NOT subset?(seq!1(i!1), seq!1(r))}")
       (replace -1)
       (label "rsetname" -1)
       (case "rset(K)")
       (("1"
         (replace "rsetname" -1 rl)
         (assert)
         (flatten)
         (case "K = i!1")
         (("1" (replace -1) (expand "subset?") (skosimp*))
          ("2"
           (case "subset?(seq!1(i!1),seq!1(K-1))")
           (("1"
             (inst - "K-1")
             (("1"
               (assert)
               (expand "subset?")
               (expand "member")
               (skosimp*)
               (inst - "x!1")
               (inst - "x!1")
               (assert))
              ("2" (assert))))
            ("2"
             (typepred "K")
             (inst - "K-1")
             (("1" (assert)) ("2" (assert))))
            ("3" (assert))))))
        ("2" (assert))))
      ("2"
       (expand "nonempty?")
       (expand "empty?")
       (inst - "j!1")
       (expand "subset?")
       (expand "member")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: compactness
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "compact?")
   (skeep)
   (name "ws" "complement[T](W)")
   (name "XS!1" "union(singleton(ws),XS)")
   (label "XS1def" -1)
   (inst - "XS!1")
   (split)
   (("1"
     (skosimp*)
     (label "YS1ss" -1)
     (label "YS1fc" -2)
     (name "YS!2" "{a: set[T] | YS!1(a) AND a /= ws}")
     (label "YS2def" -1)
     (case "subset?(YS!2,YS!1)")
     (("1"
       (inst + "YS!2")
       (split)
       (("1"
         (expand "subset?")
         (skosimp*)
         (expand "member")
         (label "x1YS2" -1)
         (inst - "x!1")
         (inst - "x!1")
         (assert)
         (replace "XS1def" "YS1ss" rl)
         (expand "union" "YS1ss")
         (assert)
         (expand "singleton" "YS1ss")
         (replace "YS2def" "x1YS2" rl)
         (assert))
        ("2"
         (label "YS21ss" -1)
         (expand "finite_cover?")
         (flatten)
         (split)
         (("1"
           (lemma "finite_subset[set[T]]")
           (inst - "YS!1" "YS!2")
           (assert))
          ("2"
           (expand "open_cover?")
           (flatten)
           (split)
           (("1"
             (expand "subset?")
             (skosimp*)
             (expand "member")
             (expand "Union")
             (inst - "x!1")
             (inst - "x!1")
             (inst - "x!1")
             (inst - "x!1")
             (inst - "x!1")
             (assert)
             (assert)
             (skosimp*)
             (inst + "a!1")
             (replace "YS2def" + rl)
             (assert)
             (expand "complement")
             (replace -9 + rl)
             (assert)
             (replace -1)
             (assert))
            ("2"
             (skosimp*)
             (replace "YS2def" -1 rl)
             (assert)
             (flatten)
             (inst - "C!1")
             (assert))))))))
      ("2"
       (expand "subset?")
       (skosimp*)
       (expand "member")
       (replace "YS2def" - rl)
       (assert)
       (flatten))))
    ("2"
     (expand "open_cover?")
     (flatten)
     (split)
     (("1"
       (expand "subset?")
       (skosimp*)
       (expand "member")
       (expand "Union")
       (inst - "x!1")
       (inst - "x!1")
       (hide -4)
       (split)
       (("1"
         (skosimp*)
         (inst + "a!1")
         (replace "XS1def" + rl)
         (expand "union")
         (expand "member")
         (propax))
        ("2"
         (inst + "ws")
         (("1" (expand "complement") (replace -3 + rl) (assert))
          ("2"
           (expand "union")
           (expand "singleton")
           (expand "member")
           (replace "XS1def" + rl)
           (assert))))))
      ("2"
       (expand "singleton")
       (expand "union")
       (assert)
       (skosimp*)
       (replace "XS1def" - rl)
       (assert)
       (inst - "C!1")
       (assert)
       (assert)
       (replace -1)
       (hide -1)
       (expand "closed?")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: compactness
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (copy -1)
   (label "scomp" -2)
   (hide "scomp")
   (expand "closed?")
   (expand "open?")
   (expand "interior")
   (expand "interior_point?")
   (expand "subset?")
   (expand "member")
   (expand "ball")
   (expand "complement")
   (expand "member")
   (decompose-equality)
   (iff)
   (ground)
   (name "setenum" "(lambda (j: nat): {tz: T | d(x!1,tz) > 1/(j+1)})")
   (lemma "compact_open_increasing_seq")
   (reveal "scomp")
   (inst - "S")
   (assert)
   (hide "scomp")
   (case "forall (zt: nat): open?(setenum(zt))")
   (("1"
     (inst -2 "setenum")
     (label "setenumopen" -1)
     (hide -1)
     (split)
     (("1"
       (skosimp*)
       (inst + "1/(i!1 + 1)")
       (skosimp*)
       (expand "subset?")
       (expand "member")
       (inst - "x!2")
       (assert)
       (replace -2 -1 rl)
       (assert))
      ("2"
       (skosimp*)
       (expand "subset?")
       (skosimp*)
       (expand "member")
       (replace -2 + rl)
       (replace -2 - rl)
       (assert)
       (cross-mult -1)
       (cross-mult 1)
       (assert))
      ("3"
       (expand "open_cover?")
       (split)
       (("1"
         (expand "subset?")
         (expand "member")
         (expand "Union")
         (skosimp*)
         (lemma "axiom_of_archimedes")
         (case "d(x!1,x!2) = 0")
         (("1"
           (lemma "fullset_metric_space")
           (expand "metric_space?")
           (flatten)
           (expand "space_zero?")
           (inst - "x!1" "x!2")
           (("1" (assert)) ("2" (expand "fullset") (propax))
            ("3" (expand "fullset") (propax))))
          ("2"
           (case "1/(d(x!1,x!2)) > 0")
           (("1"
             (inst - "1/(d(x!1,x!2)) + 2")
             (skosimp*)
             (inst + "setenum(i!1)")
             (("1"
               (replace -4 + rl)
               (assert)
               (both-sides "-" "2" -2)
               (assert)
               (cross-mult 2)
               (cross-mult -2)
               (assert))
              ("2" (inst + "i!1") (assert)) ("3" (assert))))
            ("2" (cross-mult 1) (assert)) ("3" (assert))))))
        ("2"
         (reveal "setenumopen")
         (skosimp*)
         (inst - "k!1")
         (assert))))))
    ("2"
     (skosimp*)
     (expand "open?")
     (expand "interior")
     (apply-extensionality)
     (iff)
     (ground)
     (expand "interior_point?")
     (expand "subset?")
     (expand "member")
     (expand "ball")
     (hide -2)
     (hide (2 3 4 5))
     (replace -2 + rl)
     (assert)
     (replace -2 - rl)
     (assert)
     (name "newr" "d(x!1,x!2)-1/(1+zt!1)")
     (inst + "newr")
     (("1"
       (skosimp*)
       (replace -1 - rl)
       (hide -1)
       (lemma "fullset_metric_space")
       (expand "metric_space?")
       (flatten)
       (expand "space_triangle?")
       (inst - "x!1" "x!3" "x!2")
       (("1"
         (assert)
         (expand "space_symmetric?")
         (inst - "x!2" "x!3")
         (("1" (assert)) ("2" (expand "fullset") (propax))
          ("3" (expand "fullset") (propax))))
        ("2" (expand "fullset") (propax))
        ("3" (expand "fullset") (propax))
        ("4" (expand "fullset") (propax))))
      ("2" (replace -1 + rl) (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: compactness
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (lemma "compact_open_increasing_seq")
   (inst?)
   (assert)
   (case "EXISTS (vv:(S)): TRUE")
   (("1"
     (skeep -)
     (inst - "(LAMBDA (nn:nat): ball(vv,max(nn,1)))")
     (("1"
       (split -)
       (("1"
         (case "EXISTS (i:posnat): subset?(S,ball(vv,i))")
         (("1"
           (hide -2)
           (skeep -)
           (expand "bounded?")
           (inst + "2*i+1")
           (skeep)
           (expand "subset?")
           (inst-cp - "x")
           (inst - "y")
           (expand "member")
           (expand "ball")
           (assert)
           (lemma "fullset_metric_space")
           (expand "metric_space?")
           (flatten)
           (expand "space_triangle?")
           (inst - "x" "vv" "y")
           (("1"
             (expand "space_symmetric?")
             (inst - "x" "vv")
             (("1" (assert)) ("2" (expand "fullset") (propax))
              ("3" (expand "fullset") (propax))))
            ("2" (expand "fullset") (propax))
            ("3" (expand "fullset") (propax))
            ("4" (expand "fullset") (propax))))
          ("2" (skeep -) (inst + "max(i,1)"))))
        ("2"
         (skeep)
         (expand "subset?")
         (expand "ball")
         (expand "member")
         (skeep)
         (expand "max")
         (lift-if)
         (ground))
        ("3"
         (hide (-1 2))
         (lemma "nBalls_open_cover")
         (inst - "S" "vv")
         (expand "open_cover?")
         (flatten)
         (split)
         (("1"
           (expand "subset?")
           (skeep)
           (inst - "x")
           (assert)
           (expand "Union")
           (skosimp*)
           (inst + "a!1")
           (typepred "a!1")
           (expand "extend")
           (assert)
           (split -)
           (("1"
             (flatten)
             (expand "nBalls")
             (expand "restrict")
             (skosimp*)
             (inst + "n!1")
             (expand "max")
             (propax))
            ("2" (propax))))
          ("2"
           (skeep)
           (inst - "C")
           (lemma "ball_open")
           (skosimp*)
           (inst - "max(k!1,1)" "vv")
           (assert))))))
      ("2" (skeep) (lemma "ball_open") (inst - "max(nn,1)" "vv"))
      ("3" (skeep) (expand "max") (lift-if) (ground))))
    ("2"
     (hide -1)
     (expand "bounded?")
     (inst 2 "1")
     (skosimp*)
     (inst + "x!1"))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: compactness
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst +
    "(LAMBDA (H: set[[T, posreal]],
                        a: {s: (nonempty?[T]) | ball_covering(H)(s)}): choose({h: (H) | ball[T, d](h`1, h`2) = a}))")
   (("1"
     (skosimp*)
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (typepred "a!1")
     (expand "ball_covering")
     (skosimp*)
     (inst - "h!1")
     (assert))
    ("2" (skosimp*) (rewrite "fullset_metric_space"))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: compactness
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "nonempty?")
   (expand "empty?")
   (assert)
   (lemma "set_compact")
   (inst?)
   (inst - "S!1")
   (assert)
   (skosimp*)
   (inst - "(N!1,seq!1)"))


proof_type: f_proof
decl_type: formula
library: analysis
theory: continuity_ms
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "restrict")
   (expand "subset?")
   (expand "image")
   (expand "inverse_image")
   (expand "extend")
   (expand "member")
   (skosimp*)
   (typepred "x!2")
   (replace -5 -2)
   (simplify -2)
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: continuity_ms
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "subset?")
   (expand "extend")
   (expand "inverse_image")
   (expand "member")
   (expand "image")
   (skosimp*)
   (inst -1 "x!1")
   (assert)
   (inst - "f!1(x!1)")
   (case-replace "T!1(f!1(x!1))")
   (("1"
     (replace -3)
     (assert)
     (inst + "x!1")
     (expand "restrict")
     (propax))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: continuity_ms
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (expand "continuous?")
     (expand "continuous_at?")
     (skeep)
     (expand "open_in?")
     (prop)
     (("1"
       (skosimp*)
       (case "inverse_image(f!1,Y)(s!1)")
       (("1"
         (expand "subset?")
         (expand "member")
         (expand "intersection")
         (expand "member")
         (expand "ball")
         (expand "inverse_image")
         (expand "member")
         (inst - "s!1")
         (("1"
           (expand "open?")
           (expand "interior")
           (expand "interior_point?")
           (expand "subset?")
           (expand "ball")
           (decompose-equality)
           (expand "member")
           (inst - "f!1(s!1)")
           (iff)
           (prop)
           (skosimp*)
           (copy -5)
           (inst - "r!1")
           (skosimp*)
           (inst + "delta!1")
           (skosimp*)
           (prop)
           (inst - "x!1")
           (prop)
           (inst - "f!1(x!1)")
           (prop))
          ("2"
           (typepred "s!1")
           (expand "inverse_image")
           (expand "intersection")
           (expand "member")
           (prop))))
        ("2"
         (typepred "s!1")
         (expand "intersection")
         (expand "member")
         (prop))))
      ("2"
       (expand "subset?")
       (expand "member")
       (expand "intersection")
       (expand "member")
       (skosimp*))))
    ("2"
     (expand "continuous?")
     (skosimp*)
     (typepred "x!1")
     (expand "continuous_at?")
     (expand "member")
     (expand "ball")
     (expand "open_in?")
     (expand "subset?")
     (expand "intersection")
     (expand "inverse_image")
     (expand "member")
     (expand "ball")
     (skosimp*)
     (case "open?[T2,d2](ball[T2,d2](f!1(x!1),epsilon!1))")
     (("1"
       (inst - "ball[T2,d2](f!1(x!1),epsilon!1)")
       (prop)
       (inst - "x!1")
       (("1"
         (skosimp*)
         (inst + "r!1")
         (skosimp*)
         (inst - "y!1")
         (prop)
         (("1" (expand "ball") (propax))
          ("2" (typepred "y!1") (propax))))
        ("2"
         (expand "inverse_image")
         (expand "intersection")
         (expand "member")
         (expand "ball")
         (lemma "fullset_metric_space2")
         (expand "metric_space?")
         (expand "space_zero?")
         (prop)
         (inst - "f!1(x!1)" "f!1(x!1)")
         (("1" (prop) (assert)) ("2" (expand "fullset") (propax))))))
      ("2" (lemma "ball_open[T2,d2]") (inst - "epsilon!1" "f!1(x!1)"))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: continuity_ms
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "continuous_open_sets")
   (inst - "S!1" "f!1")
   (replace -1)
   (hide -1)
   (prop)
   (("1"
     (skosimp*)
     (expand "closed?")
     (expand "closed_in?")
     (inst - "complement(Y!1)")
     (prop)
     (("1"
       (case "inverse_image(f!1, complement(Y!1)) = complement(intersection
                                                    (inverse_image(f!1, Y!1), S!1))")
       (("1" (replace -1) (propax))
        ("2"
         (lemma "demorgan2[T1]")
         (inst - "inverse_image(f!1,Y!1)" "S!1")
         (replace -1)
         (grind))))
      ("2" (grind))))
    ("2"
     (skosimp*)
     (expand "closed?")
     (expand "closed_in?")
     (inst - "complement(Y!1)")
     (lemma "complement_complement[T2]")
     (inst - "Y!1")
     (replace -1)
     (prop)
     (hide -2 -3 -4 -5 -6 -7 -8 -9)
     (case "intersection(complement(intersection
                                                  (inverse_image
                                                   (f!1, complement(Y!1)),
                                                   S!1)),
                                       S!1) = intersection(inverse_image(f!1, Y!1), S!1)")
     (("1" (replace -1) (propax))
      ("2" (hide-all-but 1) (apply-extensionality) (grind))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: uniform_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "continuous?")
   (expand "uniformly_continuous?")
   (skosimp*)
   (expand "continuous_at?")
   (skosimp*)
   (inst - "epsilon!1")
   (skosimp*)
   (inst + "delta!1")
   (skosimp*)
   (expand "member")
   (expand "ball")
   (grind))


proof_type: f_proof
decl_type: formula
library: analysis
theory: uniform_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "Hset")
   (expand "continuous?")
   (expand "restrict")
   (inst - "x!1")
   (expand "continuous_at?")
   (inst - "epsilon!1")
   (skosimp*)
   (assert)
   (inst + "(x!1,delta!1/2)")
   (split +)
   (("1"
     (skosimp*)
     (inst?)
     (("1"
       (expand "intersection")
       (assert)
       (flatten)
       (assert)
       (expand "ball")
       (assert)
       (rewrite "dt_sym"))
      ("2" (expand "intersection") (assert))))
    ("2" (expand "ball") (lemma "ds_eq_0") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: uniform_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "ball_cover")
   (expand "open_cover?")
   (split +)
   (("1"
     (expand "subset?")
     (skosimp*)
     (assert)
     (expand "Union")
     (lemma "Hset_def")
     (inst?)
     (inst?)
     (assert)
     (inst - "x!1")
     (skosimp*)
     (inst + "ball[S, ds](p!1)")
     (expand "ball_covering")
     (inst + "(p!1`1, p!1`2)")
     (("1" (assert)) ("2" (assert))))
    ("2"
     (skosimp*)
     (expand "ball_covering")
     (skosimp*)
     (replace -1)
     (hide -)
     (lemma "ball_open[S,ds]")
     (inst?))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: uniform_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "restrict")
   (typepred "a!1")
   (expand "continuous?")
   (inst - "a!1")
   (expand "continuous_at?")
   (inst?)
   (skosimp*)
   (assert)
   (expand "ball")
   (expand "intersection")
   (assert)
   (inst + "delta!1")
   (skosimp*)
   (inst - "x!1")
   (assert)
   (rewrite "dt_sym"))


proof_type: f_proof
decl_type: formula
library: analysis
theory: uniform_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (name "H" "Hset(A!1, epsilon!1, f!1)")
   (replace -1)
   (expand "ball_covering")
   (expand "open_cover?")
   (split +)
   (("1"
     (expand "subset?")
     (skosimp*)
     (assert)
     (expand "Union")
     (expand "continuous?")
     (inst - "x!1")
     (expand "continuous_at?")
     (inst - "epsilon!1/2")
     (skosimp*)
     (assert)
     (expand "Hset")
     (inst + "ball[S, ds](x!1, delta!1/2)")
     (("1" (expand "ball") (lemma "ds_eq_0") (inst?) (assert))
      ("2"
       (inst + "(x!1, delta!1/2)")
       (replace -2 + :dir rl)
       (assert)
       (skosimp*)
       (inst -4 "x!2")
       (("1"
         (assert)
         (expand "intersection")
         (assert)
         (flatten)
         (expand "ball")
         (assert)
         (rewrite "dt_sym")
         (assert))
        ("2" (expand "intersection") (assert))))))
    ("2" (skosimp*) (lemma "ball_open[S,ds]") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: uniform_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "rset")
   (lemma "is_finite_exists_N")
   (inst?)
   (("1" (hide 2) (skosimp*) (lemma "rset_prep") (inst?) (assert))
    ("2" (hide 2) (skosimp*))
    ("3" (hide 2) (lemma "rset_prep") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: uniform_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "empty?")
   (skosimp*)
   (assert)
   (lemma "idxCover_def[S,ds]")
   (inst?)
   (expand "rset")
   (inst - "Hset(A!1, epsilon!1, f!1)")
   (assert)
   (expand "ball_cover")
   (assert)
   (skosimp*)
   (inst -7 "idxCover(A!1, Hset(A!1, epsilon!1, f!1))`2(n!1)`2")
   (inst + "n!1"))


proof_type: f_proof
decl_type: formula
library: analysis
theory: uniform_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (expand "uniformly_continuous?")
   (skosimp*)
   (lemma "ball_cover_lem")
   (inst?)
   (inst - "epsilon!1/2")
   (assert)
   (case "empty?(A!1)")
   (("1" (propax))
    ("2"
     (hide 1)
     (inst + "min(rset(A!1, epsilon!1 / 2, f!1))")
     (("1"
       (skosimp*)
       (lemma "idxCover_def[S,ds]")
       (inst - "Hset(A!1, epsilon!1 / 2, f!1)" "A!1" "x!1")
       (assert)
       (split -1)
       (("1"
         (skosimp*)
         (name "seq" "idxCover(A!1, Hset(A!1, epsilon!1 / 2, f!1))")
         (replace -1)
         (name "H" "Hset(A!1, epsilon!1 / 2, f!1)")
         (replace -1)
         (expand "ball_covering")
         (skosimp*)
         (hide -4)
         (name "ak" "seq`2(n!1)`1")
         (name "rk" "seq`2(n!1)`2")
         (replace -1)
         (replace -2)
         (case "dt(f!1(x!1), f!1(ak)) < epsilon!1/2")
         (("1"
           (case "dt(f!1(ak), f!1(p!1)) < epsilon!1 / 2")
           (("1"
             (assert)
             (lemma "dt_triangle")
             (inst - "f!1(x!1)" "f!1(ak)" "f!1(p!1)")
             (assert))
            ("2"
             (hide 2)
             (case "ball(ak,2*rk)(p!1)")
             (("1"
               (typepred "seq`2(n!1)")
               (expand "Hset")
               (flatten)
               (replace -6)
               (inst - "p!1")
               (expand "intersection")
               (assert)
               (rewrite "dt_sym"))
              ("2"
               (hide 2)
               (expand "ball")
               (lemma "ds_triangle")
               (inst - "ak" "x!1" "p!1")
               (assert)
               (case "min(rset(A!1, epsilon!1 / 2, f!1)) <= rk")
               (("1" (assert))
                ("2"
                 (hide -1 2)
                 (typepred "min(rset(A!1, epsilon!1 / 2, f!1))")
                 (inst -4 "rk")
                 (assert)
                 (hide 2)
                 (hide -9 -10 -11 -12 -13)
                 (expand "rset" 1)
                 (inst + "n!1")
                 (lemma "idxCover_def[S,ds]")
                 (inst?)
                 (inst - "ak")
                 (assert))))))))
          ("2"
           (hide 2)
           (typepred "seq`2(n!1)")
           (expand "Hset")
           (assert)
           (flatten)
           (replace -4)
           (inst -2 "x!1")
           (expand "intersection")
           (assert)
           (expand "ball")
           (assert))))
        ("2" (expand "ball_cover") (propax))))
      ("2"
       (lemma "rset_finite")
       (inst?)
       (assert)
       (lemma "rset_not_empty")
       (inst?)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: uniform_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (expand "uniformly_continuous?")
     (skosimp*)
     (inst 2 "epsilon!1/2")
     (inst 2
      "(LAMBDA (n: posint): Let pointy = choose({point: [S,S] | A!1(point`1) AND A!1(point`2) AND ds(point`1, point`2) < 1 / n AND
                    dt(f!1(point`1), f!1(point`2)) > epsilon!1 / 2}) in pointy)")
     (("1"
       (assert)
       (skosimp*)
       (assert)
       (prop)
       (("1"
         (lemma "epsilon_ax[[S,S]]")
         (inst -
          "{point: [S, S] |
                                       A!1(point`1) AND
                                        A!1(point`2) AND
                                         ds(point`1, point`2) < 1 / n!1 AND
                                          dt(f!1(point`1), f!1(point`2)) > epsilon!1 / 2}")
         (prop)
         (("1" (assert))
          ("2"
           (inst 3 "1/n!1")
           (skosimp*)
           (inst + "(x!1,p!1)")
           (assert))))
        ("2"
         (lemma "epsilon_ax[[S,S]]")
         (inst -
          "{point: [S, S] |
                                       A!1(point`1) AND
                                        A!1(point`2) AND
                                         ds(point`1, point`2) < 1 / n!1 AND
                                          dt(f!1(point`1), f!1(point`2)) > epsilon!1 / 2}")
         (prop)
         (("1" (assert))
          ("2"
           (inst 3 "1/n!1")
           (skosimp*)
           (inst + "(x!1,p!1)")
           (assert))))
        ("3"
         (lemma "epsilon_ax[[S,S]]")
         (inst -
          "{point: [S, S] |
                                       A!1(point`1) AND
                                        A!1(point`2) AND
                                         ds(point`1, point`2) < 1 / n!1 AND
                                          dt(f!1(point`1), f!1(point`2)) > epsilon!1 / 2}")
         (prop)
         (("1" (assert))
          ("2"
           (inst 3 "1/n!1")
           (skosimp*)
           (inst + "(x!1,p!1)")
           (assert))))
        ("4" (assert))))
      ("2"
       (skosimp*)
       (expand "nonempty?")
       (expand "empty?")
       (expand "member")
       (inst + "1/n!1")
       (skosimp*)
       (typepred "x!1")
       (typepred "p!1")
       (inst - "(x!1,p!1)")
       (assert))))
    ("2"
     (expand "uniformly_continuous?")
     (skosimp*)
     (inst -2 "epsilon!1")
     (skosimp*)
     (lemma "archimedean")
     (inst - "delta!1")
     (skosimp*)
     (inst - "n!1")
     (inst - "seq!1(n!1)`1" "seq!1(n!1)`2")
     (("1" (prop) (("1" (assert)) ("2" (assert)))) ("2" (assert))
      ("3" (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: uniform_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "acomp" -1)
   (label "cont" -2)
   (label "compim" 1)
   (expand "compact?")
   (skeep)
   (label "xsoc" -3)
   (name "invfun" "(lambda (a: (XS)): inverse_image(f,a))")
   (label "inffunname" -1)
   (name "SS" "{ss: set[S] | EXISTS (a: (XS)): ss = invfun(a)}")
   (label "SSname" -1)
   (inst - "SS")
   (split)
   (("1"
     (skosimp*)
     (label "ysfc" -2)
     (expand "finite_cover?" -2)
     (flatten)
     (label "ysfin" -2)
     (lemma "is_finite_surj[set[S]]")
     (inst - "YS!1")
     (assert)
     (skosimp*)
     (label "f1surj" -1)
     (name "aenum"
           "lambda (i: below[N!1]): choose({r: set[T] | XS(r) AND
            invfun(r) = f!1(i)})")
     (("1"
       (label "aenumname" -1)
       (name "TT" "{a: set[T] | EXISTS (i: below[N!1]): a = aenum(i)}")
       (label "TTname" -1)
       (inst + "TT")
       (expand "finite_cover?")
       (split)
       (("1"
         (expand "subset?")
         (skosimp*)
         (expand "member")
         (replace "TTname" - rl)
         (assert)
         (skosimp*)
         (replace "aenumname" -1 rl)
         (assert))
        ("2"
         (lemma "is_finite_surj[set[T]]")
         (inst - "TT")
         (assert)
         (inst + "N!1" "aenum")
         (("1"
           (expand "surjective?")
           (skosimp*)
           (typepred "y!1")
           (replace "TTname" -1 rl)
           (assert)
           (skosimp*)
           (inst + "i!1")
           (assert))
          ("2"
           (skosimp*)
           (replace "TTname" 1 rl)
           (assert)
           (inst + "x1!1"))))
        ("3"
         (expand "open_cover?")
         (split)
         (("1"
           (expand "subset?")
           (expand "member")
           (expand "image")
           (expand "Union")
           (skosimp*)
           (label "x1fx2" -1)
           (inst "ysfc" "x!2")
           (assert)
           (skosimp*)
           (typepred "a!1")
           (expand "surjective?" "f1surj")
           (inst "f1surj" "a!1")
           (skosimp*)
           (replace "f1surj" "ysfc" rl)
           (inst + "aenum(x!3)")
           (("1"
             (typepred "aenum(x!3)")
             (expand "invfun" -2)
             (expand "inverse_image")
             (expand "member")
             (replace -2 "ysfc" rl)
             (assert))
            ("2" (replace "TTname" + rl) (assert) (inst + "x!3"))))
          ("2"
           (skosimp*)
           (replace "TTname" -1 rl)
           (assert)
           (skosimp*)
           (typepred "aenum(i!1)")
           (inst "xsoc" "C!1")
           (assert))))))
      ("2"
       (skosimp*)
       (expand "nonempty?")
       (expand "empty?")
       (expand "member")
       (expand "subset?" "acomp")
       (expand "member")
       (inst "acomp" "f!1(i!1)")
       (assert)
       (replace "SSname" "acomp" rl)
       (assert)
       (skosimp*)
       (inst - "a!1")
       (assert))))
    ("2"
     (copy "xsoc")
     (hide "xsoc")
     (label "xsoc" -1)
     (expand "open_cover?")
     (flatten)
     (label "xsopen" -2)
     (split)
     (("1"
       (expand "subset?")
       (expand "member")
       (expand "image")
       (expand "Union")
       (skosimp*)
       (inst - "f(x!1)")
       (split)
       (("1"
         (skosimp*)
         (typepred "a!1")
         (inst + "invfun(a!1)")
         (("1"
           (expand "invfun")
           (expand "inverse_image")
           (expand "member")
           (propax))
          ("2" (replace "SSname" + rl) (assert) (inst + "a!1"))))
        ("2" (inst + "x!1"))))
      ("2"
       (skosimp*)
       (label "ssc" -1)
       (replace "SSname" "ssc" rl)
       (assert)
       (skosimp*)
       (replace "inffunname" "ssc" rl)
       (assert)
       (lemma "continuous_open_sets")
       (inst - "fullset[S]" "f")
       (expand "continuous?" "cont")
       (assert)
       (inst - "a!1")
       (split)
       (("1"
         (rewrite "intersection_full")
         (lemma "open_in_fullset[S,ds]")
         (inst?)
         (assert))
        ("2" (typepred "a!1") (inst "xsopen" "a!1") (assert))))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: open_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (expand "open_ball?")
     (skosimp*)
     (expand "open_ball")
     (expand "subset?")
     (expand "member")
     (inst + "delta!1"))
    ("2"
     (expand "open_ball?")
     (skosimp*)
     (expand "subset?")
     (expand "member")
     (expand "open_ball")
     (inst + "r!1"))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: open_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "open?")
   (skosimp*)
   (expand "open_ball?")
   (inst + "min(x!1 -a!1,b!1-x!1)")
   (("1" (skosimp*) (grind)) ("2" (grind))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: open_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "open?")
   (skosimp*)
   (expand "open_ball?")
   (inst + "x!1-a!1")
   (skosimp*)
   (grind))


proof_type: f_proof
decl_type: formula
library: analysis
theory: open_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "open?")
   (skosimp*)
   (expand "open_ball?")
   (inst + "a!1-x!1")
   (grind))


proof_type: f_proof
decl_type: formula
library: analysis
theory: open_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "open?")
   (skosimp*)
   (expand "open_ball?")
   (typepred "x!1")
   (expand "union")
   (expand "member")
   (split -2)
   (("1"
     (hide -4)
     (inst?)
     (skosimp*)
     (inst + "delta!1")
     (skosimp*)
     (inst - "y!1")
     (assert))
    ("2"
     (hide -3)
     (inst?)
     (skosimp*)
     (inst + "delta!1")
     (skosimp*)
     (inst - "y!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: open_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "closed?")
   (case-replace
    "complement(LAMBDA (x): a!1 <= x AND x <= b!1) =
                 union(above_intv(b!1),below_intv(a!1))")
   (("1"
     (hide -1)
     (lemma "union_open")
     (inst?)
     (assert)
     (hide 2)
     (lemma "above_intv_open ")
     (inst?)
     (assert)
     (lemma "below_intv_open    ")
     (inst?))
    ("2" (hide 2) (apply-extensionality 1 :hide? t) (grind))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: real_metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (label "compact_first" -1)
   (label "compact_second" -2)
   (label "compact_final" 1)
   (expand "compact?")
   (skosimp*)
   (label "tot_oc" -3)
   (inst - "XS!1")
   (inst - "XS!1")
   (expand "open_cover?")
   (prop)
   (("1"
     (label "sets_open" -4)
     (copy "compact_first")
     (hide "compact_first")
     (skosimp -1)
     (expand "finite_cover?")
     (prop)
     (label "first_ss" -1)
     (label "first_fin" -2)
     (expand "open_cover?" -3)
     (prop)
     (expand "subset?" -3)
     (expand "member")
     (label "first_is_cov" -3)
     (label "first_is_op" -4)
     (expand "Union" "first_is_cov")
     (copy "compact_second")
     (hide "compact_second")
     (skosimp -1)
     (expand "open_cover?" -3)
     (prop)
     (label "second_ss" -1)
     (label "second_fin" -2)
     (label "second_cov" -3)
     (label "second_op" -4)
     (expand "Union" "second_cov")
     (inst + "union[set[real]](YS!1,YS!2)")
     (expand "open_cover?")
     (expand "subset?")
     (expand "member")
     (prop)
     (("1"
       (skosimp*)
       (expand "union")
       (expand "member")
       (prop)
       (("1" (label "in_first" -1) (inst "first_ss" "x!1") (prop))
        ("2" (label "in_second" -1) (inst "second_ss" "x!1") (prop))))
      ("2"
       (lemma "infinite_union[set[real]]")
       (label "inf_un" -1)
       (inst "inf_un" "YS!1" "YS!2")
       (assert))
      ("3"
       (skosimp*)
       (case "x!1 <= (c!1 + d!1)/2")
       (("1"
         (label "caseonx1" -1)
         (inst "first_is_cov" "x!1")
         (expand "Union")
         (assert)
         (skosimp "first_is_cov")
         (inst + "a!1")
         (expand "union")
         (expand "member")
         (propax))
        ("2"
         (inst "second_cov" "x!1")
         (assert)
         (skosimp "second_cov")
         (expand "Union")
         (inst "compact_final" "a!1")
         (expand "union")
         (expand "member")
         (propax))))
      ("4"
       (skosimp*)
       (expand "union")
       (expand "member")
       (prop)
       (("1"
         (inst "first_ss" "C!1")
         (assert)
         (inst "sets_open" "C!1")
         (assert))
        ("2"
         (inst "second_ss" "C!1")
         (inst "sets_open" "C!1")
         (assert))))))
    ("2"
     (expand "subset?")
     (expand "member")
     (skosimp*)
     (inst "tot_oc" "x!1")
     (expand "Union")
     (assert))
    ("3"
     (expand "subset?")
     (expand "member")
     (skosimp*)
     (inst "tot_oc" "x!1")
     (expand "Union")
     (assert))
    ("4"
     (expand "subset?")
     (expand "member")
     (skosimp*)
     (inst "tot_oc" "x!1")
     (expand "Union")
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: real_metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("c" "d" "YS"))
   (skeep)
   (split)
   (("1"
     (generalize "n" "m")
     (induct "m")
     (("1" (grind))
      ("2"
       (skosimp*)
       (expand "seq_intv_scaf" 1)
       (name "W" "seq_intv_scaf(c,d,YS)(j!1)")
       (replace -1)
       (hide -1)
       (name "P"
             "NOT (EXISTS (XS: set[set[real]]):
                             subset?(XS, YS) AND
                              open_cover?(XS,
                                          LAMBDA (x: real):
                                            W`1 <= x AND x <= (W`1 + W`2) / 2))")
       (hide -1)
       (grind))))
    ("2"
     (expand "subset?")
     (skosimp*)
     (expand "member")
     (expand "seq_intv_scaf" -1)
     (name "W" "seq_intv_scaf(c,d,YS)(n)")
     (replace -1)
     (hide -1)
     (name "P"
           "NOT (EXISTS (XS: set[set[real]]):
                           subset?(XS, YS) AND
                            open_cover?(XS,
                                        LAMBDA (x: real):
                                          W`1 <= x AND x <= (W`1 + W`2) / 2))")
     (hide -1)
     (grind))
    ("3"
     (generalize "n" "m")
     (induct "m")
     (("1"
       (expand "seq_intv_scaf")
       (expand "^")
       (expand "expt")
       (assert))
      ("2"
       (skosimp*)
       (name "W" "seq_intv_scaf(c,d,YS)(j!1)")
       (replace -1)
       (label "name_w" -1)
       (hide -1)
       (expand "seq_intv_scaf")
       (reveal "name_w")
       (replace "name_w")
       (hide "name_w")
       (name "P"
             "NOT (EXISTS (XS: set[set[real]]):
                             subset?(XS, YS) AND
                              finite_cover?(XS,
                                            LAMBDA (x: real):
                                              W`1 <= x AND x <= (W`1 + W`2) / 2))")
       (replace -1)
       (hide -1)
       (grind))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: real_metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("c" "d"))
   (prop)
   (expand "compact?")
   (skosimp*)
   (label "big_open_cov" -1)
   (label "exists_fs" 1)
   (label "smaller_sc" 2)
   (inst "smaller_sc" "XS!1")
   (assert)
   (induct "n" "smaller_sc")
   (("1"
     (skosimp*)
     (expand "seq_intv_scaf")
     (inst "exists_fs" "XS!2")
     (assert))
    ("2"
     (skosimp*)
     (name "W" "seq_intv_scaf(c,d,XS!1)(j!1)")
     (replace -1)
     (label "name_w" -1)
     (hide "name_w")
     (expand "seq_intv_scaf")
     (reveal "name_w")
     (replace "name_w")
     (hide "name_w")
     (case "(EXISTS (XS: set[set[real]]):
                                           subset?(XS, XS!1) AND
                                            finite_cover?(XS,
                                                          LAMBDA
                                                          (x: real):
                                                          W`1 <= x
                                                          AND
                                                          x <= (W`1 + W`2) / 2))")
     (("1"
       (assert)
       (replace -1)
       (skosimp*)
       (inst + "union[set[real]](XS!2,XS!3)")
       (expand "subset?")
       (expand "member")
       (prop)
       (("1"
         (expand "union")
         (expand "member")
         (skolem 1 ("x"))
         (inst - "x")
         (inst - "x")
         (prop))
        ("2"
         (expand "finite_cover?")
         (prop)
         (("1"
           (lemma "infinite_union[set[real]]")
           (inst - "XS!2" "XS!3")
           (prop))
          ("2"
           (label "XS3_ss" -1)
           (label "XS2_ss" -6)
           (label "XS3_oc" -3)
           (label "XS2_oc" -5)
           (expand "open_cover?")
           (prop)
           (("1"
             (expand "Union")
             (expand "subset?")
             (expand "member")
             (assert)
             (skosimp*)
             (case "x!1 <= (W`1 + W`2)/2")
             (("1"
               (inst "XS3_oc" "x!1")
               (assert)
               (skosimp*)
               (inst "XS3_ss" "a!1")
               (inst + "a!1")
               (expand "union")
               (expand "member")
               (propax))
              ("2"
               (inst -9 "x!1")
               (assert)
               (skosimp*)
               (inst + "a!1")
               (expand "union")
               (expand "member")
               (propax))))
            ("2"
             (skosimp*)
             (expand "union")
             (expand "member")
             (inst -5 "C!1")
             (inst -9 "C!1")
             (assert)
             (assert))))))))
      ("2" (assert) (replace 1) (inst + "XS!2") (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: real_metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "compact_seq_induction")
   (inst - "a!1" "b!1")
   (assert)
   (skosimp*)
   (lemma "bolzano_weierstrass4")
   (label "bzw" -1)
   (label "open_cover" -2)
   (label "induction_lem" -3)
   (label "final_compact" 1)
   (inst "bzw" "a!1" "b!1"
    "(LAMBDA (i:nat): seq_intv_scaf(a!1,b!1,YS!1)(i)`1)")
   (prop)
   (("1"
     (skosimp*)
     (expand "accumulation")
     (expand "open_cover?")
     (prop)
     (label "subset_cover" -4)
     (expand "subset?")
     (expand "member")
     (inst "subset_cover" "c!1")
     (prop)
     (expand "Union")
     (skosimp*)
     (typepred "a!2")
     (label "tpa!2" -1)
     (inst "open_cover" "a!2")
     (assert)
     (expand "open?" "open_cover")
     (expand "interior")
     (replace "open_cover" "subset_cover" rl)
     (assert)
     (expand "interior_point?")
     (skosimp*)
     (lemma "axiom_of_archimedes")
     (inst -1 "max(10,2*(b!1-a!1)/r!1)")
     (skosimp*)
     (label "ipred" -1)
     (inst "bzw" "r!1/2" "i!1")
     (("1"
       (skosimp*)
       (inst "induction_lem" "i!2")
       (inst "induction_lem" "{V: set[real] | V = a!2}")
       (prop)
       (("1" (skosimp*) (assert))
        ("2"
         (expand "finite_cover?")
         (prop)
         (("1"
           (expand "is_finite")
           (inst "induction_lem" "2"
            "(LAMBDA (K: ({V: set[real] | V = a!2})): 1)")
           (expand "injective?")
           (propax))
          ("2"
           (expand "open_cover?")
           (prop)
           (("1"
             (expand "subset?")
             (expand "member")
             (skosimp*)
             (expand "Union")
             (inst "induction_lem" "a!2")
             (lemma "seq_inv_scaf_decreasing")
             (inst?)
             (prop)
             (hide -1)
             (hide -1)
             (label "size_diff" -1)
             (inst "subset_cover" "x!1")
             (prop)
             (expand "ball")
             (expand "real_dist")
             (name "ZA" "seq_intv_scaf(a!1, b!1, YS!1)(i!2)`1")
             (name "ZB" "seq_intv_scaf(a!1, b!1, YS!1)(i!2)`2")
             (replace -1)
             (replace -2)
             (hide -1)
             (hide -1)
             (hide ("open_cover" 2 "final_compact"))
             (field "size_diff")
             (case " i!1<2^i!2")
             (("1"
               (replace "size_diff" "ipred" rl)
               (expand "max")
               (mult-by -1 "ZB-ZA")
               (assert)
               (mult-by -1 "2/r!1")
               (assert)
               (case "10 < (2 * ((2 ^ i!2) * ZB) - 2 * ((2 ^ i!2) * ZA)) / r!1")
               (("1"
                 (assert)
                 (sub-formulas -2 "ipred")
                 (field -1)
                 (cancel-by -2 "i!1")
                 (hide -4 -5)
                 (grind :exclude ("ZA" "ZB")))
                ("2"
                 (assert)
                 (sub-formulas -1 1)
                 (field -1)
                 (mult-by ipred "2*(ZB-ZA)")
                 (hide -3)
                 (grind :exclude ("ZA" "ZB")))))
              ("2"
               (case "i!1 >= 10")
               (("1"
                 (hide-all-but (-1 "bzw" 1))
                 (copy -4)
                 (copy -2)
                 (add-formulas -1 -2)
                 (both-sides "-" "i!1" -1)
                 (assert)
                 (hide -2)
                 (hide -2)
                 (hide -2)
                 (hide -3)
                 (add-formulas -2 1)
                 (both-sides "-" "i!1" -1)
                 (assert)
                 (generalize-skolem-constants)
                 (induct "i_1")
                 (("1" (assert)) ("2" (skosimp*) (grind))))
                ("2" (hide-all-but ("ipred" 1)) (grind))))))
            ("2"
             (reveal "open_cover")
             (skosimp*)
             (inst "open_cover" "a!2")
             (assert))))))))
      ("2" (assert))))
    ("2"
     (case "FORALL (j:nat): subset?(closed_intv(seq_intv_scaf(a!1,b!1,YS!1)(j)`1,seq_intv_scaf(a!1,b!1,YS!1)(j)`2),closed_intv(a!1,b!1))")
     (("1"
       (skosimp*)
       (hide-all-but (-1 1))
       (inst - "i!1")
       (expand "subset?")
       (expand "member")
       (inst - "seq_intv_scaf(a!1,b!1,YS!1)(i!1)`1")
       (("1"
         (assert)
         (lemma "seq_inv_scaf_decreasing")
         (inst?)
         (("1" (prop) (("1" (assert)) ("2" (assert))))
          ("2" (reveal "open_cover") (propax))))
        ("2" (reveal "open_cover") (propax))))
      ("2"
       (hide-all-but 1)
       (induct "j")
       (("1"
         (expand "seq_intv_scaf")
         (assert)
         (expand "subset?")
         (expand "member")
         (skosimp*)
         (assert))
        ("2"
         (skosimp*)
         (lemma "seq_inv_scaf_decreasing")
         (inst?)
         (("1"
           (prop)
           (name "Aj1"
                 "LAMBDA (x: real):
                                                                              seq_intv_scaf(a!1, b!1, YS!1)(j!1 + 1)`1 <= x AND
                                                                               x <= seq_intv_scaf(a!1, b!1, YS!1)(j!1 + 1)`2")
           (replace -1)
           (name "Djmin1"
                 "LAMBDA (x: real):
                                                                              seq_intv_scaf(a!1, b!1, YS!1)(j!1)`1 <= x AND
                                                                               x <= seq_intv_scaf(a!1, b!1, YS!1)(j!1)`2")
           (replace -1)
           (name "closedint" "LAMBDA (x: real): a!1 <= x AND x <= b!1")
           (replace -1)
           (hide -1 -2 -3)
           (hide -1 -3)
           (expand "subset?")
           (expand "member")
           (skosimp*)
           (inst - "x!1")
           (inst - "x!1")
           (assert))
          ("2" (reveal "open_cover") (propax))))
        ("3" (skosimp*) (reveal "open_cover") (propax))
        ("4" (reveal "open_cover") (propax))))
      ("3" (skosimp*)) ("4" (propax))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_integral_cont
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem 1 ("a" "b" "f" "gg"))
   (flatten)
   (assert)
   (label "altb" -1)
   (flatten)
   (label "fcont" -2)
   (label "ginc" -3)
   (name "CI" "closed_intv[T](a,b)")
   (replace -1)
   (label "CIname" -1)
   (case "NOT uniformly_continuous?[T,real_dist,real,real_dist](f,CI)")
   (("1"
     (name "ff" "(LAMBDA (x:real): IF T_pred(x) THEN f(x) ELSE 0 ENDIF)")
     (lemma "Heine[real,real_dist,real,real_dist]")
     (inst - "LAMBDA (x:real): a<=x AND x<=b" "ff")
     (assert)
     (split -)
     (("1"
       (hide-all-but (-1 1))
       (expand "uniformly_continuous?")
       (skosimp*)
       (inst - "epsilon!1")
       (skosimp*)
       (inst + "delta!1")
       (skosimp*)
       (inst - "x!1" "p!1")
       (("1" (assert) (expand "ff") (propax))
        ("2" (assert) (typepred "p!1") (expand "CI") (propax))
        ("3" (typepred "x!1") (expand "CI") (propax))))
      ("2"
       (hide-all-but ("fcont" 1))
       (expand "continuous?")
       (skosimp*)
       (inst - "x!1")
       (("1"
         (expand "continuous_at?")
         (skosimp*)
         (inst - "epsilon!1")
         (skosimp*)
         (inst + "delta!1")
         (skosimp*)
         (inst - "y!1")
         (("1"
           (assert)
           (expand "ball")
           (case "T_pred(x!1) AND T_pred(y!1)")
           (("1" (flatten) (expand "ff") (assert))
            ("2"
             (hide-all-but 1)
             (lemma "connected_domain")
             (expand "connected?")
             (inst-cp - "a" "b" "x!1")
             (inst - "a" "b" "y!1")
             (assert))))
          ("2"
           (hide-all-but 1)
           (expand "CI")
           (lemma "connected_domain")
           (expand "connected?")
           (inst - "a" "b" "y!1")
           (assert))))
        ("2"
         (hide-all-but 1)
         (expand "CI")
         (lemma "connected_domain")
         (expand "connected?")
         (inst - "a" "b" "x!1")
         (assert))))
      ("3" (lemma "closed_intervals_compact") (inst - "a" "b"))
      ("4"
       (assert)
       (hide-all-but (-1))
       (expand "empty?")
       (inst - "a")
       (expand "member")
       (propax))))
    ("2"
     (label "funif" -1)
     (lemma "integrable_lem2")
     (inst - "a" "b" "f" "gg")
     (assert)
     (split -)
     (("1"
       (hide 2)
       (skolem 1 "eps")
       (expand "uniformly_continuous?")
       (name "newep" "eps/(2*(abs(gg(b)-gg(a)) + 1))")
       (label "newepname" -1)
       (inst "funif" "newep")
       (skolem "funif" "deltaf")
       (inst + "deltaf/2")
       (skeep)
       (label "Pwidth" -2)
       (skolem 1 ("RSS1" "RSS2"))
       (typepred "RSS1")
       (label "RSS1name" -1)
       (typepred "RSS2")
       (label "RSS2name" -1)
       (expand "Riemann_sum?")
       (skolem "RSS2name" "xis2")
       (skolem "RSS1name" "xis1")
       (replace "RSS1name" +)
       (replace "RSS2name" +)
       (expand "Rie_sum" +)
       (rewrite "sigma_minus")
       (("1"
         (lemma "sigma_abs[below(P`length-1)]")
         (("1"
           (inst?)
           (case "sigma(0, P`length - 2,
                                                                                                             LAMBDA (n: below(P`length - 1)):
                                                                                                               abs(f(xis1`seq(n)) * gg(P`seq(1 + n)) +
                                                                                                                    f(xis2`seq(n)) * gg(P`seq(n))
                                                                                                                    - f(xis1`seq(n)) * gg(P`seq(n))
                                                                                                                    - f(xis2`seq(n)) * gg(P`seq(1 + n)))) < eps")
           (("1" (assert))
            ("2"
             (hide -1)
             (hide 2)
             (lemma "sigma_le[below(P`length-1)]")
             (inst -
              "LAMBDA (n: below(P`length - 1)):
                                                                                            abs(f(xis1`seq(n)) * gg(P`seq(1 + n)) +
                                                                                                 f(xis2`seq(n)) * gg(P`seq(n))
                                                                                                 - f(xis1`seq(n)) * gg(P`seq(n))
                                                                                                 - f(xis2`seq(n)) * gg(P`seq(1 + n)))"
              "LAMBDA (n: below(P`length - 1)):
                                                                                            newep * (gg(P`seq(1 + n))- gg(P`seq(n)))"
              "P`length-2" "0")
             (assert)
             (case "sigma(0, P`length - 2,
                                                                                                                          LAMBDA (n: below(P`length - 1)):
                                                                                                                            gg(P`seq(1 + n)) * newep - gg(P`seq(n)) * newep) < eps")
             (("1"
               (assert)
               (hide 2)
               (skolem 1 "nn")
               (case "abs(f(xis1`seq(nn))-f(xis2`seq(nn)))< newep")
               (("1"
                 (mult-by -1 "abs(gg(P`seq(1+nn))-gg(P`seq(nn)))")
                 (case "abs(gg(P`seq(1 + nn)) - gg(P`seq(nn))) = gg(P`seq(1 + nn)) - gg(P`seq(nn))")
                 (("1" (rewrite "abs_mult" -2 :dir rl) (assert))
                  ("2"
                   (hide 2)
                   (copy "ginc")
                   (expand "increasing?" -1)
                   (expand "restrict")
                   (inst - "P`seq(nn)" "P`seq(1+nn)")
                   (("1"
                     (assert)
                     (expand "abs" +)
                     (lift-if)
                     (ground)
                     (typepred "P")
                     (expand "increasing?")
                     (inst - "nn" "1+nn")
                     (assert))
                    ("2" (hide 2) (typepred "P") (inst - "1+nn"))
                    ("3" (typepred "P") (inst - "nn"))))))
                ("2"
                 (hide 2)
                 (inst "funif" "xis1`seq(nn)" "xis2`seq(nn)")
                 (("1"
                   (assert)
                   (expand "real_dist")
                   (hide-all-but ("funif" "Pwidth"))
                   (typepred "xis1")
                   (inst - "nn")
                   (typepred "xis2")
                   (inst - "nn")
                   (assert)
                   (flatten)
                   (lemma "width_lem")
                   (inst - "a" "b" "P" "nn")
                   (grind :exclude "width"))
                  ("2"
                   (typepred "xis2")
                   (inst - "nn")
                   (flatten)
                   (typepred "P")
                   (inst-cp - "nn")
                   (inst-cp - "nn+1")
                   (ground)
                   (expand "CI")
                   (propax))
                  ("3"
                   (typepred "xis1")
                   (inst - "nn")
                   (flatten)
                   (typepred "P")
                   (inst-cp - "nn")
                   (inst-cp - "nn+1")
                   (ground)
                   (expand "CI")
                   (propax))))))
              ("2"
               (hide 2)
               (case "FORALL (nn:below(P`length-1)): sigma(0, nn,
                                                                                              LAMBDA (n: below(P`length - 1)):
                                                                                                gg(P`seq(1 + n)) * newep - gg(P`seq(n)) * newep) = newep*(gg(P`seq(1+nn))-gg(P`seq(0)))")
               (("1"
                 (inst - "P`length-2")
                 (assert)
                 (replace -1)
                 (typepred "P")
                 (replace -2)
                 (replace -3)
                 (case "(gg(b)-gg(a))*newep < eps")
                 (("1" (assert))
                  ("2"
                   (name "CC1" "gg(b)-gg(a)")
                   (replace -1)
                   (expand "newep" 1)
                   (cross-mult 1)
                   (replace -1 :dir rl)
                   (assert)
                   (copy "ginc")
                   (expand "increasing?" -1)
                   (expand "restrict")
                   (inst - "a" "b")
                   (assert)
                   (expand "abs")
                   (assert))))
                ("2"
                 (hide 2)
                 (induct "nn")
                 (("1"
                   (hide -1)
                   (assert)
                   (expand "sigma")
                   (expand "sigma")
                   (propax))
                  ("2"
                   (skolem 1 "nn")
                   (hide -1)
                   (assert)
                   (flatten)
                   (expand "sigma" +)
                   (replace -2)
                   (assert))
                  ("3" (hide -1) (hide 2) (skosimp*) (assert))
                  ("4" (hide 1) (hide 2) (skosimp*) (assert))))
                ("3" (hide (-1 2)) (skosimp*) (assert))))))))
          ("2" (hide 2) (skosimp*) (assert))))
        ("2" (hide 2) (skosimp*) (assert))))
      ("2" (expand "monotonic?") (propax))))
    ("3" (lemma "real_metric_space") (inst?))
    ("4" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: rs_integral_cont
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem 1 ("a" "b" "f" "gg"))
   (assert)
   (flatten)
   (lemma "BV_decomposition")
   (inst - "a" "b" "gg")
   (assert)
   (skolem -1 ("vv" "ww"))
   (flatten)
   (lemma "RS_integrable_cont_inc")
   (inst-cp - "a" "b" "f" "vv")
   (inst - "a" "b" "f" "ww")
   (assert)
   (replace -3)
   (lemma "integral_diff_g")
   (inst - "a" "b" "f" "vv" "ww")
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_space_real_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "continuous?")
   (skosimp*)
   (inst - "x!1")
   (expand "continuous_at?")
   (skosimp*)
   (case "c!1 = 0")
   (("1" (grind))
    ("2"
     (inst - "epsilon!1/abs(c!1)")
     (("1"
       (skosimp*)
       (inst + "delta!1")
       (skosimp*)
       (inst - "y!1")
       (expand "member")
       (expand "ball")
       (expand "*")
       (expand "real_dist")
       (prop)
       (cross-mult -1)
       (lemma "abs_mult")
       (inst - "f!1(x!1) - f!1(y!1)" "c!1")
       (assert))
      ("2"
       (prop)
       (("1" (cross-mult 1) (assert)) ("2" (cross-mult 1) (assert))))
      ("3" (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_space_real_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "continuous?")
   (skosimp*)
   (inst - "x!1")
   (inst - "x!1")
   (expand "continuous_at?")
   (skosimp*)
   (inst - "epsilon!1/2")
   (inst - "epsilon!1/2")
   (skosimp*)
   (inst + "min(delta!1,delta!2)")
   (skosimp*)
   (inst - "y!1")
   (inst - "y!1")
   (expand "member")
   (expand "ball")
   (expand "real_dist")
   (expand "+")
   (lemma "triangle")
   (inst - "f!1(x!1) - f!1(y!1)" "g!1(x!1) - g!1(y!1)")
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_space_real_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "continuous?")
   (skosimp*)
   (inst - "x!1")
   (inst - "x!1")
   (expand "continuous_at?")
   (skosimp*)
   (inst - "epsilon!1/2")
   (inst - "epsilon!1/2")
   (skosimp*)
   (inst + "min(delta!1,delta!2)")
   (skosimp*)
   (inst - "y!1")
   (inst - "y!1")
   (expand "member")
   (expand "ball")
   (expand "-")
   (expand "real_dist")
   (lemma "triangle")
   (inst - "f!1(x!1) - f!1(y!1)" "-g!1(x!1) + g!1(y!1)")
   (grind))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_space_real_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "continuous?")
   (skosimp*)
   (inst - "x!1")
   (inst - "x!1")
   (expand "continuous_at?")
   (skosimp*)
   (case "g!1(x!1) = 0")
   (("1"
     (inst - "1")
     (inst - "epsilon!1/(abs(f!1(x!1)) + 1)")
     (skosimp*)
     (inst + "min(delta!1,delta!2)")
     (skosimp*)
     (inst - "y!1")
     (inst - "y!1")
     (expand "member")
     (expand "ball")
     (expand "*")
     (replace -1)
     (expand "real_dist")
     (lemma "abs_mult")
     (inst - "-1" "f!1(y!1)*g!1(y!1)")
     (replace -1)
     (expand "abs" 1 1)
     (field)
     (hide -1)
     (lemma "triangle")
     (inst - "f!1(x!1) - f!1(y!1)" "- f!1(x!1)")
     (case "abs(f!1(x!1) - f!1(y!1) + -f!1(x!1)) = abs(f!1(y!1))")
     (("1"
       (replace -1)
       (hide -1)
       (assert)
       (cross-mult -4)
       (case "abs(-1 * g!1(y!1)) = abs(g!1(y!1))")
       (("1"
         (replace -1)
         (hide -1)
         (case "abs(-1 * f!1(x!1)) = abs(f!1(x!1))")
         (("1"
           (replace -1)
           (hide -1)
           (add-formulas -1 -3)
           (both-sides "-" "abs(f!1(x!1) - f!1(y!1))" -1)
           (assert)
           (mult-by -1 "abs(g!1(y!1))")
           (grind))
          ("2" (hide-all-but (1)) (grind))))
        ("2" (hide-all-but (1)) (grind))))
      ("2" (hide-all-but (1)) (grind))))
    ("2"
     (label "fcont" -1)
     (label "gcont" -2)
     (name "ep1" "epsilon!1/(2*abs(g!1(x!1)))")
     (("1"
       (name "ep2" "epsilon!1/(2*(abs(f!1(x!1)) + ep1))")
       (("1"
         (label "ep1name" -2)
         (label "ep2name" -1)
         (inst - "ep1")
         (("1"
           (inst - "ep2")
           (("1"
             (skosimp*)
             (inst + "min(delta!1,delta!2)")
             (skosimp*)
             (inst - "y!1")
             (inst - "y!1")
             (expand "member")
             (expand "ball")
             (copy "fcont")
             (label "fct2" -1)
             (hide "fct2")
             (replace "ep1name" - rl)
             (replace "ep2name" - rl)
             (label "mindelta" -5)
             (expand "real_dist")
             (prop)
             (("1"
               (cross-mult -2)
               (field -2)
               (expand "*")
               (lemma "triangle")
               (inst - "f!1(x!1) * g!1(x!1) - f!1(y!1) * g!1(x!1)"
                " f!1(y!1) * g!1(x!1) -
                                                                                                                                                                                                                                       f!1(y!1) * g!1(y!1)")
               (assert)
               (lemma "abs_mult")
               (inst - "f!1(x!1)-f!1(y!1)" "g!1(x!1)")
               (assert)
               (replace -1)
               (lemma "abs_mult")
               (inst - "f!1(y!1)" "g!1(x!1) - g!1(y!1)")
               (assert)
               (replace -1)
               (hide -1)
               (hide -1)
               (hide "ep1name")
               (hide "ep2name")
               (label "finaltop" -1)
               (hide "mindelta")
               (reveal "ep1name")
               (case "abs(f!1(y!1)) <= abs(f!1(x!1)) + ep1")
               (("1"
                 (replace "ep1name" - rl)
                 (hide "ep1name")
                 (name "A" "f!1(x!1)")
                 (name "B" "f!1(y!1)")
                 (name "X" "g!1(x!1)")
                 (name "Y" "g!1(y!1)")
                 (label "yname" -1)
                 (label "xname" -2)
                 (label "bname" -3)
                 (label "aname" -4)
                 (replace "aname")
                 (replace "bname")
                 (replace "xname")
                 (replace "yname")
                 (hide "aname")
                 (hide "bname")
                 (hide "xname")
                 (hide "yname")
                 (copy "gcont")
                 (name "myvar" "abs(A) + epsilon!1 / (2 * abs(X))")
                 (label "namemyvar" -1)
                 (replace "namemyvar")
                 (copy "namemyvar")
                 (label "nmv2" -1)
                 (case "2=2")
                 (("1"
                   (mult-eq -1 -2)
                   (assert)
                   (replace -1)
                   (hide -1)
                   (hide "nmv2")
                   (mult-ineq -2 -3)
                   (("1" (field -1))
                    ("2"
                     (prop)
                     (("1"
                       (case "myvar > 0")
                       (("1" (grind)) ("2" (grind))))
                      ("2" (grind)) ("3" (grind)) ("4" (grind))))))
                  ("2" (propax))))
                ("2"
                 (reveal "fct2")
                 (reveal "mindelta")
                 (assert)
                 (expand "real_dist")
                 (lemma "triangle")
                 (inst - "-f!1(x!1)" "f!1(x!1)-f!1(y!1)")
                 (assert)
                 (hide "mindelta")
                 (grind))))
              ("2" (assert)) ("3" (assert)) ("4" (assert))))
            ("2"
             (hide-all-but ("ep2name" "ep1name" 1 2))
             (lemma "pos_div_lt")
             (inst - "(2 * (abs(f!1(x!1)) + ep1))" "epsilon!1")
             (assert)
             (lemma "pos_div_lt")
             (inst - "(2 * abs(g!1(x!1)))" "epsilon!1")
             (assert))))
          ("2"
           (hide-all-but ("ep2name" "ep1name" 1 2))
           (lemma "pos_div_lt")
           (copy -1)
           (inst - "(2 * (abs(f!1(x!1)) + ep1))" "epsilon!1")
           (inst - "(2 * abs(g!1(x!1)))" "epsilon!1")
           (replace "ep2name")
           (replace "ep1name")
           (assert))))
        ("2"
         (lemma "pos_div_lt")
         (inst - "(2 * abs(g!1(x!1)))" "epsilon!1")
         (assert))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: metric_space_real_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "continuous?")
   (skosimp*)
   (inst - "x!1")
   (expand "continuous_at?")
   (skosimp*)
   (inst - "epsilon!1")
   (skosimp*)
   (inst + "delta!1")
   (skosimp*)
   (inst - "y!1")
   (expand "member")
   (expand "ball")
   (expand "real_dist")
   (grind))


proof_type: f_proof
decl_type: formula
library: analysis
theory: real_fun_on_compact_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (label "cont" -1)
   (label "compact" -2)
   (label "empty" 1)
   (label "maxexists" 2)
   (lemma "compact_sequence_limit[T,d]")
   (label "csl" -1)
   (inst "csl" "S!1")
   (expand "nonempty?")
   (prop)
   (case "bounded_real_defs.bounded?(image(f!1,S!1))")
   (("1"
     (label "bounded" -1)
     (expand "bounded?")
     (prop)
     (label "bbel" -2)
     (hide "bbel")
     (lemma "real_complete")
     (label "lub" -1)
     (inst "lub" "image(f!1,S!1)")
     (expand "bounded_above?")
     (skosimp*)
     (prop)
     (("1"
       (skosimp*)
       (expand "least_upper_bound?")
       (prop)
       (label "lub2" -2)
       (name "seq"
             "(LAMBDA (n: nat): choose({s: T | S!1(s) AND y!1-f!1(s) < 1/(n+1)}))")
       (("1"
         (label "seq_def" -1)
         (inst "csl" "seq")
         (skosimp*)
         (inst-cp "maxexists" "p!1")
         (label "maxexists2" 2)
         (copy "lub")
         (label "lub3" -1)
         (expand "upper_bound?" "lub")
         (skosimp*)
         (inst "lub" "f!1(t!1)")
         (("1"
           (case "y!1 = f!1(t!1)")
           (("1"
             (replace -1)
             (expand "upper_bound?" "lub3")
             (inst "maxexists2" "t!1")
             (skosimp*)
             (inst "lub3" "f!1(t!2)")
             (expand "image")
             (inst + "t!2"))
            ("2"
             (name "A" "y!1 - f!1(t!1)")
             (expand "continuous?")
             (inst "cont" "p!1")
             (expand "continuous_at?")
             (expand "member")
             (expand "ball")
             (inst "cont" "A/2")
             (("1"
               (skosimp*)
               (lemma "archimedean")
               (inst - "A/4")
               (("1"
                 (skosimp*)
                 (lemma "both_sides_div_pos_lt2")
                 (inst - "n!1+1" "n!1" "1")
                 (assert)
                 (add-formulas -1 -2)
                 (both-sides "-" "1/n!1" -1)
                 (("1"
                   (assert)
                   (inst "csl" "delta!1/2" "n!1")
                   (skosimp*)
                   (typepred "n!2")
                   (both-sides "+" "1" -1)
                   (label "n1n2" -1)
                   (label "arch1" -2)
                   (label "Adef" -3)
                   (inst "cont" "seq(n!2)")
                   (prop)
                   (("1"
                     (grind "cont")
                     (("1"
                       (hide "compact")
                       (typepred "seq(n!2)")
                       (label "ge2" -2)
                       (lemma "both_sides_div_pos_ge2")
                       (label "recip" -1)
                       (inst "recip" "n!1 + 1" "n!2 + 1" "1")
                       (assert))
                      ("2"
                       (hide "compact")
                       (typepred "seq(n!2)")
                       (label "n!2le" -2)
                       (label "seqn!2tp" -1)
                       (lemma "both_sides_div_pos_ge2")
                       (label "bsxyz" -1)
                       (inst "bsxyz" "n!1 + 1" "n!2+1" "1")
                       (assert))
                      ("3"
                       (hide "compact")
                       (typepred "seq(n!2)")
                       (label "n!2le" -2)
                       (label "seqn!2tp" -1)
                       (lemma "both_sides_div_pos_ge2")
                       (label "bsxyz" -1)
                       (inst "bsxyz" "n!1 + 1" "n!2 + 1" "1")
                       (assert))
                      ("4"
                       (hide "compact")
                       (typepred "seq(n!2)")
                       (label "n!2le" -2)
                       (label "seqn!2tp" -1)
                       (lemma "both_sides_div_pos_ge2")
                       (label "bsxyz" -1)
                       (inst "bsxyz" "n!1 + 1" "n!2 + 1" "1")
                       (assert))))
                    ("2"
                     (lemma "fullset_metric_space")
                     (expand "metric_space?")
                     (expand "space_symmetric?")
                     (prop)
                     (inst -2 "p!1" "seq(n!2)")
                     (("1" (replace -2) (assert))
                      ("2" (expand "fullset") (propax))
                      ("3" (expand "fullset") (propax))))))
                  ("2"
                   (hide-all-but (-1 1))
                   (iff)
                   (prop)
                   (("1" (cancel-by 1 "n!1*n!1") (grind-reals))
                    ("2" (cancel-by 1 "n!1*n!1") (grind-reals))))))
                ("2" (assert))))
              ("2" (assert))))))
          ("2" (expand "image") (inst + "t!1"))))
        ("2"
         (skosimp*)
         (expand "nonempty?")
         (expand "empty?")
         (expand "member")
         (inst "lub2" "y!1-1/(1+n!1)")
         (prop)
         (("1" (assert))
          ("2"
           (expand "upper_bound?" +)
           (expand "image")
           (skosimp*)
           (typepred "s!1")
           (expand "image")
           (skosimp*)
           (inst - "x!3")
           (assert))))))
      ("2"
       (name "seq"
             "(LAMBDA (n: nat): choose({s: T | S!1(s) AND f!1(s) > n}))")
       (("1"
         (inst "csl" "seq")
         (skosimp*)
         (lemma "axiom_of_archimedes")
         (inst - "f!1(p!1)")
         (skosimp*)
         (expand "continuous?")
         (inst "cont" "p!1")
         (expand "continuous_at?")
         (inst "cont" "1")
         (skosimp*)
         (inst "csl" "delta!1" "max(i!1,0) + 2")
         (skosimp*)
         (typepred "n!1")
         (inst "cont" "seq(n!1)")
         (expand "member")
         (expand "ball")
         (prop)
         (("1" (assert) (grind -1))
          ("2"
           (lemma "fullset_metric_space")
           (expand "metric_space?")
           (expand "space_symmetric?")
           (prop)
           (inst - "p!1" "seq(n!1)")
           (("1" (replace -2) (propax)) ("2" (expand "fullset") (propax))
            ("3" (expand "fullset") (propax))))))
        ("2"
         (skosimp*)
         (expand "nonempty?")
         (expand "empty?")
         (inst "lub" "n!1")
         (expand "upper_bound?" +)
         (skosimp*)
         (typepred "s!1")
         (expand "image")
         (skosimp*)
         (inst - "x!3")
         (expand "member")
         (assert))))))
    ("2"
     (expand "bounded?")
     (expand "bounded_above?")
     (expand "bounded_below?")
     (prop)
     (("1"
       (name "seq"
             "(LAMBDA (n: nat): choose({s: T | S!1(s) AND f!1(s) > n}))")
       (("1"
         (inst "csl" "seq")
         (skosimp*)
         (expand "continuous?")
         (inst "cont" "p!1")
         (expand "continuous_at?")
         (inst "cont" 1)
         (skosimp*)
         (expand "member")
         (expand "ball")
         (lemma "axiom_of_archimedes")
         (inst - "f!1(p!1)")
         (skosimp*)
         (inst "csl" "delta!1" "max(i!1,0) + 3")
         (skosimp*)
         (typepred "n!1")
         (inst + "n!1")
         (expand "upper_bound?")
         (inst "cont" "seq(n!1)")
         (prop)
         (("1"
           (skosimp*)
           (typepred "s!1")
           (expand "image")
           (skosimp*)
           (grind "cont"))
          ("2"
           (lemma "fullset_metric_space")
           (expand "metric_space?")
           (expand "space_symmetric?")
           (prop)
           (inst -2 "p!1" "seq(n!1)")
           (("1" (replace -2) (propax)) ("2" (expand "fullset") (propax))
            ("3" (expand "fullset") (propax))))))
        ("2"
         (hide-all-but (1 2 3))
         (skosimp*)
         (expand "nonempty?")
         (expand "empty?")
         (inst + "n!1")
         (expand "upper_bound?")
         (skosimp*)
         (typepred "s!1")
         (expand "image")
         (skosimp*)
         (typepred "x!2")
         (inst - "x!2")
         (assert))))
      ("2"
       (name "seq"
             "(LAMBDA (n: nat): choose({s: T | S!1(s) AND f!1(s) < -n}))")
       (("1"
         (inst "csl" "seq")
         (skosimp*)
         (expand "continuous?")
         (expand "continuous_at?")
         (inst "cont" "p!1")
         (inst "cont" "1")
         (skosimp*)
         (lemma "axiom_of_archimedes")
         (inst - "-f!1(p!1)")
         (skosimp*)
         (inst "csl" "delta!1" "max(i!1,0) + 5")
         (skosimp*)
         (typepred "n!1")
         (expand "member")
         (expand "ball")
         (inst "cont" "seq(n!1)")
         (prop)
         (("1" (grind "cont"))
          ("2"
           (lemma "fullset_metric_space")
           (expand "metric_space?")
           (prop)
           (expand "space_symmetric?")
           (inst - "p!1" "seq(n!1)")
           (("1" (replace -2) (propax)) ("2" (expand "fullset") (propax))
            ("3" (expand "fullset") (propax))))))
        ("2"
         (expand "nonempty?")
         (expand "empty?")
         (skosimp*)
         (expand "member")
         (inst + "-n!1 - 1")
         (expand "lower_bound?")
         (skosimp*)
         (typepred "s!1")
         (expand "image")
         (skosimp*)
         (typepred "x!2")
         (replace -2)
         (inst - "x!2")
         (assert))))))
    ("3"
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (skosimp*)
     (inst - "f!1(x!1)")
     (expand "image")
     (inst + "x!1"))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: real_fun_on_compact_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "cont_on_compact_max")
   (inst - "S!1" "(Lambda (x: T): -f!1(x))")
   (assert)
   (prop)
   (("1" (skosimp*) (inst + "s!1") (skosimp*) (inst - "t!1") (assert))
    ("2"
     (expand "continuous?")
     (skosimp*)
     (inst - "x!1")
     (expand "continuous_at?")
     (skosimp*)
     (inst - "epsilon!1")
     (skosimp*)
     (inst + "delta!1")
     (skosimp*)
     (inst - "y!1")
     (expand "member")
     (expand "ball")
     (grind))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: riesz_interval_funs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "bounded_on_int?")
   (skosimp*)
   (inst + "M!1+M!2")
   (skeep)
   (inst - "x")
   (inst - "x")
   (grind))


proof_type: f_proof
decl_type: formula
library: analysis
theory: riesz_interval_funs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "bounded_on_int?")
   (skosimp*)
   (inst + "M!1*abs(c)")
   (skeep)
   (inst - "x")
   (mult-by -1 "abs(c)")
   (expand "*")
   (rewrite "abs_mult")
   (assert))


proof_type: f_proof
decl_type: formula
library: analysis
theory: riesz_interval_funs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (ground)
   (("1"
     (decompose-equality +)
     (typepred "fun_norm(f)")
     (inst - "x!1")
     (("1" (lemma "abs_eq_0") (inst - "f(x!1)") (assert))
      ("2"
       (expand "zero_off_int?")
       (inst - "x!1")
       (inst - "x!1")
       (expand "Intab")
       (propax))))
    ("2" (typepred "fun_norm(f)") (inst -3 "0") (assert))
    ("3" (replace -1) (expand "zero_off_int?") (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: riesz_interval_funs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "bounded_on_int?(c!1*f!1)")
   (("1"
     (case "c!1 = 0")
     (("1"
       (replace -1)
       (assert)
       (expand "*")
       (lemma "fun_norm_zero")
       (inst?)
       (assert))
      ("2"
       (case "abs(c!1) = 0")
       (("1" (lemma "abs_eq_0") (inst?) (assert))
        ("2"
         (case "fun_norm(c!1*f!1) < abs(c!1)*fun_norm(f!1)")
         (("1"
           (case "fun_norm(c!1*f!1)/abs(c!1) < fun_norm(f!1)")
           (("1"
             (typepred "fun_norm(f!1)")
             (inst -3 "fun_norm(c!1 * f!1) / abs(c!1)")
             (assert)
             (skosimp*)
             (cross-mult -3)
             (rewrite "abs_mult" :dir rl)
             (typepred "fun_norm(c!1*f!1)")
             (inst - "x!1")
             (expand "*")
             (assert))
            ("2" (cross-mult 1) (assert)) ("3" (assert))))
          ("2"
           (typepred "fun_norm(c!1*f!1)")
           (inst -3 "abs(c!1)*fun_norm(f!1)")
           (assert)
           (skosimp*)
           (expand "*")
           (rewrite "abs_mult")
           (typepred "fun_norm(f!1)")
           (inst - "x!1")
           (mult-by -2 "abs(c!1)")
           (assert))))))))
    ("2"
     (hide 2)
     (typepred "f!1")
     (expand "bounded_on_int?")
     (skosimp*)
     (inst + "abs(c!1)*M!1")
     (skosimp*)
     (inst - "x!1")
     (mult-by -1 "abs(c!1)")
     (expand "*")
     (rewrite "abs_mult")
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: riesz_interval_funs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "bounded_on_int?(f!1+g!1)")
   (("1"
     (typepred "fun_norm(f!1+g!1)")
     (inst -3 "fun_norm(f!1) + fun_norm(g!1)")
     (assert)
     (skosimp*)
     (expand "+")
     (lemma "triangle")
     (inst - "f!1(x!1)" "g!1(x!1)")
     (typepred "fun_norm(f!1)")
     (inst - "x!1")
     (typepred "fun_norm(g!1)")
     (inst - "x!1")
     (assert))
    ("2"
     (hide 2)
     (typepred "f!1")
     (typepred "g!1")
     (expand "bounded_on_int?")
     (skosimp*)
     (inst + "M!1+M!2")
     (skosimp*)
     (inst - "x!1")
     (inst - "x!1")
     (grind))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: riesz_interval_funs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "restrict")
   (expand "metric_space?")
   (expand "space_zero?")
   (expand "space_symmetric?")
   (expand "space_triangle?")
   (split)
   (("1"
     (skolem 1 ("ff" "gg"))
     (typepred "ff")
     (typepred "gg")
     (typepred "fun_norm_dist(ff,gg)")
     (ground))
    ("2"
     (case "FORALL (ff, gg: (LAMBDA (s: ((bounded_on_int?))): TRUE)):NOT fun_norm_dist(gg, ff) < fun_norm_dist(ff, gg)")
     (("1"
       (skolem 1 ("ff" "gg"))
       (inst-cp - "ff" "gg")
       (inst - "gg" "ff")
       (assert))
      ("2"
       (hide 2)
       (skeep)
       (expand "fun_norm_dist" -1 2)
       (typepred "fun_norm(ff-gg)")
       (inst -3 "fun_norm_dist(gg, ff)")
       (assert)
       (skosimp*)
       (expand "fun_norm_dist")
       (typepred "fun_norm(gg-ff)")
       (inst - "x!1")
       (expand "-")
       (expand "abs")
       (lift-if)
       (ground))))
    ("3"
     (skolem 1 ("ff" "gg" "z"))
     (expand "fun_norm_dist")
     (typepred "fun_norm(ff-z)")
     (inst -3 "fun_norm(ff - gg) + fun_norm(gg - z)")
     (assert)
     (skosimp*)
     (typepred "fun_norm(ff-gg)")
     (inst - "x!1")
     (typepred "fun_norm(gg-z)")
     (inst - "x!1")
     (expand "-")
     (assert)
     (expand "abs")
     (lift-if)
     (ground))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: riesz_interval_funs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem 1 "ff")
   (typepred "ff")
   (expand "continuous_on_int?")
   (lemma "cont_on_compact_max[real,real_dist]")
   (("1"
     (lemma "cont_on_compact_min[real,real_dist]")
     (inst - "Intab"
      "(LAMBDA (xy:real): IF Intab(xy) THEN ff(xy) ELSE 0 ENDIF)")
     (("1"
       (inst - "Intab"
        "(LAMBDA (xy:real): IF Intab(xy) THEN ff(xy) ELSE 0 ENDIF)")
       (("1"
         (case "(continuity_ms_def
                          [real, real_metric_space.real_dist, real,
                           real_metric_space.real_dist].continuous?
                          ((LAMBDA (xy: real): IF Intab(xy) THEN ff(xy) ELSE 0 ENDIF),
                           Intab)
                       AND compactness[real, real_metric_space.real_dist].compact?(Intab))
                                   AND NOT
                                   empty?(Intab)")
         (("1"
           (flatten)
           (assert)
           (hide -1)
           (hide -1)
           (skosimp*)
           (hide -3)
           (hide 1)
           (expand "bounded_on_int?")
           (inst + "max(abs(ff(s!1)),abs(ff(s!2)))")
           (("1"
             (skosimp*)
             (inst - "x!1")
             (("1"
               (inst - "x!1")
               (("1" (grind)) ("2" (expand "Intab") (propax))))
              ("2" (expand "Intab") (propax))))
            ("2" (assert) (typepred "s!2") (expand "Intab") (propax))
            ("3" (typepred "s!1") (expand "Intab") (propax))))
          ("2"
           (hide -1)
           (hide -1)
           (hide 2)
           (split)
           (("1"
             (expand "continuous?")
             (skosimp*)
             (inst - "x!1")
             (("1"
               (expand "continuous_at?")
               (skosimp*)
               (inst - "epsilon!1")
               (skosimp*)
               (inst + "delta!1")
               (skosimp*)
               (inst - "y!1")
               (("1"
                 (expand "member")
                 (expand "ball")
                 (expand "real_dist")
                 (assert))
                ("2" (hide-all-but 1) (expand "restrict") (propax))))
              ("2"
               (typepred "x!1")
               (expand "Intab")
               (assert)
               (expand "restrict")
               (ground))))
            ("2"
             (hide -)
             (lemma "closed_intervals_compact")
             (inst - "a" "b")
             (expand "Intab")
             (propax))
            ("3"
             (hide -2)
             (expand "empty?")
             (inst - "a")
             (expand "Intab")
             (assert))))
          ("3" (expand "Intab") (assert) (skosimp*) (assert))))
        ("2" (expand "Intab") (skosimp*) (assert))))
      ("2" (expand "Intab") (skosimp*) (assert))))
    ("2" (lemma "real_metric_space") (inst?))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: riesz_interval_funs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (f: (bounded_on_int?)): EXISTS (M:nnreal): (FORALL (x): abs(f(x)) <= M) AND
                                                    (FORALL (M1: real):
                                                       M1 < M IMPLIES
                                                        (EXISTS (x): abs(f(x)) > M1))")
   (("1"
     (inst +
      "LAMBDA (f:(bounded_on_int?)): choose({M: nnreal |
                                          (FORALL (x): abs(f(x)) <= M) AND
                                           (FORALL (M1: real):
                                              M1 < M IMPLIES
                                               (EXISTS (x): abs(f(x)) > M1))})")
     (skeep)
     (inst - "f")
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (skosimp*)
     (inst - "M!1")
     (ground))
    ("2"
     (hide 2)
     (skosimp*)
     (name "MM" "lub({zz:real | exists (yy:INTab): abs(f!1(yy)) = zz})")
     (("1"
       (inst + "MM")
       (("1"
         (case "(FORALL (x): abs(f!1(x)) <= MM)")
         (("1"
           (replace -1)
           (skeep)
           (typepred "MM")
           (expand "least_upper_bound?")
           (flatten)
           (inst - "M1")
           (assert)
           (expand "upper_bound?" +)
           (skeep)
           (typepred "s")
           (skosimp*)
           (inst + "yy!1")
           (assert))
          ("2"
           (hide 2)
           (typepred "MM")
           (expand "least_upper_bound?")
           (flatten)
           (expand "upper_bound?" -1)
           (skosimp*)
           (inst - "abs(f!1(x!1))")
           (inst + "x!1"))))
        ("2"
         (typepred "MM")
         (expand "least_upper_bound?")
         (flatten)
         (expand "upper_bound?" -1)
         (inst - "abs(f!1(a))")
         (("1" (assert)) ("2" (inst + "a") (assert)) ("3" (assert))))))
      ("2"
       (hide 2)
       (split)
       (("1"
         (expand "nonempty?")
         (expand "empty?")
         (expand "member")
         (inst - "abs(f!1(a))")
         (("1" (inst + "a") (assert)) ("2" (assert))))
        ("2"
         (expand "bounded_above?")
         (typepred "f!1")
         (expand "bounded_on_int?")
         (skosimp*)
         (inst + "M!1")
         (expand "upper_bound?")
         (skosimp*)
         (typepred "s!1")
         (skosimp*)
         (inst - "yy!1")
         (assert))))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: riesz_interval_funs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "bounded_on_int_const_closed")
   (inst - "-1" "g!1")
   (lemma "bounded_on_int_sum_closed")
   (inst - "f!1" "-1*g!1")
   (expand "-")
   (typepred "f!1")
   (typepred "g!1")
   (expand "zero_off_int_and_bounded?")
   (flatten)
   (expand "*")
   (expand "+")
   (assert))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: riesz_interval_funs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "-")
   (ground)
   (("1"
     (typepred "fun_norm(LAMBDA (x: INTab): f!1(x) - g!1(x))")
     (("1"
       (decompose-equality +)
       (inst - "x!1")
       (lemma "abs_eq_0")
       (inst?)
       (assert))
      ("2"
       (hide-all-but 1)
       (typepred "f!1")
       (typepred "g!1")
       (expand "bounded_on_int?")
       (skosimp*)
       (inst + "M!1+M!2")
       (skolem 1 "yyy")
       (inst - "yyy")
       (inst - "yyy")
       (grind))))
    ("2"
     (replace -1)
     (assert)
     (typepred "fun_norm(LAMBDA (x: INTab): 0)")
     (("1" (inst -3 "0") (assert))
      ("2" (expand "bounded_on_int?") (assert))))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: riesz_interval_funs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "f!1")
   (expand "bounded_on_int?")
   (skosimp*)
   (inst + "abs(c!1)*M!1")
   (skosimp*)
   (expand "*")
   (rewrite "abs_mult")
   (inst - "x!1")
   (mult-by -1 "abs(c!1)")
   (assert))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: riesz_interval_funs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "f!1")
   (typepred "g!1")
   (expand "bounded_on_int?")
   (skosimp*)
   (inst + "M!1+M!2")
   (skosimp*)
   (inst - "x!1")
   (inst - "x!1")
   (grind))


proof_type: f_proof
decl_type: formula
library: analysis
theory: riesz_linear_functionals
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "linear_op?")
   (flatten)
   (expand "const_inv_op?")
   (inst - "LAMBDA (y:INTab): 0" "0")
   (("1" (expand "*") (assert))
    ("2" (lemma "funs_contain_zero") (propax))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: riesz_bounded_functionals
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "funs_subspace")
   (expand "bounded_linear_subspace?")
   (flatten)
   (skosimp*)
   (expand "funs_sum_closed?")
   (inst - "f!1" "g!1")
   (("1" (expand "+") (expand "extend") (assert))
    ("2" (expand "extend") (assert) (expand "fullset") (propax))
    ("3" (expand "extend") (expand "fullset") (propax))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: riesz_bounded_functionals
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "funs_subspace")
   (expand "bounded_linear_subspace?")
   (flatten)
   (expand "funs_const_closed?")
   (inst - "f" "c")
   (("1" (expand "extend") (assert))
    ("2" (expand "extend") (expand "fullset") (propax))))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: riesz_bounded_functionals
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "funs_subspace")
   (expand "bounded_linear_subspace?")
   (flatten)
   (expand "funs_contain_constants?")
   (inst - "0")
   (expand "extend")
   (assert))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: riesz_bounded_functionals
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "funs_subspace")
   (expand "bounded_linear_subspace?")
   (flatten)
   (expand "funs_bounded?")
   (inst - "f")
   (expand "extend")
   (expand "fullset")
   (propax))


proof_type: t_proof
decl_type: tcc
library: analysis
theory: riesz_bounded_functionals
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (L:(bounded_op?)): EXISTS (M:nnreal): (FORALL (f: Funs):
                                                                                                                                   abs(L(f)) <= M * fun_norm[a, b](f))
                                                                                                                                 AND
                                                                                                                                 (FORALL (M1: real):
                                                                                                                                    M1 < M IMPLIES
                                                                                                                                     (EXISTS (f: Funs): abs(L(f)) > M1*fun_norm(f)))")
   (("1"
     (inst +
      "LAMBDA (L:(bounded_op?)): choose({M: nnreal |
                                                                                      (FORALL (f: Funs):
                                                                                         abs(L(f)) <= M * fun_norm[a, b](f))
                                                                                       AND
                                                                                       (FORALL (M1: real):
                                                                                          M1 < M IMPLIES
                                                                                           (EXISTS (f: Funs): abs(L(f)) > M1*fun_norm(f)))})")
     (("1"
       (skeep)
       (inst - "L")
       (skosimp*)
       (expand "nonempty?")
       (expand "empty?")
       (expand "member")
       (inst - "M!1")
       (ground))
      ("2"
       (hide -1)
       (skeep)
       (skeep)
       (skeep)
       (hide -)
       (lemma "funs_subspace")
       (expand "bounded_linear_subspace?")
       (flatten)
       (expand "funs_bounded?")
       (inst - "f1")
       (expand "extend")
       (expand "fullset")
       (propax))
      ("3"
       (hide -)
       (skeep)
       (lemma "funs_subspace")
       (assert)
       (expand "bounded_linear_subspace?")
       (flatten)
       (expand "funs_bounded?")
       (inst - "f")
       (expand "extend")
       (expand "fullset")
       (propax))))
    ("2"
     (hide 2)
     (skolem 1 "LL")
     (name "Aset"
           "{M:nnreal | (FORALL (f: Funs): abs(LL(f)) <= M * fun_norm[a, b](f))}")
     (("1"
       (name "MM" "glb(Aset)")
       (("1"
         (inst + "MM")
         (("1"
           (split +)
           (("1"
             (skeep)
             (case "fun_norm[a,b](f) = 0")
             (("1"
               (replace -1)
               (assert)
               (typepred "LL")
               (expand "bounded_op?")
               (skosimp*)
               (inst - "f")
               (assert))
              ("2"
               (typepred "MM")
               (expand "greatest_lower_bound?")
               (flatten)
               (inst -2 "abs(LL(f))/fun_norm[a,b](f)")
               (("1"
                 (split -)
                 (("1" (cross-mult -))
                  ("2"
                   (expand "lower_bound?")
                   (skosimp*)
                   (typepred "s!1")
                   (expand "extend" -1)
                   (assert)
                   (ground)
                   (expand "Aset" -2)
                   (inst - "f")
                   (cross-mult +))))
                ("2" (assert))))))
            ("2"
             (skeep)
             (typepred "MM")
             (expand "greatest_lower_bound?")
             (flatten)
             (expand "lower_bound?" -1)
             (inst - "M1")
             (("1" (assert))
              ("2"
               (expand "extend" +)
               (ground)
               (("1"
                 (expand "Aset" +)
                 (skosimp*)
                 (inst + "f!1")
                 (assert))
                ("2"
                 (name "ff1" "LAMBDA (y: INTab): 1")
                 (case "fun_norm(ff1) = 1")
                 (("1"
                   (inst + "ff1")
                   (("1" (assert))
                    ("2"
                     (assert)
                     (lemma "funs_subspace")
                     (expand "bounded_linear_subspace?")
                     (flatten)
                     (expand "funs_contain_constants?")
                     (inst - "1")
                     (expand "extend")
                     (propax))))
                  ("2"
                   (typepred "fun_norm(ff1)")
                   (inst - "a")
                   (("1"
                     (case "ff1(a) = 1")
                     (("1" (replace -1) (assert) (inst - "1") (assert))
                      ("2" (expand "ff1") (propax))))
                    ("2" (ground))))
                  ("3"
                   (expand "bounded_on_int?" +)
                   (inst + "1")
                   (skosimp*)
                   (expand "ff1")
                   (assert))))))))))
          ("2"
           (typepred "MM")
           (expand "greatest_lower_bound?")
           (flatten)
           (inst - "0")
           (assert)
           (expand "lower_bound?" +)
           (skosimp*)
           (typepred "s!1")
           (expand "extend" -1)
           (ground))))
        ("2"
         (hide 2)
         (assert)
         (hide -)
         (typepred "glb(extend[real, nnreal, bool, FALSE](Aset))")
         (expand "greatest_lower_bound?")
         (ground)
         (("1"
           (expand "lower_bound?")
           (skosimp*)
           (inst - "s!1")
           (expand "extend" 1)
           (propax))
          ("2"
           (skosimp*)
           (inst - "y!1")
           (assert)
           (hide 1)
           (expand "lower_bound?")
           (skosimp*)
           (inst - "s!1")
           (assert)
           (typepred "s!1")
           (expand "extend" -1)
           (ground))))
        ("3"
         (hide 2)
         (split +)
         (("1"
           (expand "nonempty?")
           (expand "empty?")
           (expand "member")
           (typepred "LL")
           (expand "bounded_op?")
           (skosimp*)
           (inst -2 "M!1")
           (expand "extend")
           (expand "Aset")
           (propax))
          ("2"
           (expand "bounded_below?")
           (name "ff1" "LAMBDA (y: INTab): 1")
           (case "fun_norm(ff1) = 1")
           (("1"
             (inst + "abs(LL(ff1))/fun_norm(ff1)")
             (("1"
               (expand "lower_bound?")
               (skosimp*)
               (typepred "s!1")
               (expand "extend")
               (ground)
               (expand "Aset" -2)
               (inst - "ff1")
               (cross-mult 1))
              ("2" (assert))
              ("3"
               (lemma "funs_subspace")
               (expand "bounded_linear_subspace?")
               (flatten)
               (expand "funs_contain_constants?")
               (inst - "1")
               (expand "extend")
               (assert))))
            ("2"
             (hide -2)
             (hide 2)
             (typepred "fun_norm(ff1)")
             (inst - "a")
             (("1"
               (inst - "1")
               (case "ff1(a) = 1")
               (("1" (assert)) ("2" (expand "ff1") (propax))))
              ("2" (ground))))
            ("3"
             (expand "ff1" +)
             (ground)
             (hide (-2 2))
             (expand "bounded_on_int?")
             (inst + "2")
             (assert))))))))
      ("2"
       (hide 2)
       (skeep)
       (lemma "funs_subspace")
       (expand "bounded_linear_subspace?")
       (flatten)
       (expand "funs_bounded?")
       (inst - "f")
       (expand "extend")
       (expand "fullset")
       (propax))))
    ("3"
     (hide 2)
     (skeep)
     (skeep)
     (skeep)
     (lemma "funs_subspace")
     (expand "bounded_linear_subspace?")
     (flatten)
     (expand "funs_bounded?")
     (inst - "f1")
     (expand "extend")
     (expand "fullset")
     (propax))
    ("4"
     (hide 2)
     (skeep)
     (lemma "funs_subspace")
     (expand "bounded_linear_subspace?")
     (flatten)
     (expand "funs_bounded?")
     (inst - "f")
     (expand "extend")
     (expand "fullset")
     (propax))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: riesz_hahn_banach
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "partial_order?")
   (expand "preorder?")
   (expand "reflexive?")
   (expand "transitive?")
   (expand "antisymmetric?")
   (split)
   (("1" (skolem 1 "OE") (expand "<=") (expand "subset?") (skeep))
    ("2"
     (skolem 1 ("oe1" "oe2" "oe3"))
     (flatten)
     (expand "<=")
     (flatten)
     (split)
     (("1"
       (hide -2)
       (expand "subset?")
       (skeep)
       (inst - "x")
       (inst - "x")
       (assert))
      ("2"
       (skeep)
       (inst - "ff")
       (inst - "ff")
       (assert)
       (expand "subset?")
       (inst - "ff")
       (assert))
      ("3" (assert))))
    ("3"
     (skolem 1 ("oe1" "oe2"))
     (flatten)
     (assert)
     (expand "<=")
     (flatten)
     (case "oe1`space = oe2`space")
     (("1"
       (decompose-equality +)
       (decompose-equality +)
       (inst - "x!1")
       (assert))
      ("2"
       (decompose-equality 1)
       (hide -2)
       (expand "subset?")
       (inst - "x!1")
       (inst - "x!1")
       (assert)
       (iff)
       (ground))))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: riesz_hahn_banach
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (lemma "Hahn_Banach_partial_order")
   (expand "partial_order?")
   (flatten)
   (split)
   (("1"
     (hide -2)
     (expand "preorder?")
     (flatten)
     (split)
     (("1"
       (hide -2)
       (expand "reflexive?")
       (skeep)
       (inst - "x")
       (expand "le")
       (propax))
      ("2"
       (hide -1)
       (expand "transitive?")
       (skeep)
       (inst - "x" "y" "z")
       (expand "le")
       (assert))))
    ("2"
     (hide -1)
     (expand "antisymmetric?")
     (skeep)
     (inst - "x" "y")
     (expand "le")
     (assert))))


proof_type: f_proof
decl_type: formula
library: analysis
theory: riesz_hahn_banach
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (deftactic step_assert (step)
    (branch step ((skip) (finalize (assert)))))
   (skeep)
   (name "OEnorm" "op_norm[a, b, ((OE`space))](OE`Lop)")
   (("1"
     (label "OEnormname" -1)
     (name "Extspace"
           "{gg:[INTab->real] | bounded_on_int?[a,b](gg) AND EXISTS (rr: [INTab->real],ffc:real): OE`space(rr) AND gg = rr + ffc*ff}")
     (case "NOT bounded_linear_subspace?[a,b](Extspace)")
     (("1"
       (hide 3)
       (hide -)
       (expand "bounded_linear_subspace?")
       (split)
       (("1"
         (expand "funs_sum_closed?")
         (skosimp*)
         (ground)
         (typepred "f!1")
         (typepred "g!1")
         (expand "Extspace")
         (flatten)
         (split)
         (("1"
           (expand "bounded_on_int?")
           (skosimp*)
           (inst + "M!1 + M!2")
           (skosimp*)
           (inst - "x!1")
           (inst - "x!1")
           (grind))
          ("2"
           (skosimp*)
           (inst + "rr!1+rr!2" "ffc!1+ffc!2")
           (assert)
           (split +)
           (("1"
             (typepred "OE`space")
             (expand "bounded_linear_subspace?")
             (flatten)
             (expand "funs_sum_closed?")
             (inst - "rr!1" "rr!2"))
            ("2"
             (replace -3)
             (replace -6)
             (hide-all-but 1)
             (decompose-equality)
             (grind))))))
        ("2"
         (expand "funs_const_closed?")
         (skosimp*)
         (typepred "f!1")
         (expand "Extspace")
         (flatten)
         (split)
         (("1"
           (hide -2)
           (expand "bounded_on_int?")
           (skosimp*)
           (expand "*")
           (assert)
           (inst + "abs(c!1)*M!1")
           (skosimp*)
           (inst - "x!1")
           (rewrite "abs_mult")
           (mult-by -1 "abs(c!1)")
           (assert))
          ("2"
           (skosimp*)
           (inst + "c!1*rr!1" "c!1*ffc!1")
           (split)
           (("1"
             (typepred "OE`space")
             (expand "bounded_linear_subspace?")
             (flatten)
             (expand "funs_const_closed?")
             (inst - "rr!1" "c!1"))
            ("2"
             (replace -3)
             (hide-all-but 1)
             (decompose-equality)
             (grind))))))
        ("3"
         (expand "funs_bounded?")
         (skosimp*)
         (typepred "f!1")
         (expand "Extspace")
         (flatten))
        ("4"
         (ground)
         (expand "funs_contain_constants?")
         (skosimp*)
         (expand "Extspace" +)
         (split)
         (("1" (expand "bounded_on_int?") (inst + "abs(c!1)") (grind))
          ("2"
           (inst + "LAMBDA (y:INTab): c!1" "0")
           (split +)
           (("1"
             (typepred "OE`space")
             (expand "bounded_linear_subspace?")
             (flatten)
             (expand "funs_contain_constants?")
             (inst - "c!1"))
            ("2" (hide-all-but 1) (decompose-equality) (grind))))))
        ("5"
         (expand "funs_contain_continuous?")
         (skosimp*)
         (expand "Extspace")
         (split)
         (("1" (lemma "continuous_implies_bounded[a,b]") (inst - "f!1"))
          ("2"
           (inst + "f!1" "0")
           (split)
           (("1"
             (typepred "OE`space")
             (expand "bounded_linear_subspace?")
             (flatten)
             (expand "funs_contain_continuous?")
             (inst - "f!1")
             (ground))
            ("2" (hide-all-but 1) (decompose-equality) (grind))))))))
      ("2"
       (label "bls" -1)
       (label "Extspacename" -2)
       (label "ffmember" 1)
       (label "ExtExists" 2)
       (name "funchoose"
             "LAMBDA (gg:(Extspace)): choose({rr:[INTab->real]|EXISTS (ffc:real):OE`space(rr) AND gg = rr + ffc * ff})")
       (("1"
         (label "funchoosename" -1)
         (name "constchoose"
               "(LAMBDA (gg: (Extspace)):
                                                                                                                                                                                                                                           choose({ffc: real |
                                                                                                                                                                                                                                                     EXISTS (rr: [INTab->real]):
                                                                                                                                                                                                                                                       OE`space(rr) AND gg = rr + ffc * ff}))")
         (("1"
           (label "constchoosename" -1)
           (case "NOT FORALL (gg:(Extspace),rr:real): gg = funchoose(gg) + rr*ff IMPLIES rr = constchoose(gg)")
           (("1"
             (skeep)
             (typepred "constchoose(gg)")
             (skolem -1 "fq")
             (assert)
             (flatten)
             (case "ff = (1/(rr-constchoose(gg)))*(fq+(-1)*funchoose(gg))")
             (("1"
               (typepred "OE`space")
               (expand "bounded_linear_subspace?" -1)
               (flatten)
               (expand "funs_const_closed?")
               (inst-cp - "funchoose(gg)" "-1")
               (("1"
                 (expand "funs_sum_closed?")
                 (step_assert (inst - "fq" "(-1) * funchoose(gg)"))
                 (step_assert
                  (inst - "fq + (-1) * funchoose(gg)"
                   "(1 / (rr - constchoose(gg)))"))
                 (assert))
                ("2" (assert) (typepred "funchoose(gg)") (skosimp*))))
              ("2"
               (hide-all-but (-2 -3 1))
               (decompose-equality +)
               (decompose-equality -)
               (decompose-equality -)
               (inst - "x!1")
               (inst - "x!1")
               (replace -1)
               (hide -1)
               (expand "*")
               (cross-mult 1)
               (grind :exclude ("funchoose" "constchoose")))))
            ("2"
             (label "funchooseunique" -1)
             (case "NOT FORALL (gg:(Extspace), fq:(OE`space)): gg = fq + constchoose(gg)*ff IMPLIES fq = funchoose(gg)")
             (("1"
               (skeep)
               (typepred "funchoose(gg)")
               (skosimp*)
               (case "ffc!1 = constchoose(gg)")
               (("1"
                 (replace -1)
                 (hide-all-but (-3 -4 1))
                 (decompose-equality +)
                 (decompose-equality -)
                 (decompose-equality -)
                 (inst - "x!1")
                 (inst - "x!1")
                 (grind :exclude ("funchoose" "constchoose")))
                ("2"
                 (case "ff = (1/(ffc!1-constchoose(gg)))*(fq+(-1)*funchoose(gg))")
                 (("1"
                   (typepred "OE`space")
                   (expand "bounded_linear_subspace?" -1)
                   (flatten)
                   (expand "funs_const_closed?")
                   (inst-cp - "funchoose(gg)" "-1")
                   (expand "funs_sum_closed?")
                   (step_assert (inst - "fq" "-1 * funchoose(gg)"))
                   (step_assert
                    (inst - "fq + -1 * funchoose(gg)"
                     "(1 / (ffc!1 - constchoose(gg)))"))
                   (assert))
                  ("2"
                   (hide-all-but (-2 -3 1))
                   (decompose-equality +)
                   (decompose-equality -)
                   (decompose-equality -)
                   (inst - "x!1")
                   (inst - "x!1")
                   (replace -1)
                   (hide -1)
                   (expand "*")
                   (cross-mult 1)
                   (assert)
                   (grind :exclude ("funchoose" "constchoose")))
                  ("3" (assert))))))
              ("2"
               (label "funchooseunique2" -1)
               (case "NOT FORALL (gg:(Extspace)): gg = funchoose(gg) + constchoose(gg)*ff")
               (("1"
                 (skeep)
                 (typepred "constchoose(gg)")
                 (skosimp*)
                 (inst "funchooseunique2" "gg" "rr!1")
                 (assert))
                ("2"
                 (label "ggdecomp" -1)
                 (case "NOT       FORALL (gg: (Extspace), fq: (OE`space), rr:real):
                                                                                                                                                               gg = fq + rr * ff IMPLIES fq = funchoose(gg) AND rr = constchoose(gg)")
                 (("1"
                   (skeep)
                   (case "rr = constchoose(gg)")
                   (("1"
                     (assert)
                     (inst "funchooseunique2" "gg" "fq")
                     (assert))
                    ("2"
                     (hide 2)
                     (inst "ggdecomp" "gg")
                     (case "ff = (1/(rr-constchoose(gg)))*(funchoose(gg)+(-1)*fq)")
                     (("1"
                       (typepred "OE`space")
                       (expand "bounded_linear_subspace?" -1)
                       (flatten)
                       (expand "funs_const_closed?")
                       (inst-cp - "fq" "-1")
                       (expand "funs_sum_closed?")
                       (step_assert (inst - "funchoose(gg)" "(-1)*fq"))
                       (("1"
                         (step_assert
                          (inst - "funchoose(gg) + (-1) * fq"
                           "(1 / (rr - constchoose(gg)))"))
                         (assert))
                        ("2"
                         (typepred "funchoose(gg)")
                         (step_assert (skosimp*)))))
                      ("2"
                       (hide-all-but (-1 -2 1 2))
                       (decompose-equality +)
                       (decompose-equality -)
                       (decompose-equality -)
                       (inst - "x!1")
                       (inst - "x!1")
                       (replace -1)
                       (hide -1)
                       (expand "*")
                       (cross-mult 1)
                       (grind :exclude ("funchoose" "constchoose")))
                      ("3" (assert))))))
                  ("2"
                   (label "decompunique" -1)
                   (case "NOT FORALL (fq:[INTab->real]): OE`space(fq) IMPLIES funchoose(fq) = fq AND constchoose(fq) = 0")
                   (("1"
                     (skeep)
                     (inst - "fq" "fq" "0")
                     (("1"
                       (assert)
                       (split -)
                       (("1" (ground))
                        ("2"
                         (hide-all-but 1)
                         (decompose-equality +)
                         (grind))))
                      ("2"
                       (hide 2)
                       (expand "Extspace")
                       (split +)
                       (("1"
                         (hide-all-but (-1 1))
                         (typepred "OE`space")
                         (expand "bounded_linear_subspace?")
                         (expand "funs_bounded?")
                         (flatten)
                         (inst - "fq"))
                        ("2"
                         (hide-all-but (-1 1))
                         (inst + "fq" "0")
                         (assert)
                         (decompose-equality +)
                         (grind))))))
                    ("2"
                     (label "OEdecomp" -1)
                     (case "EXISTS (beta:real): FORALL (yy,hh:(OE`space)): -OEnorm*fun_norm[a,b](hh+ff)-OE`Lop(hh) <= beta AND beta <= OEnorm*fun_norm[a,b](yy+ff)-OE`Lop(yy)")
                     (("1"
                       (label "betadef" -1)
                       (skosimp*)
                       (name "Extop"
                             "(LAMBDA (gg:(Extspace)): OE`Lop(funchoose(gg)) + constchoose(gg)*beta!1)")
                       (("1"
                         (label "Extopname" -1)
                         (case "NOT FORALL (f: ((Extspace))): abs(Extop(f)) <= OEnorm * fun_norm[a,b](f)")
                         (("1"
                           (hide "ExtExists")
                           (skosimp*)
                           (expand "Extop" +)
                           (case "constchoose(f!1) = 0")
                           (("1"
                             (copy "ggdecomp")
                             (inst - "f!1")
                             (case "f!1 = funchoose(f!1)")
                             (("1"
                               (typepred "OEnorm")
                               (inst - "funchoose(f!1)")
                               (assert))
                              ("2"
                               (replace -2)
                               (hide-all-but (-1 1))
                               (decompose-equality +)
                               (decompose-equality -)
                               (grind))))
                            ("2"
                             (name "spcfun"
                                   "(1/constchoose(f!1))*funchoose(f!1)")
                             (("1"
                               (label "spcfunname" -1)
                               (case "constchoose(f!1)*spcfun = funchoose(f!1)")
                               (("1"
                                 (label "fcmult" -1)
                                 (copy "betadef")
                                 (case
                                  "NOT bounded_on_int?[a, b]
                                                                                                                                                                                                                                                                                                               ((+[INTab])(funchoose(f!1), *[INTab](constchoose(f!1), ff)))")
                                 (("1"
                                   (hide-all-but 1)
                                   (typepred "ff")
                                   (expand "+")
                                   (expand "*")
                                   (typepred "funchoose(f!1)")
                                   (skosimp*)
                                   (hide -2)
                                   (typepred "OE`space")
                                   (expand "bounded_linear_subspace?")
                                   (flatten)
                                   (expand "funs_bounded?")
                                   (inst - "funchoose(f!1)")
                                   (expand "bounded_on_int?")
                                   (skosimp*)
                                   (inst
                                    +
                                    "M!1 + abs(constchoose(f!1))*M!2")
                                   (skosimp*)
                                   (inst - "x!1")
                                   (inst - "x!1")
                                   (copy -7)
                                   (copy -4)
                                   (mult-by -2 "abs(constchoose(f!1))")
                                   (hide-all-but (-1 -2 1))
                                   (lemma "triangle")
                                   (inst?)
                                   (rewrite "abs_mult")
                                   (assert))
                                  ("2"
                                   (label "boi" -1)
                                   (hide "boi")
                                   (expand "abs" +)
                                   (lift-if)
                                   (ground)
                                   (("1"
                                     (inst - "spcfun" "spcfun")
                                     (("1"
                                       (assert)
                                       (flatten)
                                       (case "constchoose(f!1) < 0")
                                       (("1"
                                         (mult-by -4 "-constchoose(f!1)")
                                         (assert)
                                         (case
                                          "fun_norm[a, b](spcfun + ff) * -constchoose(f!1) = fun_norm[a,b](funchoose(f!1) + constchoose(f!1)*ff)")
                                         (("1"
                                           (case
                                            "OE`Lop(spcfun) * -constchoose(f!1) = -OE`Lop(funchoose(f!1))")
                                           (("1"
                                             (copy "ggdecomp")
                                             (inst - "f!1")
                                             (assert))
                                            ("2"
                                             (hide-all-but ("fcmult" 1))
                                             (typepred "OE`Lop")
                                             (expand
                                              "bounded_linear_operator?")
                                             (expand "linear_op?")
                                             (expand "const_inv_op?")
                                             (flatten)
                                             (inst
                                              -
                                              "spcfun"
                                              "constchoose(f!1)")
                                             (assert))))
                                          ("2"
                                           (hide 2)
                                           (hide-all-but ("fcmult" 1 -2))
                                           (lemma "fun_norm_scal[a,b]")
                                           (inst
                                            -
                                            "spcfun + ff"
                                            "constchoose(f!1)")
                                           (expand "abs" -1)
                                           (case
                                            "constchoose(f!1) * (spcfun + ff) = funchoose(f!1) + constchoose(f!1) * ff")
                                           (("1" (assert))
                                            ("2"
                                             (replace "fcmult" :dir rl)
                                             (hide-all-but 1)
                                             (decompose-equality +)
                                             (grind
                                              :exclude
                                              ("constchoose"
                                               "funchoose"
                                               "spcfun")))))
                                          ("3" (reveal "boi") (propax))))
                                        ("2"
                                         (mult-by -2 "constchoose(f!1)")
                                         (assert)
                                         (case
                                          "fun_norm[a, b](spcfun + ff) * constchoose(f!1) = fun_norm[a,b](funchoose(f!1) + constchoose(f!1)*ff)")
                                         (("1"
                                           (case
                                            "OE`Lop(spcfun) * constchoose(f!1) = OE`Lop(funchoose(f!1))")
                                           (("1"
                                             (copy "ggdecomp")
                                             (inst - "f!1")
                                             (assert))
                                            ("2"
                                             (hide-all-but ("fcmult" 1))
                                             (typepred "OE`Lop")
                                             (expand
                                              "bounded_linear_operator?")
                                             (expand "linear_op?")
                                             (expand "const_inv_op?")
                                             (flatten)
                                             (inst
                                              -
                                              "spcfun"
                                              "constchoose(f!1)")
                                             (assert))))
                                          ("2"
                                           (hide 2)
                                           (hide-all-but
                                            ("fcmult" 1 -2 3))
                                           (lemma "fun_norm_scal[a,b]")
                                           (inst
                                            -
                                            "spcfun + ff"
                                            "constchoose(f!1)")
                                           (expand "abs" -1)
                                           (case
                                            "constchoose(f!1) * (spcfun + ff) = funchoose(f!1) + constchoose(f!1) * ff")
                                           (("1" (assert))
                                            ("2"
                                             (replace "fcmult" :dir rl)
                                             (hide-all-but 1)
                                             (decompose-equality +)
                                             (grind
                                              :exclude
                                              ("constchoose"
                                               "funchoose"
                                               "spcfun")))))
                                          ("3"
                                           (reveal "boi")
                                           (propax))))))
                                      ("2"
                                       (typepred "OE`space")
                                       (expand
                                        "bounded_linear_subspace?"
                                        -1)
                                       (flatten)
                                       (expand "funs_const_closed?")
                                       (inst
                                        -
                                        "funchoose(f!1)"
                                        "(1 / constchoose(f!1))")
                                       (assert))))
                                    ("2"
                                     (hide 1)
                                     (inst - "spcfun" "spcfun")
                                     (("1"
                                       (assert)
                                       (flatten)
                                       (case "constchoose(f!1) >= 0")
                                       (("1"
                                         (mult-by -3 "constchoose(f!1)")
                                         (assert)
                                         (case
                                          "fun_norm[a, b](spcfun + ff) * constchoose(f!1) = fun_norm[a,b](funchoose(f!1) + constchoose(f!1)*ff)")
                                         (("1"
                                           (case
                                            "OE`Lop(spcfun) * constchoose(f!1) = OE`Lop(funchoose(f!1))")
                                           (("1"
                                             (copy "ggdecomp")
                                             (inst - "f!1")
                                             (assert))
                                            ("2"
                                             (hide-all-but ("fcmult" 1))
                                             (typepred "OE`Lop")
                                             (expand
                                              "bounded_linear_operator?")
                                             (expand "linear_op?")
                                             (expand "const_inv_op?")
                                             (flatten)
                                             (inst
                                              -
                                              "spcfun"
                                              "constchoose(f!1)")
                                             (assert))))
                                          ("2"
                                           (hide 2)
                                           (hide-all-but ("fcmult" 1 -2))
                                           (lemma "fun_norm_scal[a,b]")
                                           (inst
                                            -
                                            "spcfun + ff"
                                            "constchoose(f!1)")
                                           (expand "abs" -1)
                                           (case
                                            "constchoose(f!1) * (spcfun + ff) = funchoose(f!1) + constchoose(f!1) * ff")
                                           (("1" (assert))
                                            ("2"
                                             (replace "fcmult" :dir rl)
                                             (hide-all-but 1)
                                             (decompose-equality +)
                                             (grind
                                              :exclude
                                              ("constchoose"
                                               "funchoose"
                                               "spcfun")))))
                                          ("3" (reveal "boi") (propax))))
                                        ("2"
                                         (mult-by -1 "-constchoose(f!1)")
                                         (assert)
                                         (case
                                          "fun_norm[a, b](spcfun + ff) * -constchoose(f!1) = fun_norm[a,b](funchoose(f!1) + constchoose(f!1)*ff)")
                                         (("1"
                                           (case
                                            "OE`Lop(spcfun) * constchoose(f!1) = OE`Lop(funchoose(f!1))")
                                           (("1"
                                             (copy "ggdecomp")
                                             (inst - "f!1")
                                             (assert))
                                            ("2"
                                             (hide-all-but ("fcmult" 1))
                                             (typepred "OE`Lop")
                                             (expand
                                              "bounded_linear_operator?")
                                             (expand "linear_op?")
                                             (expand "const_inv_op?")
                                             (flatten)
                                             (inst
                                              -
                                              "spcfun"
                                              "constchoose(f!1)")
                                             (assert))))
                                          ("2"
                                           (hide 2)
                                           (hide-all-but
                                            ("fcmult" 1 -2 3))
                                           (lemma "fun_norm_scal[a,b]")
                                           (inst
                                            -
                                            "spcfun + ff"
                                            "constchoose(f!1)")
                                           (expand "abs" -1)
                                           (case
                                            "constchoose(f!1) * (spcfun + ff) = funchoose(f!1) + constchoose(f!1) * ff")
                                           (("1" (assert))
                                            ("2"
                                             (replace "fcmult" :dir rl)
                                             (hide-all-but 1)
                                             (decompose-equality +)
                                             (grind
                                              :exclude
                                              ("constchoose"
                                               "funchoose"
                                               "spcfun")))))
                                          ("3"
                                           (reveal "boi")
                                           (propax))))))
                                      ("2"
                                       (typepred "OE`space")
                                       (expand
                                        "bounded_linear_subspace?"
                                        -1)
                                       (flatten)
                                       (expand "funs_const_closed?")
                                       (inst
                                        -
                                        "funchoose(f!1)"
                                        "(1 / constchoose(f!1))")
                                       (assert))))))))
                                ("2"
                                 (replace "spcfunname" + :dir rl)
                                 (hide-all-but (1 2))
                                 (decompose-equality +)
                                 (expand "*")
                                 (assert))))
                              ("2" (assert))))))
                          ("2"
                           (label "oplem" -1)
                           (case "bounded_linear_operator?[a,b,(Extspace)](Extop)")
                           (("1"
                             (label "blop" -1)
                             (name "Extn"
                                   "(# space:=Extspace, Lop := Extop #)")
                             (label "Extnname" -1)
                             (inst "ExtExists" "Extn")
                             (("1"
                               (assert)
                               (expand "Extn" +)
                               (expand "Extspace" +)
                               (inst + "LAMBDA (x:INTab): 0" "1")
                               (split)
                               (("1"
                                 (hide-all-but "ExtExists")
                                 (typepred "OE`space")
                                 (expand "bounded_linear_subspace?")
                                 (flatten)
                                 (expand "funs_contain_constants?")
                                 (inst - "0"))
                                ("2"
                                 (hide-all-but "ExtExists")
                                 (decompose-equality)
                                 (grind))))
                              ("2"
                               (split)
                               (("1" (expand "Extn" +) (propax))
                                ("2" (expand "Extn" +) (propax))
                                ("3"
                                 (hide-all-but ("blop" 1))
                                 (expand "Extn")
                                 (case "Extn`space = Extspace")
                                 (("1"
                                   (expand "bounded_linear_operator?")
                                   (flatten)
                                   (split)
                                   (("1"
                                     (expand "bounded_op?")
                                     (skosimp*)
                                     (inst + "M!1")
                                     (skosimp*)
                                     (inst - "f!1"))
                                    ("2"
                                     (expand "linear_op?")
                                     (flatten)
                                     (split)
                                     (("1"
                                       (expand "additive_op?")
                                       (skosimp*)
                                       (inst - "f!1" "g!1"))
                                      ("2"
                                       (expand "const_inv_op?")
                                       (skosimp*)
                                       (inst - "f!1" "c!1"))))))
                                  ("2" (expand "Extn" 1) (propax))))
                                ("4"
                                 (expand "<=" 1)
                                 (split)
                                 (("1"
                                   (expand "subset?")
                                   (skeep)
                                   (assert)
                                   (expand "Extn" +)
                                   (expand "Extspace" +)
                                   (split +)
                                   (("1"
                                     (hide-all-but (-1 1))
                                     (typepred "OE`space")
                                     (expand "bounded_linear_subspace?")
                                     (flatten)
                                     (expand "funs_bounded?")
                                     (inst - "x"))
                                    ("2"
                                     (expand "bounded_on_int?")
                                     (ground)
                                     (inst + "x" "0")
                                     (assert)
                                     (hide-all-but 1)
                                     (decompose-equality)
                                     (grind))))
                                  ("2"
                                   (skosimp*)
                                   (expand "Extn" +)
                                   (expand "Extop" +)
                                   (case "constchoose(ff!1) = 0")
                                   (("1"
                                     (replace -1)
                                     (assert)
                                     (inst "ggdecomp" "ff!1")
                                     (assert)
                                     (replace -1)
                                     (case "ff!1 = funchoose(ff!1)")
                                     (("1" (assert))
                                      ("2"
                                       (hide-all-but ("ggdecomp" 1))
                                       (decompose-equality)
                                       (decompose-equality -)
                                       (inst - "x!1")
                                       (grind))))
                                    ("2"
                                     (inst "OEdecomp" "ff!1")
                                     (ground))))
                                  ("3"
                                   (name
                                    "Extnnorm"
                                    "op_norm[a, b, ((Extn`space))](Extn`Lop)")
                                   (("1"
                                     (label "Extnnormname" -1)
                                     (replace "Extnnormname")
                                     (replace "OEnormname")
                                     (case "OEnorm < Extnnorm")
                                     (("1"
                                       (typepred "Extnnorm")
                                       (copy -3)
                                       (inst - "OEnorm")
                                       (assert)
                                       (skosimp*)
                                       (expand "Extn" -1)
                                       (inst "oplem" "f!1")
                                       (assert))
                                      ("2"
                                       (typepred "OEnorm")
                                       (inst -3 "Extnnorm")
                                       (assert)
                                       (skosimp*)
                                       (typepred "Extnnorm")
                                       (inst - "f!1")
                                       (("1"
                                         (case
                                          "Extn`Lop(f!1) = OE`Lop(f!1)")
                                         (("1" (assert))
                                          ("2"
                                           (expand "Extn" +)
                                           (expand "Extop" +)
                                           (case "constchoose(f!1) = 0")
                                           (("1"
                                             (case
                                              "f!1 = funchoose(f!1)")
                                             (("1" (replace -2) (assert))
                                              ("2"
                                               (inst "ggdecomp" "f!1")
                                               (replace -1)
                                               (hide-all-but
                                                ("ggdecomp" 1))
                                               (decompose-equality +)
                                               (decompose-equality -)
                                               (inst - "x!1")
                                               (grind
                                                :exclude
                                                "funchoose"))))
                                            ("2"
                                             (inst "OEdecomp" "f!1")
                                             (ground))))))
                                        ("2"
                                         (expand "Extn" +)
                                         (expand "Extspace" +)
                                         (assert)
                                         (split +)
                                         (("1"
                                           (hide-all-but 1)
                                           (typepred "OE`space")
                                           (expand
                                            "bounded_linear_subspace?")
                                           (expand "bounded_on_int?")
                                           (flatten)
                                           (expand "funs_bounded?")
                                           (inst - "f!1")
                                           (expand "bounded_on_int?")
                                           (propax))
                                          ("2"
                                           (inst + "f!1" "0")
                                           (assert)
                                           (hide-all-but 1)
                                           (decompose-equality +)
                                           (grind))))))))
                                    ("2"
                                     (hide-all-but ("bls" 1))
                                     (expand "fullset")
                                     (expand "extend")
                                     (expand "Extn")
                                     (case
                                      "Extspace = (LAMBDA (t: [INTab->real]):
                                                                                                                                                                                                                                                                                                                                             IF Extspace(t) THEN TRUE ELSE FALSE ENDIF)")
                                     (("1" (assert))
                                      ("2"
                                       (decompose-equality +)
                                       (lift-if)
                                       (propax))))
                                    ("3"
                                     (hide-all-but 1)
                                     (skosimp*)
                                     (expand "Extn")
                                     (propax))))))))))
                            ("2"
                             (hide-all-but ("ffmember" 1 "oplem"))
                             (expand "bounded_linear_operator?")
                             (split)
                             (("1"
                               (expand "bounded_op?")
                               (inst + "OEnorm"))
                              ("2"
                               (hide "oplem")
                               (expand "linear_op?")
                               (split)
                               (("1"
                                 (expand "additive_op?")
                                 (skosimp*)
                                 (expand "Extop")
                                 (case
                                  "funchoose(f!1+g!1) = funchoose(f!1)+funchoose(g!1) AND constchoose(f!1+g!1) = constchoose(f!1)+constchoose(g!1)")
                                 (("1"
                                   (flatten)
                                   (replace -1)
                                   (replace -2)
                                   (hide -)
                                   (typepred "OE`Lop")
                                   (expand "bounded_linear_operator?")
                                   (flatten)
                                   (expand "linear_op?")
                                   (flatten)
                                   (expand "additive_op?")
                                   (inst
                                    -
                                    "funchoose(f!1)"
                                    "funchoose(g!1)")
                                   (replace -2)
                                   (hide -)
                                   (assert))
                                  ("2"
                                   (hide 2)
                                   (reveal "decompunique")
                                   (inst
                                    -
                                    "f!1+g!1"
                                    "funchoose(f!1) + funchoose(g!1)"
                                    "constchoose(f!1) + constchoose(g!1)")
                                   (("1"
                                     (split -)
                                     (("1" (ground))
                                      ("2"
                                       (hide 2)
                                       (reveal "ggdecomp")
                                       (inst-cp - "f!1")
                                       (inst - "g!1")
                                       (decompose-equality +)
                                       (decompose-equality -)
                                       (decompose-equality -)
                                       (inst - "x!1")
                                       (inst - "x!1")
                                       (grind
                                        :exclude
                                        ("funchoose" "constchoose")))))
                                    ("2"
                                     (hide 2)
                                     (typepred "OE`space")
                                     (expand "bounded_linear_subspace?")
                                     (flatten)
                                     (expand "funs_sum_closed?")
                                     (inst
                                      -
                                      "funchoose(f!1)"
                                      "funchoose(g!1)")
                                     (("1"
                                       (typepred "funchoose(g!1)")
                                       (skosimp*))
                                      ("2"
                                       (typepred "funchoose(f!1)")
                                       (skosimp*))))
                                    ("3"
                                     (reveal "bls")
                                     (hide-all-but ("bls" 1))
                                     (expand "bounded_linear_subspace?")
                                     (flatten)
                                     (expand "funs_sum_closed?")
                                     (inst - "f!1" "g!1"))))))
                                ("2"
                                 (hide "ffmember")
                                 (expand "const_inv_op?")
                                 (skosimp*)
                                 (expand "Extop")
                                 (case
                                  "funchoose(c!1*f!1) = c!1*funchoose(f!1) AND constchoose(c!1*f!1) = c!1*constchoose(f!1)")
                                 (("1"
                                   (flatten)
                                   (typepred "OE`Lop")
                                   (expand "bounded_linear_operator?")
                                   (expand "linear_op?")
                                   (expand "const_inv_op?")
                                   (flatten)
                                   (inst - "funchoose(f!1)" "c!1")
                                   (assert))
                                  ("2"
                                   (hide 2)
                                   (reveal "decompunique")
                                   (inst
                                    -
                                    "c!1*f!1"
                                    "c!1 * funchoose(f!1)"
                                    "c!1 * constchoose(f!1)")
                                   (("1"
                                     (split -)
                                     (("1" (ground))
                                      ("2"
                                       (hide 2)
                                       (reveal "ggdecomp")
                                       (inst - "f!1")
                                       (decompose-equality +)
                                       (decompose-equality -)
                                       (inst - "x!1")
                                       (mult-by -1 "c!1")
                                       (grind
                                        :exclude
                                        ("funchoose" "constchoose")))))
                                    ("2"
                                     (hide 2)
                                     (typepred "OE`space")
                                     (expand "bounded_linear_subspace?")
                                     (expand "funs_const_closed?")
                                     (flatten)
                                     (inst - "funchoose(f!1)" "c!1")
                                     (typepred "funchoose(f!1)")
                                     (skosimp*))
                                    ("3"
                                     (hide 2)
                                     (reveal "bls")
                                     (expand "bounded_linear_subspace?")
                                     (expand "funs_const_closed?")
                                     (flatten)
                                     (inst - "f!1" "c!1"))))))))))
                            ("3"
                             (hide-all-but ("bls" 1))
                             (expand "extend")
                             (expand "fullset")
                             (case "Extspace = (LAMBDA (t: [INTab->real]):
                                                                                                                                                                                                                     IF (Extspace)(t) THEN TRUE ELSE FALSE ENDIF)")
                             (("1" (assert))
                              ("2"
                               (hide 2)
                               (hide "bls")
                               (decompose-equality +)
                               (lift-if)
                               (propax))))))
                          ("3"
                           (hide-all-but 1)
                           (skosimp*)
                           (typepred "f!1")
                           (expand "Extspace")
                           (flatten))))
                        ("2"
                         (expand "bounded_on_int?")
                         (ground)
                         (hide-all-but 1)
                         (skosimp*)
                         (typepred "funchoose(gg!1)")
                         (skosimp*))))
                      ("2"
                       (case "NOT FORALL (yy, hh: (OE`space)): -OEnorm * fun_norm[a, b](hh + ff) - OE`Lop(hh) <= OEnorm * fun_norm[a, b](yy + ff) - OE`Lop(yy)")
                       (("1"
                         (hide 2)
                         (skeep)
                         (typepred "OEnorm")
                         (inst - "yy-hh")
                         (("1"
                           (case "OE`Lop(yy)-OE`Lop(hh) <= OEnorm*fun_norm[a,b](yy-hh)")
                           (("1"
                             (case "fun_norm[a,b](yy-hh) <= fun_norm[a,b](yy+ff) + fun_norm[a,b](hh+ff)")
                             (("1" (mult-by -1 "OEnorm") (assert))
                              ("2"
                               (hide-all-but 1)
                               (lemma "fun_norm_triangle[a,b]")
                               (inst - "yy+ff" "(-1)*hh+(-1)*ff")
                               (("1"
                                 (case
                                  "yy + ff + ((-1) * hh + (-1) * ff) = yy-hh")
                                 (("1"
                                   (replace -1)
                                   (hide -1)
                                   (case
                                    "fun_norm[a,b]((-1) * hh + (-1) * ff) = fun_norm[a, b](hh + ff)")
                                   (("1" (assert))
                                    ("2"
                                     (hide-all-but 1)
                                     (lemma "fun_norm_scal[a,b]")
                                     (inst - "hh+ff" "-1")
                                     (case
                                      "(-1) * hh + (-1) * ff = (-1)*(hh+ff)")
                                     (("1"
                                       (assert)
                                       (expand "abs")
                                       (assert))
                                      ("2"
                                       (hide-all-but 1)
                                       (decompose-equality +)
                                       (grind))))))
                                  ("2"
                                   (decompose-equality +)
                                   (hide-all-but 1)
                                   (grind))))
                                ("2"
                                 (hide-all-but 1)
                                 (expand "+")
                                 (expand "*")
                                 (expand "bounded_on_int?")
                                 (typepred "ff")
                                 (typepred "hh")
                                 (case "bounded_on_int?[a,b](hh)")
                                 (("1"
                                   (expand "bounded_on_int?")
                                   (skosimp*)
                                   (inst + "M!1+M!2")
                                   (skosimp*)
                                   (inst - "x!1")
                                   (inst - "x!1")
                                   (grind))
                                  ("2"
                                   (typepred "OE`space")
                                   (expand "bounded_linear_subspace?")
                                   (expand "funs_bounded?")
                                   (flatten)
                                   (inst - "hh"))))))))
                            ("2"
                             (typepred "OE`Lop")
                             (expand "bounded_linear_operator?")
                             (expand "linear_op?")
                             (flatten)
                             (expand "const_inv_op?")
                             (inst - "hh" "-1")
                             (expand "additive_op?")
                             (step_assert (inst - "yy" "-1*hh"))
                             (case "yy+-1*hh = yy-hh")
                             (("1"
                               (replace -1)
                               (replace -3)
                               (expand "abs")
                               (lift-if)
                               (ground))
                              ("2"
                               (hide-all-but 1)
                               (decompose-equality +)
                               (grind))))))
                          ("2"
                           (hide-all-but 1)
                           (typepred "yy")
                           (typepred "hh")
                           (typepred "OE`space")
                           (expand "bounded_linear_subspace?")
                           (flatten)
                           (expand "funs_const_closed?")
                           (inst - "hh" "-1")
                           (expand "funs_sum_closed?")
                           (inst - "yy" "-1*hh")
                           (("1"
                             (case "yy+-1*hh = yy-hh")
                             (("1" (assert))
                              ("2"
                               (hide-all-but 1)
                               (decompose-equality)
                               (grind))))
                            ("2" (assert))))))
                        ("2"
                         (hide-all-but (-1 1))
                         (name "Aset"
                               "{Pr:real|EXISTS (hh:(OE`space)): Pr = -OEnorm * fun_norm[a, b](hh + ff) - OE`Lop(hh)}")
                         (("1"
                           (name "betas" "lub(Aset)")
                           (("1"
                             (inst + "betas")
                             (skosimp*)
                             (split +)
                             (("1"
                               (typepred "betas")
                               (expand "least_upper_bound?")
                               (flatten)
                               (expand "upper_bound?" -1)
                               (inst -
                                "-OEnorm * fun_norm[a, b](hh!1 + ff) - OE`Lop(hh!1)")
                               (expand "Aset" +)
                               (inst + "hh!1"))
                              ("2"
                               (typepred "betas")
                               (expand "least_upper_bound?")
                               (flatten)
                               (inst?)
                               (assert)
                               (hide 2)
                               (expand "upper_bound?" +)
                               (skosimp*)
                               (typepred "s!1")
                               (expand "Aset" -1)
                               (skosimp*)
                               (inst - "yy!1" "hh!2")
                               (assert))))
                            ("2"
                             (hide 2)
                             (expand "nonempty?")
                             (expand "empty?")
                             (expand "member")
                             (split)
                             (("1"
                               (name "zerfun" "LAMBDA (x:INTab): 0")
                               (inst -
                                "-OEnorm * fun_norm[a, b](zerfun + ff) - OE`Lop(zerfun)")
                               (("1"
                                 (expand "Aset" +)
                                 (inst + "zerfun")
                                 (typepred "OE`space")
                                 (expand "bounded_linear_subspace?")
                                 (flatten)
                                 (expand "funs_contain_constants?")
                                 (inst - "0")
                                 (assert))
                                ("2"
                                 (typepred "OE`space")
                                 (expand "bounded_linear_subspace?")
                                 (flatten)
                                 (expand "funs_contain_constants?")
                                 (inst - "0")
                                 (assert))
                                ("3"
                                 (case "zerfun + ff = ff")
                                 (("1" (assert))
                                  ("2"
                                   (hide-all-but 1)
                                   (decompose-equality +)
                                   (expand "zerfun")
                                   (grind))))))
                              ("2"
                               (name "zerfun" "LAMBDA (x:INTab): 0")
                               (expand "bounded_above?")
                               (inst +
                                "OEnorm * fun_norm[a, b](zerfun + ff) - OE`Lop(zerfun)")
                               (("1"
                                 (expand "upper_bound?")
                                 (skosimp*)
                                 (typepred "s!1")
                                 (expand "Aset" -1)
                                 (skosimp*)
                                 (inst - "zerfun" "hh!1")
                                 (assert))
                                ("2"
                                 (typepred "OE`space")
                                 (expand "bounded_linear_subspace?")
                                 (flatten)
                                 (expand "funs_contain_constants?")
                                 (inst - "0")
                                 (assert))
                                ("3"
                                 (case "zerfun+ff = ff")
                                 (("1" (assert))
                                  ("2"
                                   (hide-all-but 1)
                                   (expand "zerfun")
                                   (decompose-equality +)
                                   (grind))))))))))
                          ("2"
                           (hide-all-but 1)
                           (skeep)
                           (case "bounded_on_int?[a,b](hh)")
                           (("1"
                             (typepred "ff")
                             (expand "bounded_on_int?")
                             (skosimp*)
                             (inst + "M!1+M!2")
                             (skosimp*)
                             (inst - "x!1")
                             (inst - "x!1")
                             (grind))
                            ("2"
                             (hide 2)
                             (typepred "OE`space")
                             (expand "bounded_linear_subspace?")
                             (flatten)
                             (expand "funs_bounded?")
                             (inst - "hh"))))))
                        ("3"
                         (hide-all-but 1)
                         (skeep)
                         (case "bounded_on_int?[a,b](yy)")
                         (("1"
                           (typepred "ff")
                           (expand "bounded_on_int?")
                           (skosimp*)
                           (inst + "M!1+M!2")
                           (skosimp*)
                           (inst - "x!1")
                           (inst - "x!1")
                           (grind))
                          ("2"
                           (hide 2)
                           (typepred "OE`space")
                           (expand "bounded_linear_subspace?")
                           (flatten)
                           (expand "funs_bounded?")
                           (inst - "yy"))))))
                      ("3"
                       (hide-all-but 1)
                       (skeep)
                       (hide -)
                       (case "bounded_on_int?[a,b](yy)")
                       (("1"
                         (typepred "ff")
                         (expand "bounded_on_int?")
                         (skosimp*)
                         (inst + "M!1+M!2")
                         (skosimp*)
                         (inst - "x!1")
                         (inst - "x!1")
                         (grind))
                        ("2"
                         (hide 2)
                         (typepred "OE`space")
                         (expand "bounded_linear_subspace?")
                         (flatten)
                         (expand "funs_bounded?")
                         (inst - "yy"))))
                      ("4"
                       (hide-all-but 1)
                       (skeep)
                       (case "bounded_on_int?[a,b](hh)")
                       (("1"
                         (typepred "ff")
                         (expand "bounded_on_int?")
                         (skosimp*)
                         (inst + "M!1+M!2")
                         (skosimp*)
                         (inst - "x!1")
                         (inst - "x!1")
                         (grind))
                        ("2"
                         (hide 2)
                         (typepred "OE`space")
                         (expand "bounded_linear_subspace?")
                         (flatten)
                         (expand "funs_bounded?")
                         (inst - "hh"))))))
                    ("3"
                     (hide-all-but 1)
                     (skosimp*)
                     (typepred "funchoose(fq!1)")
                     (skosimp*)
                     (expand "Extspace")
                     (assert)
                     (split)
                     (("1"
                       (typepred "OE`space")
                       (expand "bounded_linear_subspace?")
                       (flatten)
                       (expand "funs_bounded?")
                       (inst - "funchoose(fq!1)")
                       (expand "bounded_on_int?")
                       (ground))
                      ("2" (inst + "funchoose(fq!1)" "ffc!1") (assert))))
                    ("4"
                     (hide-all-but 1)
                     (skosimp*)
                     (expand "Extspace")
                     (split)
                     (("1"
                       (expand "bounded_on_int?")
                       (typepred "OE`space")
                       (expand "bounded_linear_subspace?")
                       (flatten)
                       (expand "funs_bounded?")
                       (inst - "fq!1")
                       (assert)
                       (expand "bounded_on_int?")
                       (propax))
                      ("2"
                       (inst + "fq!1" "0")
                       (assert)
                       (decompose-equality +)
                       (grind))))))))))))))
          ("2"
           (skeep)
           (expand "nonempty?")
           (expand "empty?")
           (typepred "gg")
           (expand "Extspace" -1)
           (flatten)
           (skosimp*)
           (inst - "ffc!1")
           (expand "member")
           (inst + "rr!1")
           (assert))))
        ("2"
         (skeep)
         (expand "nonempty?")
         (expand "empty?")
         (typepred "gg")
         (expand "Extspace" -1)
         (flatten)
         (skosimp*)
         (inst - "rr!1")
         (expand "member" 1)
         (inst + "ffc!1")
         (assert))))))
    ("2"
     (hide 2)
     (hide 2)
     (typepred "OE`space")
     (expand "extend")
     (expand "fullset")
     (case "OE`space = (LAMBDA (t: [INTab->real]):
                                                                     IF ((OE`space))(t) THEN TRUE ELSE FALSE ENDIF)")
     (("1" (assert))
      ("2" (hide-all-but 1) (decompose-equality +) (lift-if) (propax))))
    ("3"
     (hide 2)
     (typepred "OE`Lop")
     (expand "bounded_linear_operator?")
     (ground))))


