# Proofs

proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "h!1")
   (expand "simple?")
   (flatten)
   (expand "sq")
   (lemma "prod_measurable" ("g1" "h!1" "g2" "h!1"))
   (expand "*")
   (expand "sq")
   (assert)
   (hide -1 -2)
   (lemma "finite_image[real,real]"
    ("f" "lambda y: y*y" "S" "image(h!1, fullset[T])"))
   (lemma "extensionality"
    ("a"
     "image[real, real](LAMBDA y: y * y, image[T,real](h!1, fullset[T]))"
     "b"
     "image[T,real](LAMBDA (x: T): h!1(x) * h!1(x), fullset[T])"))
   (split -1)
   (("1" (assert))
    ("2"
     (hide-all-but 1)
     (expand "fullset")
     (expand "image")
     (expand "member")
     (skosimp*)
     (split)
     (("1" (skosimp*) (typepred "x!2") (skosimp) (inst + "x!3") (assert))
      ("2" (skosimp*) (inst + "h!1(x!2)") (inst + "x!2"))))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "h1!1")
   (typepred "h2!1")
   (expand "simple?")
   (flatten)
   (hide -1 -3)
   (lemma
    "is_finite_cross[(fullset[(image(h1!1, fullset[T]))]),(fullset[(image(h2!1, fullset[T]))])]")
   (split -1)
   (("1"
     (lemma "finite_image[[real,real],real]"
      ("f"
       "lambda (x,y:real): x+y"
       "S"
       "fullset[[((fullset[(image(h1!1, fullset[T]))])),
                   ((fullset[(image(h2!1, fullset[T]))]))]]"))
     (("1"
       (case "subset?(image((+[T])(h1!1, h2!1), fullset[T]),image[[real, real], real](LAMBDA (x, y: real): x + y,
                             extend
                                 [[real, real],
                                  [((fullset[(image[T, real](h1!1, fullset[T]))])),
                                   ((fullset[(image[T, real](h2!1, fullset[T]))]))],
                                  bool, FALSE]
                                 (fullset
                                      [[((fullset[(image(h1!1, fullset[T]))])),
                                        ((fullset[(image(h2!1, fullset[T]))]))]])))")
       (("1"
         (lemma "finite_subset[real]"
          ("s"
           "image((+[T])(h1!1, h2!1), fullset[T])"
           "A"
           "image[[real, real], real]
                             (LAMBDA (x, y: real): x + y,
                              extend
                                  [[real, real],
                                   [((fullset[(image[T, real](h1!1, fullset[T]))])),
                                    ((fullset[(image[T, real](h2!1, fullset[T]))]))],
                                   bool, FALSE]
                                  (fullset
                                       [[((fullset[(image(h1!1, fullset[T]))])),
                                         ((fullset[(image(h2!1, fullset[T]))]))]]))"))
         (("1" (assert)) ("2" (propax))))
        ("2"
         (hide-all-but 1)
         (grind)
         (inst + "(h1!1(x!2),h2!1(x!2))")
         (prop)
         (("1" (inst + "x!2")) ("2" (inst + "x!2"))))))
      ("2"
       (hide -2 -3 2)
       (expand "extend")
       (expand "is_finite")
       (expand "is_finite_type")
       (skosimp*)
       (inst + "N!1" "g!1")
       (("1"
         (expand "restrict")
         (expand "injective?")
         (skosimp*)
         (inst - "x1!1" "x2!1")
         (assert))
        ("2" (skosimp) (typepred "x!1") (assert))))))
    ("2"
     (hide-all-but (-2 1))
     (expand "is_finite_type")
     (expand "is_finite")
     (skosimp)
     (inst + "N!1" "f!1")
     (expand "restrict")
     (expand "injective?")
     (skosimp*)
     (inst - "x1!1" "x2!1")
     (assert))
    ("3"
     (hide-all-but (-1 1))
     (expand "is_finite")
     (skosimp)
     (expand "is_finite_type")
     (inst + "N!1" "f!1")
     (expand "restrict")
     (expand "injective?")
     (skosimp*)
     (inst - "x1!1" "x2!1")
     (assert))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "h!1")
   (expand "simple?")
   (flatten)
   (hide -1)
   (lemma "finite_image[real,real]"
    ("f" "lambda y: c!1*y" "S" "image(h!1, fullset[T])"))
   (("1"
     (lemma "extensionality[real]"
      ("a"
       "image[real, real](LAMBDA y: c!1 * y, image[T,real](h!1, fullset[T]))"
       "b"
       "image[T,real](*[T](c!1, h!1), fullset[T])"))
     (split -1)
     (("1" (assert))
      ("2"
       (hide-all-but 1)
       (expand "fullset")
       (expand "image")
       (expand "member")
       (skosimp)
       (split)
       (("1"
         (skosimp*)
         (typepred "x!2")
         (skosimp)
         (inst + "x!3")
         (expand "*")
         (assert))
        ("2"
         (skosimp*)
         (expand "*")
         (inst + "h!1(x!2)")
         (inst + "x!2"))))))
    ("2" (propax))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "h!1")
   (expand "simple?")
   (flatten)
   (hide -1)
   (expand "fullset")
   (expand "image")
   (rewrite "is_finite_surj" -1 :dir rl)
   (rewrite "is_finite_surj" 1 :dir rl)
   (skosimp*)
   (inst + "N!1" "lambda (n:below[N!1]): -f!1(n)")
   (("1"
     (expand "surjective?")
     (skosimp)
     (inst - "-y!1")
     (("1" (skosimp) (inst + "x!1") (assert))
      ("2"
       (typepred "y!1")
       (skosimp)
       (expand "-")
       (inst + "x!1")
       (assert))))
    ("2"
     (skosimp)
     (typepred "f!1(n!1)")
     (skosimp)
     (inst + "x!1")
     (expand "-")
     (assert))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "simple_neg" ("h" "h2!1"))
   (lemma "simple_add" ("h1" "h1!1" "h2" "-h2!1"))
   (expand "+")
   (expand "-")
   (assert))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "h!1")
   (expand "simple?")
   (flatten)
   (hide -1)
   (expand "fullset")
   (expand "image")
   (rewrite "is_finite_surj" -1 :dir rl)
   (rewrite "is_finite_surj" 1 :dir rl)
   (skosimp)
   (inst + "N!1" "_")
   (inst + "lambda (n:below[N!1]): abs(f!1(n))")
   (("1"
     (expand "surjective?")
     (skosimp)
     (typepred "y!1")
     (skosimp)
     (expand "abs" -1)
     (replace -1)
     (inst - "h!1(x!1)")
     (("1" (skosimp) (inst + "x!2") (assert)) ("2" (inst + "x!1"))))
    ("2"
     (skosimp)
     (typepred "f!1(n!1)")
     (skosimp)
     (inst + "x!1")
     (assert)
     (expand "abs" 1 2)
     (assert))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "simple_add" ("h1" "h1!1" "h2" "h2!1"))
   (lemma "simple_diff" ("h1" "h1!1" "h2" "h2!1"))
   (lemma "simple_abs" ("h" "(-[T])(h1!1, h2!1)"))
   (lemma "simple_diff"
    ("h1" "(+[T])(h1!1, h2!1)" "h2" "abs((-[T])(h1!1, h2!1))"))
   (lemma "simple_scal"
    ("c"
     "1/2"
     "h"
     "(-[T])((+[T])(h1!1, h2!1), abs((-[T])(h1!1, h2!1)))"))
   (expand "*")
   (expand "-")
   (expand "+")
   (expand "abs" -1)
   (expand "min")
   (lemma "extensionality"
    ("f"
     "(LAMBDA (x: T):
                     h1!1(x) * (1 / 2) + h2!1(x) * (1 / 2) -
                      abs(h1!1(x) - h2!1(x)) * (1 / 2))"
     "g"
     "LAMBDA (x: T): min(h1!1(x), h2!1(x))"))
   (split -1)
   (("1" (assert)) ("2" (hide-all-but 1) (grind))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "simple_neg" ("h" "h1!1"))
   (lemma "simple_neg" ("h" "h2!1"))
   (lemma "simple_min" ("h1" "-h1!1" "h2" "-h2!1"))
   (lemma "simple_neg" ("h" "min(-h1!1,-h2!1)"))
   (expand "-")
   (expand "min")
   (expand "max")
   (case-replace
    "(LAMBDA (x_1: T): -min(-h1!1(x_1), -h2!1(x_1)))=(LAMBDA (x: T): max(h1!1(x), h2!1(x)))")
   (apply-extensionality :hide? t)
   (hide-all-but 1)
   (grind))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand "maximum" 1) (propax))
    ("2"
     (skosimp*)
     (expand "maximum" 1)
     (inst - "v!1")
     (rewrite "simple_max"))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand "minimum" 1) (propax))
    ("2"
     (skosimp*)
     (expand "minimum" 1)
     (inst - "v!1")
     (rewrite "simple_min"))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "simple_const" ("c" "0"))
   (expand "const_fun")
   (lemma "simple_max" ("h1" "h!1" "h2" "LAMBDA (x: T): 0"))
   (("1" (expand "plus") (expand "max" -) (propax)) ("2" (propax))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "simple_const" ("c" "0"))
   (expand "const_fun")
   (lemma "simple_min" ("h1" "h!1" "h2" "LAMBDA (x: T): 0"))
   (("1"
     (expand "minus")
     (expand "min" -1)
     (lemma "simple_neg" ("h" "LAMBDA (x_1: T): min(h!1(x_1), 0)"))
     (("1" (expand "-") (propax)) ("2" (propax))))
    ("2" (propax))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "simple_add" ("h1" "h1!1" "h2" "h2!1"))
   (lemma "simple_diff" ("h1" "h1!1" "h2" "h2!1"))
   (lemma "simple_sq" ("h" "(+[T])(h1!1, h2!1)"))
   (lemma "simple_sq" ("h" "(-[T])(h1!1, h2!1)"))
   (lemma "simple_diff"
    ("h1" "sq[T]((+[T])(h1!1, h2!1))" "h2" "sq[T]((-[T])(h1!1, h2!1))"))
   (lemma "simple_scal"
    ("c"
     "1/4"
     "h"
     "(-[T])(sq[T]((+[T])(h1!1, h2!1)), sq[T]((-[T])(h1!1, h2!1)))"))
   (lemma "extensionality"
    ("f"
     "*[T]
                       (1 / 4,
                        (-[T])
                            (sq[T]((+[T])(h1!1, h2!1)),
                             sq[T]((-[T])(h1!1, h2!1))))"
     "g"
     "*[T](h1!1, h2!1)"))
   (split -1)
   (("1" (assert)) ("2" (hide-all-but 1) (grind))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem + ("h!1" "_"))
   (induct "n")
   (("1" (expand "expt") (expand "expt") (rewrite "simple_const"))
    ("2"
     (skosimp)
     (expand "expt" 1)
     (lemma "simple_times" ("h1" "h!1" "h2" "expt[T](h!1, j!1)"))
     (("1" (expand "*" -1) (expand "expt" -1) (expand "expt" 1) (propax))
      ("2" (propax))))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "simple?")
   (typepred "h!1")
   (typepred "a!1")
   (lemma "expt_measurable" ("g" "h!1" "a" "a!1"))
   (("1"
     (replace -1)
     (hide -1)
     (expand "nn_simple?")
     (flatten)
     (expand "simple?")
     (flatten)
     (hide -4 -1)
     (expand "fullset")
     (expand "image")
     (lemma "finite_image[nnreal,real]"
      ("f"
       "lambda (x:nnreal): x^a!1"
       "S"
       "{y: nnreal | EXISTS (x_1: ({x: T | TRUE})): y = h!1(x_1)}"))
     (("1"
       (hide -4)
       (expand "image")
       (case-replace
        "{y_1: real |
                      EXISTS (x_1:
                                ({y: nnreal |
                                    EXISTS (x_1: ({x: T | TRUE})): y = h!1(x_1)})):
                        y_1 = x_1 ^ a!1}={y: real |
                           EXISTS (x_1: ({x: T | TRUE})):
                             y = (^[T](h!1, a!1))(x_1)}")
       (("1"
         (hide -1 2)
         (apply-extensionality :hide? t)
         (("1"
           (case-replace
            "EXISTS (x_1: ({x: T | TRUE})): x!1 = ^[T](h!1, a!1)(x_1)")
           (("1"
             (skosimp)
             (expand "^" -1)
             (inst + "h!1(x!2)")
             (split)
             (("1" (inst - "x!2") (assert)) ("2" (inst + "x!2"))))
            ("2"
             (replace 1 2)
             (assert)
             (skosimp)
             (typepred "x!2")
             (skosimp)
             (replace -2)
             (expand "^" 1)
             (replace -3)
             (inst + "x!3"))
            ("3" (hide 2) (skosimp) (skosimp) (inst - "x1!1") (assert))))
          ("2" (skosimp) (skosimp) (inst - "x1!1") (assert))))
        ("2" (hide -1 2) (skosimp) (skosimp) (inst - "x1!1") (assert))))
      ("2"
       (hide 2)
       (expand "is_finite")
       (skosimp)
       (inst + "N!1" "f!1")
       (expand "restrict")
       (expand "injective?")
       (skosimp)
       (inst - "x1!1" "x2!1")
       (assert))))
    ("2"
     (expand "nn_simple?")
     (expand "simple?")
     (expand "nn_measurable?")
     (flatten)
     (replace -3)
     (propax))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "simple?")
   (split)
   (("1"
     (rewrite "measurable_def2")
     (skosimp)
     (expand "phi")
     (expand "inverse_image")
     (expand "member")
     (case "i!1(0)")
     (("1"
       (case "i!1(1)")
       (("1"
         (assert)
         (lemma "measurable_fullset")
         (expand "fullset")
         (expand "measurable_set?")
         (propax))
        ("2"
         (assert)
         (lemma "measurable_complement" ("a" "X!1"))
         (("1"
           (case-replace
            "{x_1: T | IF X!1(x_1) THEN FALSE ELSE TRUE ENDIF}=complement[T](X!1)")
           (("1" (expand "measurable_set?") (propax))
            ("2"
             (hide-all-but 1)
             (apply-extensionality :hide? t)
             (grind))))
          ("2" (expand "measurable_set?") (propax))))))
      ("2"
       (case "i!1(1)")
       (("1"
         (case-replace
          "{x_1: T | IF X!1(x_1) THEN i!1(1) ELSE i!1(0) ENDIF}= X!1")
         (("1" (assert))
          ("2" (hide 3) (apply-extensionality :hide? t) (grind))))
        ("2"
         (assert)
         (lemma "measurable_emptyset")
         (expand "emptyset")
         (expand "measurable_set?")
         (propax))))))
    ("2"
     (lemma "finite_subset[real]")
     (inst - "add[real](1,singleton[real](0))"
      "image[T,real](phi(X!1), fullset[T])")
     (split -1)
     (("1" (propax)) ("2" (hide 2) (grind))))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "bounded_measurable?")
   (split)
   (("1" (expand "bounded?") (inst + "0") (grind))
    ("2"
     (lemma "const_measurable" ("c" "0"))
     (expand "const_fun")
     (propax))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + ("F"))
   (typepred "F")
   (expand "bounded_measurable?")
   (split)
   (("1"
     (expand "bounded?")
     (expand "simple?")
     (flatten)
     (hide -1)
     (name "CC" "image[T,real](abs[T](F),fullset[T])")
     (typepred "sup(CC)")
     (("1"
       (expand "least_upper_bound")
       (flatten)
       (case "exists x: true")
       (("1"
         (inst + "sup(CC)")
         (("1"
           (skolem! +)
           (expand "upper_bound")
           (inst - "abs(F(x!1))")
           (expand "CC" 1)
           (expand "fullset")
           (expand "image")
           (inst + "x!1")
           (expand "abs" 1 2)
           (propax))
          ("2"
           (expand "upper_bound")
           (skosimp)
           (inst - "abs(F(x!1))")
           (("1" (typepred "abs(F(x!1))") (assert))
            ("2"
             (expand "CC")
             (expand "fullset")
             (expand "image")
             (inst + "x!1")
             (expand "abs" 1 2)
             (propax))))))
        ("2" (inst 2 "0") (skosimp) (inst + "x!1"))))
      ("2"
       (split 1)
       (("1"
         (expand "nonempty?")
         (expand "empty?")
         (expand "member")
         (case "exists x: true")
         (("1"
           (skosimp)
           (inst - "abs(F(x!1))")
           (expand "CC")
           (expand "fullset")
           (expand "image")
           (inst + "x!1")
           (hide-all-but 1)
           (expand "abs" 1 2)
           (propax))
          ("2" (inst 2 "0") (skosimp) (inst + "x!1"))))
        ("2"
         (hide 2)
         (case "forall (X:finite_set[real]): above_bounded[real](X)")
         (("1"
           (inst - "CC")
           (lemma "finite_image[real,real]")
           (inst - "image(F, fullset[T])" "abs")
           (case-replace
            "image[real, real](abs, image(F, fullset[T]))=CC")
           (hide-all-but 1)
           (apply-extensionality :hide? t)
           (expand "CC")
           (expand "fullset")
           (expand "image")
           (expand "abs" 1 2)
           (case-replace
            "EXISTS (x_1: ({x: T | TRUE})): x!1 = abs(F(x_1))")
           (("1" (skosimp) (inst + "F(x!2)") (inst + "x!2"))
            ("2"
             (replace 1 2)
             (assert)
             (skosimp)
             (typepred "x!2")
             (skosimp)
             (inst + "x!3")
             (assert))))
          ("2"
           (hide-all-but 1)
           (case " FORALL (X: finite_set[real],n:nat): card(X)=n => above_bounded[real](X)")
           (("1" (skosimp) (inst - "X!1" "card(X!1)"))
            ("2"
             (hide 2)
             (induct "n")
             (("1"
               (skosimp*)
               (rewrite "card_empty?")
               (expand "above_bounded")
               (inst + "0")
               (expand "upper_bound")
               (skosimp)
               (expand "empty?")
               (inst - "z!1")
               (assert))
              ("2"
               (skosimp*)
               (lemma "nonempty_card[real]" ("S" "X!1"))
               (assert)
               (lemma "choose_rest[real]" ("a" "X!1"))
               (expand "nonempty?")
               (assert)
               (lemma "card_rest[real]" ("S" "X!1"))
               (replace -4)
               (assert)
               (inst - "rest[real](X!1)")
               (assert)
               (expand "above_bounded")
               (skosimp)
               (inst + "max(choose[real](X!1),n!1)")
               (expand "upper_bound")
               (skosimp)
               (typepred "z!1")
               (replace -3 -1 rl)
               (expand "add" -1)
               (split -1)
               (("1" (replace -1) (hide-all-but 2) (grind))
                ("2"
                 (inst -4 "z!1")
                 (("1"
                   (name-replace "DRL1" "choose[real](X!1)")
                   (hide-all-but (-4 2))
                   (grind))
                  ("2" (assert))))))))))))))))
    ("2" (expand "simple?") (flatten))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "simple_const" ("c" "0"))
   (expand "const_fun")
   (expand "increasing_nn_simple?")
   (expand "nn_simple?")
   (split)
   (("1" (skosimp)) ("2" (hide -1) (grind))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "sup_norm_simple" ("p" "p!1"))
   (skosimp)
   (expand "nonempty?")
   (expand "empty?")
   (inst -3 "h!1")
   (expand "member")
   (replace -2 1)
   (propax))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "nn_simple_approx_TCC1" ("p" "p!1"))
   (lemma "choose_member"
    ("a"
     "{h |
                              (FORALL x: 0 <= h(x) & h(x) <= p!1(x)) AND
                               sup_norm[T]((-[T])(p!1, h)) <=
                                sup_norm[T](p!1) / 2}"))
   (expand "nonempty?")
   (assert)
   (expand "nn_simple?")
   (skosimp)
   (inst - "x!1")
   (flatten))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (hide -1)
   (expand "nn_simple_approx")
   (case "nonempty?({h |
                          (FORALL x: 0 <= h(x) & h(x) <= p!1(x)) AND
                           sup_norm(p!1 - h) <= sup_norm(p!1) / 2})")
   (("1"
     (lemma "choose_member"
      ("a"
       "({h |
                        (FORALL x: 0 <= h(x) & h(x) <= p!1(x)) AND
                         sup_norm(p!1 - h) <= sup_norm(p!1) / 2})"))
     (split -1)
     (("1"
       (name-replace "HH"
        "choose({h |
                         (FORALL x: 0 <= h(x) & h(x) <= p!1(x)) AND
                          sup_norm(p!1 - h) <= sup_norm(p!1) / 2})")
       (expand "member")
       (flatten)
       (inst - "x!1"))
      ("2" (expand "nonempty?") (propax))))
    ("2"
     (hide 2)
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (lemma "sup_norm_simple" ("p" "p!1"))
     (skosimp)
     (inst -3 "h!1")
     (replace -2)
     (propax))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "p!1")
   (typepred "nn_simple_approx(p!1)")
   (expand "nn_bounded_measurable?")
   (lemma "simple_is_bounded_measurable")
   (inst - "nn_simple_approx(p!1)")
   (flatten)
   (expand "bounded_measurable?")
   (flatten)
   (skosimp)
   (expand "-" 2)
   (name "DRL1" " nn_simple_approx(p!1)")
   (replace -1)
   (hide-all-but (-1 -7 1 2))
   (expand "nn_simple_approx")
   (case "nonempty?({h |
                         (FORALL x: 0 <= h(x) & h(x) <= p!1(x)) AND
                          sup_norm(p!1 - h) <= sup_norm(p!1) / 2})")
   (("1"
     (lemma "choose_member"
      ("a"
       "{h |
                       (FORALL x: 0 <= h(x) & h(x) <= p!1(x)) AND
                        sup_norm(p!1 - h) <= sup_norm(p!1) / 2}"))
     (expand "nonempty?")
     (replace 1)
     (replace -2)
     (expand "member")
     (flatten)
     (hide -3 1)
     (inst - "x!1")
     (flatten)
     (assert))
    ("2"
     (hide-all-but (1 2 -2))
     (lemma "sup_norm_simple" ("p" "p!1"))
     (skosimp)
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (inst -3 "h!1")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (typepred "v!1((-[T])(p!1, nn_simple_approx(p!1)))(n!1-1)")
   (("1"
     (inst - "x!1")
     (flatten)
     (assert)
     (name-replace "DRL1"
      "v!1((-[T])(p!1, nn_simple_approx(p!1)))(n!1 - 1)(x!1)")
     (typepred "nn_simple_approx(p!1)")
     (expand "nn_simple?")
     (flatten)
     (inst - "x!1")
     (assert)
     (expand "-" -5)
     (assert))
    ("2"
     (hide 3)
     (lemma "nn_simple_sequence_TCC2" ("p" "p!1" "n" "n!1"))
     (assert))
    ("3" (assert))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: measure_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (skosimp)
   (typepred "w!1")
   (expand "increasing_nn_simple?")
   (flatten)
   (inst - "x1!1")
   (expand "nn_simple?")
   (flatten)
   (lemma "simple_is_bounded_measurable")
   (inst - "w!1(x1!1)")
   (expand "bounded_measurable?")
   (propax))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "g!1")
   (expand "measurable_function?")
   (lemma "singleton_is_borel" ("x" "0"))
   (lemma "fullset_is_borel[real,metric_induced_topology]")
   (lemma "difference_is_borel[real,metric_induced_topology]"
    ("a" "fullset[real]" "b" "singleton[real](0)"))
   (("1"
     (inst - "difference[real](fullset[real], singleton[real](0))")
     (expand "measurable_set?")
     (case-replace
      "inverse_image(g!1,
                            difference[real](fullset[real], singleton[real](0))) = nonzero_set?(g!1)")
     (hide-all-but 1)
     (apply-extensionality :hide? t)
     (expand "nonzero_set?")
     (expand "singleton")
     (expand "fullset")
     (expand "difference")
     (expand "member")
     (expand "inverse_image")
     (expand "member")
     (expand "/=")
     (propax))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "X!1")
   (apply-extensionality 1 :hide? t)
   (expand "nonzero_set?")
   (expand "phi")
   (expand "member")
   (case-replace "X!1(x!1)")
   (("1" (assert)) ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "isf?")
   (lemma "simple_const" ("c" "0"))
   (replace -1)
   (hide -1)
   (expand "nonzero_set?")
   (expand "mu_fin?")
   (lemma "m_emptyset")
   (expand "emptyset")
   (replace -1)
   (assert))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (case "FORALL (P: pred[isf], i1: isf, n:nat): card[real](image[T,real](i1,nonzero_set?(i1)))=n =>
                 (P(lambda x: 0) AND
                   (FORALL c, E, i: P(i) IMPLIES P(c * phi(E) + i)))
                  IMPLIES P(i1)")
   (("1"
     (skosimp)
     (inst - "P!1" "i1!1"
      "card[real](image[T,real](i1!1,nonzero_set?(i1!1)))")
     (("1" (assert))
      ("2"
       (typepred "i1!1")
       (expand "isf?")
       (expand "simple?")
       (flatten)
       (lemma "finite_subset[real]"
        ("s"
         "image[T, real](i1!1, nonzero_set?(i1!1))"
         "A"
         "image(i1!1, fullset[T])"))
       (("1"
         (split -1)
         (("1" (propax))
          ("2"
           (hide-all-but 1)
           (expand "nonzero_set?")
           (expand "fullset")
           (expand "image")
           (expand "subset?")
           (expand "member")
           (skosimp*)
           (typepred "x!2")
           (inst + "x!2"))))
        ("2" (propax))))))
    ("2"
     (hide 2)
     (induct "n")
     (("1"
       (skosimp*)
       (rewrite "card_empty?[real]")
       (case "empty?(nonzero_set?(i1!1))")
       (("1"
         (case-replace "i1!1=lambda x: 0")
         (apply-extensionality 1 :hide? t)
         (expand "empty?")
         (inst - "x!1")
         (expand "nonzero_set?")
         (expand "member")
         (assert))
        ("2"
         (expand "empty?")
         (skosimp)
         (expand "member")
         (inst - "i1!1(x!1)")
         (expand "nonzero_set?")
         (expand "image")
         (inst + "x!1"))))
      ("2"
       (skosimp*)
       (inst - "P!1" "_")
       (replace -3)
       (replace -4 -1)
       (lemma "nonempty_card[real]"
        ("S" "image[T, real](i1!1, nonzero_set?(i1!1))"))
       (assert)
       (lemma "choose_rest[real]"
        ("a" "image[T, real](i1!1, nonzero_set?(i1!1))"))
       (lemma "choose_member[real]"
        ("a" "image[T, real](i1!1, nonzero_set?(i1!1))"))
       (name-replace "CC"
        "choose[real](image[T, real](i1!1, nonzero_set?(i1!1)))")
       (expand "nonempty?")
       (replace 1 *)
       (expand "member" -1)
       (copy -1)
       (expand "nonzero_set?" -1)
       (expand "image" -1)
       (skosimp)
       (typepred "x!1")
       (replace -2 -1 rl)
       (hide -2)
       (name "EE" "inverse_image[T,real](i1!1,singleton[real](CC))")
       (typepred "i1!1")
       (expand "isf?")
       (expand "simple?")
       (flatten)
       (expand "measurable_function?")
       (lemma "singleton_is_borel[real,metric_induced_topology]"
        ("x" "CC"))
       (inst - "singleton[real](CC)")
       (replace -5)
       (lemma "card_rest[real]"
        ("S" "image[T, real](i1!1, nonzero_set?(i1!1))"))
       (replace -10)
       (assert)
       (name "EEC" "difference(nonzero_set?(i1!1),EE)")
       (case "measurable_set?(EEC)")
       (("1"
         (case "subset?(EE,nonzero_set?(i1!1))")
         (("1"
           (case "mu_fin?(EE)")
           (("1"
             (case "mu_fin?(EEC)")
             (("1"
               (lemma "isf_phi" ("E" "EE"))
               (("1"
                 (lemma "isf_phi" ("E" "EEC"))
                 (("1"
                   (lemma "isf_prod" ("i1" "phi(EEC)" "i2" "i1!1"))
                   (("1"
                     (lemma "isf_scal" ("c" "CC" "i" "phi(EE)"))
                     (("1"
                       (lemma "isf_add"
                        ("i1"
                         "*[T](CC, phi(EE))"
                         "i2"
                         "*[T](phi(EEC), i1!1)"))
                       (("1"
                         (lemma "extensionality"
                          ("f"
                           "i1!1"
                           "g"
                           "(+[T])(*[T](CC, phi(EE)), *[T](phi(EEC), i1!1))"))
                         (expand "phi" -1 1)
                         (expand "phi" -1 1)
                         (expand "+" -1 1)
                         (expand "*" -1 1)
                         (expand "*" -1 2)
                         (expand "member")
                         (split -1)
                         (("1"
                           (inst -20 "*[T](phi(EEC), i1!1)")
                           (split -20)
                           (("1"
                             (inst -23 "CC" "EE" "*[T](phi(EEC), i1!1)")
                             (assert))
                            ("2"
                             (case-replace
                              "image[T, real]
                                             (*[T](phi(EEC), i1!1), nonzero_set?(*[T](phi(EEC), i1!1))) = rest[real](image[T, real](i1!1, nonzero_set?(i1!1)))")
                             (hide 2 5 -21 -22)
                             (expand "rest" 1)
                             (reveal -6)
                             (replace -1)
                             (apply-extensionality 1 :hide? t)
                             (expand "remove")
                             (expand "EEC")
                             (expand "phi")
                             (expand "*" 1)
                             (expand "difference")
                             (expand "member")
                             (expand "nonzero_set?")
                             (expand "image")
                             (case-replace "x!2=CC")
                             (("1"
                               (assert)
                               (skosimp*)
                               (typepred "x!3")
                               (case-replace "i1!1(x!3)=0")
                               (("1" (assert))
                                ("2"
                                 (assert)
                                 (case-replace "EE(x!3)")
                                 (("1" (assert))
                                  ("2"
                                   (assert)
                                   (expand "EE")
                                   (expand "singleton")
                                   (expand "inverse_image")
                                   (expand "member")
                                   (assert))))))
                              ("2"
                               (assert)
                               (case-replace
                                "EXISTS (x_1: ({x | i1!1(x) /= 0})): x!2 = i1!1(x_1)")
                               (("1"
                                 (hide -3 -4 -5-6 -7 -8 -9 -10 -20 -21)
                                 (skosimp)
                                 (typepred "x!3")
                                 (inst + "x!3")
                                 (("1"
                                   (assert)
                                   (case-replace "EE(x!3)")
                                   (("1"
                                     (expand "EE")
                                     (expand "singleton")
                                     (expand "inverse_image")
                                     (expand "member")
                                     (assert))
                                    ("2" (assert))))
                                  ("2"
                                   (expand "EE")
                                   (expand "singleton")
                                   (expand "inverse_image")
                                   (expand "member")
                                   (assert))))
                                ("2"
                                 (replace 1 3)
                                 (assert)
                                 (hide
                                  -3
                                  -4
                                  -5
                                  -6
                                  -7
                                  -8
                                  -9
                                  -10
                                  -13
                                  -14
                                  -15
                                  -17
                                  -21
                                  -22)
                                 (skosimp*)
                                 (hide -2 -8)
                                 (case-replace "EE(x!3)")
                                 (("1"
                                   (expand "EE")
                                   (expand "singleton")
                                   (expand "inverse_image")
                                   (expand "member")
                                   (typepred "x!3")
                                   (assert)
                                   (expand "EE")
                                   (expand "singleton")
                                   (expand "inverse_image")
                                   (expand "member")
                                   (assert))
                                  ("2"
                                   (assert)
                                   (expand "EE")
                                   (expand "singleton")
                                   (expand "inverse_image")
                                   (expand "member")
                                   (typepred "x!3")
                                   (expand "EE")
                                   (assert)
                                   (case-replace "i1!1(x!3)=0")
                                   (("1" (assert))
                                    ("2"
                                     (assert)
                                     (inst + "x!3")
                                     (assert))))))))))))
                          ("2"
                           (skosimp)
                           (case-replace "EE(x!2)")
                           (("1"
                             (expand "EEC")
                             (expand "nonzero_set?")
                             (expand "difference")
                             (expand "member")
                             (assert)
                             (hide-all-but (-1 1 2))
                             (expand "EE")
                             (expand "singleton")
                             (expand "inverse_image")
                             (expand "member")
                             (propax))
                            ("2"
                             (assert)
                             (expand "EEC")
                             (expand "nonzero_set?")
                             (expand "difference")
                             (expand "member")
                             (case-replace "i1!1(x!2) = 0")
                             (("1" (assert)) ("2" (assert))))))))
                        ("2" (propax)) ("3" (propax))))
                      ("2" (propax))))
                    ("2" (propax))))
                  ("2" (propax))))
                ("2" (propax))))
              ("2"
               (lemma "m_monotone" ("a" "EEC" "b" "nonzero_set?(i1!1)"))
               (split -1)
               (("1" (expand "x_le") (expand "mu_fin?") (assert))
                ("2" (expand "EEC") (rewrite "difference_subset"))))
              ("3" (propax))))
            ("2"
             (lemma "m_monotone" ("a" "EE" "b" "nonzero_set?(i1!1)"))
             (assert)
             (expand "x_le")
             (expand "mu_fin?")
             (assert))))
          ("2"
           (hide-all-but (1 -8 2))
           (expand "nonzero_set?")
           (expand "EE")
           (hide -1)
           (expand "singleton")
           (expand "inverse_image")
           (expand "subset?")
           (expand "member")
           (skosimp*)
           (assert))))
        ("2"
         (hide-all-but (-4 -5 -6 1 -1))
         (lemma "nonzero_measurable" ("g" "i1!1"))
         (expand "measurable_set?")
         (lemma "sigma_algebra_difference"
          ("x" "nonzero_set?(i1!1)" "y" "EE"))
         (("1" (assert)) ("2" (propax)) ("3" (propax))))))
      ("3" (skosimp) (rewrite "isf_zero"))
      ("4"
       (skosimp*)
       (typepred "i1!1")
       (expand "isf?")
       (expand "simple?")
       (flatten)
       (lemma "finite_subset[real]"
        ("s"
         "image[T, real](i1!1, nonzero_set?(i1!1))"
         "A"
         "image(i1!1, fullset[T])"))
       (("1"
         (split -1)
         (("1" (propax))
          ("2"
           (hide-all-but 1)
           (expand "fullset")
           (expand "nonzero_set?")
           (expand "image")
           (expand "subset?")
           (expand "member")
           (skosimp*)
           (inst + "x!2"))))
        ("2" (propax))))))
    ("3" (hide 2) (skosimp) (rewrite "isf_zero"))
    ("4"
     (hide 2)
     (skosimp)
     (typepred "i1!1")
     (expand "isf?")
     (expand "simple?")
     (flatten)
     (lemma "finite_subset[real]"
      ("s"
       "image[T, real](i1!1, nonzero_set?(i1!1))"
       "A"
       "image(i1!1, fullset[T])"))
     (("1"
       (split -1)
       (("1" (propax))
        ("2"
         (hide-all-but 1)
         (expand "fullset")
         (expand "nonzero_set?")
         (expand "image")
         (expand "subset?")
         (expand "member")
         (skosimp*)
         (inst + "x!2"))))
      ("2" (propax))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "isf?")
   (split)
   (("1"
     (flatten)
     (rewrite "simple_def2")
     (skosimp)
     (inst + "P!1")
     (expand "finite_partition_of?")
     (skosimp)
     (typepred "E!1")
     (expand "every")
     (inst - "E!1")
     (inst - "E!1")
     (replace -2)
     (replace -3)
     (flatten)
     (lemma "m_monotone" ("a" "E!1" "b" "nonzero_set?(f!1)"))
     (split -1)
     (("1"
       (expand "mu_fin?")
       (expand "x_le")
       (replace -5)
       (replace 3)
       (propax))
      ("2"
       (expand "subset?")
       (skosimp)
       (expand "member")
       (expand "nonzero_set?")
       (expand "constant_over?")
       (skosimp)
       (inst-cp - "choose(E!1)")
       (inst - "x!1")
       (assert))))
    ("2"
     (skosimp*)
     (typepred "p!1")
     (case-replace "simple?(f!1)")
     (("1"
       (expand "finite_partition_of?")
       (name "PP"
             "{x: set[T] | S(x)& p!1(x) & nonempty?(x) & f!1(choose(x)) /= 0}")
       (case "forall (x:(PP)): S(x) & p!1(x)& nonempty?(x) & f!1(choose(x)) /= 0")
       (("1"
         (hide -2)
         (case "forall (p:setofsets[T],n:nat): subset?(p,PP) & card(p) = n => mu_fin?(Union(p))")
         (("1"
           (inst - "PP" "card(PP)")
           (("1"
             (split -1)
             (("1"
               (case-replace "Union(PP)=nonzero_set?(f!1)")
               (hide -1 2)
               (apply-extensionality :hide? t)
               (expand "nonzero_set?")
               (case-replace "f!1(x!1)=0")
               (("1"
                 (assert)
                 (expand "Union")
                 (skosimp)
                 (typepred "a!1")
                 (expand "PP")
                 (flatten)
                 (inst -9 "a!1")
                 (flatten)
                 (expand "constant_over?")
                 (skosimp)
                 (inst-cp -10 "x!1")
                 (inst -10 "choose(a!1)")
                 (assert))
                ("2"
                 (assert)
                 (expand "Union")
                 (expand "finite_partition?")
                 (expand "fullset")
                 (expand "partition?")
                 (flatten)
                 (lemma "extensionality_postulate"
                  ("f" "Union(p!1)" "g" "({x: T | TRUE})"))
                 (replace -1 -4 rl)
                 (hide -1)
                 (inst -3 "x!1")
                 (expand "Union")
                 (skosimp)
                 (typepred "a!1")
                 (inst -7 "a!1")
                 (flatten)
                 (inst + "a!1")
                 (expand "PP")
                 (assert)
                 (case-replace "nonempty?(a!1)")
                 (("1"
                   (assert)
                   (expand "/=")
                   (expand "constant_over?")
                   (skosimp)
                   (inst-cp -10 "x!1")
                   (inst -10 "choose(a!1)")
                   (assert))
                  ("2"
                   (hide 2)
                   (expand "nonempty?")
                   (expand "empty?")
                   (inst - "x!1")
                   (assert))))))
              ("2" (hide-all-but 1) (grind))))
            ("2"
             (expand "finite_partition?")
             (flatten)
             (lemma "finite_subset[set[T]]" ("s" "PP" "A" "p!1"))
             (("1"
               (assert)
               (expand "subset?")
               (skosimp)
               (expand "member")
               (inst - "x!1")
               (flatten))
              ("2" (propax))))))
          ("2"
           (hide 2)
           (induct "n")
           (("1"
             (skosimp)
             (rewrite "card_is_0[set[T]]")
             (replace -2)
             (lemma "Union_empty" ("A" "emptyset[set[T]]"))
             (expand "emptyset" -1 2)
             (expand "empty?" -1 2)
             (expand "member")
             (rewrite "emptyset_is_empty?" -1)
             (replace -1)
             (lemma "m_emptyset")
             (expand "mu_fin?")
             (assert))
            ("2"
             (skosimp*)
             (lemma "nonempty_card[set[T]]" ("S" "p!2"))
             (assert)
             (expand "nonempty?")
             (lemma "choose_rest[set[T]]" ("a" "p!2"))
             (assert)
             (lemma "card_rest[set[T]]" ("S" "p!2"))
             (assert)
             (replace -5)
             (assert)
             (inst - "rest(p!2)")
             (assert)
             (split -3)
             (("1"
               (case-replace
                "Union(p!2)=union(choose(p!2),Union(rest(p!2)))")
               (("1"
                 (hide -1)
                 (expand "subset?")
                 (inst - "choose(p!2)")
                 (assert)
                 (inst - "choose(p!2)")
                 (flatten)
                 (inst - "choose(p!2)")
                 (flatten)
                 (replace 4)
                 (replace 3)
                 (lemma "m_union"
                  ("a" "choose(p!2)" "b" "Union(rest(p!2))"))
                 (expand "x_add")
                 (expand "x_le")
                 (expand "mu_fin?")
                 (assert))
                ("2"
                 (hide 3 -1)
                 (apply-extensionality 1 :hide? t)
                 (case-replace "Union(p!2)(x!1)")
                 (("1"
                   (expand "union")
                   (expand "member")
                   (flatten)
                   (expand "Union")
                   (skosimp)
                   (typepred "a!1")
                   (replace -4 -1 rl)
                   (expand "add")
                   (expand "member")
                   (split -1)
                   (("1" (replace -1) (propax)) ("2" (inst + "a!1"))))
                  ("2"
                   (replace 1 2)
                   (assert)
                   (expand "union")
                   (expand "member")
                   (expand "Union")
                   (split -1)
                   (("1" (inst + "choose(p!2)"))
                    ("2"
                     (skosimp)
                     (inst + "a!1")
                     (typepred "a!1")
                     (lemma "rest_subset" ("a" "p!2"))
                     (expand "subset?")
                     (inst - "a!1")
                     (assert))))))))
              ("2"
               (expand "subset?")
               (skosimp)
               (expand "member")
               (lemma "rest_subset" ("a" "p!2"))
               (expand "subset?")
               (inst - "x!1")
               (assert)
               (inst - "x!1")
               (assert))))
            ("3"
             (skosimp)
             (hide 2)
             (rewrite "measurable_Union")
             (split)
             (("1"
               (skosimp)
               (expand "subset?")
               (inst - "x!1")
               (assert)
               (inst - "x!1")
               (flatten))
              ("2"
               (hide 2)
               (lemma "finite_countable[set[T]]" ("x" "p!2"))
               (expand "is_countable")
               (propax))))
            ("4"
             (skosimp)
             (lemma "finite_subset[set[T]]" ("s" "p!2" "A" "p!1"))
             (("1"
               (assert)
               (expand "subset?")
               (skosimp)
               (expand "member")
               (inst - "x!1")
               (assert)
               (inst - "x!1")
               (flatten))
              ("2" (expand "finite_partition?") (flatten))))))
          ("3"
           (skosimp)
           (lemma "measurable_Union" ("M" "p!2"))
           (("1"
             (expand "restrict")
             (expand "Union")
             (case-replace
              "{x: T | EXISTS (a: (LAMBDA (s: (S)): p!2(s))): a(x)}={x: T | EXISTS (a: (p!2)): a(x)}")
             (hide -1 2 3)
             (apply-extensionality 1 :hide? t)
             (case-replace "EXISTS (a: (p!2)): a(x!1)")
             (("1"
               (skosimp)
               (inst + "a!1")
               (typepred "a!1")
               (expand "subset?")
               (inst - "a!1")
               (assert)
               (inst - "a!1")
               (flatten))
              ("2"
               (replace 1 2)
               (assert)
               (skosimp)
               (typepred "a!1")
               (inst + "a!1"))))
            ("2"
             (hide 2 3)
             (expand "finite_partition?")
             (flatten)
             (expand "restrict")
             (case "is_countable[set[T]](p!2)")
             (("1" (expand "is_countable") (skosimp) (inst + "f!2"))
              ("2"
               (hide 2)
               (lemma "finite_countable[set[T]]" ("x" "p!2"))
               (propax))))))
          ("4"
           (skosimp)
           (hide 2)
           (expand "finite_partition?")
           (flatten)
           (lemma "finite_subset[set[T]]" ("s" "p!2" "A" "p!1"))
           (("1"
             (split -1)
             (("1" (propax))
              ("2"
               (hide 2)
               (expand "subset?")
               (skosimp)
               (expand "member")
               (inst - "x!1")
               (inst - "x!1")
               (("1" (assert)) ("2" (assert))))))
            ("2" (propax))))))
        ("2" (skosimp) (typepred "x!1") (expand "PP") (propax))))
      ("2"
       (hide 2)
       (rewrite "simple_def2")
       (inst + "p!1")
       (expand "finite_partition_of?")
       (split)
       (("1" (expand "every") (skosimp) (inst - "x!1") (flatten))
        ("2" (expand "every") (skosimp) (inst - "x!1") (flatten))))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "isf_integral")
   (case "empty?(fullset[T])")
   (("1"
     (case-replace
      "image[T, real](phi(E!1), fullset[T]) = emptyset[real]")
     (("1"
       (rewrite "sigma_empty")
       (("1"
         (typepred "E!1")
         (rewrite "extensionality_postulate" -3 :dir rl)
         (expand "emptyset")
         (expand "fullset")
         (expand "image")
         (expand "phi")
         (expand "member")
         (expand "empty?")
         (expand "member")
         (case-replace "E!1=emptyset[T]")
         (("1"
           (typepred "m")
           (expand "measure?")
           (flatten)
           (expand "emptyset")
           (expand "mu")
           (assert)
           (expand "measure_empty?")
           (expand "emptyset")
           (replace -1)
           (assert))
          ("2"
           (apply-extensionality 1 :hide? t)
           (expand "emptyset")
           (inst -4 "1")
           (inst + "x!1")
           (assert))))
        ("2"
         (hide 2)
         (skosimp)
         (expand "singleton")
         (expand "phi")
         (expand "inverse_image")
         (expand "member")
         (rewrite "extensionality_postulate" -1 :dir rl)
         (expand "emptyset")
         (expand "fullset")
         (expand "image")
         (case "empty?(E!1)")
         (("1"
           (case-replace "c!1=1")
           (("1"
             (assert)
             (case-replace
              "{x_2: T | IF E!1(x_2) THEN 1 ELSE 0 ENDIF = 1}=E!1")
             (("1"
               (lemma "emptyset_is_empty?[T]")
               (inst - "E!1")
               (assert))
              ("2"
               (hide-all-but 1)
               (apply-extensionality :hide? t)
               (lift-if)
               (assert))))
            ("2"
             (case-replace
              "{x_2: T | IF E!1(x_2) THEN 1 ELSE 0 ENDIF = c!1}=emptyset[T]")
             (("1"
               (expand "mu_fin?")
               (typepred "m")
               (expand "measure?")
               (flatten)
               (assert)
               (expand "measure_empty?")
               (replace -1)
               (assert))
              ("2"
               (hide-all-but (-1 -3 1 2 3))
               (apply-extensionality 1 :hide? t)
               (expand "emptyset")
               (lift-if -1)
               (assert))))))
          ("2"
           (case-replace "c!1=1")
           (("1"
             (case-replace
              "{x_2: T | IF E!1(x_2) THEN 1 ELSE 0 ENDIF = 1}=E!1")
             (("1"
               (assert)
               (typepred "E!1")
               (expand "measurable_set?")
               (propax))
              ("2"
               (apply-extensionality 1 :hide? t)
               (lift-if 1)
               (assert))))
            ("2"
             (case-replace
              "{x_2: T | IF E!1(x_2) THEN 1 ELSE 0 ENDIF = c!1}=emptyset[T]")
             (("1"
               (expand "mu_fin?")
               (typepred "m")
               (expand "measure?")
               (flatten)
               (assert)
               (expand "measure_empty?")
               (replace -1)
               (assert))
              ("2"
               (apply-extensionality 1 :hide? t)
               (expand "emptyset")
               (lift-if -1)
               (assert))))))))))
      ("2"
       (hide 2)
       (apply-extensionality 1 :hide? t)
       (expand "emptyset")
       (expand "fullset")
       (expand "image")
       (skosimp)
       (expand "phi")
       (expand "member")
       (expand "empty?")
       (inst - "x!2")
       (assert))))
    ("2"
     (case-replace "E!1=emptyset[T]")
     (("1"
       (case-replace
        "image[T, real](phi(emptyset[T]), fullset[T]) = singleton[real](0)")
       (("1"
         (rewrite "sigma_singleton")
         (("1"
           (typepred "m")
           (expand "measure?")
           (flatten)
           (expand "mu")
           (assert)
           (expand "measure_empty?")
           (replace -1)
           (assert))
          ("2"
           (hide 3)
           (skosimp)
           (expand "singleton")
           (expand "emptyset")
           (expand "phi")
           (expand "member")
           (expand "inverse_image")
           (expand "member")
           (case-replace "{x: T | 0 = c!1}=emptyset[T]")
           (("1"
             (expand "mu_fin?")
             (typepred "m")
             (expand "measure?")
             (flatten)
             (assert)
             (expand "measure_empty?")
             (replace -1)
             (assert))
            ("2" (apply-extensionality 1 :hide? t))))))
        ("2"
         (hide -1 3)
         (expand "singleton")
         (expand "fullset")
         (expand "emptyset")
         (expand "phi")
         (expand "image")
         (apply-extensionality 1 :hide? t)
         (case-replace "x!1=0")
         (("1" (expand "empty?") (skosimp) (inst + "x!2"))
          ("2" (assert))))))
      ("2"
       (case-replace "E!1=fullset[T]")
       (("1"
         (case-replace
          "image[T, real](phi(fullset[T]), fullset[T]) = singleton[real](1)")
         (("1"
           (rewrite "sigma_singleton")
           (("1"
             (expand "singleton" 3)
             (expand "phi")
             (expand "member")
             (expand "inverse_image")
             (expand "member")
             (case-replace
              "{x_1: T | IF fullset[T](x_1) THEN 1 ELSE 0 ENDIF = 1}=fullset[T]")
             (("1" (assert))
              ("2"
               (apply-extensionality 1 :hide? t)
               (expand "fullset")
               (propax))))
            ("2"
             (hide 4)
             (skosimp*)
             (expand "singleton")
             (expand "phi")
             (expand "inverse_image")
             (expand "member")
             (expand "fullset")
             (case-replace "1=c!1")
             (("1" (assert))
              ("2"
               (replace 1 3)
               (assert)
               (typepred "m")
               (expand "measure?")
               (flatten)
               (expand "mu_fin?")
               (expand "emptyset")
               (assert)
               (typepred "S")
               (expand "sigma_algebra?")
               (flatten)
               (expand "subset_algebra_empty?")
               (expand "emptyset")
               (expand "member")
               (replace -1)
               (assert)
               (expand "measure_empty?")
               (expand "emptyset")
               (replace -4)
               (assert))))))
          ("2"
           (hide-all-but (1 3))
           (expand "singleton")
           (apply-extensionality :hide? t)
           (case-replace "x!1=1")
           (("1"
             (expand "fullset")
             (expand "image")
             (expand "empty?")
             (skosimp)
             (inst + "x!2")
             (expand "phi")
             (assert))
            ("2"
             (assert)
             (expand "fullset")
             (expand "image")
             (expand "phi")
             (expand "member")
             (propax))))))
        ("2"
         (case-replace
          "image[T, real](phi(E!1), fullset[T]) = add[real](1,singleton[real](0))")
         (("1"
           (hide -1)
           (case "FORALL (c:real):
                         NOT c = 0 IMPLIES
                          measurable_set?(inverse_image[T, real](phi[T, S](E!1), singleton[real](c))) AND S(inverse_image[T, real](phi[T, S](E!1), singleton[real](c))) AND
                           mu_fin?[T, S, m]
                               (inverse_image[T, real](phi[T, S](E!1), singleton[real](c)))")
           (("1"
             (rewrite "sigma_add" 4)
             (("1"
               (expand "singleton" 4 1)
               (case-replace
                "inverse_image[T, real](phi(E!1), singleton[real](1)) = E!1")
               (("1"
                 (hide -1)
                 (rewrite "sigma_singleton")
                 (("1" (assert))
                  ("2"
                   (skosimp)
                   (inst - "c!1")
                   (assert)
                   (flatten)
                   (assert))))
                ("2"
                 (apply-extensionality 1 :hide? t)
                 (expand "singleton")
                 (expand "phi")
                 (expand "inverse_image")
                 (expand "member")
                 (lift-if 1)
                 (assert))))
              ("2"
               (rewrite "convergent_singleton" 1)
               (hide-all-but (-1 1))
               (skosimp)
               (inst - "c!1")
               (assert)
               (flatten)
               (assert))
              ("3" (skosimp) (inst - "c!1") (assert) (flatten) (assert))
              ("4"
               (lemma "finite_countable[real]"
                ("x" "singleton[real](0)"))
               (propax))))
            ("2"
             (hide 5)
             (skosimp)
             (case-replace
              "inverse_image[T, real]
                                        (phi[T, S](E!1), singleton[real](c!1)) = if c!1=1 then E!1 else emptyset[T] endif")
             (("1"
               (hide -1)
               (case-replace "c!1=1")
               (("1"
                 (assert)
                 (typepred "E!1")
                 (expand "measurable_set?")
                 (propax))
                ("2"
                 (assert)
                 (expand "mu_fin?")
                 (expand "measurable_set?")
                 (typepred "m")
                 (expand "measure?")
                 (flatten)
                 (assert)
                 (expand "measure_empty?")
                 (replace -1)
                 (assert))))
              ("2"
               (hide 3)
               (apply-extensionality 1 :hide? t)
               (expand "emptyset")
               (expand "singleton")
               (expand "phi")
               (expand "inverse_image")
               (expand "member")
               (case-replace "E!1(x!1)")
               (("1" (assert) (case-replace "c!1=1") (assert))
                ("2" (assert))))))))
          ("2"
           (hide 5)
           (apply-extensionality 1 :hide? t)
           (expand "singleton")
           (expand "add")
           (expand "fullset")
           (expand "phi")
           (expand "member")
           (expand "image")
           (case-replace "x!1=0")
           (("1"
             (lemma "fullset_is_full?[T]")
             (inst - "E!1")
             (expand "fullset" -1)
             (replace -1 2 rl)
             (hide -1)
             (expand "full?")
             (skosimp)
             (expand "member")
             (inst + "x!2")
             (assert))
            ("2"
             (assert)
             (case-replace "x!1=1")
             (("1"
               (hide 1 3 5 -1)
               (rewrite "emptyset_is_empty?" 2 :dir rl)
               (expand "empty?")
               (skosimp)
               (inst + "x!2")
               (assert))
              ("2" (assert) (skosimp) (lift-if) (assert))))))))))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "isf_integral")
   (case "empty?(fullset[T])")
   (("1"
     (case-replace
      "image[T, real](LAMBDA (x: T): 0, fullset[T])=emptyset[real]")
     (("1"
       (rewrite "sigma_empty")
       (hide -1 2)
       (skosimp)
       (expand "singleton")
       (expand "inverse_image")
       (expand "member")
       (case-replace "{x: T | 0 = c!1}=emptyset[T]")
       (("1"
         (expand "mu_fin?")
         (typepred "m")
         (expand "measure?")
         (flatten)
         (assert)
         (expand "measure_empty?")
         (replace -1)
         (assert))
        ("2"
         (apply-extensionality 1 :hide? t)
         (expand "emptyset")
         (propax))))
      ("2"
       (apply-extensionality 1 :hide? t)
       (expand "emptyset")
       (expand "fullset")
       (expand "image")
       (skosimp)
       (expand "empty?")
       (inst - "x!2")
       (assert))))
    ("2"
     (case-replace
      "image[T, real](LAMBDA (x: T): 0, fullset[T])=singleton[real](0)")
     (("1"
       (rewrite "sigma_singleton")
       (hide 3)
       (skosimp)
       (expand "singleton")
       (expand "inverse_image")
       (expand "member")
       (expand "mu_fin?")
       (typepred "m")
       (expand "measure?")
       (flatten)
       (case-replace "{x: T | 0 = c!1}=emptyset[T]")
       (("1" (assert) (expand "measure_empty?") (replace -2) (assert))
        ("2"
         (apply-extensionality 1 :hide? t)
         (expand "emptyset")
         (propax))))
      ("2"
       (hide 3)
       (apply-extensionality 1 :hide? t)
       (expand "singleton")
       (expand "fullset")
       (expand "image")
       (case-replace "x!1=0")
       (("1" (expand "empty?") (skosimp) (inst + "x!2"))
        ("2" (replace 1 2) (assert))))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (assert)
   (skolem + ("_" "p!1"))
   (case "FORALL (n:nat,i: isf):
                 finite_partition_of?(i)(p!1) & card({c | c /= 0 and image(i,fullset[T])(c)}) = n IMPLIES
                  isf_integral(i) =
                   sigma[set[T]]
                       (p!1,
                        LAMBDA Y:
                          IF (NOT p!1(Y)) OR empty?(Y) OR i(choose[T](Y)) = 0 THEN 0
                          ELSE i(choose[T](Y)) * mu(Y)
                          ENDIF)")
   (("1"
     (skosimp)
     (inst - "card({c | c /= 0 AND image(i!1, fullset[T])(c)})" "i!1")
     (("1" (assert))
      ("2"
       (hide-all-but 1)
       (typepred "i!1")
       (expand "isf?")
       (expand "simple?")
       (flatten)
       (lemma "finite_subset[real]"
        ("s"
         "{c | c /= 0 AND image[T, real](i!1, fullset[T])(c)}"
         "A"
         "image(i!1, fullset[T])"))
       (("1"
         (split -1)
         (("1" (propax))
          ("2"
           (hide-all-but 1)
           (expand "fullset")
           (expand "image")
           (expand "subset?")
           (expand "member")
           (skosimp*))))
        ("2" (propax))))))
    ("2"
     (hide 2)
     (induct "n")
     (("1"
       (skosimp)
       (lemma "card_is_0[real]"
        ("S" "{c | c /= 0 AND image(i!1, fullset[T])(c)}"))
       (("1"
         (assert)
         (replace -3)
         (expand "isf_integral")
         (case "nonempty?(image[T, real](i!1, fullset[T]))")
         (("1"
           (case-replace
            "image[T, real](i!1, fullset[T])=singleton[real](0)")
           (("1"
             (rewrite "sigma_singleton" 1)
             (("1"
               (case "forall x: i!1(x) = 0")
               (("1"
                 (lemma "sigma_eq"
                  ("X"
                   "p!1"
                   "f"
                   "LAMBDA (Y:set[T]):
                                 IF (NOT p!1(Y)) OR empty?(Y) OR i!1(choose[T](Y)) = 0 THEN 0
                                 ELSE i!1(choose[T](Y)) * mu(Y)
                                 ENDIF"
                   "g"
                   "lambda (Y:set[T]):0"))
                 (("1"
                   (split -1)
                   (("1" (replace -1) (rewrite "sigma_zero" 1))
                    ("2"
                     (hide 2)
                     (skosimp)
                     (lift-if)
                     (prop)
                     (inst - "choose[T](t!1)"))))
                  ("2"
                   (typepred "p!1")
                   (expand "finite_partition?")
                   (expand "convergent?")
                   (flatten))
                  ("3"
                   (typepred "p!1")
                   (expand "convergent?")
                   (expand "finite_partition?")
                   (flatten))
                  ("4"
                   (skosimp)
                   (expand "finite_partition_of?")
                   (inst -6 "Y!1")
                   (flatten)
                   (assert))
                  ("5" (skosimp) (expand "nonempty?") (propax))
                  ("6" (skosimp) (expand "nonempty?") (propax))))
                ("2"
                 (hide 2)
                 (skosimp)
                 (lemma "extensionality_postulate"
                  ("f"
                   "image[T, real](i!1, fullset[T])"
                   "g"
                   "singleton[real](0)"))
                 (replace -1 -2 rl)
                 (inst - "i!1(x!1)")
                 (expand "singleton")
                 (replace -2 1 rl)
                 (expand "fullset")
                 (expand "image")
                 (inst + "x!1"))))
              ("2"
               (hide 2)
               (skosimp*)
               (case-replace
                "inverse_image[T, real](i!1, singleton[real](c!1))=emptyset[T]")
               (("1"
                 (lemma "m_emptyset")
                 (expand "mu_fin?")
                 (replace -1)
                 (assert))
                ("2"
                 (hide 3)
                 (apply-extensionality 1 :hide? t)
                 (expand "emptyset")
                 (expand "inverse_image")
                 (expand "member")
                 (expand "singleton")
                 (lemma "extensionality_postulate"
                  ("f"
                   "image[T, real](i!1, fullset[T])"
                   "g"
                   "{y: real | y = 0}"))
                 (replace -1 -3 rl)
                 (hide -1)
                 (inst - "i!1(x!1)")
                 (replace -1 * rl)
                 (replace -2 1 rl)
                 (expand "fullset")
                 (expand "image")
                 (inst + "x!1"))))))
            ("2"
             (hide 2)
             (apply-extensionality :hide? t)
             (expand "singleton")
             (case-replace "x!1=0")
             (("1"
               (hide -5)
               (lemma "extensionality_postulate"
                ("f"
                 "{c | c /= 0 AND image(i!1, fullset[T])(c)}"
                 "g"
                 "emptyset[real]"))
               (replace -1 -4 rl)
               (hide -1)
               (expand "nonempty?")
               (expand "empty?")
               (skosimp)
               (expand "member")
               (inst - "x!2")
               (replace -2)
               (expand "emptyset")
               (expand "image")
               (skosimp)
               (inst + "x!3")
               (assert))
              ("2"
               (assert)
               (lemma "extensionality_postulate"
                ("f"
                 "{c | c /= 0 AND image(i!1, fullset[T])(c)}"
                 "g"
                 "emptyset[real]"))
               (replace -1 -4 rl)
               (hide -1)
               (inst - "x!1")
               (assert)
               (expand "emptyset")
               (propax))))))
          ("2"
           (expand "nonempty?")
           (hide -2 -4)
           (rewrite "emptyset_is_empty?")
           (replace -1)
           (rewrite "sigma_empty" 1)
           (("1"
             (lemma "extensionality_postulate[real,bool]"
              ("f"
               "image[T, real](i!1, fullset[T])"
               "g"
               "emptyset[real]"))
             (replace -1 -2 rl)
             (hide -1)
             (lemma "sigma_countable.sigma_eq"
              ("X"
               "p!1"
               "f"
               "LAMBDA (Y:set[T]):
                             IF (NOT p!1(Y)) OR empty?(Y) OR i!1(choose[T](Y)) = 0 THEN 0
                             ELSE i!1(choose[T](Y)) * mu(Y)
                             ENDIF"
               "g"
               "lambda(Y:set[T]):0"))
             (("1"
               (split -1)
               (("1" (replace -1) (rewrite "sigma_zero" 1))
                ("2"
                 (hide 2)
                 (skosimp)
                 (typepred "t!1")
                 (assert)
                 (lift-if)
                 (prop)
                 (inst - "i!1(choose[T](t!1))")
                 (expand "emptyset")
                 (expand "fullset")
                 (expand "image")
                 (inst + "choose[T](t!1)"))))
              ("2"
               (expand "convergent?")
               (typepred "p!1")
               (expand "finite_partition?")
               (flatten))
              ("3"
               (typepred "p!1")
               (expand "finite_partition?")
               (expand "convergent?")
               (flatten))
              ("4"
               (skosimp)
               (expand "finite_partition_of?")
               (inst -3 "Y!1")
               (flatten)
               (assert))
              ("5" (skosimp) (expand "nonempty?") (propax))
              ("6" (skosimp) (expand "nonempty?") (propax))))
            ("2"
             (hide 2)
             (skosimp)
             (case-replace
              "inverse_image[T, real](i!1, singleton[real](c!1))=emptyset[T]")
             (("1"
               (lemma "m_emptyset")
               (expand "mu_fin?")
               (replace -1)
               (assert))
              ("2"
               (hide 3)
               (apply-extensionality 1 :hide? t)
               (expand "emptyset")
               (expand "inverse_image")
               (expand "singleton")
               (expand "member")
               (lemma "extensionality_postulate"
                ("f"
                 "image[T, real](i!1, fullset[T])"
                 "g"
                 "{x: real | FALSE}"))
               (replace -1 -3 rl)
               (inst - "c!1")
               (expand "fullset")
               (expand "image")
               (inst + "x!1")
               (assert))))))))
        ("2"
         (hide 2)
         (typepred "i!1")
         (expand "isf?")
         (expand "simple?")
         (flatten)
         (lemma "finite_subset[real]"
          ("s"
           "{c | c /= 0 AND image[T, real](i!1, fullset[T])(c)}"
           "A"
           "image(i!1, fullset[T])"))
         (("1"
           (split -1)
           (("1" (propax))
            ("2"
             (hide-all-but 1)
             (expand "fullset")
             (expand "image")
             (expand "subset?")
             (expand "member")
             (skosimp*))))
          ("2" (propax))))))
      ("2"
       (skosimp*)
       (name-replace "NZ_IMAGE"
        "{c | c /= 0 AND image(i!1, fullset[T])(c)}")
       (lemma "nonempty_card[real]" ("S" "NZ_IMAGE"))
       (assert)
       (lemma "card_rest[real]" ("S" "NZ_IMAGE"))
       (replace -5)
       (simplify -1)
       (lemma "choose_member[real]" ("a" "NZ_IMAGE"))
       (expand "nonempty?")
       (replace 1)
       (expand "NZ_IMAGE" -1 2)
       (expand "member" -1)
       (flatten)
       (name-replace "CC" "choose[real](NZ_IMAGE)")
       (name "P1" "{a:set[T] | p!1(a) & forall (x:(a)): i!1(x) = CC}")
       (case "subset?(P1,p!1)")
       (("1"
         (case "is_finite[set[T]](P1)")
         (("1"
           (lemma "measurable_Union" ("M" "P1"))
           (("1"
             (expand "restrict" -1)
             (expand "Union" -1)
             (name-replace "CC_SET"
              "{x: T | EXISTS (a: (LAMBDA (s: ((S))): P1(s))): a(x)}")
             (case "forall x: CC_SET(x) => i!1(x)=CC & exists (a:(P1)): a(x)")
             (("1"
               (name "II" "i!1-CC*phi(CC_SET)")
               (copy -3)
               (expand "measurable_set?" -1)
               (case "mu_fin?(CC_SET)")
               (("1"
                 (lemma "isf_phi" ("E" "CC_SET"))
                 (("1"
                   (lemma "isf_scal" ("c" "CC" "i" "phi[T, S](CC_SET)"))
                   (("1"
                     (lemma "isf_diff"
                      ("i1" "i!1" "i2" "*[T](CC, phi[T, S](CC_SET))"))
                     (("1"
                       (replace -6)
                       (inst -14 "II")
                       (case-replace
                        "{c | c /= 0 AND image(II, fullset[T])(c)}=rest(NZ_IMAGE)")
                       (("1"
                         (replace -14)
                         (hide -3 -14 -17)
                         (hide -1)
                         (case "finite_partition_of?(II)(p!1)")
                         (("1"
                           (replace -1)
                           (case-replace
                            "isf_integral(i!1) = isf_integral(II) + CC*mu(CC_SET)")
                           (("1"
                             (hide -1)
                             (name-replace "LHS" "isf_integral(II)")
                             (name "P2" "difference(p!1,P1)")
                             (lemma "difference_subset"
                              ("a" "p!1" "b" "P1"))
                             (lemma "difference_disjoint"
                              ("b" "p!1" "a" "P1"))
                             (replace -3)
                             (case "union(P1,P2)=p!1")
                             (("1"
                               (case "is_finite(P2)")
                               (("1"
                                 (case "is_finite(p!1)")
                                 (("1"
                                   (lemma
                                    "sigma_disjoint_union"
                                    ("f"
                                     "LAMBDA Y:
                                                   IF (NOT p!1(Y)) OR empty?(Y) OR i!1(choose[T](Y)) = 0 THEN 0
                                                   ELSE i!1(choose[T](Y)) * mu(Y)
                                                   ENDIF"
                                     "X"
                                     "P1"
                                     "Y"
                                     "P2"))
                                   (("1"
                                     (replace -4)
                                     (replace -5)
                                     (replace -1 3)
                                     (hide -1)
                                     (lemma
                                      "sigma_eq"
                                      ("X"
                                       "P1"
                                       "f"
                                       "LAMBDA Y:
                                                      IF (NOT p!1(Y)) OR empty?(Y) OR i!1(choose[T](Y)) = 0 THEN 0
                                                      ELSE i!1(choose[T](Y)) * mu(Y)
                                                      ENDIF"
                                       "g"
                                       "LAMBDA Y: if not P1(Y) then 0 else CC*mu(Y) endif"))
                                     (("1"
                                       (split -1)
                                       (("1"
                                         (replace -1)
                                         (hide -1)
                                         (case
                                          "forall (c:real,f:(convergent?(P1))): (forall (x:(P1)): f(x) = c*mu(x)) => sigma(P1, f) = c*mu(CC_SET)")
                                         (("1"
                                           (inst-cp
                                            -
                                            "CC"
                                            "LAMBDA Y: IF NOT P1(Y) THEN 0 ELSE CC * mu(Y) ENDIF")
                                           (("1"
                                             (split -2)
                                             (("1"
                                               (replace -1)
                                               (assert)
                                               (hide -1)
                                               (lemma
                                                "sigma_disjoint_union"
                                                ("X"
                                                 "P1"
                                                 "Y"
                                                 "P2"
                                                 "f"
                                                 " LAMBDA Y:
                                                               IF (NOT p!1(Y)) OR empty?(Y) OR II(choose[T](Y)) = 0 THEN 0
                                                               ELSE II(choose[T](Y)) * mu(Y)
                                                               ENDIF"))
                                               (("1"
                                                 (replace -6)
                                                 (replace -5)
                                                 (replace -1)
                                                 (hide -1)
                                                 (inst
                                                  -
                                                  "0"
                                                  "LAMBDA Y:
                                                                IF (NOT p!1(Y)) OR empty?(Y) OR II(choose[T](Y)) = 0 THEN 0
                                                                ELSE II(choose[T](Y)) * mu(Y)
                                                                ENDIF")
                                                 (("1"
                                                   (split -1)
                                                   (("1"
                                                     (replace -1)
                                                     (hide -1)
                                                     (assert)
                                                     (replace -19)
                                                     (hide -19)
                                                     (lemma
                                                      "sigma_eq"
                                                      ("X"
                                                       "P2"
                                                       "f"
                                                       "LAMBDA Y:
                                                                     IF (NOT p!1(Y)) OR empty?(Y) OR II(choose[T](Y)) = 0 THEN 0
                                                                     ELSE II(choose[T](Y)) * mu(Y)
                                                                     ENDIF"
                                                       "g"
                                                       "LAMBDA Y:
                                                                      IF (NOT p!1(Y)) OR empty?(Y) OR i!1(choose[T](Y)) = 0 THEN 0
                                                                      ELSE i!1(choose[T](Y)) * mu(Y)
                                                                      ENDIF"))
                                                     (("1"
                                                       (split -1)
                                                       (("1" (propax))
                                                        ("2"
                                                         (hide 4)
                                                         (skosimp)
                                                         (typepred "t!1")
                                                         (expand
                                                          "subset?"
                                                          -6)
                                                         (inst - "t!1")
                                                         (assert)
                                                         (assert)
                                                         (case-replace
                                                          "empty?(t!1)")
                                                         (assert)
                                                         (case-replace
                                                          "i!1(choose[T](t!1)) = 0")
                                                         (("1"
                                                           (expand
                                                            "II"
                                                            2)
                                                           (expand "-" 2)
                                                           (replace -1)
                                                           (expand "*" 2)
                                                           (expand "phi")
                                                           (expand
                                                            "member")
                                                           (case-replace
                                                            "CC_SET(choose[T](t!1))")
                                                           (("1"
                                                             (inst
                                                              -16
                                                              "choose[T](t!1)")
                                                             (assert))
                                                            ("2"
                                                             (assert))))
                                                          ("2"
                                                           (replace 1)
                                                           (expand
                                                            "II"
                                                            3)
                                                           (expand "-" 3)
                                                           (expand "*" 3)
                                                           (expand
                                                            "P2"
                                                            -1)
                                                           (expand
                                                            "difference"
                                                            -1)
                                                           (expand
                                                            "member")
                                                           (expand
                                                            "phi"
                                                            4)
                                                           (expand
                                                            "member")
                                                           (case-replace
                                                            "CC_SET(choose[T](t!1))")
                                                           (("1"
                                                             (inst
                                                              -14
                                                              "choose[T](t!1)")
                                                             (assert)
                                                             (flatten)
                                                             (skosimp)
                                                             (expand
                                                              "P1"
                                                              3)
                                                             (skosimp)
                                                             (typepred
                                                              "x!1")
                                                             (typepred
                                                              "t!1")
                                                             (expand
                                                              "finite_partition_of?"
                                                              -23)
                                                             (inst
                                                              -23
                                                              "t!1")
                                                             (flatten)
                                                             (assert)
                                                             (expand
                                                              "constant_over?")
                                                             (skosimp)
                                                             (inst-cp
                                                              -24
                                                              "choose[T](t!1)")
                                                             (inst
                                                              -24
                                                              "x!1")
                                                             (assert))
                                                            ("2"
                                                             (replace 1)
                                                             (replace 2)
                                                             (assert))))
                                                          ("3"
                                                           (expand
                                                            "nonempty?")
                                                           (propax))))))
                                                      ("2"
                                                       (expand
                                                        "convergent?")
                                                       (propax))
                                                      ("3"
                                                       (expand
                                                        "convergent?")
                                                       (propax))))
                                                    ("2"
                                                     (skosimp)
                                                     (hide -19 4)
                                                     (typepred "x!1")
                                                     (expand
                                                      "subset?"
                                                      -17)
                                                     (inst -17 "x!1")
                                                     (assert)
                                                     (assert)
                                                     (case-replace
                                                      "empty?(x!1)")
                                                     (("1" (assert))
                                                      ("2"
                                                       (assert)
                                                       (case-replace
                                                        "II(choose[T](x!1)) = 0")
                                                       (("1" (assert))
                                                        ("2"
                                                         (assert)
                                                         (hide 3)
                                                         (expand "II" 1)
                                                         (expand "-" 1)
                                                         (expand "*" 1)
                                                         (expand "phi")
                                                         (expand
                                                          "member")
                                                         (case-replace
                                                          "CC_SET(choose[T](x!1))")
                                                         (("1"
                                                           (inst
                                                            -15
                                                            "choose[T](x!1)")
                                                           (assert))
                                                          ("2"
                                                           (replace 1 2)
                                                           (typepred
                                                            "p!1")
                                                           (expand
                                                            "finite_partition?")
                                                           (expand
                                                            "partition?")
                                                           (flatten)
                                                           (lemma
                                                            "extensionality_postulate"
                                                            ("f"
                                                             "Union(p!1)"
                                                             "g"
                                                             "fullset[T]"))
                                                           (replace
                                                            -1
                                                            -2
                                                            rl)
                                                           (hide -1)
                                                           (expand
                                                            "CC_SET"
                                                            1)
                                                           (inst + "x!1")
                                                           (("1"
                                                             (assert))
                                                            ("2"
                                                             (expand
                                                              "finite_partition_of?"
                                                              -22)
                                                             (inst
                                                              -22
                                                              "x!1")
                                                             (flatten))))))
                                                        ("3"
                                                         (expand
                                                          "nonempty?")
                                                         (propax))))))))
                                                  ("2"
                                                   (expand "convergent?")
                                                   (propax))
                                                  ("3"
                                                   (skosimp)
                                                   (expand
                                                    "finite_partition_of?"
                                                    -8)
                                                   (inst -8 "Y!1")
                                                   (flatten)
                                                   (assert))
                                                  ("4"
                                                   (skosimp)
                                                   (expand "nonempty?")
                                                   (propax))
                                                  ("5"
                                                   (skosimp)
                                                   (expand "nonempty?")
                                                   (propax))))
                                                ("2"
                                                 (replace -4)
                                                 (expand "convergent?")
                                                 (propax))
                                                ("3"
                                                 (skosimp)
                                                 (expand
                                                  "finite_partition_of?"
                                                  -9)
                                                 (inst -9 "Y!1")
                                                 (flatten)
                                                 (assert))
                                                ("4"
                                                 (skosimp)
                                                 (expand "nonempty?")
                                                 (propax))))
                                              ("2"
                                               (skosimp)
                                               (typepred "x!1")
                                               (assert))))
                                            ("2"
                                             (expand "convergent?")
                                             (flatten))
                                            ("3"
                                             (hide 4 -19)
                                             (skosimp)
                                             (expand "subset?" -17)
                                             (inst -17 "Y!1")
                                             (expand "member")
                                             (assert)
                                             (expand
                                              "finite_partition_of?"
                                              -20)
                                             (inst -20 "Y!1")
                                             (flatten)
                                             (assert)
                                             (expand "P1" -1)
                                             (split -22)
                                             (("1"
                                               (rewrite
                                                "emptyset_is_empty?")
                                               (replace -1)
                                               (expand "mu_fin?")
                                               (rewrite "m_emptyset")
                                               (assert))
                                              ("2"
                                               (inst - "choose(Y!1)")
                                               (assert))))))
                                          ("2"
                                           (hide 4 -19)
                                           (hide-all-but
                                            (1
                                             2
                                             3
                                             -19
                                             -18
                                             -16
                                             -15
                                             -14
                                             -11
                                             -1))
                                           (skosimp)
                                           (case
                                            "forall (n:nat,X:setofsets[T]): subset?(X,P1) & card(X)=n => sigma(X,f!1)=c!1*mu(Union(X))")
                                           (("1"
                                             (inst - "card(P1)" "P1")
                                             (split -1)
                                             (("1"
                                               (case-replace
                                                "Union(P1)=CC_SET")
                                               (hide -1 2)
                                               (apply-extensionality
                                                1
                                                :hide?
                                                t)
                                               (expand "CC_SET")
                                               (case-replace
                                                "Union(P1)(x!1)")
                                               (("1"
                                                 (expand "Union" -1)
                                                 (skosimp)
                                                 (inst + "a!1")
                                                 (expand "subset?")
                                                 (inst -7 "a!1")
                                                 (expand "member")
                                                 (expand
                                                  "finite_partition_of?")
                                                 (inst -9 "a!1")
                                                 (flatten))
                                                ("2"
                                                 (replace 1 2)
                                                 (assert)
                                                 (skosimp)
                                                 (typepred "a!1")
                                                 (expand "Union")
                                                 (inst + "a!1"))))
                                              ("2"
                                               (hide-all-but 1)
                                               (expand "subset?")
                                               (skosimp))))
                                            ("2"
                                             (induct "n")
                                             (("1"
                                               (skosimp)
                                               (lemma
                                                "card_is_0"
                                                ("S" "X!1"))
                                               (assert)
                                               (replace -3)
                                               (replace -1)
                                               (rewrite
                                                "Union_emptyset_rew")
                                               (rewrite "sigma_empty")
                                               (expand "mu")
                                               (rewrite "m_emptyset")
                                               (assert))
                                              ("2"
                                               (skosimp*)
                                               (hide 2)
                                               (lemma
                                                "nonempty_card"
                                                ("S" "X!1"))
                                               (assert)
                                               (rewrite
                                                "sigma_choose_rest"
                                                1)
                                               (("1"
                                                 (inst - "rest(X!1)")
                                                 (lemma
                                                  "card_rest"
                                                  ("S" "X!1"))
                                                 (assert)
                                                 (expand "nonempty?" -2)
                                                 (replace 1)
                                                 (replace -1)
                                                 (replace -4)
                                                 (simplify -2)
                                                 (hide -1 -4)
                                                 (split -1)
                                                 (("1"
                                                   (replace -1)
                                                   (hide -1)
                                                   (lemma
                                                    "choose_member"
                                                    ("a" "X!1"))
                                                   (replace 1)
                                                   (inst - "choose(X!1)")
                                                   (("1"
                                                     (replace -3)
                                                     (hide -3)
                                                     (lemma
                                                      "finite_subset"
                                                      ("s"
                                                       "X!1"
                                                       "A"
                                                       "P1"))
                                                     (assert)
                                                     (lemma
                                                      "finite_subset"
                                                      ("s"
                                                       "rest(X!1)"
                                                       "A"
                                                       "X!1"))
                                                     (rewrite
                                                      "rest_subset")
                                                     (lemma
                                                      "finite_countable"
                                                      ("x" "X!1"))
                                                     (lemma
                                                      "finite_countable"
                                                      ("x" "rest(X!1)"))
                                                     (("1"
                                                       (lemma
                                                        "measurable_Union"
                                                        ("M" "X!1"))
                                                       (("1"
                                                         (lemma
                                                          "measurable_Union"
                                                          ("M"
                                                           "rest(X!1)"))
                                                         (("1"
                                                           (expand
                                                            "restrict")
                                                           (expand
                                                            "Union"
                                                            (2 -1 -2))
                                                           (case-replace
                                                            "{x: T |
                                                                                     EXISTS (a: (LAMBDA (s: (S)): rest(X!1)(s))): a(x)}={x: T | EXISTS (a: (rest(X!1))): a(x)}")
                                                           (("1"
                                                             (hide -1)
                                                             (case-replace
                                                              "{x: T | EXISTS (a: (LAMBDA (s: (S)): X!1(s))): a(x)}={x: T | EXISTS (a: (X!1)): a(x)}")
                                                             (("1"
                                                               (hide -1)
                                                               (case
                                                                "measurable_set?(choose(X!1))")
                                                               (("1"
                                                                 (lemma
                                                                  "m_disjoint_union"
                                                                  ("a"
                                                                   "choose(X!1)"
                                                                   "b"
                                                                   "{x: T | EXISTS (a: (rest(X!1))): a(x)}"))
                                                                 (("1"
                                                                   (split
                                                                    -1)
                                                                   (("1"
                                                                     (case-replace
                                                                      "union(choose(X!1), {x: T | EXISTS (a: (rest(X!1))): a(x)})={x: T | EXISTS (a: (X!1)): a(x)}")
                                                                     (("1"
                                                                       (hide
                                                                        -1)
                                                                       (typepred
                                                                        "i!1")
                                                                       (expand
                                                                        "isf?")
                                                                       (flatten)
                                                                       (lemma
                                                                        "m_monotone"
                                                                        ("a"
                                                                         "choose(X!1)"
                                                                         "b"
                                                                         "nonzero_set?(i!1)"))
                                                                       (split
                                                                        -1)
                                                                       (("1"
                                                                         (lemma
                                                                          "m_monotone"
                                                                          ("a"
                                                                           "{x: T | EXISTS (a: (rest(X!1))): a(x)}"
                                                                           "b"
                                                                           "nonzero_set?(i!1)"))
                                                                         (split
                                                                          -1)
                                                                         (("1"
                                                                           (lemma
                                                                            "m_monotone"
                                                                            ("a"
                                                                             "{x: T | EXISTS (a: (X!1)): a(x)}"
                                                                             "b"
                                                                             "nonzero_set?(i!1)"))
                                                                           (("1"
                                                                             (split
                                                                              -1)
                                                                             (("1"
                                                                               (expand
                                                                                "x_le")
                                                                               (expand
                                                                                "x_eq")
                                                                               (expand
                                                                                "mu_fin?")
                                                                               (expand
                                                                                "mu")
                                                                               (assert)
                                                                               (flatten)
                                                                               (assert)
                                                                               (expand
                                                                                "x_add")
                                                                               (assert))
                                                                              ("2"
                                                                               (hide-all-but
                                                                                (-14
                                                                                 1
                                                                                 4))
                                                                               (expand
                                                                                "subset?")
                                                                               (expand
                                                                                "nonzero_set?")
                                                                               (expand
                                                                                "member")
                                                                               (skosimp*)
                                                                               (typepred
                                                                                "a!1")
                                                                               (inst
                                                                                -
                                                                                "a!1")
                                                                               (assert)
                                                                               (expand
                                                                                "P1")
                                                                               (flatten)
                                                                               (inst
                                                                                -
                                                                                "x!1")
                                                                               (assert))))
                                                                            ("2"
                                                                             (propax))))
                                                                          ("2"
                                                                           (hide-all-but
                                                                            (1
                                                                             2
                                                                             -13
                                                                             4))
                                                                           (lemma
                                                                            "rest_subset"
                                                                            ("a"
                                                                             "X!1"))
                                                                           (expand
                                                                            "subset?")
                                                                           (expand
                                                                            "nonzero_set?")
                                                                           (expand
                                                                            "member")
                                                                           (skosimp*)
                                                                           (typepred
                                                                            "a!1")
                                                                           (inst
                                                                            -
                                                                            "a!1")
                                                                           (inst
                                                                            -
                                                                            "a!1")
                                                                           (assert)
                                                                           (expand
                                                                            "P1")
                                                                           (flatten)
                                                                           (inst
                                                                            -
                                                                            "x!1")
                                                                           (assert))))
                                                                        ("2"
                                                                         (hide-all-but
                                                                          (1
                                                                           -11
                                                                           -12
                                                                           4))
                                                                         (expand
                                                                          "subset?")
                                                                         (expand
                                                                          "nonzero_set?")
                                                                         (expand
                                                                          "member")
                                                                         (skosimp*)
                                                                         (inst
                                                                          -
                                                                          "choose(X!1)")
                                                                         (assert)
                                                                         (expand
                                                                          "P1")
                                                                         (flatten)
                                                                         (inst
                                                                          -
                                                                          "x!1")
                                                                         (assert))))
                                                                      ("2"
                                                                       (apply-extensionality
                                                                        1
                                                                        :hide?
                                                                        t)
                                                                       (expand
                                                                        "union"
                                                                        1)
                                                                       (expand
                                                                        "member")
                                                                       (case-replace
                                                                        "choose(X!1)(x!1)")
                                                                       (("1"
                                                                         (inst
                                                                          +
                                                                          "choose(X!1)"))
                                                                        ("2"
                                                                         (replace
                                                                          1
                                                                          2)
                                                                         (case-replace
                                                                          "EXISTS (a: (rest(X!1))): a(x!1)")
                                                                         (("1"
                                                                           (skosimp)
                                                                           (typepred
                                                                            "a!1")
                                                                           (lemma
                                                                            "rest_subset"
                                                                            ("a"
                                                                             "X!1"))
                                                                           (expand
                                                                            "subset?")
                                                                           (inst
                                                                            -
                                                                            "a!1")
                                                                           (assert)
                                                                           (inst
                                                                            +
                                                                            "a!1"))
                                                                          ("2"
                                                                           (replace
                                                                            1
                                                                            3)
                                                                           (assert)
                                                                           (skosimp)
                                                                           (typepred
                                                                            "a!1")
                                                                           (case-replace
                                                                            "a!1=choose(X!1)")
                                                                           (inst
                                                                            +
                                                                            "a!1")
                                                                           (expand
                                                                            "rest")
                                                                           (expand
                                                                            "remove")
                                                                           (expand
                                                                            "member")
                                                                           (assert))))))))
                                                                    ("2"
                                                                     (lemma
                                                                      "choose_not_member"
                                                                      ("a"
                                                                       "X!1"))
                                                                     (assert)
                                                                     (expand
                                                                      "disjoint?")
                                                                     (expand
                                                                      "empty?"
                                                                      2)
                                                                     (skosimp)
                                                                     (expand
                                                                      "intersection")
                                                                     (expand
                                                                      "member")
                                                                     (flatten)
                                                                     (skosimp)
                                                                     (typepred
                                                                      "a!1")
                                                                     (typepred
                                                                      "p!1")
                                                                     (expand
                                                                      "finite_partition?")
                                                                     (expand
                                                                      "partition?")
                                                                     (flatten)
                                                                     (expand
                                                                      "subset?")
                                                                     (inst-cp
                                                                      -14
                                                                      "choose(X!1)")
                                                                     (inst
                                                                      -14
                                                                      "a!1")
                                                                     (assert)
                                                                     (lemma
                                                                      "rest_subset"
                                                                      ("a"
                                                                       "X!1"))
                                                                     (expand
                                                                      "subset?")
                                                                     (inst
                                                                      -
                                                                      "a!1")
                                                                     (expand
                                                                      "member")
                                                                     (assert)
                                                                     (inst-cp
                                                                      -21
                                                                      "choose(X!1)")
                                                                     (inst
                                                                      -21
                                                                      "a!1")
                                                                     (assert)
                                                                     (inst
                                                                      -
                                                                      "a!1"
                                                                      "choose(X!1)")
                                                                     (assert)
                                                                     (expand
                                                                      "disjoint?"
                                                                      -3)
                                                                     (expand
                                                                      "empty?"
                                                                      -3)
                                                                     (inst
                                                                      -
                                                                      "x!1")
                                                                     (expand
                                                                      "intersection")
                                                                     (expand
                                                                      "member")
                                                                     (propax))))
                                                                  ("2"
                                                                   (propax))
                                                                  ("3"
                                                                   (propax))))
                                                                ("2"
                                                                 (expand
                                                                  "finite_partition_of?")
                                                                 (expand
                                                                  "subset?")
                                                                 (inst
                                                                  -8
                                                                  "choose(X!1)")
                                                                 (assert)
                                                                 (inst
                                                                  -13
                                                                  "choose(X!1)")
                                                                 (assert)
                                                                 (inst
                                                                  -15
                                                                  "choose(X!1)")
                                                                 (flatten)
                                                                 (expand
                                                                  "measurable_set?")
                                                                 (propax))))
                                                              ("2"
                                                               (hide 3)
                                                               (apply-extensionality
                                                                1
                                                                :hide?
                                                                t)
                                                               (case-replace
                                                                "EXISTS (a: (X!1)): a(x!1)")
                                                               (("1"
                                                                 (skosimp)
                                                                 (expand
                                                                  "subset?")
                                                                 (inst
                                                                  -9
                                                                  "a!1")
                                                                 (expand
                                                                  "member")
                                                                 (inst
                                                                  -14
                                                                  "a!1")
                                                                 (assert)
                                                                 (expand
                                                                  "finite_partition_of?")
                                                                 (inst
                                                                  -16
                                                                  "a!1")
                                                                 (flatten)
                                                                 (inst
                                                                  +
                                                                  "a!1"))
                                                                ("2"
                                                                 (replace
                                                                  1
                                                                  2)
                                                                 (assert)
                                                                 (skosimp)
                                                                 (inst
                                                                  +
                                                                  "a!1"))))))
                                                            ("2"
                                                             (hide 3)
                                                             (apply-extensionality
                                                              1
                                                              :hide?
                                                              t)
                                                             (case-replace
                                                              "EXISTS (a: (rest(X!1))): a(x!1)")
                                                             (("1"
                                                               (expand
                                                                "subset?")
                                                               (skosimp)
                                                               (lemma
                                                                "rest_subset"
                                                                ("a"
                                                                 "X!1"))
                                                               (typepred
                                                                "a!1")
                                                               (expand
                                                                "subset?")
                                                               (inst
                                                                -
                                                                "a!1")
                                                               (inst
                                                                -11
                                                                "a!1")
                                                               (inst
                                                                -16
                                                                "a!1")
                                                               (assert)
                                                               (expand
                                                                "finite_partition_of?")
                                                               (inst
                                                                -18
                                                                "a!1")
                                                               (flatten)
                                                               (inst
                                                                +
                                                                "a!1"))
                                                              ("2"
                                                               (replace
                                                                1
                                                                2)
                                                               (assert)
                                                               (skosimp)
                                                               (inst
                                                                +
                                                                "a!1"))))))
                                                          ("2"
                                                           (hide-all-but
                                                            (-2 1))
                                                           (expand
                                                            "restrict")
                                                           (expand
                                                            "is_countable")
                                                           (skosimp)
                                                           (typepred
                                                            "f!2")
                                                           (inst
                                                            +
                                                            "f!2"))))
                                                        ("2"
                                                         (hide-all-but
                                                          (-2 1))
                                                         (expand
                                                          "restrict")
                                                         (expand
                                                          "is_countable")
                                                         (skosimp)
                                                         (typepred "f!2")
                                                         (inst
                                                          +
                                                          "f!2"))))
                                                      ("2" (propax))))
                                                    ("2"
                                                     (expand "subset?")
                                                     (inst
                                                      -
                                                      "choose(X!1)")
                                                     (assert))))
                                                  ("2"
                                                   (hide-all-but
                                                    (-1 1 2))
                                                   (lemma
                                                    "rest_subset"
                                                    ("a" "X!1"))
                                                   (expand "subset?")
                                                   (skosimp)
                                                   (inst - "x!1")
                                                   (inst - "x!1")
                                                   (assert))))
                                                ("2"
                                                 (expand
                                                  "nonempty_countable?")
                                                 (lemma
                                                  "finite_subset"
                                                  ("s" "X!1" "A" "P1"))
                                                 (assert)
                                                 (lemma
                                                  "finite_countable"
                                                  ("x" "X!1"))
                                                 (propax))))
                                              ("3"
                                               (hide 2)
                                               (skosimp)
                                               (lemma
                                                "measurable_Union"
                                                ("M" "X!1"))
                                               (("1"
                                                 (expand "restrict")
                                                 (expand "Union")
                                                 (expand
                                                  "measurable_set?")
                                                 (case-replace
                                                  "{x: T | EXISTS (a: (LAMBDA (s: (S)): X!1(s))): a(x)}={x: T | EXISTS (a: (X!1)): a(x)}")
                                                 (("1"
                                                   (assert)
                                                   (hide -1)
                                                   (typepred "i!1")
                                                   (expand "isf?")
                                                   (flatten)
                                                   (lemma
                                                    "m_monotone"
                                                    ("a"
                                                     "{x: T | EXISTS (a: (X!1)): a(x)}"
                                                     "b"
                                                     "nonzero_set?(i!1)"))
                                                   (("1"
                                                     (split -1)
                                                     (("1"
                                                       (expand "mu_fin?")
                                                       (expand "x_le")
                                                       (assert))
                                                      ("2"
                                                       (expand "subset?")
                                                       (expand "member")
                                                       (skosimp*)
                                                       (expand
                                                        "nonzero_set?")
                                                       (typepred "a!1")
                                                       (inst -6 "a!1")
                                                       (assert)
                                                       (expand "P1")
                                                       (flatten)
                                                       (inst -8 "x!1")
                                                       (assert))))
                                                    ("2"
                                                     (expand
                                                      "measurable_set?")
                                                     (propax))))
                                                  ("2"
                                                   (hide 2)
                                                   (apply-extensionality
                                                    1
                                                    :hide?
                                                    t)
                                                   (case-replace
                                                    "EXISTS (a: (X!1)): a(x!1)")
                                                   (("1"
                                                     (skosimp)
                                                     (inst + "a!1")
                                                     (typepred "a!1")
                                                     (expand "subset?")
                                                     (inst - "a!1")
                                                     (assert)
                                                     (inst -11 "a!1")
                                                     (assert)
                                                     (expand
                                                      "finite_partition_of?")
                                                     (inst -13 "a!1")
                                                     (flatten))
                                                    ("2"
                                                     (replace 1 2)
                                                     (assert)
                                                     (skosimp)
                                                     (inst + " a!1"))))))
                                                ("2"
                                                 (lemma
                                                  "finite_subset"
                                                  ("s" "X!1" "A" "P1"))
                                                 (("1"
                                                   (assert)
                                                   (lemma
                                                    "finite_countable"
                                                    ("x" "X!1"))
                                                   (expand "restrict")
                                                   (expand
                                                    "is_countable")
                                                   (skosimp)
                                                   (typepred "f!2")
                                                   (inst + "f!2"))
                                                  ("2" (propax))))))
                                              ("4"
                                               (hide 2)
                                               (skosimp)
                                               (expand "convergent?")
                                               (flatten)
                                               (lemma
                                                "finite_subset"
                                                ("s" "X!1" "A" "P1"))
                                               (("1" (assert))
                                                ("2" (propax))))
                                              ("5"
                                               (skosimp)
                                               (lemma
                                                "finite_subset"
                                                ("s" "X!1" "A" "P1"))
                                               (("1"
                                                 (assert)
                                                 (lemma
                                                  "finite_countable"
                                                  ("x" "X!1"))
                                                 (propax))
                                                ("2" (propax))))
                                              ("6"
                                               (skosimp)
                                               (lemma
                                                "finite_subset"
                                                ("s" "X!1" "A" "P1"))
                                               (("1" (assert))
                                                ("2" (propax))))))
                                            ("3"
                                             (skosimp)
                                             (lemma
                                              "finite_subset"
                                              ("s" "X!1" "A" "P1"))
                                             (("1"
                                               (assert)
                                               (lemma
                                                "measurable_Union"
                                                ("M" "X!1"))
                                               (("1"
                                                 (expand
                                                  "measurable_set?")
                                                 (expand "restrict")
                                                 (expand "Union" (-1 1))
                                                 (case-replace
                                                  "{x: T | EXISTS (a: (LAMBDA (s: (S)): X!1(s))): a(x)}={x: T | EXISTS (a: (X!1)): a(x)}")
                                                 (("1"
                                                   (replace -2)
                                                   (typepred "i!1")
                                                   (expand "isf?")
                                                   (flatten)
                                                   (lemma
                                                    "m_monotone"
                                                    ("a"
                                                     "{x: T | EXISTS (a: (X!1)): a(x)}"
                                                     "b"
                                                     "nonzero_set?(i!1)"))
                                                   (("1"
                                                     (split -1)
                                                     (("1"
                                                       (expand "mu_fin?")
                                                       (expand "x_le")
                                                       (assert))
                                                      ("2"
                                                       (expand "subset?")
                                                       (expand "member")
                                                       (skosimp*)
                                                       (typepred "a!1")
                                                       (expand
                                                        "nonzero_set?")
                                                       (inst - "a!1")
                                                       (assert)
                                                       (expand "P1" -8)
                                                       (flatten)
                                                       (inst - "x!1")
                                                       (assert))))
                                                    ("2"
                                                     (expand
                                                      "measurable_set?")
                                                     (propax))))
                                                  ("2"
                                                   (hide 2)
                                                   (apply-extensionality
                                                    1
                                                    :hide?
                                                    t)
                                                   (case-replace
                                                    "EXISTS (a: (X!1)): a(x!1)")
                                                   (("1"
                                                     (skosimp)
                                                     (inst + "a!1")
                                                     (typepred "a!1")
                                                     (expand "subset?")
                                                     (inst - "a!1")
                                                     (assert)
                                                     (inst -12 "a!1")
                                                     (assert)
                                                     (expand
                                                      "finite_partition_of?"
                                                      -14)
                                                     (inst -14 "a!1")
                                                     (flatten))
                                                    ("2"
                                                     (replace 1 2)
                                                     (assert)
                                                     (skosimp)
                                                     (inst + " a!1"))))))
                                                ("2"
                                                 (lemma
                                                  "finite_countable"
                                                  ("x" "X!1"))
                                                 (expand "restrict")
                                                 (expand "is_countable")
                                                 (skosimp)
                                                 (typepred "f!2")
                                                 (inst + "f!2"))))
                                              ("2" (propax))))
                                            ("4"
                                             (skosimp)
                                             (expand "convergent?")
                                             (flatten)
                                             (lemma
                                              "finite_subset"
                                              ("s" "X!1" "A" "P1"))
                                             (("1" (assert))
                                              ("2" (propax))))
                                            ("5"
                                             (skosimp)
                                             (lemma
                                              "finite_subset"
                                              ("s" "X!1" "A" "P1"))
                                             (("1"
                                               (assert)
                                               (lemma
                                                "finite_countable"
                                                ("x" "X!1"))
                                               (propax))
                                              ("2" (propax))))
                                            ("6"
                                             (skosimp)
                                             (lemma
                                              "finite_subset"
                                              ("s" "X!1" "A" "P1"))
                                             (("1" (assert))
                                              ("2" (propax))))))
                                          ("3"
                                           (skosimp)
                                           (typepred "x!1")
                                           (expand "subset?" -17)
                                           (inst -17 "x!1")
                                           (expand "member")
                                           (expand
                                            "finite_partition_of?"
                                            -21)
                                           (inst -21 "x!1")
                                           (flatten)
                                           (case-replace "empty?(x!1)")
                                           (("1"
                                             (rewrite
                                              "emptyset_is_empty?"
                                              -1)
                                             (replace -1)
                                             (expand "mu_fin?")
                                             (rewrite "m_emptyset")
                                             (assert))
                                            ("2"
                                             (assert)
                                             (expand "P1" -1)
                                             (inst - "choose(x!1)")
                                             (assert))))))
                                        ("2"
                                         (hide -19 4)
                                         (skosimp)
                                         (typepred "t!1")
                                         (replace -1)
                                         (expand "subset?" -17)
                                         (inst -17 "t!1")
                                         (expand "member")
                                         (assert)
                                         (case "empty?(t!1)")
                                         (("1"
                                           (rewrite
                                            "emptyset_is_empty?"
                                            -1)
                                           (replace -1)
                                           (lemma "m_emptyset")
                                           (expand "mu")
                                           (replace -1)
                                           (assert))
                                          ("2"
                                           (assert)
                                           (case-replace
                                            "i!1(choose[T](t!1)) = 0")
                                           (("1"
                                             (replace -19 -2 rl)
                                             (assert)
                                             (inst - "choose[T](t!1)")
                                             (assert))
                                            ("2"
                                             (assert)
                                             (replace -18 -1 rl)
                                             (assert)
                                             (inst - "choose[T](t!1)")
                                             (replace -1)
                                             (propax))
                                            ("3"
                                             (expand "nonempty?")
                                             (propax))))))))
                                      ("2"
                                       (hide -19 4)
                                       (expand "convergent?")
                                       (flatten))
                                      ("3"
                                       (skosimp)
                                       (hide 4 -20)
                                       (expand
                                        "finite_partition_of?"
                                        -20)
                                       (expand "subset?" -17)
                                       (inst -17 "Y!1")
                                       (expand "member")
                                       (assert)
                                       (inst -20 "Y!1")
                                       (flatten)
                                       (assert)
                                       (split -22)
                                       (("1"
                                         (rewrite "emptyset_is_empty?")
                                         (replace -1)
                                         (expand "mu_fin?")
                                         (rewrite "m_emptyset")
                                         (assert))
                                        ("2"
                                         (expand "P1" -2)
                                         (inst - "choose(Y!1)")
                                         (assert))))
                                      ("4"
                                       (expand "convergent?")
                                       (flatten))))
                                    ("2"
                                     (expand "convergent?")
                                     (flatten)
                                     (replace -3)
                                     (propax))
                                    ("3"
                                     (skosimp)
                                     (expand "finite_partition_of?")
                                     (inst -21 "Y!1")
                                     (flatten)
                                     (assert))
                                    ("4"
                                     (skosimp)
                                     (expand "nonempty?")
                                     (propax))
                                    ("5"
                                     (skosimp)
                                     (expand "nonempty?")
                                     (propax))
                                    ("6"
                                     (lemma
                                      "finite_countable[setof[T]]"
                                      ("x" "P2"))
                                     (("1" (propax)) ("2" (propax))))
                                    ("7"
                                     (lemma
                                      "finite_countable[setof[T]]"
                                      ("x" "P1"))
                                     (("1" (propax)) ("2" (propax))))))
                                  ("2"
                                   (typepred "p!1")
                                   (expand "finite_partition?")
                                   (flatten))))
                                ("2"
                                 (hide-all-but (-3 1))
                                 (typepred "p!1")
                                 (expand "finite_partition?")
                                 (flatten)
                                 (lemma
                                  "finite_subset"
                                  ("s" "P2" "A" "p!1"))
                                 (("1" (assert)) ("2" (propax))))))
                              ("2"
                               (hide-all-but 1)
                               (grind)
                               (expand "P2")
                               (expand "P1")
                               (apply-extensionality :hide? t)
                               (grind))))
                            ("2"
                             (hide -13 4)
                             (expand "isf_integral")
                             (lemma "sigma_remove"
                              ("t"
                               "CC"
                               "X"
                               "image[T, real](i!1, fullset[T])"
                               "f"
                               "LAMBDA c:
                                            IF c = 0 THEN 0
                                            ELSE c * mu(inverse_image[T, real](i!1, singleton[real](c)))
                                            ENDIF"))
                             (("1"
                               (expand "member")
                               (replace -13)
                               (replace 2)
                               (name-replace "LHS"
                                "sigma[real]
                                          (image[T, real](i!1, fullset[T]),
                                           LAMBDA c:
                                             IF c = 0 THEN 0
                                             ELSE c * mu(inverse_image[T, real](i!1, singleton[real](c)))
                                             ENDIF)")
                               (case-replace
                                "inverse_image[T, real](i!1, singleton[real](CC))=CC_SET")
                               (("1"
                                 (hide -1)
                                 (case "image(i!1, fullset[T])(0)")
                                 (("1"
                                   (case-replace
                                    "remove(CC, image[T, real](i!1, fullset[T]))=image[T, real](II, fullset[T])")
                                   (("1"
                                     (hide -1)
                                     (case
                                      "is_finite(image[T, real](II, fullset[T]))")
                                     (("1"
                                       (lemma
                                        "sigma_eq"
                                        ("X"
                                         "image[T, real](II, fullset[T])"
                                         "f"
                                         "LAMBDA c:
                                                       IF c = 0 THEN 0
                                                       ELSE c * mu(inverse_image[T, real](i!1, singleton[real](c)))
                                                       ENDIF"
                                         "g"
                                         "LAMBDA c:
                                                       IF c = 0 THEN 0
                                                       ELSE c * mu(inverse_image[T, real](II, singleton[real](c)))
                                                       ENDIF"))
                                       (("1"
                                         (split -1)
                                         (("1" (replace -1) (assert))
                                          ("2"
                                           (hide -3 2)
                                           (skosimp)
                                           (typepred "t!1")
                                           (expand "fullset" -1)
                                           (expand "image" -1)
                                           (skosimp)
                                           (case-replace "t!1=0")
                                           (assert)
                                           (case-replace
                                            "inverse_image[T, real](i!1, singleton[real](t!1)) = inverse_image[T, real](II, singleton[real](t!1))")
                                           (hide 3)
                                           (expand "singleton")
                                           (expand "inverse_image")
                                           (expand "member")
                                           (apply-extensionality
                                            1
                                            :hide?
                                            t)
                                           (case-replace
                                            "i!1(x!2) = t!1")
                                           (("1"
                                             (expand "II" (-2 1))
                                             (expand "-")
                                             (expand "*")
                                             (expand "phi")
                                             (expand "member")
                                             (case "CC_SET(x!1)")
                                             (("1"
                                               (replace -1)
                                               (inst-cp -12 "x!1")
                                               (assert))
                                              ("2"
                                               (replace 1)
                                               (case "CC_SET(x!2)")
                                               (("1"
                                                 (inst -12 "x!2")
                                                 (assert)
                                                 (flatten)
                                                 (replace -12)
                                                 (assert)
                                                 (replace -2 -3 rl)
                                                 (typepred "p!1")
                                                 (expand
                                                  "finite_partition?")
                                                 (expand "partition?")
                                                 (flatten)
                                                 (lemma
                                                  "extensionality_postulate"
                                                  ("f"
                                                   "Union(p!1)"
                                                   "g"
                                                   "fullset[T]"))
                                                 (replace -1 -2 rl)
                                                 (inst -2 "x!1")
                                                 (expand "fullset")
                                                 (hide -1)
                                                 (expand "Union")
                                                 (skosimp)
                                                 (typepred "a!1")
                                                 (expand "CC_SET")
                                                 (inst + "a!1")
                                                 (expand
                                                  "finite_partition_of?")
                                                 (inst -23 "a!1")
                                                 (flatten)
                                                 (assert)
                                                 (expand "P1")
                                                 (skosimp)
                                                 (typepred "x!3")
                                                 (expand
                                                  "constant_over?")
                                                 (skolem! -25)
                                                 (inst-cp -25 "x!1")
                                                 (inst -25 "x!3")
                                                 (assert))
                                                ("2"
                                                 (replace 1 3)
                                                 (assert))))))
                                            ("2"
                                             (replace 1 2)
                                             (assert)
                                             (hide -2)
                                             (expand "II" -1)
                                             (expand "-")
                                             (expand "*")
                                             (expand "phi")
                                             (expand "member")
                                             (case "CC_SET(x!2)")
                                             (("1"
                                               (assert)
                                               (inst -11 "x!2")
                                               (assert))
                                              ("2"
                                               (replace 1)
                                               (assert))))))))
                                        ("2"
                                         (expand "convergent?")
                                         (flatten))
                                        ("3"
                                         (skosimp*)
                                         (hide-all-but (1 2 -5))
                                         (expand "isf?")
                                         (expand "simple?")
                                         (flatten)
                                         (lemma
                                          "m_monotone"
                                          ("a"
                                           "inverse_image[T, real](II, singleton[real](c!1))"
                                           "b"
                                           "nonzero_set?(II)"))
                                         (("1"
                                           (split -1)
                                           (("1"
                                             (expand "x_le")
                                             (expand "mu_fin?")
                                             (expand
                                              "measurable_function?")
                                             (inst
                                              -
                                              "singleton[real](c!1)")
                                             (("1"
                                               (expand "measurable_set?")
                                               (replace -2)
                                               (assert))
                                              ("2"
                                               (lemma
                                                "singleton_is_borel"
                                                ("x" "c!1"))
                                               (propax))))
                                            ("2"
                                             (hide-all-but (1 2))
                                             (expand "subset?")
                                             (expand "nonzero_set?")
                                             (expand "singleton")
                                             (expand "inverse_image")
                                             (expand "member")
                                             (skosimp)
                                             (assert))))
                                          ("2"
                                           (expand
                                            "measurable_function?")
                                           (inst
                                            -
                                            "singleton[real](c!1)")
                                           (lemma
                                            "singleton_is_borel"
                                            ("x" "c!1"))
                                           (propax))))
                                        ("4"
                                         (expand "convergent?")
                                         (flatten))))
                                      ("2"
                                       (expand "isf?")
                                       (expand "simple?")
                                       (flatten))))
                                    ("2"
                                     (hide -2 2)
                                     (apply-extensionality 1 :hide? t)
                                     (case-replace
                                      "image[T, real](II, fullset[T])(x!1)")
                                     (("1"
                                       (expand "remove" 1)
                                       (expand "member")
                                       (case-replace "x!1=CC")
                                       (("1"
                                         (hide 1)
                                         (expand "fullset" -2)
                                         (expand "image" -2)
                                         (skosimp)
                                         (expand "II" -2)
                                         (expand "-" -2)
                                         (expand "*" -2)
                                         (expand "phi" -2)
                                         (expand "member")
                                         (case "CC_SET(x!2)")
                                         (("1"
                                           (replace -1)
                                           (inst -11 "x!2")
                                           (assert))
                                          ("2"
                                           (replace 1)
                                           (typepred "p!1")
                                           (expand "finite_partition?")
                                           (expand "partition?")
                                           (flatten)
                                           (expand "fullset")
                                           (lemma
                                            "extensionality_postulate"
                                            ("f"
                                             "Union(p!1)"
                                             "g"
                                             "{x: T | TRUE}"))
                                           (replace -1 -2 rl)
                                           (hide -1)
                                           (inst - "x!2")
                                           (expand "Union" -1)
                                           (skosimp)
                                           (expand "CC_SET")
                                           (inst + "a!1")
                                           (expand
                                            "finite_partition_of?")
                                           (inst -19 "a!1")
                                           (flatten)
                                           (assert)
                                           (expand "P1")
                                           (skosimp)
                                           (typepred "x!3")
                                           (expand "constant_over?")
                                           (skosimp)
                                           (inst-cp -21 "x!2")
                                           (inst -21 "x!3")
                                           (assert))))
                                        ("2"
                                         (assert)
                                         (expand "fullset")
                                         (expand "image" -1)
                                         (skosimp)
                                         (expand "II" -1)
                                         (expand "-" -1)
                                         (expand "*" -1)
                                         (expand "phi" -1)
                                         (expand "member")
                                         (case "CC_SET(x!2)")
                                         (("1" (inst -10 "x!2") (assert))
                                          ("2"
                                           (replace 1)
                                           (expand "image")
                                           (inst + "x!2")
                                           (assert))))))
                                      ("2"
                                       (replace 1 2)
                                       (assert)
                                       (expand "remove")
                                       (flatten)
                                       (expand "member")
                                       (expand "fullset")
                                       (expand "image")
                                       (skosimp*)
                                       (expand "II")
                                       (expand "-" 1)
                                       (expand "*" 1)
                                       (expand "phi")
                                       (expand "member")
                                       (case "CC_SET(x!2)")
                                       (("1"
                                         (expand "CC_SET" -1)
                                         (skosimp)
                                         (typepred "a!1")
                                         (expand "P1" -2)
                                         (flatten)
                                         (inst - "x!2")
                                         (assert))
                                        ("2"
                                         (inst + "x!2")
                                         (replace 1 2)
                                         (assert))))))))
                                  ("2"
                                   (case-replace
                                    "remove(CC, image[T, real](i!1, fullset[T]))=remove(0,image[T, real](II, fullset[T]))")
                                   (("1"
                                     (hide -1)
                                     (case
                                      "is_finite(image[T, real](II, fullset[T]))")
                                     (("1"
                                       (lemma
                                        "sigma_remove"
                                        ("f"
                                         "LAMBDA c:
                                                       IF c = 0 THEN 0
                                                       ELSE c * mu(inverse_image[T, real](i!1, singleton[real](c)))
                                                       ENDIF"
                                         "X"
                                         "image[T, real](II, fullset[T])"
                                         "t"
                                         "0"))
                                       (("1"
                                         (expand "member")
                                         (replace -1 -3)
                                         (hide -1)
                                         (lemma
                                          "sigma_eq"
                                          ("X"
                                           "image[T, real](II, fullset[T])"
                                           "f"
                                           "LAMBDA c:
                                                         IF c = 0 THEN 0
                                                         ELSE c * mu(inverse_image[T, real](i!1, singleton[real](c)))
                                                         ENDIF"
                                           "g"
                                           "LAMBDA c:
                                                         IF c = 0 THEN 0
                                                         ELSE c * mu(inverse_image[T, real](II, singleton[real](c)))
                                                         ENDIF"))
                                         (("1"
                                           (split -1)
                                           (("1"
                                             (replace -1)
                                             (replace -3)
                                             (assert))
                                            ("2"
                                             (hide -2 3)
                                             (skosimp)
                                             (typepred "t!1")
                                             (case-replace "t!1=0")
                                             (assert)
                                             (expand "fullset" -1)
                                             (expand "image" -1)
                                             (skosimp)
                                             (case-replace
                                              "inverse_image[T, real](i!1, singleton[real](t!1))=inverse_image[T, real](II, singleton[real](t!1))")
                                             (hide 3)
                                             (apply-extensionality
                                              1
                                              :hide?
                                              t)
                                             (expand "inverse_image")
                                             (expand "member")
                                             (expand "singleton")
                                             (case-replace
                                              "i!1(x!2) = t!1")
                                             (("1"
                                               (expand "II")
                                               (expand "-")
                                               (expand "*")
                                               (expand "phi")
                                               (expand "member")
                                               (case-replace
                                                "CC_SET(x!2)")
                                               (("1"
                                                 (inst-cp -10 "x!2")
                                                 (assert)
                                                 (flatten)
                                                 (replace -11)
                                                 (assert)
                                                 (hide 1)
                                                 (case-replace
                                                  "CC_SET(x!1)")
                                                 (("1"
                                                   (inst -11 "x!1")
                                                   (assert))
                                                  ("2"
                                                   (replace 1)
                                                   (replace -2 * rl)
                                                   (hide -2 2)
                                                   (typepred "p!1")
                                                   (expand
                                                    "finite_partition?")
                                                   (expand "partition?")
                                                   (flatten)
                                                   (lemma
                                                    "extensionality_postulate"
                                                    ("f"
                                                     "Union(p!1)"
                                                     "g"
                                                     "fullset[T]"))
                                                   (replace -1 -2 rl)
                                                   (inst - "x!1")
                                                   (hide -1)
                                                   (expand "fullset" -1)
                                                   (expand "Union")
                                                   (skosimp)
                                                   (typepred "a!1")
                                                   (expand "CC_SET" 1)
                                                   (inst + "a!1")
                                                   (expand
                                                    "finite_partition_of?"
                                                    -21)
                                                   (inst -21 "a!1")
                                                   (flatten)
                                                   (assert)
                                                   (expand "P1" 1)
                                                   (skosimp)
                                                   (typepred "x!3")
                                                   (expand
                                                    "constant_over?")
                                                   (skolem! -23)
                                                   (inst-cp -23 "x!1")
                                                   (inst -23 "x!3")
                                                   (assert))))
                                                ("2"
                                                 (replace 1)
                                                 (assert))))
                                              ("2"
                                               (replace 1 2)
                                               (assert)
                                               (expand "II")
                                               (expand "-")
                                               (expand "*")
                                               (expand "phi")
                                               (expand "member")
                                               (case-replace
                                                "CC_SET(x!2)")
                                               (("1"
                                                 (inst -10 "x!2")
                                                 (assert))
                                                ("2" (assert))))))))
                                          ("2"
                                           (expand "convergent?")
                                           (flatten))
                                          ("3"
                                           (hide-all-but (-4 1))
                                           (skosimp)
                                           (expand "isf?")
                                           (expand "simple?")
                                           (flatten)
                                           (expand
                                            "measurable_function?")
                                           (inst
                                            -
                                            "singleton[real](c!1)")
                                           (("1"
                                             (split)
                                             (("1"
                                               (expand "measurable_set?")
                                               (propax))
                                              ("2"
                                               (lemma
                                                "m_monotone"
                                                ("a"
                                                 "inverse_image[T, real](II, singleton[real](c!1))"
                                                 "b"
                                                 "nonzero_set?(II)"))
                                               (split -1)
                                               (("1"
                                                 (expand "x_le")
                                                 (expand "mu_fin?")
                                                 (assert))
                                                ("2"
                                                 (expand "subset?")
                                                 (expand "inverse_image")
                                                 (expand "nonzero_set?")
                                                 (expand "singleton")
                                                 (expand "member")
                                                 (skosimp)
                                                 (assert))))))
                                            ("2"
                                             (lemma
                                              "singleton_is_borel"
                                              ("x" "c!1"))
                                             (propax))))))
                                        ("2"
                                         (expand "convergent?")
                                         (flatten))))
                                      ("2"
                                       (expand "isf?")
                                       (expand "simple?")
                                       (flatten))))
                                    ("2"
                                     (apply-extensionality 1 :hide? t)
                                     (hide -1 3)
                                     (case "forall x: i!1(x)/=0")
                                     (("1"
                                       (hide 2)
                                       (expand "remove")
                                       (expand "member")
                                       (case-replace "x!1=0")
                                       (("1" (assert))
                                        ("2"
                                         (assert)
                                         (case-replace "x!1=CC")
                                         (("1"
                                           (assert)
                                           (expand "fullset" -3)
                                           (expand "image" -3)
                                           (skosimp)
                                           (expand "II")
                                           (expand "-")
                                           (expand "*")
                                           (expand "phi")
                                           (expand "member")
                                           (case "CC_SET(x!2)")
                                           (("1"
                                             (replace -1)
                                             (inst -10 "x!2")
                                             (assert))
                                            ("2"
                                             (typepred "p!1")
                                             (expand "finite_partition?")
                                             (expand "partition?")
                                             (flatten)
                                             (lemma
                                              "extensionality_postulate"
                                              ("f"
                                               "Union(p!1)"
                                               "g"
                                               "fullset[T]"))
                                             (replace -1 -2 rl)
                                             (inst -2 "x!2")
                                             (hide -1)
                                             (expand "fullset" -1)
                                             (expand "Union")
                                             (skosimp)
                                             (assert)
                                             (expand "CC_SET" 1)
                                             (inst + "a!1")
                                             (expand
                                              "finite_partition_of?"
                                              -19)
                                             (inst -19 "a!1")
                                             (flatten)
                                             (assert)
                                             (expand "P1" 1)
                                             (skosimp)
                                             (typepred "x!3")
                                             (expand "constant_over?")
                                             (skosimp)
                                             (inst-cp -21 "x!2")
                                             (inst -21 "x!3")
                                             (assert))))
                                          ("2"
                                           (assert)
                                           (case-replace
                                            "image[T, real](i!1, fullset[T])(x!1)")
                                           (("1"
                                             (expand "fullset")
                                             (expand "image")
                                             (skosimp)
                                             (inst + "x!2")
                                             (expand "II")
                                             (expand "-")
                                             (expand "*")
                                             (expand "phi")
                                             (expand "member")
                                             (case "CC_SET(x!2)")
                                             (("1"
                                               (inst -10 "x!2")
                                               (assert))
                                              ("2" (assert))))
                                            ("2"
                                             (replace 1 4)
                                             (assert)
                                             (expand "fullset")
                                             (expand "image")
                                             (skosimp)
                                             (inst + "x!2")
                                             (expand "II")
                                             (expand "-")
                                             (expand "phi")
                                             (expand "member")
                                             (expand "*")
                                             (case "CC_SET(x!2)")
                                             (("1"
                                               (inst -10 "x!2")
                                               (assert))
                                              ("2" (assert))))))))))
                                      ("2"
                                       (skosimp)
                                       (expand "fullset")
                                       (expand "image")
                                       (inst + "x!2")
                                       (assert))))))))
                                ("2"
                                 (hide -1 2)
                                 (apply-extensionality 1 :hide? t)
                                 (case "CC_SET(x!1)")
                                 (("1"
                                   (inst -8 "x!1")
                                   (replace -1)
                                   (expand "inverse_image" 1)
                                   (expand "member")
                                   (expand "singleton")
                                   (flatten))
                                  ("2"
                                   (replace 1 2)
                                   (assert)
                                   (expand "inverse_image" -1)
                                   (expand "member")
                                   (expand "singleton" -1)
                                   (typepred "p!1")
                                   (expand "finite_partition?")
                                   (flatten)
                                   (expand "fullset")
                                   (expand "partition?")
                                   (flatten)
                                   (lemma
                                    "extensionality_postulate"
                                    ("f"
                                     "Union(p!1)"
                                     "g"
                                     "{x: T | TRUE}"))
                                   (replace -1 -2 rl)
                                   (hide -1)
                                   (inst - "x!1")
                                   (expand "Union" -1)
                                   (skosimp)
                                   (typepred "a!1")
                                   (expand "CC_SET" 1)
                                   (inst + "a!1")
                                   (assert)
                                   (expand "finite_partition_of?")
                                   (inst -18 "a!1")
                                   (flatten)
                                   (assert)
                                   (expand "P1")
                                   (skosimp)
                                   (typepred "x!2")
                                   (expand "constant_over?")
                                   (skosimp)
                                   (inst-cp -20 "x!2")
                                   (inst -20 "x!1")
                                   (assert))))))
                              ("2"
                               (hide 2)
                               (expand "convergent?")
                               (flatten)
                               (typepred "i!1")
                               (expand "isf?")
                               (expand "simple?")
                               (flatten))
                              ("3"
                               (hide 2)
                               (skosimp)
                               (typepred "i!1")
                               (expand "isf?" -1)
                               (expand "simple?")
                               (flatten)
                               (expand "measurable_function?")
                               (inst - "singleton[real](c!1)")
                               (("1"
                                 (expand "measurable_set?")
                                 (replace -1)
                                 (lemma
                                  "m_monotone"
                                  ("a"
                                   "inverse_image[T, real](i!1, singleton[real](c!1))"
                                   "b"
                                   "nonzero_set?(i!1)"))
                                 (split -1)
                                 (("1"
                                   (expand "x_le")
                                   (expand "mu_fin?")
                                   (assert))
                                  ("2"
                                   (expand "subset?")
                                   (expand "member")
                                   (expand "nonzero_set?")
                                   (expand "singleton")
                                   (expand "inverse_image")
                                   (expand "member")
                                   (skosimp)
                                   (assert))))
                                ("2"
                                 (lemma "singleton_is_borel" ("x" "c!1"))
                                 (propax))))))
                            ("3" (assert))))
                          ("2"
                           (hide -12 4)
                           (expand "finite_partition_of?")
                           (skosimp)
                           (inst -12 "E!1")
                           (assert)
                           (flatten)
                           (assert)
                           (split)
                           (("1"
                             (expand "constant_over?")
                             (skosimp)
                             (case-replace "y!1=CC")
                             (("1"
                               (inst + "0")
                               (skosimp)
                               (expand "II" 1)
                               (expand "-" 1)
                               (expand "*" 1)
                               (expand "phi" 1)
                               (expand "member")
                               (typepred "x!1")
                               (inst-cp -15 "x!1")
                               (replace -16 * rl)
                               (case-replace "CC_SET(x!1)")
                               (("1" (assert))
                                ("2"
                                 (hide 2)
                                 (expand "CC_SET" 1)
                                 (inst + "E!1")
                                 (expand "P1" 1)
                                 (skosimp)
                                 (inst -15 "x!2")
                                 (assert))))
                              ("2"
                               (inst + "y!1")
                               (skosimp)
                               (expand "II" 2)
                               (expand "-" 2)
                               (expand "*" 2)
                               (expand "phi" 2)
                               (expand "member")
                               (case "CC_SET(x!1)")
                               (("1"
                                 (expand "CC_SET" -1)
                                 (skosimp)
                                 (typepred "a!1")
                                 (expand "P1" -2)
                                 (flatten)
                                 (typepred "x!1")
                                 (typepred "p!1")
                                 (expand "finite_partition?")
                                 (flatten)
                                 (expand "fullset")
                                 (expand "partition?")
                                 (flatten)
                                 (inst -2 "a!1" "E!1")
                                 (case "a!1=E!1")
                                 (("1"
                                   (assert)
                                   (inst -8 "x!1")
                                   (inst -22 "x!1")
                                   (assert))
                                  ("2"
                                   (assert)
                                   (expand "disjoint?")
                                   (expand "empty?")
                                   (inst - "x!1")
                                   (expand "intersection")
                                   (expand "member")
                                   (propax))))
                                ("2"
                                 (assert)
                                 (typepred "x!1")
                                 (inst -14 "x!1"))))))
                            ("2"
                             (flatten)
                             (assert)
                             (expand "II" 2)
                             (expand "-" 2)
                             (replace -14)
                             (expand "*" 2)
                             (assert)
                             (expand "phi")
                             (expand "member")
                             (case-replace "CC_SET(choose(E!1))")
                             (("1"
                               (expand "CC_SET" -1)
                               (skosimp)
                               (typepred "a!1")
                               (expand "P1" -2)
                               (flatten)
                               (inst - "choose(E!1)")
                               (assert))
                              ("2" (assert))))))))
                        ("2"
                         (hide -14 4)
                         (apply-extensionality 1 :hide? t)
                         (case-replace "x!1=0")
                         (("1"
                           (assert)
                           (expand "rest" -2)
                           (expand "remove")
                           (expand "member")
                           (expand "NZ_IMAGE")
                           (propax))
                          ("2"
                           (assert)
                           (case-replace "image(II, fullset[T])(x!1)")
                           (("1"
                             (expand "fullset" -1)
                             (expand "image" -1)
                             (skosimp)
                             (expand "II")
                             (expand "-" -1)
                             (case "CC_SET(x!2)")
                             (("1"
                               (inst -9 "x!2")
                               (assert)
                               (flatten)
                               (replace -9)
                               (expand "*" -2)
                               (expand "phi" -2)
                               (expand "member")
                               (propax))
                              ("2"
                               (expand "*" -1)
                               (expand "phi" -1)
                               (expand "member")
                               (assert)
                               (expand "rest" 3)
                               (expand "remove")
                               (expand "member")
                               (expand "NZ_IMAGE" 3 2)
                               (expand "fullset" 3)
                               (expand "image" 3)
                               (split 3)
                               (("1"
                                 (expand "/=" 1)
                                 (expand "CC_SET" 1)
                                 (typepred "p!1")
                                 (expand "finite_partition?")
                                 (flatten)
                                 (expand "fullset")
                                 (expand "partition?")
                                 (flatten)
                                 (lemma
                                  "extensionality_postulate"
                                  ("f" "Union(p!1)" "g" "{x: T | TRUE}"))
                                 (replace -1 -2 rl)
                                 (hide -1)
                                 (inst - "x!2")
                                 (expand "Union" -1)
                                 (skosimp)
                                 (typepred "a!1")
                                 (inst + "a!1")
                                 (split 1)
                                 (("1"
                                   (expand "finite_partition_of?")
                                   (inst -20 "a!1")
                                   (flatten))
                                  ("2"
                                   (expand "P1" 1)
                                   (skosimp)
                                   (typepred "x!3")
                                   (expand "finite_partition_of?")
                                   (inst -21 "a!1")
                                   (flatten)
                                   (expand "constant_over?")
                                   (skosimp)
                                   (inst-cp -22 "x!2")
                                   (inst -22 "x!3")
                                   (assert)
                                   (expand "CC" 1)
                                   (assert))))
                                ("2" (inst + "x!2"))))))
                            ("2"
                             (replace 1 3)
                             (assert)
                             (expand "rest" -1)
                             (expand "remove")
                             (flatten)
                             (expand "member")
                             (expand "fullset" 1)
                             (expand "image" 1)
                             (expand "NZ_IMAGE" -1)
                             (expand "fullset" -1)
                             (expand "image" -1)
                             (skosimp)
                             (inst + "x!2")
                             (expand "II" 1)
                             (expand "-")
                             (expand "*" 1)
                             (expand "phi" 1)
                             (expand "member")
                             (case "CC_SET(x!2)")
                             (("1"
                               (replace -1)
                               (inst -9 "x!2")
                               (assert)
                               (flatten)
                               (assert)
                               (expand "CC")
                               (assert))
                              ("2" (assert))))))))))
                      ("2" (propax))))
                    ("2" (propax))))
                  ("2" (propax))))
                ("2"
                 (typepred "i!1")
                 (expand "isf?")
                 (flatten)
                 (case "subset?(CC_SET,nonzero_set?(i!1))")
                 (("1"
                   (lemma "m_monotone"
                    ("a" "CC_SET" "b" "nonzero_set?(i!1)"))
                   (assert)
                   (expand "x_le")
                   (expand "mu_fin?")
                   (assert))
                  ("2"
                   (hide -12 5)
                   (expand "subset?" 1)
                   (expand "member")
                   (skosimp)
                   (inst -6 "x!1")
                   (assert)
                   (flatten)
                   (expand "nonzero_set?")
                   (assert))))
                ("3" (propax))))
              ("2"
               (hide -1 -7 4)
               (skosimp)
               (expand "CC_SET")
               (skosimp)
               (typepred "a!1")
               (split)
               (("1" (expand "P1" -2) (flatten) (inst - "x!1"))
                ("2" (inst + "a!1"))))))
            ("2"
             (hide-all-but (-1 -7 1))
             (lemma "finite_countable[set[T]]" ("x" "P1"))
             (("1"
               (hide -2)
               (expand "restrict")
               (expand "is_countable")
               (skosimp)
               (typepred "f!1")
               (inst + "lambda (x:(LAMBDA (s: (S)): P1(s))): f!1(x)")
               (expand "injective?")
               (skosimp)
               (inst - "x1!1" "x2!1")
               (assert))
              ("2" (propax))))))
          ("2"
           (hide-all-but (-1 -6 1))
           (typepred "p!1")
           (expand "finite_partition?")
           (flatten)
           (lemma "finite_subset[set[T]]" ("s" "P1" "A" "p!1"))
           (("1" (assert)) ("2" (propax))))))
        ("2"
         (expand "P1")
         (expand "subset?")
         (expand "member")
         (skosimp))))
      ("3"
       (hide 2)
       (skosimp*)
       (expand "convergent?")
       (typepred "p!1")
       (expand "finite_partition?")
       (flatten))
      ("4"
       (hide 2)
       (skosimp*)
       (expand "finite_partition_of?")
       (inst - "Y!1")
       (flatten)
       (assert))
      ("5" (hide 2) (skosimp*) (expand "nonempty?") (propax))
      ("6" (hide 2) (skosimp*) (expand "nonempty?") (propax))
      ("7"
       (hide 2)
       (skosimp*)
       (typepred "p!1")
       (expand "finite_partition?")
       (flatten)
       (lemma "finite_countable[set[T]]" ("x" "p!1"))
       (("1" (propax)) ("2" (propax))))
      ("8"
       (hide 2)
       (skosimp)
       (typepred "i!1")
       (expand "isf?")
       (expand "simple?")
       (flatten)
       (lemma "finite_subset[real]"
        ("s"
         "{c | c /= 0 AND image[T, real](i!1, fullset[T])(c)}"
         "A"
         "image(i!1, fullset[T])"))
       (("1"
         (assert)
         (hide-all-but 1)
         (expand "fullset")
         (expand "image")
         (expand "subset?")
         (expand "member")
         (skosimp*))
        ("2" (propax))))))
    ("3"
     (hide 2)
     (skosimp*)
     (expand "convergent?")
     (typepred "p!1")
     (expand "finite_partition?")
     (flatten))
    ("4"
     (skosimp*)
     (expand "finite_partition_of?")
     (inst - "Y!1")
     (flatten)
     (assert))
    ("5" (hide 2) (skosimp*) (expand "nonempty?") (propax))
    ("6" (hide 2) (skosimp*) (expand "nonempty?") (propax))
    ("7"
     (hide 2)
     (skosimp)
     (typepred "p!1")
     (expand "finite_partition?")
     (flatten)
     (lemma "finite_countable[set[T]]" ("x" "p!1"))
     (("1" (propax)) ("2" (propax))))
    ("8"
     (hide 2)
     (skosimp)
     (hide -1)
     (typepred "i!1")
     (expand "isf?")
     (expand "simple?")
     (flatten)
     (lemma "finite_subset[real]"
      ("s"
       "{c | c /= 0 AND image[T, real](i!1, fullset[T])(c)}"
       "A"
       "image(i!1, fullset[T])"))
     (("1"
       (assert)
       (hide-all-but 1)
       (expand "fullset")
       (expand "image")
       (expand "subset?")
       (expand "member")
       (skosimp*))
      ("2" (propax))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "i!1")
   (rewrite "isf_def")
   (skosimp)
   (lemma "isf_integral_def" ("i" "i!1" "p" "p!1"))
   (typepred "p!1")
   (replace -2)
   (lemma "isf_integral_def" ("i" "c!1*i!1" "p" "p!1"))
   (split -1)
   (("1"
     (replace -1)
     (replace -4)
     (assert)
     (hide -1 -4)
     (rewrite "sigma_scal" 1 :dir rl)
     (("1"
       (case-replace
        "(LAMBDA Y:
                     IF (NOT p!1(Y)) OR empty?(Y) OR (c!1 * i!1)(choose[T](Y)) = 0
                       THEN 0
                     ELSE (c!1 * i!1)(choose[T](Y)) * mu(Y)
                     ENDIF)
               =c!1 *(LAMBDA (Y_1: set[T]):
                         IF (NOT p!1(Y_1)) OR
                             empty?(Y_1) OR i!1(choose[T](Y_1)) = 0
                           THEN 0
                         ELSE i!1(choose[T](Y_1)) * mu(Y_1)
                         ENDIF)")
       (("1"
         (hide 2)
         (apply-extensionality 1 :hide? t)
         (("1"
           (expand "*")
           (case-replace "p!1(x!1)")
           (("1"
             (case-replace "empty?(x!1)")
             (("1" (assert))
              ("2"
               (assert)
               (case-replace "i!1(choose[T](x!1)) = 0")
               (("1" (assert))
                ("2"
                 (assert)
                 (case-replace "c!1=0")
                 (("1" (assert)) ("2" (assert))))
                ("3" (expand "nonempty?") (propax))))))
            ("2" (assert))))
          ("2"
           (skosimp*)
           (expand "finite_partition_of?")
           (inst - "Y!1")
           (flatten)
           (assert))
          ("3" (skosimp) (expand "nonempty?") (propax))
          ("4"
           (skosimp*)
           (expand "finite_partition_of?")
           (inst - "Y!1")
           (flatten)
           (assert)
           (expand "*")
           (replace -5)
           (assert))
          ("5" (skosimp) (expand "nonempty?") (propax))
          ("6" (skosimp) (expand "nonempty?") (propax))))
        ("2"
         (hide 2)
         (skosimp)
         (expand "finite_partition_of?")
         (inst - "Y!1")
         (flatten)
         (assert))
        ("3" (skosimp) (expand "nonempty?") (propax))
        ("4"
         (skosimp)
         (hide 4)
         (expand "*")
         (expand "finite_partition_of?")
         (inst - "Y!1")
         (flatten)
         (assert))
        ("5" (skosimp) (expand "nonempty?") (propax))
        ("6" (skosimp) (expand "nonempty?") (propax))))
      ("2"
       (hide 2)
       (expand "convergent?")
       (flatten)
       (hide 2)
       (expand "finite_partition?")
       (flatten))
      ("3"
       (skosimp)
       (expand "finite_partition_of?")
       (hide 4)
       (inst - "Y!1")
       (flatten)
       (assert))
      ("4" (skosimp) (expand "nonempty?") (propax))
      ("5" (skosimp) (expand "nonempty?") (propax))))
    ("2"
     (hide -3 2)
     (expand "finite_partition_of?")
     (skosimp)
     (typepred "E!1")
     (inst - "E!1")
     (flatten)
     (replace -3)
     (split 1)
     (("1"
       (expand "*")
       (expand "constant_over?")
       (skosimp)
       (inst + "c!1*y!1")
       (skosimp)
       (inst - "x!1")
       (assert))
      ("2"
       (flatten)
       (split -5)
       (("1" (propax)) ("2" (expand "*" 2) (replace -1) (assert))
        ("3" (propax))))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "isf_integral_scal" ("i" "i!1" "c" "-1"))
   (expand "-")
   (expand "*")
   (assert))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "i2!1")
   (typepred "i1!1")
   (expand "isf?")
   (flatten)
   (rewrite "simple_def2")
   (rewrite "simple_def2")
   (skosimp*)
   (name "PP" "join(P!1,P!2)")
   (case "every(S,PP)")
   (("1"
     (hide -3 -6)
     (case "every(constant_over?(i1!1), PP)")
     (("1"
       (case "every(constant_over?(i2!1), PP)")
       (("1"
         (case "every(constant_over?(i1!1+i2!1), PP)")
         (("1"
           (hide -6 -8)
           (lemma "isf_integral_def" ("i" "i1!1" "p" "PP"))
           (lemma "isf_integral_def" ("i" "i2!1" "p" "PP"))
           (lemma "isf_integral_def" ("i" "i1!1+i2!1" "p" "PP"))
           (split -1)
           (("1"
             (split -2)
             (("1"
               (split -3)
               (("1"
                 (replace -1)
                 (replace -2)
                 (replace -3)
                 (assert)
                 (hide -1 -2 -3)
                 (hide -5)
                 (typepred "PP")
                 (copy -1)
                 (expand "finite_partition?" -1)
                 (flatten)
                 (hide -1)
                 (case "finite_partition_of?(i2!1)(PP)")
                 (("1"
                   (case "finite_partition_of?(i1!1)(PP)")
                   (("1"
                     (case "finite_partition_of?(i1!1+i2!1)(PP)")
                     (("1"
                       (lemma "sigma_plus[set[T]]"
                        ("X"
                         "PP"
                         "f"
                         "LAMBDA (Y_1: set[T]):
                                       IF (NOT PP(Y_1)) OR empty?(Y_1) OR i1!1(choose[T](Y_1)) = 0
                                         THEN 0
                                       ELSE i1!1(choose[T](Y_1)) * mu(Y_1)
                                       ENDIF"
                         "g"
                         "LAMBDA (Y_1: set[T]):
                                       IF (NOT PP(Y_1)) OR empty?(Y_1) OR i2!1(choose[T](Y_1)) = 0
                                         THEN 0
                                       ELSE i2!1(choose[T](Y_1)) * mu(Y_1)
                                       ENDIF"))
                       (("1"
                         (replace -1 1 rl)
                         (hide -1)
                         (case-replace
                          "(LAMBDA (Y_2: set[T]):
                                       IF (NOT PP(Y_2)) OR
                                           empty?(Y_2) OR (i1!1 + i2!1)(choose[T](Y_2)) = 0
                                         THEN 0
                                       ELSE (i1!1 + i2!1)(choose[T](Y_2)) * mu(Y_2)
                                       ENDIF)
                                 =

                                       ((LAMBDA (Y_1: set[T]):
                                          IF (NOT PP(Y_1)) OR empty?(Y_1) OR i1!1(choose[T](Y_1)) = 0
                                            THEN 0
                                          ELSE i1!1(choose[T](Y_1)) * mu(Y_1)
                                          ENDIF)
                                        +
                                        (LAMBDA (Y_1: set[T]):
                                           IF (NOT PP(Y_1)) OR
                                               empty?(Y_1) OR i2!1(choose[T](Y_1)) = 0
                                             THEN 0
                                           ELSE i2!1(choose[T](Y_1)) * mu(Y_1)
                                           ENDIF))")
                         (("1"
                           (hide 2)
                           (apply-extensionality :hide? t)
                           (("1"
                             (expand "+")
                             (case-replace "PP(x!1)")
                             (("1"
                               (case-replace "empty?(x!1)")
                               (("1" (assert))
                                ("2"
                                 (assert)
                                 (case-replace
                                  "i1!1(choose[T](x!1)) = 0")
                                 (("1"
                                   (case-replace
                                    "i2!1(choose[T](x!1)) = 0")
                                   (("1" (assert)) ("2" (assert))))
                                  ("2"
                                   (case-replace
                                    "i2!1(choose[T](x!1)) = 0")
                                   (("1" (assert))
                                    ("2"
                                     (assert)
                                     (case-replace
                                      "i2!1(choose[T](x!1))=-i1!1(choose[T](x!1))")
                                     (("1" (assert)) ("2" (assert))))))
                                  ("3" (expand "nonempty?") (propax))))))
                              ("2" (assert))))
                            ("2"
                             (skosimp)
                             (expand "finite_partition_of?" -4)
                             (inst - "Y!1")
                             (flatten)
                             (assert))
                            ("3" (skosimp) (expand "nonempty?") (propax))
                            ("4"
                             (skosimp)
                             (expand "finite_partition_of?" -3)
                             (inst - "Y!1")
                             (flatten)
                             (assert))
                            ("5" (skosimp) (expand "nonempty?") (propax))
                            ("6"
                             (skosimp*)
                             (expand "finite_partition_of?" -2)
                             (inst - "Y!1")
                             (flatten)
                             (assert))
                            ("7" (skosimp) (expand "nonempty?") (propax))
                            ("8"
                             (skosimp)
                             (expand "nonempty?")
                             (propax))))
                          ("2"
                           (hide 2)
                           (skosimp)
                           (expand "finite_partition_of?" -2)
                           (inst - "Y!1")
                           (flatten)
                           (assert))
                          ("3" (skosimp) (expand "nonempty?") (propax))))
                        ("2" (hide 2) (expand "convergent?") (flatten))
                        ("3"
                         (hide 2)
                         (skosimp)
                         (expand "finite_partition_of?" -4)
                         (inst - "Y!1")
                         (flatten)
                         (assert))
                        ("4" (skosimp) (expand "nonempty?") (propax))
                        ("5" (expand "convergent?") (flatten))
                        ("6"
                         (hide 2)
                         (skosimp)
                         (expand "finite_partition_of?" -3)
                         (inst - "Y!1")
                         (flatten)
                         (assert))
                        ("7" (skosimp) (expand "nonempty?") (propax))
                        ("8" (skosimp) (expand "nonempty?") (propax))))
                      ("2"
                       (hide 2 -1 -2)
                       (expand "finite_partition_of?")
                       (skosimp)
                       (expand "every")
                       (inst - "E!1")
                       (inst -6 "E!1")
                       (assert)
                       (flatten)
                       (expand "constant_over?")
                       (skosimp)
                       (hide -4 -5)
                       (lemma "isf_add" ("i1" "i1!1" "i2" "i2!1"))
                       (expand "isf?")
                       (flatten)
                       (lemma "m_monotone"
                        ("a"
                         "E!1"
                         "b"
                         "nonzero_set?((+[T])(i1!1, i2!1))"))
                       (split -1)
                       (("1" (expand "x_le") (expand "mu_fin?") (assert))
                        ("2"
                         (expand "nonzero_set?")
                         (expand "subset?")
                         (expand "member")
                         (skosimp)
                         (inst-cp - "x!1")
                         (replace -2)
                         (inst - "choose[T](E!1)")
                         (replace -7 * rl)
                         (propax))))))
                    ("2"
                     (hide 2 -1 -4 -5 -9)
                     (expand "finite_partition_of?")
                     (skosimp)
                     (typepred "E!1")
                     (expand "every")
                     (inst - "E!1")
                     (inst - "E!1")
                     (assert)
                     (flatten)
                     (expand "constant_over?")
                     (skosimp)
                     (inst-cp - "choose[T](E!1)")
                     (replace -5 * rl)
                     (hide -5)
                     (lemma "m_monotone"
                      ("a" "E!1" "b" "nonzero_set?(i1!1)"))
                     (split -1)
                     (("1" (expand "x_le") (expand "mu_fin?") (assert))
                      ("2"
                       (expand "subset?")
                       (skosimp)
                       (expand "member")
                       (expand "nonzero_set?")
                       (inst - "x!1")
                       (assert))))))
                  ("2"
                   (hide 2 -2 -3 -5 -7)
                   (expand "finite_partition_of?")
                   (skosimp)
                   (expand "every")
                   (inst - "E!1")
                   (inst - "E!1")
                   (assert)
                   (flatten)
                   (lemma "m_monotone"
                    ("a" "E!1" "b" "nonzero_set?(i2!1)"))
                   (split -1)
                   (("1" (expand "x_le") (expand "mu_fin?") (assert))
                    ("2"
                     (expand "subset?")
                     (skosimp)
                     (expand "member")
                     (expand "nonzero_set?")
                     (expand "constant_over?")
                     (skosimp)
                     (inst-cp - "choose[T](E!1)")
                     (inst - "x!1")
                     (assert))))))
                ("2"
                 (hide -1 -2 2)
                 (expand "finite_partition_of?")
                 (skosimp)
                 (typepred "E!1")
                 (expand "every")
                 (inst -4 "E!1")
                 (replace -4)
                 (inst -5 "E!1")
                 (assert)
                 (flatten)
                 (lemma "m_monotone"
                  ("a" "E!1" "b" "nonzero_set?(i1!1)"))
                 (split -1)
                 (("1" (expand "x_le") (expand "mu_fin?") (assert))
                  ("2"
                   (expand "subset?")
                   (skosimp)
                   (expand "member")
                   (expand "nonzero_set?")
                   (expand "constant_over?")
                   (skosimp)
                   (inst-cp -6 "x!1")
                   (inst -6 "choose(E!1)")
                   (assert))))))
              ("2"
               (hide -1 -2 2)
               (expand "finite_partition_of?")
               (skosimp)
               (expand "every")
               (hide -1 -3 -6 -5)
               (inst - "E!1")
               (inst - "E!1")
               (assert)
               (flatten)
               (expand "constant_over?")
               (skosimp)
               (lemma "m_monotone" ("a" "E!1" "b" "nonzero_set?(i2!1)"))
               (split -1)
               (("1" (expand "x_le") (expand "mu_fin?") (assert))
                ("2"
                 (expand "subset?")
                 (skosimp)
                 (expand "member")
                 (expand "nonzero_set?")
                 (inst-cp - "x!1")
                 (inst - "choose(E!1)")
                 (assert))))))
            ("2"
             (hide -1 -2 -4 -5 -7 2)
             (expand "finite_partition_of?")
             (skosimp)
             (expand "every")
             (inst - "E!1")
             (inst - "E!1")
             (assert)
             (flatten)
             (expand "constant_over?")
             (skosimp)
             (expand "+")
             (lemma "m_monotone"
              ("a"
               "E!1"
               "b"
               "union(nonzero_set?(i1!1),nonzero_set?(i2!1))"))
             (("1"
               (split -1)
               (("1"
                 (expand "x_le")
                 (expand "mu_fin?")
                 (assert)
                 (lemma "m_union"
                  ("a" "nonzero_set?(i1!1)" "b" "nonzero_set?(i2!1)"))
                 (("1" (expand "x_le") (expand "x_add") (propax))
                  ("2" (rewrite "nonzero_measurable"))
                  ("3" (rewrite "nonzero_measurable"))))
                ("2"
                 (expand "subset?")
                 (expand "member")
                 (expand "union")
                 (expand "nonzero_set?")
                 (expand "member")
                 (skosimp)
                 (inst-cp - "x!1")
                 (inst - "choose(E!1)")
                 (assert))))
              ("2" (rewrite "measurable_union"))))))
          ("2"
           (hide 2)
           (expand "every")
           (skosimp)
           (typepred "x!1")
           (replace -5 -1 rl)
           (hide -5)
           (expand "join")
           (skosimp)
           (replace -1)
           (hide -1)
           (inst - "intersection(a1!1, a2!1)")
           (("1"
             (inst - "intersection(a1!1, a2!1)")
             (("1"
               (expand "constant_over?")
               (skosimp*)
               (inst + "y!2+y!1")
               (skosimp)
               (inst - "x!2")
               (inst - "x!2")
               (expand "+" 1)
               (assert)
               (replace -1)
               (replace -2)
               (assert))
              ("2"
               (hide 2)
               (expand "PP")
               (expand "join")
               (inst + "a1!1" "a2!1"))))
            ("2"
             (hide 2)
             (expand "PP")
             (expand "join")
             (inst + "a1!1" "a2!1"))))))
        ("2"
         (hide 2)
         (expand "every")
         (skosimp)
         (typepred "x!1")
         (expand "PP")
         (expand "join")
         (skosimp)
         (replace -1)
         (hide -1)
         (expand "constant_over?")
         (typepred "a2!1")
         (inst -6 "a2!1")
         (skosimp)
         (inst + "y!1")
         (skosimp)
         (typepred "x!2")
         (expand "intersection")
         (flatten)
         (expand "member")
         (inst -8 "x!2"))))
      ("2"
       (hide -4 -6 2)
       (hide -1 -2 -4)
       (expand "constant_over?")
       (expand "every")
       (skosimp)
       (typepred "x!1")
       (expand "PP")
       (expand "join")
       (skosimp)
       (inst -2 "a1!1")
       (skosimp)
       (inst + "y!1")
       (skosimp)
       (inst - "x!2")
       (typepred "x!2")
       (replace -2 -1)
       (expand "intersection")
       (expand "member")
       (flatten))))
    ("2"
     (hide 2 -3 -4 -6 -7)
     (expand "every")
     (skosimp)
     (typepred "x!1")
     (replace -2 -1 rl)
     (hide -2)
     (expand "join")
     (skosimp)
     (replace -1)
     (hide -1)
     (inst - "a1!1")
     (inst - "a2!1")
     (lemma "measurable_intersection" ("a" "a1!1" "b" "a2!1"))
     (("1" (expand "measurable_set?") (propax))
      ("2" (expand "measurable_set?") (propax))
      ("3" (expand "measurable_set?") (propax))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "isf_integral_opp" ("i" "i2!1"))
   (lemma "isf_integral_add" ("i1" "i1!1" "i2" "-i2!1"))
   (expand "-")
   (expand "+")
   (assert))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (name "NZ" "lambda (i:isf): image[T,real](i,nonzero_set?(i))")
   (case "FORALL (i: isf,n:nat): card[real](NZ(i)) = n =>(FORALL x: i(x) >= 0) IMPLIES isf_integral(i) >= 0")
   (("1"
     (skosimp)
     (inst - "i!1" "card[real](NZ(i!1))")
     (("1" (split -1) (("1" (propax)) ("2" (propax))))
      ("2"
       (typepred "i!1")
       (expand "isf?")
       (expand "simple?")
       (flatten)
       (lemma "finite_subset[real]")
       (inst - "image[T,real](i!1, fullset[T])" "NZ(i!1)")
       (split -1)
       (("1" (propax))
        ("2"
         (hide-all-but 1)
         (expand "NZ")
         (expand "fullset")
         (expand "nonzero_set?")
         (expand "image")
         (expand "subset?")
         (expand "member")
         (skosimp*)
         (typepred "x!2")
         (inst + "x!2"))))))
    ("2"
     (hide 2)
     (induct "n")
     (("1"
       (skosimp)
       (rewrite "empty_card" -1 :dir rl)
       (expand "empty?")
       (hide -3)
       (case-replace "i!1=lambda x: 0")
       (("1" (rewrite "isf_integral_zero") (assert))
        ("2"
         (apply-extensionality 1 :hide? t)
         (inst - "i!1(x!1)")
         (expand "NZ")
         (expand "nonzero_set?")
         (expand "image")
         (inst + "x!1"))))
      ("2"
       (skosimp*)
       (lemma "nonempty_card[real]" ("S" "NZ(i!1)"))
       (assert)
       (lemma "card_rest[real]" ("S" "NZ(i!1)"))
       (replace -4)
       (assert)
       (lemma "choose_rest[real]" ("a" "NZ(i!1)"))
       (expand "nonempty?")
       (lemma "choose_member[real]" ("a" "NZ(i!1)"))
       (replace 1)
       (name "YY" "choose[real](NZ(i!1))")
       (replace -1)
       (name "XX" "inverse_image[T,real](i!1,singleton[real](YY))")
       (lemma "singleton_is_borel[real,metric_induced_topology]"
        ("x" "YY"))
       (typepred "i!1")
       (expand "isf?")
       (expand "simple?")
       (flatten)
       (expand "measurable_function?")
       (inst - "singleton[real](YY)")
       (replace -5)
       (copy -1)
       (expand "measurable_set?" -1)
       (case "mu_fin?(XX)")
       (("1"
         (lemma "isf_phi" ("E" "XX"))
         (("1"
           (lemma "isf_scal" ("c" "YY" "i" "phi[T, S](XX)"))
           (("1"
             (lemma "isf_diff"
              ("i1" "i!1" "i2" "*[T](YY, phi[T, S](XX))"))
             (("1"
               (case "rest[real](NZ(i!1))=NZ((-[T])(i!1, *[T](YY, phi[T, S](XX))))")
               (("1"
                 (inst -16 "(-[T])(i!1, *[T](YY, phi[T, S](XX)))")
                 (replace -1 -16 rl)
                 (replace -15)
                 (hide-all-but (-2 -5 -7 -11 -12 -13 -16 -18 2))
                 (split -7)
                 (("1"
                   (rewrite "isf_integral_diff" -1)
                   (case "YY<0")
                   (("1"
                     (expand "member" -8)
                     (expand "NZ" -8)
                     (expand "nonzero_set?")
                     (expand "image")
                     (skosimp)
                     (typepred "x!1")
                     (inst -10 "x!1")
                     (assert))
                    ("2"
                     (case-replace "YY=0")
                     (("1"
                       (assert)
                       (rewrite "isf_integral_scal" *)
                       (assert))
                      ("2"
                       (lemma "both_sides_times_pos_le1"
                        ("pz" "YY" "x" "0" "y" "mu(XX)"))
                       (("1"
                         (assert)
                         (assert)
                         (rewrite "isf_integral_scal" *)
                         (assert)
                         (rewrite "isf_integral_phi")
                         (typepred "mu(XX)")
                         (assert))
                        ("2"
                         (assert)
                         (expand "measurable_set?")
                         (propax))
                        ("3" (assert))))))))
                  ("2"
                   (skosimp)
                   (expand "-" 1)
                   (expand "*" 1)
                   (expand "phi" 1)
                   (expand "XX" 1)
                   (expand "singleton" 1)
                   (expand "inverse_image" 1)
                   (expand "member" 1)
                   (case-replace "i!1(x!1)=YY")
                   (("1" (assert)) ("2" (assert) (inst -7 "x!1"))))))
                ("2"
                 (expand "rest" 1)
                 (replace -11)
                 (replace 2)
                 (expand "remove")
                 (expand "member")
                 (apply-extensionality 1 :hide? t)
                 (expand "NZ")
                 (expand "nonzero_set?")
                 (expand "*" 1)
                 (expand "-" 1)
                 (expand "image")
                 (case-replace "x!1=YY")
                 (("1"
                   (assert)
                   (skosimp)
                   (typepred "x!2")
                   (assert)
                   (expand "phi")
                   (expand "member")
                   (expand "XX")
                   (expand "singleton")
                   (expand "inverse_image")
                   (expand "member")
                   (case-replace "i!1(x!2) = YY")
                   (("1" (assert)) ("2" (assert))))
                  ("2"
                   (assert)
                   (case-replace
                    "(EXISTS (x_1: ({x | i!1(x) /= 0})): x!1 = i!1(x_1))")
                   (("1"
                     (skosimp)
                     (typepred "x!2")
                     (inst + "x!2")
                     (("1"
                       (expand "phi" 2)
                       (expand "XX" 2)
                       (expand "singleton" 2)
                       (expand "inverse_image" 2)
                       (expand "member" 2)
                       (assert))
                      ("2"
                       (expand "phi" 1)
                       (expand "XX" 1)
                       (expand "singleton" 1)
                       (expand "inverse_image" 1)
                       (expand "member" 1)
                       (assert))))
                    ("2"
                     (replace 1 3)
                     (assert)
                     (skosimp*)
                     (typepred "x!2")
                     (expand "phi" (-1 -2))
                     (expand "XX" (-1 -2))
                     (expand "singleton" (-1 -2))
                     (expand "inverse_image" (-1 -2))
                     (expand "member" (-1 -2))
                     (case-replace "i!1(x!2) = YY")
                     (("1" (assert)) ("2" (assert) (inst + "x!2"))))))))
                ("3" (propax))))
              ("2" (propax))))
            ("2" (propax))))
          ("2" (propax))))
        ("2"
         (hide-all-but (-4 1 -1))
         (lemma "nonzero_measurable" ("g" "i!1"))
         (lemma "m_monotone" ("a" "XX" "b" "nonzero_set?(i!1)"))
         (split -1)
         (("1" (expand "x_le") (expand "mu_fin?") (assert))
          ("2"
           (hide-all-but 1)
           (expand "XX")
           (expand "nonzero_set?")
           (expand "singleton")
           (expand "inverse_image")
           (expand "member")
           (expand "subset?")
           (expand "member")
           (skosimp*)
           (typepred "YY")
           (expand "NZ")
           (expand "nonzero_set?")
           (expand "image")
           (skosimp)
           (typepred "x!2")
           (assert))))
        ("3" (propax))))
      ("3"
       (skosimp)
       (typepred "i!1")
       (expand "isf?")
       (expand "simple?")
       (flatten)
       (lemma "finite_subset[real]"
        ("A" "image[T,real](i!1, fullset[T])" "s" "NZ(i!1)"))
       (("1" (assert) (hide-all-but 1) (expand "NZ") (grind))
        ("2" (propax))))))
    ("3"
     (skosimp)
     (typepred "i!1")
     (expand "isf?")
     (expand "simple?")
     (flatten)
     (lemma "finite_subset[real]"
      ("A" "image[T,real](i!1, fullset[T])" "s" "NZ(i!1)"))
     (("1"
       (split -1)
       (("1" (propax))
        ("2"
         (hide-all-but 1)
         (expand "NZ")
         (expand "fullset")
         (expand "nonzero_set?")
         (expand "image")
         (expand "subset?")
         (expand "member")
         (skosimp*)
         (inst + "x!2"))))
      ("2" (propax))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "isf_integral_diff" ("i1" "i2!1" "i2" "i1!1"))
   (lemma "isf_integral_pos" ("i" "i2!1 - i1!1"))
   (split -1)
   (("1" (assert)) ("2" (skosimp) (inst - "x!1") (expand "-") (assert))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (case "forall (x:T): -abs(i!1(x))<=i!1(x)&i!1(x)<=abs(i!1(x))")
   (("1"
     (lemma "isf_integral_le" ("i1" "-abs(i!1)" "i2" "i!1"))
     (split -1)
     (("1"
       (lemma "isf_integral_le" ("i1" "i!1" "i2" "abs(i!1)"))
       (split -1)
       (("1"
         (rewrite "isf_integral_opp" -2)
         (expand "abs" 1 1)
         (case-replace "isf_integral(i!1) < 0")
         (("1" (assert)) ("2" (assert))))
        ("2"
         (skosimp)
         (inst - "x!1")
         (assert)
         (flatten)
         (expand "abs" 1)
         (propax))))
      ("2"
       (skosimp)
       (inst - "x!1")
       (flatten)
       (expand "abs" 1)
       (expand "-" 1)
       (propax))))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (lemma "isf_induction"
    ("P"
     "lambda(i: isf): EXISTS nnx: FORALL x: -nnx <= i(x) AND i(x) <= nnx"))
   (skosimp)
   (inst - "i!1")
   (split -1)
   (("1" (propax)) ("2" (assert))
    ("3"
     (hide 2)
     (skosimp*)
     (inst + "nnx!1+abs(c!1)")
     (skosimp)
     (expand "phi")
     (grind))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "isf_integral_le"
    ("i1" "abs(i!1)" "i2" "nnx!1*phi(nonzero_set?(i!1))"))
   (("1"
     (split -1)
     (("1"
       (rewrite "isf_integral_scal" -1)
       (("1"
         (rewrite "isf_integral_phi" -1)
         (lemma "nonzero_measurable" ("g" "i!1"))
         (propax))
        ("2"
         (rewrite "isf_phi")
         (lemma "nonzero_measurable" ("g" "i!1"))
         (propax))))
      ("2"
       (skosimp)
       (inst - "x!1")
       (expand "abs" 1)
       (hide 2)
       (expand "phi")
       (expand "member")
       (expand "nonzero_set?")
       (expand "*")
       (case-replace "i!1(x!1)=0")
       (("1" (assert) (expand "abs") (assert)) ("2" (assert))))))
    ("2"
     (rewrite "isf_scal")
     (rewrite "isf_phi")
     (lemma "nonzero_measurable" ("g" "i!1"))
     (propax))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "isf?")
   (case-replace "simple?(f!1)")
   (("1"
     (expand "ae_0?")
     (expand "restrict")
     (expand "pointwise_ae?")
     (expand "ae?")
     (expand "fullset")
     (expand "ae_in?")
     (split)
     (("1"
       (skosimp*)
       (typepred "E!1")
       (expand "negligible_set?")
       (skosimp)
       (case "subset?(nonzero_set?(f!1),X!1)")
       (("1"
         (case-replace "mu_fin?(nonzero_set?(f!1))")
         (("1"
           (lemma "isf_bounded" ("i" "f!1"))
           (("1"
             (skosimp)
             (lemma "isf_integral_bound" ("i" "f!1" "nnx" "nnx!1"))
             (split -1)
             (("1"
               (lemma "m_monotone" ("a" "nonzero_set?(f!1)" "b" "X!1"))
               (("1"
                 (assert)
                 (expand "x_le")
                 (expand "mu_fin?")
                 (assert)
                 (expand "mu")
                 (assert)
                 (expand "null_set?")
                 (flatten)
                 (expand "mu_fin?")
                 (expand "mu")
                 (assert)
                 (typepred "m(nonzero_set?(f!1))`2")
                 (replace -9)
                 (case-replace "m(nonzero_set?(f!1))`2 = 0")
                 (("1"
                   (lemma "isf_integral_abs" ("i" "f!1"))
                   (typepred "abs(isf_integral(f!1))")
                   (assert))
                  ("2" (assert))))
                ("2" (expand "null_set?") (flatten))))
              ("2"
               (skosimp)
               (inst - "x!1")
               (hide-all-but (-1 1))
               (grind))))
            ("2" (expand "isf?") (assert))))
          ("2"
           (hide 2)
           (expand "null_set?")
           (flatten)
           (lemma "m_monotone" ("a" "nonzero_set?(f!1)" "b" "X!1"))
           (assert)
           (expand "x_le")
           (expand "mu_fin?")
           (expand "mu")
           (assert))
          ("3"
           (lemma "nonzero_measurable" ("g" "f!1"))
           (("1" (propax)) ("2" (rewrite "simple_is_measurable"))))))
        ("2"
         (hide 2)
         (expand "nonzero_set?")
         (expand "subset?")
         (skosimp)
         (expand "member")
         (inst - "x!1")
         (inst - "x!1")
         (assert))))
      ("2"
       (flatten)
       (copy -1)
       (case-replace "f!1=lambda x: 0")
       (("1" (assert))
        ("2"
         (case "exists (px:posreal): forall (x:(nonzero_set?(f!1))): px<=abs(f!1(x))")
         (("1"
           (skosimp)
           (lemma "isf_integral_le"
            ("i1" "px!1*phi(nonzero_set?(f!1))" "i2" "abs(f!1)"))
           (("1"
             (split -1)
             (("1"
               (replace -5)
               (typepred "mu(nonzero_set?(f!1))")
               (("1"
                 (rewrite "isf_integral_scal")
                 (("1"
                   (rewrite "isf_integral_phi")
                   (expand "<=" -2)
                   (split -2)
                   (("1" (assert))
                    ("2"
                     (rewrite "zero_times3" -1)
                     (inst + "nonzero_set?(f!1)")
                     (("1" (skosimp) (expand "nonzero_set?") (assert))
                      ("2"
                       (expand "negligible_set?")
                       (inst + "nonzero_set?(f!1)")
                       (expand "subset?")
                       (expand "member")
                       (split 1)
                       (("1"
                         (expand "null_set?")
                         (assert)
                         (rewrite "nonzero_measurable")
                         (expand "simple?")
                         (propax))
                        ("2" (skosimp))))))))
                  ("2" (rewrite "isf_phi"))))
                ("2"
                 (assert)
                 (lemma "nonzero_measurable" ("g" "f!1"))
                 (("1" (expand "measurable_set?") (propax))
                  ("2" (rewrite "simple_is_measurable"))))))
              ("2"
               (skosimp)
               (inst - "x!1")
               (("1"
                 (expand "*" 1)
                 (expand "nonzero_set?")
                 (expand "phi")
                 (case-replace "member(x!1, {x | f!1(x) /= 0})")
                 (("1" (assert) (expand "abs" 1) (propax))
                  ("2" (assert))))
                ("2" (expand "*") (expand "phi") (assert))))))
            ("2" (rewrite "isf_scal") (rewrite "isf_phi"))))
          ("2"
           (hide 3)
           (lemma "simple_def2" ("f" "f!1"))
           (assert)
           (skosimp)
           (typepred "P!1")
           (expand "finite_partition?")
           (flatten)
           (expand "partition?")
           (flatten)
           (case " FORALL (P: finite_set[set[T]], n: nat):
                         card(P) = n & every(constant_over?(f!1), P)=>
                          (EXISTS (px: posreal):
                             FORALL (s: (P)):
                               FORALL (x: (s)): f!1(x) /= 0 => px <= abs(f!1(x)))")
           (("1"
             (inst - "P!1" "card[set[T]](P!1)")
             (assert)
             (skosimp)
             (inst + "px!1")
             (skosimp)
             (lemma "extensionality_postulate"
              ("f" "Union(P!1)" "g" "fullset[T]"))
             (replace -1 -3 rl)
             (inst -3 "x!1")
             (expand "fullset")
             (hide -1)
             (expand "Union")
             (skosimp)
             (inst - "a!1")
             (inst - "x!1")
             (assert)
             (typepred "x!1")
             (expand "nonzero_set?")
             (propax))
            ("2"
             (hide-all-but 1)
             (induct "n")
             (("1"
               (skosimp)
               (lemma "card_is_0[set[T]]" ("S" "P!2"))
               (assert)
               (replace -1 -2)
               (inst + "1")
               (skosimp)
               (typepred "s!1")
               (replace -3)
               (expand "emptyset")
               (propax))
              ("2"
               (skosimp*)
               (lemma "nonempty_card[set[T]]" ("S" "P!2"))
               (assert)
               (lemma "card_rest[set[T]]" ("S" "P!2"))
               (expand "nonempty?")
               (assert)
               (replace -3)
               (assert)
               (inst - "rest[set[T]](P!2)")
               (assert)
               (split -2)
               (("1"
                 (skosimp)
                 (hide -2 -3)
                 (name "C" "choose[set[T]](P!2)")
                 (copy -3)
                 (expand "every" -1)
                 (inst - "C")
                 (expand "constant_over?" -1)
                 (skosimp)
                 (case "y!1=0")
                 (("1"
                   (inst + "px!1")
                   (skosimp)
                   (skosimp)
                   (typepred "s!1")
                   (case-replace "s!1=C")
                   (("1"
                     (replace -3)
                     (typepred "x!1")
                     (inst - "x!1")
                     (("1" (assert))
                      ("2"
                       (inst -6 "s!1")
                       (("1" (inst -6 "x!1") (assert))
                        ("2"
                         (expand "rest")
                         (expand "remove")
                         (expand "member")
                         (assert))))))
                    ("2"
                     (inst -5 "s!1")
                     (("1" (inst -5 "x!1") (assert))
                      ("2"
                       (expand "rest")
                       (expand "remove")
                       (assert))))))
                  ("2"
                   (inst + "min(abs(y!1),px!1)")
                   (("1"
                     (skosimp)
                     (skosimp)
                     (typepred "s!1")
                     (typepred "x!1")
                     (case "s!1=C")
                     (("1"
                       (inst - "x!1")
                       (("1" (replace -4) (hide-all-but 4) (grind))
                        ("2" (assert))))
                      ("2"
                       (inst -5 "s!1")
                       (("1" (inst -5 "x!1") (assert))
                        ("2"
                         (expand "rest")
                         (expand "remove")
                         (assert))))))
                    ("2" (hide-all-but (1 2)) (grind))))))
                ("2"
                 (expand "every")
                 (skosimp)
                 (typepred "x!1")
                 (expand "rest" -1)
                 (expand "remove")
                 (flatten)
                 (expand "member")
                 (inst - "x!1"))))))))))))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "isf_ae_0" ("f" "i1!1-i2!1"))
   (lemma "isf_diff" ("i1" "i1!1" "i2" "i2!1"))
   (assert)
   (expand "isf?")
   (flatten)
   (assert)
   (lemma "isf_integral_abs" ("i" "i1!1-i2!1"))
   (rewrite "isf_integral_diff")
   (hide -5)
   (split -4)
   (("1"
     (replace -1)
     (expand "<=" -2)
     (split)
     (("1" (assert)) ("2" (rewrite "abs_eq_0"))))
    ("2"
     (hide-all-but (-4 1))
     (expand "ae_0?")
     (expand "ae_eq?")
     (expand "restrict")
     (expand "pointwise_ae?")
     (expand "-")
     (case-replace
      "(LAMBDA (x: T): (i1!1(x) = i2!1(x)))=(LAMBDA (x_1: T): (i1!1(x_1) - i2!1(x_1) = 0))")
     (hide -1 2)
     (apply-extensionality :hide? t)
     (case-replace "i1!1(x!1) = i2!1(x!1)")
     (("1" (assert)) ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "isf_integral_pos" ("i" "plus(i!1)"))
   (split)
   (("1"
     (lemma "isf_ae_eq" ("i1" "i!1" "i2" "plus(i!1)"))
     (split)
     (("1" (assert))
      ("2"
       (hide -1 2)
       (expand "ae_nonneg?")
       (expand "ae_eq?")
       (expand "restrict")
       (expand "plus")
       (expand "max")
       (expand "pointwise_ae?")
       (case-replace
        "(LAMBDA (x_1: T):
                    (i!1(x_1) = IF i!1(x_1) < 0 THEN 0 ELSE i!1(x_1) ENDIF))=(LAMBDA (x_1: T): (0 <= i!1(x_1)))")
       (apply-extensionality :hide? t)
       (case-replace "i!1(x!1) < 0")
       (("1" (assert)) ("2" (assert))))))
    ("2" (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "isf_ae_0_le" ("i" "i2!1-i1!1"))
   (split)
   (("1" (rewrite "isf_integral_diff") (assert))
    ("2"
     (hide 2)
     (expand "ae_nonneg?")
     (expand "ae_le?")
     (expand "-")
     (expand "pointwise_ae?")
     (case-replace
      "(LAMBDA (x_1: T): (0 <= i2!1(x_1) - i1!1(x_1)))=(LAMBDA (x: T): (i1!1(x) <= i2!1(x)))")
     (apply-extensionality :hide? t))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "isf_ae_0" ("f" "i!1"))
   (assert)
   (lemma "isf_ae_eq" ("i1" "i!1" "i2" "abs(i!1)"))
   (assert)
   (hide-all-but (-1 1))
   (expand "abs")
   (expand "ae_eq?")
   (expand "ae_nonneg?")
   (expand "restrict")
   (expand "pointwise_ae?")
   (case-replace
    "(LAMBDA (x_1: T): (i!1(x_1) = abs(i!1(x_1))))=(LAMBDA (x_1: T): (0 <= i!1(x_1)))")
   (apply-extensionality :hide? t)
   (hide-all-but 1)
   (grind))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (name "G" "lambda (n:nat): i!1-u!1(n)")
   (case "pointwise_convergence?(G,lambda x: 0)")
   (("1"
     (case "pointwise_decreasing?(G)")
     (("1"
       (case "every(isf?,G)")
       (("1"
         (expand "converges_upto?")
         (split)
         (("1"
           (case "convergence?((isf_integral o G), 0)")
           (("1"
             (hide-all-but (-1 1))
             (rewrite "metric_convergence_def" *)
             (rewrite "metric_convergence_def" *)
             (expand "metric_converges_to")
             (skosimp)
             (inst - "r!1")
             (skosimp)
             (inst + "n!1")
             (skosimp)
             (inst - "i!2")
             (assert)
             (expand "ball")
             (expand "o")
             (expand "G")
             (rewrite "isf_integral_diff")
             (name-replace "II" "isf_integral(i!1)")
             (name-replace "IU" "isf_integral(u!1(i!2))")
             (grind))
            ("2"
             (hide 2)
             (case "forall (n:nat,x:T): G(n)(x)>=0")
             (("1"
               (hide -5 -6)
               (lemma "nonzero_measurable" ("g" "G(0)"))
               (lemma "simple_is_bounded_measurable" ("x" "G(0)"))
               (("1"
                 (expand "bounded_measurable?")
                 (expand "bounded?")
                 (skolem - ("M"))
                 (case "FORALL x: 0 <= G(0)(x) & G(0)(x) <= M")
                 (("1"
                   (hide -2)
                   (case "decreasing?(isf_integral o G)")
                   (("1"
                     (name "IGS"
                           "image[nat, real](isf_integral o G, fullset[nat])")
                     (case "nonempty?[real](IGS) AND below_bounded[real](IGS)")
                     (("1"
                       (name "AA" "inf(IGS)")
                       (("1"
                         (typepred "inf(IGS)")
                         (replace -2)
                         (name "F" "nonzero_set?(G(0))")
                         (replace -1)
                         (case "mu_fin?(F)")
                         (("1"
                           (case "0<=AA")
                           (("1"
                             (case "forall (epsilon:posreal): AA<=epsilon*mu(F)")
                             (("1"
                               (case-replace "AA=0")
                               (("1"
                                 (hide -2 -3)
                                 (rewrite "metric_convergence_def" +)
                                 (expand "metric_converges_to")
                                 (skosimp)
                                 (expand "ball")
                                 (expand "member")
                                 (expand "o" 1)
                                 (expand "greatest_lower_bound")
                                 (flatten)
                                 (inst - "r!1")
                                 (assert)
                                 (expand "lower_bound")
                                 (skosimp)
                                 (case "z!1<r!1")
                                 (("1"
                                   (hide 1)
                                   (typepred "z!1")
                                   (expand "IGS" -1)
                                   (expand "fullset" -1)
                                   (expand "o" -1)
                                   (expand "image" -1)
                                   (skolem - ("n!1"))
                                   (inst + "n!1")
                                   (skosimp)
                                   (expand "decreasing?")
                                   (inst -11 "n!1" "i!2")
                                   (assert)
                                   (expand "o" -11)
                                   (inst -6 "isf_integral(G(i!2))")
                                   (("1"
                                     (expand "abs" 1)
                                     (assert)
                                     (lift-if)
                                     (assert))
                                    ("2"
                                     (expand "IGS")
                                     (expand "fullset")
                                     (expand "o ")
                                     (expand "image")
                                     (inst + "i!2"))))
                                  ("2" (assert))))
                                ("2"
                                 (case-replace "mu(F)=0")
                                 (("1" (inst - "1") (assert))
                                  ("2"
                                   (lemma
                                    "posreal_div_posreal_is_posreal"
                                    ("px" "AA" "py" "mu(F)*2"))
                                   (("1"
                                     (inst - "AA / (mu(F) * 2)")
                                     (("1" (assert)) ("2" (assert))))
                                    ("2" (assert))
                                    ("3" (assert))))))))
                              ("2"
                               (skosimp)
                               (case "AA>epsilon!1 * mu(F)")
                               (("1"
                                 (hide 1)
                                 (typepred "mu(F)")
                                 (expand ">=" -1)
                                 (expand "<=" -1)
                                 (split -1)
                                 (("1"
                                   (lemma
                                    "posreal_times_posreal_is_posreal"
                                    ("px" "epsilon!1" "py" "mu(F)"))
                                   (("1"
                                     (hide -4)
                                     (name
                                      "EN"
                                      "lambda (n:nat): {x| G(n)(x)>=epsilon!1}")
                                     (case
                                      "forall (n:nat): measurable_set?(EN(n))")
                                     (("1"
                                       (case "decreasing?(EN)")
                                       (("1"
                                         (case
                                          "forall (n:nat): subset?(EN(n),F)")
                                         (("1"
                                           (case
                                            "forall (n:nat): mu_fin?(EN(n))")
                                           (("1"
                                             (case
                                              "convergence?(mu o EN, 0)")
                                             (("1"
                                               (case
                                                "forall (n:nat,x): G(n)(x) <= (epsilon!1*phi(F)+M*phi(EN(n)))(x)")
                                               (("1"
                                                 (lemma
                                                  "isf_phi"
                                                  ("E" "F"))
                                                 (lemma
                                                  "isf_scal"
                                                  ("c"
                                                   "epsilon!1"
                                                   "i"
                                                   "phi(F)"))
                                                 (("1"
                                                   (lemma
                                                    "isf_integral_phi"
                                                    ("E" "F"))
                                                   (lemma
                                                    "isf_integral_scal"
                                                    ("c"
                                                     "epsilon!1"
                                                     "i"
                                                     "phi(F)"))
                                                   (replace -2)
                                                   (hide -2)
                                                   (rewrite
                                                    "metric_convergence_def"
                                                    -)
                                                   (expand
                                                    "metric_converges_to")
                                                   (expand "ball")
                                                   (expand "member")
                                                   (typepred "M")
                                                   (expand ">=" -1)
                                                   (expand "<=" -1)
                                                   (split -1)
                                                   (("1"
                                                     (lemma
                                                      "posreal_div_posreal_is_posreal"
                                                      ("px"
                                                       "AA-epsilon!1 * mu(F)"
                                                       "py"
                                                       "M"))
                                                     (("1"
                                                       (inst
                                                        -7
                                                        "(AA - epsilon!1 * mu(F)) / M")
                                                       (("1"
                                                         (skosimp)
                                                         (expand "o" -7)
                                                         (inst
                                                          -6
                                                          "n!1"
                                                          "_")
                                                         (inst -7 "n!1")
                                                         (assert)
                                                         (typepred
                                                          "mu(EN(n!1))")
                                                         (case-replace
                                                          "abs(-1 * mu(EN(n!1))) = mu(EN(n!1))")
                                                         (("1"
                                                           (hide -1)
                                                           (rewrite
                                                            "div_mult_pos_lt2"
                                                            -8)
                                                           (lemma
                                                            "isf_phi"
                                                            ("E"
                                                             "EN(n!1)"))
                                                           (("1"
                                                             (lemma
                                                              "isf_scal"
                                                              ("c"
                                                               "M"
                                                               "i"
                                                               "phi[T, S](EN(n!1))"))
                                                             (("1"
                                                               (lemma
                                                                "isf_integral_scal"
                                                                ("c"
                                                                 "M"
                                                                 "i"
                                                                 "phi[T, S](EN(n!1))"))
                                                               (rewrite
                                                                "isf_integral_phi")
                                                               (lemma
                                                                "isf_integral_le"
                                                                ("i1"
                                                                 "G(n!1)"
                                                                 "i2"
                                                                 "epsilon!1 * phi(F) + M * phi(EN(n!1))"))
                                                               (("1"
                                                                 (split
                                                                  -1)
                                                                 (("1"
                                                                   (rewrite
                                                                    "isf_integral_add"
                                                                    -1)
                                                                   (replace
                                                                    -2)
                                                                   (replace
                                                                    -8)
                                                                   (expand
                                                                    "greatest_lower_bound")
                                                                   (flatten)
                                                                   (expand
                                                                    "lower_bound")
                                                                   (inst
                                                                    -23
                                                                    "isf_integral(G(n!1))")
                                                                   (("1"
                                                                     (assert))
                                                                    ("2"
                                                                     (expand
                                                                      "IGS")
                                                                     (expand
                                                                      "fullset")
                                                                     (expand
                                                                      "o ")
                                                                     (expand
                                                                      "image")
                                                                     (inst
                                                                      +
                                                                      "n!1"))))
                                                                  ("2"
                                                                   (propax))))
                                                                ("2"
                                                                 (rewrite
                                                                  "isf_add"))
                                                                ("3"
                                                                 (expand
                                                                  "every")
                                                                 (inst
                                                                  -31
                                                                  "n!1")
                                                                 (expand
                                                                  "nth")
                                                                 (propax))))
                                                              ("2"
                                                               (propax))))
                                                            ("2"
                                                             (inst
                                                              -12
                                                              "n!1"))))
                                                          ("2"
                                                           (hide-all-but
                                                            (-1
                                                             1
                                                             -9
                                                             -12))
                                                           (expand "abs")
                                                           (assert)
                                                           (grind))))
                                                        ("2" (assert))))
                                                      ("2" (assert))
                                                      ("3" (assert))))
                                                    ("2"
                                                     (replace -1 * rl)
                                                     (case-replace
                                                      "isf_integral o G = lambda (n:nat):0")
                                                     (("1"
                                                       (expand
                                                        "convergence?")
                                                       (skosimp)
                                                       (inst + "0")
                                                       (assert))
                                                      ("2"
                                                       (apply-extensionality
                                                        :hide?
                                                        t)
                                                       (expand "o")
                                                       (hide-all-but
                                                        (-23 1 -27 -25))
                                                       (case-replace
                                                        "G(x!1)=lambda x: 0")
                                                       (("1"
                                                         (rewrite
                                                          "isf_integral_zero"))
                                                        ("2"
                                                         (hide 2)
                                                         (apply-extensionality
                                                          :hide?
                                                          t)
                                                         (inst - "x!2")
                                                         (inst
                                                          -
                                                          "x!1"
                                                          "x!2")
                                                         (expand
                                                          "pointwise_decreasing?")
                                                         (inst - "x!2")
                                                         (expand
                                                          "decreasing?")
                                                         (inst
                                                          -
                                                          "0"
                                                          "x!1")
                                                         (flatten)
                                                         (assert))))))))
                                                  ("2" (propax))))
                                                ("2"
                                                 (hide-all-but
                                                  (1 -22 -20 -18))
                                                 (skosimp)
                                                 (expand "*")
                                                 (expand "+")
                                                 (expand "F")
                                                 (expand "nonzero_set?")
                                                 (expand "EN")
                                                 (expand "phi")
                                                 (expand "member")
                                                 (case-replace
                                                  "G(0)(x!1) = 0")
                                                 (("1"
                                                   (assert)
                                                   (expand
                                                    "pointwise_decreasing?")
                                                   (inst -4 "x!1")
                                                   (expand "decreasing?")
                                                   (inst -4 "0" "n!1")
                                                   (assert)
                                                   (assert))
                                                  ("2"
                                                   (assert)
                                                   (case-replace
                                                    "G(n!1)(x!1) >= epsilon!1")
                                                   (("1"
                                                     (inst - "x!1")
                                                     (flatten)
                                                     (expand
                                                      "pointwise_decreasing?")
                                                     (inst -5 "x!1")
                                                     (expand
                                                      "decreasing?")
                                                     (inst -5 "0" "n!1")
                                                     (assert))
                                                    ("2" (assert))))))))
                                              ("2"
                                               (hide 2)
                                               (lemma
                                                "m_decreasing_convergence"
                                                ("E" "EN"))
                                               (assert)
                                               (inst-cp - "0")
                                               (assert)
                                               (expand "x_converges?")
                                               (case
                                                "subset?(IIntersection(EN),EN(0))")
                                               (("1"
                                                 (case
                                                  "measurable_set?(IIntersection(EN))")
                                                 (("1"
                                                   (lemma
                                                    "m_monotone"
                                                    ("a"
                                                     "IIntersection(EN)"
                                                     "b"
                                                     "EN(0)"))
                                                   (("1"
                                                     (assert)
                                                     (expand "x_le")
                                                     (expand "mu_fin?")
                                                     (assert)
                                                     (flatten)
                                                     (replace -1)
                                                     (assert)
                                                     (case
                                                      "empty?(IIntersection(EN))")
                                                     (("1"
                                                       (rewrite
                                                        "emptyset_is_empty?"
                                                        -1)
                                                       (replace -1)
                                                       (typepred "m")
                                                       (expand
                                                        "measure?")
                                                       (flatten)
                                                       (assert)
                                                       (hide -1 -2 -3)
                                                       (rewrite
                                                        "metric_convergence_def"
                                                        +)
                                                       (expand "o")
                                                       (replace -6 -5)
                                                       (lemma
                                                        "m_emptyset")
                                                       (replace -1)
                                                       (hide -2 -3)
                                                       (assert)
                                                       (prop)
                                                       (lemma
                                                        "convergence_sequences.limit_def"
                                                        ("l"
                                                         "0"
                                                         "v"
                                                         "LAMBDA (i:nat): m(EN(i))`2"))
                                                       (("1"
                                                         (replace
                                                          -3
                                                          -1
                                                          rl)
                                                         (hide-all-but
                                                          (-1 1))
                                                         (expand "mu")
                                                         (assert)
                                                         (expand
                                                          "convergence")
                                                         (expand
                                                          "metric_converges_to")
                                                         (expand "ball")
                                                         (skosimp)
                                                         (inst - "r!1")
                                                         (skosimp)
                                                         (inst + "n!1")
                                                         (skosimp)
                                                         (inst - "i!2")
                                                         (assert)
                                                         (grind))
                                                        ("2" (propax))
                                                        ("3"
                                                         (skosimp)
                                                         (inst -10 "i!2")
                                                         (expand
                                                          "measurable_set?")
                                                         (propax))))
                                                      ("2"
                                                       (expand
                                                        "empty?"
                                                        1)
                                                       (skosimp)
                                                       (expand
                                                        "IIntersection"
                                                        -1)
                                                       (expand "member")
                                                       (expand "EN" -1)
                                                       (expand
                                                        "pointwise_convergence?")
                                                       (assert)
                                                       (expand "o")
                                                       (replace -7)
                                                       (expand
                                                        "measurable_set?")
                                                       (inst -29 "x!1")
                                                       (rewrite
                                                        "metric_convergence_def"
                                                        -29)
                                                       (expand
                                                        "metric_converges_to")
                                                       (inst
                                                        -29
                                                        "epsilon!1")
                                                       (expand "ball")
                                                       (expand "member")
                                                       (skosimp)
                                                       (inst -29 "n!1")
                                                       (hide-all-but
                                                        (-1 -29))
                                                       (inst - "n!1")
                                                       (grind))))
                                                    ("2" (propax))))
                                                  ("2"
                                                   (rewrite
                                                    "measurable_IIntersection"))))
                                                ("2"
                                                 (hide-all-but (1 -5))
                                                 (expand "subset?")
                                                 (expand "IIntersection")
                                                 (expand "member")
                                                 (skosimp)
                                                 (inst - "0"))))
                                              ("3"
                                               (skosimp)
                                               (expand "measurable_set?")
                                               (propax))
                                              ("4"
                                               (skosimp)
                                               (inst - "x1!1")
                                               (assert)
                                               (inst -4 "x1!1")
                                               (expand "measurable_set?")
                                               (propax))))
                                            ("2"
                                             (skosimp)
                                             (inst - "n!1")
                                             (lemma
                                              "m_monotone"
                                              ("a" "EN(n!1)" "b" "F"))
                                             (assert)
                                             (expand "x_le")
                                             (expand "mu_fin?")
                                             (assert))
                                            ("3" (propax))))
                                          ("2"
                                           (skosimp)
                                           (hide-all-but (1 -19))
                                           (expand "EN")
                                           (expand "F")
                                           (expand "nonzero_set?")
                                           (expand
                                            "pointwise_decreasing?")
                                           (expand "subset?")
                                           (expand "member")
                                           (skosimp)
                                           (inst - "x!1")
                                           (expand "decreasing?")
                                           (inst - "0" "n!1")
                                           (assert))))
                                        ("2"
                                         (hide 2)
                                         (expand "decreasing?")
                                         (skosimp)
                                         (expand "subset?")
                                         (expand "EN")
                                         (expand "member")
                                         (skosimp)
                                         (expand "pointwise_decreasing?")
                                         (inst -20 "x!2")
                                         (expand "decreasing?")
                                         (inst -20 "x!1" "y!1")
                                         (assert))))
                                      ("2"
                                       (skosimp)
                                       (expand "EN")
                                       (lemma "simple_is_measurable")
                                       (inst - "G(n!1)")
                                       (("1"
                                         (rewrite "measurable_ge" -1)
                                         (inst - "epsilon!1")
                                         (expand "measurable_set?")
                                         (propax))
                                        ("2"
                                         (expand "every")
                                         (inst -16 "n!1")
                                         (expand "nth")
                                         (expand "isf?")
                                         (flatten))))))
                                    ("2" (assert))))
                                  ("2"
                                   (replace -1)
                                   (replace -1 * rl)
                                   (case-replace
                                    "isf_integral o G = lambda (n:nat): 0")
                                   (("1"
                                     (expand "convergence?")
                                     (skosimp)
                                     (inst + "0")
                                     (skosimp))
                                    ("2"
                                     (hide 2)
                                     (apply-extensionality :hide? t)
                                     (expand "o")
                                     (lemma
                                      "isf_integral_pos"
                                      ("i" "G(x!1)"))
                                     (split -1)
                                     (("1"
                                       (lemma
                                        "isf_integral_le"
                                        ("i1" "G(x!1)" "i2" "M*phi(F)"))
                                       (("1"
                                         (split -1)
                                         (("1"
                                           (rewrite "isf_integral_scal")
                                           (("1"
                                             (rewrite "isf_integral_phi")
                                             (assert))
                                            ("2" (rewrite "isf_phi"))))
                                          ("2"
                                           (skosimp)
                                           (expand "*")
                                           (inst -13 "x!2")
                                           (flatten)
                                           (expand
                                            "pointwise_decreasing?")
                                           (inst -18 "x!2")
                                           (expand "decreasing?")
                                           (inst -18 "0" "x!1")
                                           (assert)
                                           (expand "phi")
                                           (expand "member")
                                           (expand "F")
                                           (expand "nonzero_set?")
                                           (assert))))
                                        ("2"
                                         (rewrite "isf_scal")
                                         (rewrite "isf_phi"))))
                                      ("2"
                                       (skosimp)
                                       (inst -14 "x!1" "x!2"))))))))
                                ("2" (assert))))
                              ("3"
                               (assert)
                               (expand "measurable_set?")
                               (propax))))
                            ("2"
                             (expand "greatest_lower_bound")
                             (flatten)
                             (inst - "0")
                             (expand "lower_bound")
                             (split -4)
                             (("1" (propax)) ("2" (assert))
                              ("3"
                               (skosimp)
                               (typepred "z!1")
                               (expand "IGS")
                               (expand "fullset")
                               (expand "o ")
                               (expand "image")
                               (skosimp)
                               (lemma "isf_integral_pos" ("i" "G(x!1)"))
                               (assert)
                               (skosimp)
                               (inst -12 "x!1" "x!2"))))))
                          ("2"
                           (expand "every")
                           (inst -10 "0")
                           (expand "nth")
                           (expand "isf?")
                           (flatten)
                           (expand "F")
                           (propax))
                          ("3" (propax))))
                        ("2" (propax))))
                      ("2"
                       (hide 2)
                       (split)
                       (("1"
                         (expand "nonempty?")
                         (expand "IGS")
                         (expand "fullset")
                         (expand "o ")
                         (expand "image")
                         (expand "empty?")
                         (expand "member")
                         (inst - "isf_integral(G(0))")
                         (("1" (inst + "0"))
                          ("2"
                           (expand "every")
                           (inst -6 "0")
                           (expand "nth")
                           (propax))))
                        ("2"
                         (expand "below_bounded")
                         (inst + "0")
                         (expand "lower_bound")
                         (skosimp)
                         (typepred "z!1")
                         (expand "IGS")
                         (expand "fullset")
                         (expand "o ")
                         (expand "image")
                         (skosimp)
                         (lemma "isf_integral_pos" ("i" "G(x!1)"))
                         (split -1)
                         (("1" (assert))
                          ("2" (skosimp) (inst -6 "x!1" "x!2"))))))))
                    ("2"
                     (hide -6 2)
                     (expand "pointwise_decreasing?")
                     (expand "decreasing?")
                     (skosimp)
                     (expand "o")
                     (lemma "isf_integral_le"
                      ("i1" "G(y!1)" "i2" "G(x!1)"))
                     (assert)
                     (skosimp)
                     (inst -6 "x!2")
                     (inst -6 "x!1" "y!1")
                     (assert))))
                  ("2"
                   (hide-all-but (-1 -3 1))
                   (skosimp)
                   (inst - "x!1")
                   (inst - "0" "x!1")
                   (assert))))
                ("2"
                 (expand "every")
                 (inst -3 "0")
                 (expand "nth")
                 (expand "isf?")
                 (flatten))))
              ("2"
               (hide 2)
               (skosimp)
               (hide -4 -5)
               (expand "pointwise_decreasing?")
               (expand "pointwise_convergence?")
               (inst - "x!1")
               (inst - "x!1")
               (lemma "converges_downto_ge"
                ("u" "lambda (n:nat): G(n)(x!1)" "x" "0"))
               (split -1)
               (("1" (inst - "n!1") (assert))
                ("2" (expand "converges_downto?") (assert))))))
            ("3"
             (skosimp)
             (expand "every")
             (inst - "x1!1")
             (expand "nth")
             (propax))))
          ("2"
           (expand "pointwise_converges_upto?")
           (flatten)
           (hide-all-but (-6 1))
           (expand "pointwise_increasing?")
           (expand "o ")
           (expand "increasing?")
           (skosimp)
           (lemma "isf_integral_le" ("i1" "u!1(x!1)" "i2" "u!1(y!1)"))
           (split -1)
           (("1" (propax))
            ("2"
             (skosimp)
             (inst - "x!2")
             (inst - "x!1" "y!1")
             (assert))))))
        ("2"
         (expand "every")
         (expand "nth")
         (skosimp)
         (expand "G")
         (rewrite "isf_diff")
         (typepred "u!1(n!1)")
         (typepred "u!1")
         (expand "increasing_nn_simple?")
         (flatten)
         (typepred "i!1")
         (inst - "n!1")
         (hide-all-but (-1 -2 1 -3 -8))
         (expand "isf?")
         (flatten)
         (expand "nn_simple?")
         (flatten)
         (assert)
         (lemma "m_monotone"
          ("a" "nonzero_set?(u!1(n!1))" "b" "nonzero_set?(i!1)"))
         (assert)
         (expand "x_le")
         (expand "mu_fin?")
         (assert)
         (hide -2 2)
         (expand "subset?")
         (skosimp)
         (expand "pointwise_converges_upto?")
         (expand "pointwise_increasing?")
         (expand "pointwise_convergence?")
         (inst -5 "x!1")
         (inst -6 "x!1")
         (lemma "converges_upto_le"
          ("u" "lambda (n:nat): u!1(n)(x!1)" "x" "i!1(x!1)"))
         (split -1)
         (("1"
           (expand "member")
           (expand "nonzero_set?")
           (expand "/=")
           (replace -2)
           (inst - "n!1")
           (inst - "x!1")
           (assert))
          ("2" (hide 2) (expand "converges_upto?") (assert))))))
      ("2"
       (expand "pointwise_converges_upto?")
       (flatten)
       (hide-all-but (-4 1))
       (expand "pointwise_increasing?")
       (expand "pointwise_decreasing?")
       (skosimp)
       (inst - "x!1")
       (expand "decreasing?")
       (expand "increasing?")
       (skosimp)
       (inst - "x!2" "y!1")
       (assert)
       (expand "G")
       (expand "-")
       (assert))))
    ("2"
     (hide -1 2)
     (expand "pointwise_converges_upto?")
     (flatten)
     (expand "pointwise_convergence?")
     (skosimp)
     (inst - "x!1")
     (expand "G")
     (hide -2)
     (rewrite "metric_convergence_def" *)
     (rewrite "metric_convergence_def" *)
     (expand "-")
     (expand "metric_converges_to")
     (skosimp)
     (inst - "r!1")
     (skosimp)
     (inst + "n!1")
     (skosimp)
     (inst - "i!2")
     (assert)
     (expand "ball")
     (grind))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "simple?")
   (flatten)
   (lemma "nonzero_measurable" ("g" "f!1"))
   (("1" (propax)) ("2" (propax))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "isf?")
   (split)
   (("1"
     (expand "simple?")
     (split)
     (("1"
       (expand "measurable_function?")
       (skosimp)
       (case "B!1(0)")
       (("1"
         (case-replace "inverse_image(LAMBDA (x: T): 0, B!1)=fullset[T]")
         (("1" (expand "measurable_set?") (propax))
          ("2"
           (hide 2)
           (apply-extensionality 1 :hide? t)
           (expand "fullset")
           (expand "inverse_image")
           (assert))))
        ("2"
         (case-replace
          "inverse_image(LAMBDA (x: T): 0, B!1)=emptyset[T]")
         (("1" (expand "measurable_set?") (propax))
          ("2"
           (hide 3)
           (apply-extensionality :hide? t)
           (expand "emptyset")
           (expand "inverse_image")
           (assert))))))
      ("2"
       (case "empty?(fullset[T])")
       (("1"
         (case-replace
          "image(LAMBDA (x: T): 0, fullset[T]) = emptyset[real]")
         (("1" (assert))
          ("2"
           (apply-extensionality :hide? t)
           (expand "emptyset")
           (expand "fullset")
           (hide 1)
           (expand "image")
           (skolem - ("TT"))
           (expand "empty?")
           (inst - "TT")
           (expand "member")
           (propax))))
        ("2"
         (case-replace
          "image[T,real](LAMBDA (x: T): 0, fullset[T]) = singleton[real](0)")
         (("1" (assert))
          ("2"
           (hide 3)
           (expand "singleton")
           (apply-extensionality :hide? t)
           (case-replace "x!1=0")
           (("1"
             (expand "fullset")
             (expand "image")
             (expand "empty?")
             (skosimp)
             (inst + "x!2"))
            ("2"
             (assert)
             (expand "fullset")
             (expand "image")
             (propax))))))))))
    ("2"
     (expand "nonzero_set?")
     (typepred "m")
     (expand "measure?")
     (flatten)
     (expand "mu_fin?")
     (assert)
     (expand "measure_empty?")
     (expand "emptyset")
     (replace -1)
     (assert))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "i1!1")
   (typepred "i2!1")
   (expand "isf?")
   (flatten)
   (lemma "simple_add" ("h1" "i1!1" "h2" "i2!1"))
   (assert)
   (expand "+")
   (expand "simple?")
   (flatten)
   (hide-all-but (-5 -8 1))
   (lemma "union_difference"
    ("a" "nonzero_set?(i1!1)" "b" "nonzero_set?(i2!1)"))
   (lemma "difference_disjoint"
    ("a" "nonzero_set?(i1!1)" "b" "nonzero_set?(i2!1)"))
   (lemma "m_disjoint_union"
    ("a"
     "nonzero_set?(i1!1)"
     "b"
     "difference(nonzero_set?(i2!1), nonzero_set?(i1!1))"))
   (("1"
     (replace -2 -1)
     (replace -3 -1 rl)
     (expand "mu_fin?")
     (expand "x_eq")
     (expand "x_add")
     (replace -5)
     (flatten)
     (hide -2)
     (lemma "m_monotone"
      ("a"
       "difference(nonzero_set?(i2!1), nonzero_set?(i1!1))"
       "b"
       "nonzero_set?(i2!1)"))
     (("1"
       (split -1)
       (("1"
         (expand "x_le")
         (replace -5)
         (flatten)
         (replace -1)
         (hide -2)
         (hide-all-but (-2 1))
         (lemma "m_monotone"
          ("a"
           "nonzero_set?(LAMBDA (x: T): i1!1(x) + i2!1(x))"
           "b"
           "union(nonzero_set?(i1!1), nonzero_set?(i2!1))"))
         (("1"
           (split -1)
           (("1" (expand "x_le") (replace -2) (flatten))
            ("2"
             (hide-all-but 1)
             (expand "nonzero_set?")
             (expand "union")
             (expand "subset?")
             (expand "member")
             (skosimp*)
             (assert))))
          ("2"
           (hide-all-but 1)
           (lemma "nonzero_measurable" ("g" "i1!1"))
           (lemma "nonzero_measurable" ("g" "i2!1"))
           (expand "measurable_set?")
           (lemma "sigma_algebra_union"
            ("x" "nonzero_set?(i1!1)" "y" "nonzero_set?(i2!1)"))
           (("1" (assert)) ("2" (propax)) ("3" (propax))))
          ("3"
           (hide-all-but 1)
           (lemma "nonzero_measurable"
            ("g" "LAMBDA (x: T): i1!1(x) + i2!1(x)"))
           (("1" (propax))
            ("2"
             (hide 2)
             (lemma "sum_measurable" ("g1" "i1!1" "g2" "i2!1"))
             (expand "+")
             (propax))))))
        ("2"
         (hide-all-but 1)
         (expand "nonzero_set?")
         (expand "difference")
         (expand "subset?")
         (expand "member")
         (skosimp*))))
      ("2" (lemma "nonzero_measurable" ("g" "i2!1")) (propax))))
    ("2"
     (lemma "sigma_algebra_difference"
      ("x" "nonzero_set?(i2!1)" "y" "nonzero_set?(i1!1)"))
     (("1" (expand "measurable_set?") (expand "member") (propax))
      ("2"
       (lemma "nonzero_measurable" ("g" "i1!1"))
       (expand "measurable_set?")
       (propax))
      ("3"
       (lemma "nonzero_measurable" ("g" "i2!1"))
       (expand "measurable_set?")
       (propax))))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "i!1")
   (expand "*")
   (expand "isf?")
   (flatten)
   (lemma "simple_scal" ("c" "c!1" "h" "i!1"))
   (expand "*")
   (split)
   (("1" (propax))
    ("2"
     (hide -1 -2)
     (case-replace "c!1=0")
     (("1"
       (case-replace
        "nonzero_set?(LAMBDA (x: T): 0 * i!1(x)) = emptyset[T]")
       (("1"
         (expand "mu_fin?")
         (typepred "m")
         (expand "measure?")
         (flatten)
         (assert)
         (expand "measure_empty?")
         (replace -1)
         (assert))
        ("2"
         (hide-all-but 1)
         (apply-extensionality :hide? t)
         (expand "emptyset")
         (expand "nonzero_set?")
         (assert))))
      ("2"
       (case-replace
        "nonzero_set?(LAMBDA (x: T): c!1 * i!1(x)) = nonzero_set?(i!1)")
       (hide-all-but (1 2))
       (apply-extensionality :hide? t)
       (expand "nonzero_set?")
       (expand "/=")
       (assert)
       (case-replace "i!1(x!1) = 0")
       (("1" (assert)) ("2" (assert))))))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "i!1")
   (lemma "isf_scal" ("c" "-1" "i" "i!1"))
   (expand "*")
   (expand "-" 1)
   (assert))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "isf_opp" ("i" "i2!1"))
   (lemma "isf_add" ("i1" "i1!1" "i2" "-i2!1"))
   (expand "-")
   (expand "+")
   (assert))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "i!1")
   (expand "isf?")
   (flatten)
   (lemma "simple_abs" ("h" "i!1"))
   (expand "simple?")
   (flatten)
   (lemma "m_monotone"
    ("a" "nonzero_set?(abs[T](i!1))" "b" "nonzero_set?(i!1)"))
   (split -1)
   (("1" (expand "x_le") (expand "mu_fin?") (replace -6) (flatten))
    ("2"
     (hide-all-but 1)
     (expand "nonzero_set?")
     (expand "abs")
     (expand "subset?")
     (expand "member")
     (skosimp*)
     (replace -1)
     (expand "abs")
     (propax))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "i1!1")
   (typepred "i2!1")
   (expand "isf?")
   (flatten)
   (lemma "simple_min" ("h1" "i1!1" "h2" "i2!1"))
   (expand "min")
   (hide -1 -2 -4)
   (expand "mu_fin?")
   (case "subset?(nonzero_set?(LAMBDA (x: T): min(i1!1(x), i2!1(x))),union(nonzero_set?(i1!1),nonzero_set?(i2!1)))")
   (("1"
     (lemma "m_union"
      ("a" "nonzero_set?(i1!1)" "b" "nonzero_set?(i2!1)"))
     (("1"
       (lemma "m_monotone"
        ("a"
         "nonzero_set?(LAMBDA (x: T): min(i1!1(x), i2!1(x)))"
         "b"
         "union(nonzero_set?(i1!1), nonzero_set?(i2!1))"))
       (("1"
         (replace -3 -1 LR)
         (name-replace "NZM"
          "nonzero_set?(LAMBDA (x: T): min(i1!1(x), i2!1(x)))")
         (hide -3)
         (expand "x_le")
         (assert)
         (expand "x_add")
         (propax))
        ("2"
         (expand "measurable_set?")
         (lemma "sigma_algebra_union"
          ("x" "nonzero_set?(i1!1)" "y" "nonzero_set?(i2!1)"))
         (assert))
        ("3"
         (rewrite "nonzero_measurable")
         (lemma "min_measurable" ("g1" "i1!1" "g2" "i2!1"))
         (expand "min" -1)
         (propax))))
      ("2" (lemma "nonzero_measurable" ("g" "i2!1")) (propax))
      ("3" (lemma "nonzero_measurable" ("g" "i1!1")) (propax))))
    ("2" (hide-all-but 1) (grind))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "i1!1")
   (typepred "i2!1")
   (lemma "isf_scal" ("c" "-1" "i" "i1!1"))
   (lemma "isf_scal" ("c" "-1" "i" "i2!1"))
   (lemma "isf_min" ("i1" "*[T](-1, i1!1)" "i2" "*[T](-1, i2!1)"))
   (expand "*")
   (expand "min")
   (lemma "isf_scal"
    ("c"
     "-1"
     "i"
     "LAMBDA (x_1: T): min(-1 * i1!1(x_1), -1 * i2!1(x_1))"))
   (("1"
     (expand "*" -1)
     (expand "min")
     (expand "max")
     (expand "max")
     (case-replace
      "(LAMBDA (x: T):
                   -1 *
                    IF -1 * i1!1(x) > -1 * i2!1(x) THEN -1 * i2!1(x)
                    ELSE -1 * i1!1(x)
                    ENDIF)=(LAMBDA (x: T):
                   IF i1!1(x) < i2!1(x) THEN i2!1(x) ELSE i1!1(x) ENDIF)")
     (apply-extensionality :hide? t)
     (hide-all-but 1)
     (grind))
    ("2" (assert))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand "minimum") (propax))
    ("2"
     (skosimp*)
     (inst - "w!1")
     (expand "minimum" 1)
     (assert)
     (rewrite "isf_min"))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand "maximum") (propax))
    ("2"
     (skosimp*)
     (inst - "w!1")
     (expand "maximum" 1)
     (rewrite "isf_max"))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "i!1")
   (lemma "isf_max" ("i1" "i!1" "i2" "lambda x: 0"))
   (("1" (expand "max") (expand "plus") (propax))
    ("2" (lemma "isf_zero") (propax))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "isf_min" ("i1" "i!1" "i2" "lambda x: 0"))
   (("1"
     (expand "min")
     (lemma "isf_scal"
      ("c" "-1" "i" "LAMBDA (x_1: T): min(i!1(x_1), 0)"))
     (("1" (expand "*") (expand "minus") (assert)) ("2" (propax))))
    ("2" (lemma "isf_zero") (propax))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "i!1")
   (expand "sq")
   (expand "isf?")
   (flatten)
   (split)
   (("1"
     (hide -2)
     (expand "simple?")
     (flatten)
     (split)
     (("1"
       (hide -2)
       (lemma "prod_measurable" ("g1" "i!1" "g2" "i!1"))
       (expand "sq")
       (expand "*")
       (propax))
      ("2"
       (hide -1)
       (lemma "finite_image[real,real]")
       (inst - "image(i!1, fullset[T])" "lambda (x:real): x*x")
       (case-replace
        "image[real, real]
                       (LAMBDA (x: real): x * x, image[T,real](i!1, fullset[T]))=image[T,real](LAMBDA (x: T): sq(i!1(x)), fullset[T])")
       (hide-all-but 1)
       (apply-extensionality :hide? t)
       (expand "fullset")
       (expand "sq")
       (expand "image")
       (case-replace
        "(EXISTS (x_1: ({x: T | TRUE})): x!1 = i!1(x_1) * i!1(x_1))")
       (("1" (skosimp) (inst + "i!1(x!2)") (inst + "x!2"))
        ("2"
         (replace 1 2)
         (assert)
         (skosimp*)
         (typepred "x!2")
         (skosimp)
         (inst + "x!3")
         (assert))))))
    ("2"
     (hide -1)
     (case-replace
      "nonzero_set?(LAMBDA (x: T): sq(i!1(x))) = nonzero_set?(i!1)")
     (hide-all-but 1)
     (apply-extensionality 1 :hide? t)
     (expand "sq")
     (expand "nonzero_set?")
     (case-replace "i!1(x!1)=0")
     (("1" (assert))
      ("2"
       (assert)
       (expand "/=")
       (rewrite "sq_eq_0" 1 :dir rl)
       (expand "sq")
       (propax))))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "isf_add" ("i1" "i1!1" "i2" "i2!1"))
   (lemma "isf_diff" ("i1" "i1!1" "i2" "i2!1"))
   (lemma "isf_sq" ("i" "(+[T])(i1!1, i2!1)"))
   (lemma "isf_sq" ("i" "(-[T])(i1!1, i2!1)"))
   (lemma "isf_diff"
    ("i1" "sq[T]((+[T])(i1!1, i2!1))" "i2" "sq[T]((-[T])(i1!1, i2!1))"))
   (lemma "isf_scal"
    ("c"
     "1/4"
     "i"
     "(-[T])(sq[T]((+[T])(i1!1, i2!1)), sq[T]((-[T])(i1!1, i2!1)))"))
   (case-replace
    "*[T]
                   (1 / 4,
                    (-[T])
                        (sq[T]((+[T])(i1!1, i2!1)), sq[T]((-[T])(i1!1, i2!1)))) = *[T](i1!1, i2!1)")
   (hide-all-but 1)
   (apply-extensionality :hide? t)
   (expand "sq")
   (expand "*")
   (expand "-")
   (expand "+")
   (expand "sq")
   (assert))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "isf?")
   (typepred "E!1")
   (expand "measurable_set?")
   (rewrite "nonzero_set_phi")
   (assert)
   (lemma "phi_is_simple")
   (inst - "E!1"))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem + ("i!1" "_"))
   (induct "pn")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp)
     (case-replace "j!1=0")
     (("1"
       (expand "expt" 1)
       (expand "expt" 1)
       (expand "expt" 1)
       (typepred "i!1")
       (rewrite "eta"))
      ("2"
       (assert)
       (expand "expt")
       (expand "expt" 2)
       (lemma "isf_prod"
        ("i1" "i!1" "i2" "LAMBDA (x: T): expt(i!1(x), j!1)"))
       (("1" (expand "*") (propax)) ("2" (propax))))))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "i!1")
   (typepred "h!1")
   (expand "isf?")
   (flatten)
   (hide -1 -2)
   (case "subset?(nonzero_set?(*[T](i!1, h!1)),nonzero_set?(i!1))")
   (("1"
     (lemma "m_monotone"
      ("a" "nonzero_set?(*[T](i!1, h!1))" "b" "nonzero_set?(i!1)"))
     (assert)
     (expand "mu_fin?")
     (expand "x_le")
     (replace -3)
     (flatten))
    ("2" (hide-all-but 1) (grind))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "i!1")
   (expand "isf?")
   (flatten)
   (expand "simple?")
   (flatten)
   (lemma "finite_countable[real]"
    ("x" "image[T, real](i!1, fullset[T])"))
   (("1" (propax)) ("2" (propax))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "i!1")
   (split)
   (("1"
     (expand "isf?")
     (flatten)
     (expand "simple?")
     (flatten)
     (expand "measurable_function?")
     (lemma "singleton_is_borel[real,metric_induced_topology]"
      ("x" "c!1"))
     (inst - " singleton[real](c!1)")
     (expand "measurable_set?")
     (propax))
    ("2"
     (expand "isf?")
     (flatten)
     (case "subset?(inverse_image[T, real](i!1, singleton[real](c!1)),nonzero_set?(i!1))")
     (("1"
       (lemma "m_monotone"
        ("a"
         "inverse_image[T, real](i!1, singleton[real](c!1))"
         "b"
         "nonzero_set?(i!1)"))
       (assert)
       (expand "x_le")
       (expand "mu_fin?")
       (replace -4)
       (flatten))
      ("2" (hide-all-but (1 3)) (grind))))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "i!1")
   (expand "convergent?")
   (expand "isf?")
   (expand "simple?")
   (flatten))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "p!1")
   (expand "fullset")
   (expand "finite_partition?")
   (flatten)
   (hide-all-but (-2 1))
   (expand "is_countable")
   (expand "is_finite")
   (skosimp)
   (inst + "f!2")
   (expand "injective?")
   (propax))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "convergent?")
   (typepred "p!1")
   (expand "fullset")
   (expand "finite_partition?")
   (flatten))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "i!1")
   (expand "isf?")
   (flatten)
   (assert)
   (lemma "nonzero_measurable" ("g" "i!1"))
   (expand "measurable_set?")
   (propax))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: isf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (skolem + ("n!1"))
   (expand "pointwise_converges_upto?")
   (flatten)
   (typepred "u!1")
   (expand "increasing_nn_simple?")
   (flatten)
   (hide -2)
   (inst - "n!1")
   (expand "nn_simple?")
   (flatten)
   (expand "isf?")
   (assert)
   (case "forall x: u!1(n!1)(x)<= i!1(x)")
   (("1"
     (typepred "i!1")
     (expand "isf?")
     (flatten)
     (lemma "m_monotone"
      ("a" "nonzero_set?(u!1(n!1))" "b" "nonzero_set?(i!1)"))
     (split -1)
     (("1" (expand "mu_fin?") (expand "x_le") (assert))
      ("2"
       (hide 2 -2)
       (expand "nonzero_set?")
       (expand "subset?")
       (expand "member")
       (skosimp)
       (inst - "x!1")
       (inst - "x!1")
       (assert))))
    ("2"
     (hide 2)
     (skosimp)
     (case "i!1(x!1)<u!1(n!1)(x!1)")
     (("1"
       (expand "pointwise_convergence?")
       (expand "pointwise_increasing?")
       (inst -4 "x!1")
       (inst -5 "x!1")
       (rewrite "metric_convergence_def" *)
       (expand "metric_converges_to")
       (inst -4 "u!1(n!1)(x!1)-i!1(x!1)")
       (("1"
         (skosimp)
         (expand "ball")
         (expand "member")
         (inst -4 "max(n!1,n!2)")
         (assert)
         (split -4)
         (("1"
           (expand "increasing?")
           (inst -5 "n!1" "max(n!1,n!2)")
           (assert))
          ("2" (assert))))
        ("2" (assert))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "nn_integrable?")
   (inst + "lambda n: lambda x: 0")
   (("1"
     (split)
     (("1"
       (expand "pointwise_convergence?")
       (skosimp)
       (expand "convergence?")
       (skosimp)
       (inst + "0")
       (skosimp))
      ("2"
       (expand "convergent?")
       (inst + "0")
       (expand "o ")
       (expand "convergence?")
       (skosimp)
       (inst + "0")
       (skosimp)
       (lemma "isf_integral_zero")
       (replace -1)
       (propax))))
    ("2"
     (expand "increasing_nn_isf?")
     (expand "pointwise_increasing?")
     (skosimp)
     (expand "increasing?")
     (propax))
    ("3" (lemma "isf_zero") (assert) (expand "nn_isf?") (propax))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (name "U1" "lambda (m:nat): lambda n:min(u1!1(n),u2!1(m))")
   (name "U2" "lambda (m:nat): lambda n:min(u2!1(n),u1!1(m))")
   (case "forall n: pointwise_convergence?(U2(n), u1!1(n))")
   (("1"
     (case "forall n: pointwise_convergence?(U1(n), u2!1(n))")
     (("1"
       (hide -3 -4)
       (case "forall n: converges_upto?((isf_integral o U2(n)),isf_integral(u1!1(n)))")
       (("1"
         (case "forall n: converges_upto?((isf_integral o U1(n)),isf_integral(u2!1(n)))")
         (("1"
           (expand "convergent?" -7)
           (skosimp)
           (lemma "hausdorff_convergence.limit_def"
            ("v" "isf_integral o u1!1" "l" "l!1"))
           (("1"
             (assert)
             (replace -1)
             (case "convergence?(isf_integral o u2!1, l!1)")
             (("1"
               (lemma "hausdorff_convergence.limit_def"
                ("v" "isf_integral o u2!1" "l" "l!1"))
               (("1" (assert) (expand "convergent?") (inst + "l!1"))
                ("2" (hide 2) (expand "convergent?") (inst + "l!1"))))
              ("2"
               (hide 2)
               (hide -1)
               (hide -5 -6)
               (case "FORALL (i1, i2: nn_isf):
                             (FORALL x: i1(x) <= i2(x)) IMPLIES
                              isf_integral(i1) <= isf_integral(i2)")
               (("1"
                 (inst-cp - "lambda x: 0" "_")
                 (("1"
                   (rewrite "isf_integral_zero")
                   (name-replace "II" "isf_integral")
                   (case "forall (n,m:nat): (II o U2(n))(m) <= l!1")
                   (("1"
                     (case "forall (n,m:nat): (II o U1(n))(m) = (II o U2(m))(n)")
                     (("1"
                       (case "FORALL n: II(u1!1(n)) <= l!1")
                       (("1"
                         (case "FORALL (n, m: nat): (II o U2(n))(m) <= II(u1!1(n))")
                         (("1"
                           (case "FORALL (n, m: nat): (II o U1(n))(m) <= II(u2!1(n))")
                           (("1"
                             (case "FORALL n: II(u2!1(n)) <= l!1")
                             (("1"
                               (lemma "increasing_bounded_convergence"
                                ("v1" "II o u2!1"))
                               (("1"
                                 (split)
                                 (("1"
                                   (expand "sup")
                                   (typepred "lub(Im(II o u2!1))")
                                   (name-replace
                                    "LIMIT"
                                    "lub(Im(II o u2!1))")
                                   (expand "least_upper_bound?")
                                   (flatten)
                                   (inst - "l!1")
                                   (split -2)
                                   (("1"
                                     (expand "<=" -1)
                                     (split -1)
                                     (("1"
                                       (expand "Im" -2)
                                       (expand "upper_bound?")
                                       (hide 1)
                                       (rewrite
                                        "metric_convergence_def"
                                        *)
                                       (expand "metric_converges_to")
                                       (lemma
                                        "posreal_div_posreal_is_posreal"
                                        ("px" "l!1-LIMIT" "py" "4"))
                                       (("1"
                                         (name-replace
                                          "RR"
                                          "(l!1 - LIMIT) / 4")
                                         (inst -17 "RR")
                                         (("1"
                                           (skosimp)
                                           (expand "ball")
                                           (expand "member")
                                           (expand "o" -17)
                                           (expand "o")
                                           (inst-cp -14 "n!1")
                                           (expand "converges_upto?" -15)
                                           (flatten)
                                           (rewrite
                                            "metric_convergence_def"
                                            *)
                                           (expand "metric_converges_to")
                                           (inst -15 "RR")
                                           (("1"
                                             (skosimp)
                                             (expand "ball")
                                             (expand "member")
                                             (hide -14 -17 -18)
                                             (inst -16 "n!1")
                                             (inst -14 "n!2")
                                             (hide -13 -15)
                                             (assert)
                                             (inst -8 "n!1")
                                             (expand "abs" -14)
                                             (assert)
                                             (inst -7 "n!1" "n!2")
                                             (expand "abs" -13)
                                             (assert)
                                             (hide -7 -8)
                                             (inst -7 "n!2" "n!1")
                                             (replace -7 * rl)
                                             (hide -7)
                                             (inst -6 "n!2" "n!1")
                                             (inst - "II(u2!1(n!2))")
                                             (("1"
                                               (expand "RR")
                                               (hide-all-but
                                                (-1 -2 -3 -10 -11 -6))
                                               (grind))
                                              ("2"
                                               (expand "o")
                                               (inst + "n!2"))))
                                            ("2" (assert))))
                                          ("2" (assert))))
                                        ("2" (assert))))
                                      ("2"
                                       (assert)
                                       (replace -1)
                                       (hide-all-but (-3 1))
                                       (rewrite
                                        "metric_convergence_def"
                                        *)
                                       (expand "convergence")
                                       (expand "metric_converges_to")
                                       (skosimp)
                                       (inst - "r!1")
                                       (expand "ball")
                                       (expand "member")
                                       (skosimp)
                                       (inst + "n!1")
                                       (skosimp)
                                       (inst - "i!1")
                                       (assert)
                                       (grind))))
                                    ("2"
                                     (hide 2)
                                     (expand "o" 1)
                                     (expand "Im" 1)
                                     (expand "upper_bound?" 1)
                                     (skosimp)
                                     (typepred "s!1")
                                     (skolem - ("n!1"))
                                     (replace -1)
                                     (hide -1)
                                     (inst -3 "n!1"))))
                                  ("2"
                                   (hide-all-but (1 -7))
                                   (expand "increasing?")
                                   (expand "o ")
                                   (skolem + ("n!1" "m!1"))
                                   (inst - "u2!1(n!1)" "u2!1(m!1)")
                                   (flatten)
                                   (split)
                                   (("1" (propax))
                                    ("2"
                                     (hide 2)
                                     (skosimp)
                                     (typepred "u2!1")
                                     (expand "increasing_nn_isf?")
                                     (expand "pointwise_increasing?")
                                     (inst - "x!1")
                                     (expand "increasing?")
                                     (inst - "n!1" "m!1")
                                     (assert))))))
                                ("2"
                                 (expand "o" 1)
                                 (expand "bounded_above?")
                                 (inst + "l!1"))))
                              ("2"
                               (hide 2)
                               (skosimp)
                               (inst -8 "n!1")
                               (expand "converges_upto?" -8)
                               (flatten)
                               (rewrite "metric_convergence_def" *)
                               (expand "metric_converges_to")
                               (expand "ball")
                               (expand "member")
                               (case "l!1 < II(u2!1(n!1))")
                               (("1"
                                 (hide 1)
                                 (inst -9 "II(u2!1(n!1))-l!1")
                                 (("1"
                                   (skosimp)
                                   (inst -9 "n!1+n!2")
                                   (assert)
                                   (expand "o" -9)
                                   (inst - "n!1" "n!1+n!2")
                                   (expand "o" -2)
                                   (expand "abs" -9)
                                   (assert)
                                   (inst - "n!1+n!2" "n!1")
                                   (expand "o" -3)
                                   (inst - "n!1+n!2")
                                   (inst - "n!1" "n!1+n!2")
                                   (expand "o")
                                   (assert))
                                  ("2" (assert))))
                                ("2" (assert))))))
                            ("2"
                             (hide-all-but (-5 1))
                             (skosimp)
                             (expand "o")
                             (expand "U1")
                             (inst - "min(u1!1(m!1), u2!1(n!1))"
                              "u2!1(n!1)")
                             (("1" (assert) (hide 1) (grind))
                              ("2"
                               (typepred "u1!1(m!1)")
                               (typepred "u2!1(n!1)")
                               (hide -1 -3 2)
                               (expand "nn_isf?")
                               (skosimp)
                               (inst - "x!1")
                               (inst - "x!1")
                               (grind))))))
                          ("2"
                           (hide-all-but (-4 1))
                           (skosimp)
                           (expand "U2")
                           (expand "o ")
                           (inst - "min(u2!1(m!1), u1!1(n!1))"
                            "u1!1(n!1)")
                           (("1" (assert) (hide 1) (grind))
                            ("2"
                             (typepred "u2!1(m!1)")
                             (typepred "u1!1(n!1)")
                             (hide -1 -3 2)
                             (expand "nn_isf?")
                             (skosimp)
                             (inst - "x!1")
                             (inst - "x!1")
                             (grind))))))
                        ("2"
                         (hide 2)
                         (skosimp)
                         (case "l!1<II(u1!1(n!1))")
                         (("1"
                           (hide 1)
                           (rewrite "metric_convergence_def" *)
                           (expand "metric_converges_to")
                           (inst -10 "II(u1!1(n!1))-l!1")
                           (("1"
                             (skosimp)
                             (expand "ball")
                             (expand "member")
                             (expand "o" -10)
                             (inst -10 "n!1+n!2")
                             (assert)
                             (typepred "u1!1")
                             (expand "increasing_nn_isf?")
                             (expand "pointwise_increasing?")
                             (inst -5 "u1!1(n!1)" "u1!1(n!1 + n!2)")
                             (split -5)
                             (("1" (expand "abs" -11) (assert))
                              ("2"
                               (skosimp)
                               (inst - "x!1")
                               (expand "increasing?")
                               (inst - "n!1" "n!1+n!2")
                               (assert))))
                            ("2" (assert))))
                          ("2" (assert))))))
                      ("2"
                       (hide-all-but 1)
                       (skosimp)
                       (expand "U2")
                       (expand "U1")
                       (expand "o")
                       (case-replace
                        "min(u1!1(m!1), u2!1(n!1))=min(u2!1(n!1), u1!1(m!1))")
                       (hide 2)
                       (grind)
                       (apply-extensionality :hide? t)
                       (grind))))
                    ("2"
                     (hide-all-but (-1 -2 -4 -7 1))
                     (skosimp)
                     (expand "o")
                     (inst -3 "n!1")
                     (expand "converges_upto?")
                     (flatten)
                     (expand "increasing?")
                     (expand "U2")
                     (inst-cp - "min(u2!1(m!1), u1!1(n!1))" "u1!1(n!1)")
                     (("1"
                       (split -2)
                       (("1"
                         (case "II(u1!1(n!1))<=l!1")
                         (("1" (assert))
                          ("2"
                           (case "l!1<II(u1!1(n!1))")
                           (("1"
                             (hide-all-but (-1 -7 -3))
                             (rewrite "metric_convergence_def" *)
                             (expand "metric_converges_to")
                             (inst -3 "II(u1!1(n!1))-l!1")
                             (("1"
                               (skosimp)
                               (inst -3 "n!1+n!2")
                               (assert)
                               (expand "ball")
                               (inst - "u1!1(n!1)" "u1!1(n!1+n!2)")
                               (split -2)
                               (("1" (expand "abs") (assert))
                                ("2"
                                 (skosimp)
                                 (typepred "u1!1")
                                 (expand "increasing_nn_isf?")
                                 (expand "pointwise_increasing?")
                                 (inst - "x!1")
                                 (expand "increasing?")
                                 (inst - "n!1" "n!1+n!2")
                                 (assert))))
                              ("2" (assert))))
                            ("2" (assert))))))
                        ("2" (hide-all-but 1) (grind))))
                      ("2"
                       (hide-all-but 1)
                       (typepred "u1!1(n!1)")
                       (typepred "u2!1(m!1)")
                       (hide -1 -3)
                       (expand "nn_isf?")
                       (skosimp)
                       (inst - "x!1")
                       (inst - "x!1")
                       (grind))))))
                  ("2" (rewrite "nn_isf_TCC1"))))
                ("2"
                 (hide-all-but 1)
                 (skosimp)
                 (lemma "isf_integral_le" ("i1" "i1!1" "i2" "i2!1"))
                 (assert))))))
            ("2" (expand "convergent?") (inst + "l!1"))))
          ("2"
           (hide -1 -3 2)
           (skosimp)
           (inst - "n!1")
           (lemma "isf_convergence" ("u" "U1(n!1)" "i" "u2!1(n!1)"))
           (("1"
             (split -1)
             (("1" (propax))
              ("2"
               (hide 2)
               (expand "pointwise_converges_upto?")
               (assert)
               (hide-all-but 1)
               (expand "U1")
               (typepred "u1!1")
               (expand "increasing_nn_isf?")
               (expand "pointwise_increasing?")
               (skosimp)
               (inst - "x!1")
               (expand "min")
               (expand "increasing?")
               (skosimp)
               (inst - "x!2" "y!1")
               (assert)
               (grind))))
            ("2"
             (hide-all-but 1)
             (expand "U1")
             (typepred "u1!1")
             (expand "increasing_nn_isf?")
             (expand "increasing_nn_simple?")
             (split)
             (("1"
               (skosimp)
               (typepred "u1!1(n!2)")
               (typepred "u2!1(n!1)")
               (expand "nn_isf?")
               (expand "nn_simple?")
               (split)
               (("1"
                 (skosimp)
                 (inst - "x!1")
                 (inst - "x!1")
                 (hide-all-but (-2 -4 1))
                 (grind))
                ("2" (expand "isf?") (flatten) (rewrite "simple_min"))))
              ("2"
               (expand "pointwise_increasing?")
               (skosimp)
               (inst - "x!1")
               (expand "increasing?")
               (skosimp)
               (inst - "x!2" "y!1")
               (assert)
               (expand "min")
               (grind))))))))
        ("2"
         (hide 2)
         (skosimp)
         (inst -2 "n!1")
         (hide -1)
         (lemma "isf_convergence" ("u" "U2(n!1)" "i" "u1!1(n!1)"))
         (("1"
           (split -1)
           (("1" (propax))
            ("2"
             (expand "pointwise_converges_upto?")
             (assert)
             (hide-all-but 1)
             (expand "U2")
             (typepred "u2!1")
             (expand "increasing_nn_isf?")
             (expand "pointwise_increasing?")
             (skosimp)
             (inst - "x!1")
             (expand "increasing?")
             (skosimp*)
             (inst - "x!2" "y!1")
             (assert)
             (grind))))
          ("2"
           (hide-all-but 1)
           (expand "U2")
           (typepred "u2!1")
           (expand "increasing_nn_isf?")
           (expand "increasing_nn_simple?")
           (split)
           (("1"
             (skosimp)
             (expand "nn_simple?")
             (split)
             (("1"
               (hide -1)
               (skosimp)
               (typepred "u2!1(n!2)")
               (typepred "u1!1(n!1)")
               (expand "nn_isf?")
               (inst - "x!1")
               (inst - "x!1")
               (expand "min")
               (hide -1 -3)
               (grind))
              ("2"
               (hide -1)
               (typepred "u2!1(n!2)")
               (typepred "u1!1(n!1)")
               (expand "isf?")
               (flatten)
               (rewrite "simple_min"))))
            ("2"
             (expand "pointwise_increasing?")
             (skosimp)
             (inst - "x!1")
             (expand "min")
             (expand "increasing?")
             (skosimp)
             (inst - "x!2" "y!1")
             (assert)
             (grind))))))))
      ("2"
       (hide -1 -2 -3 2)
       (skosimp)
       (expand "pointwise_convergence?")
       (skosimp)
       (inst - "x!1")
       (inst - "x!1")
       (hide -3)
       (expand "U1")
       (rewrite "metric_convergence_def" *)
       (rewrite "metric_convergence_def" *)
       (rewrite "metric_convergence_def" *)
       (expand "metric_converges_to")
       (skosimp)
       (inst - "r!1/2")
       (inst - "r!1/2")
       (skosimp*)
       (inst + "n!1+n!2+n!3")
       (skosimp)
       (inst - "i!1")
       (inst - "i!1")
       (expand "ball")
       (expand "member")
       (assert)
       (typepred "u2!1")
       (expand "increasing_nn_isf?")
       (expand "pointwise_increasing?")
       (inst - "x!1")
       (expand "increasing?")
       (inst - "n!1" "i!1")
       (assert)
       (grind))))
    ("2"
     (hide -1 -2 2)
     (skosimp)
     (expand "U2")
     (expand "pointwise_convergence?")
     (skosimp)
     (inst - "x!1")
     (inst - "x!1")
     (expand "min")
     (hide -3)
     (typepred "u2!1")
     (typepred "u1!1")
     (expand "increasing_nn_isf?")
     (expand "pointwise_increasing?")
     (rewrite "metric_convergence_def" *)
     (rewrite "metric_convergence_def" *)
     (rewrite "metric_convergence_def" *)
     (expand "metric_converges_to")
     (skosimp)
     (inst -3 "r!1/2")
     (inst -4 "r!1/2")
     (skosimp*)
     (expand "ball")
     (expand "member")
     (inst + "n!1+n!2+n!3")
     (skosimp)
     (inst -4 "i!1")
     (inst -5 "i!1")
     (inst - "x!1")
     (inst - "x!1")
     (assert)
     (expand "increasing?")
     (inst - "n!1" "i!1")
     (assert)
     (hide -2)
     (grind))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "i!1")
   (lemma "nn_isf_is_nn_integrable")
   (inst - "i!1")
   (flatten)
   (expand "nn_integral")
   (case "nonempty?({u | pointwise_convergence?(u, i!1)})")
   (("1"
     (lemma "choose_member"
      ("a" "({u | pointwise_convergence?(u, i!1)})"))
     (name-replace "U" "choose({u | pointwise_convergence?(u, i!1)})")
     (split -1)
     (("1"
       (expand "member")
       (hide -2)
       (expand "nn_integrable?")
       (skosimp)
       (lemma "nn_convergence" ("f" "i!1" "u1" "u!1" "u2" "U"))
       (assert)
       (flatten)
       (replace -2 1 rl)
       (hide -1 -2 -3)
       (lemma "nn_convergence"
        ("f" "i!1" "u1" "u!1" "u2" "lambda n: i!1"))
       (("1"
         (assert)
         (split -1)
         (("1"
           (flatten)
           (replace -2 1)
           (hide -2)
           (rewrite "limit_def")
           (expand "o ")
           (expand "convergence?")
           (skosimp)
           (inst + "0")
           (skosimp))
          ("2"
           (hide-all-but 1)
           (expand "pointwise_convergence?")
           (skosimp)
           (expand "convergence?")
           (skosimp)
           (inst + "0")
           (skosimp))))
        ("2"
         (hide-all-but (1 -5))
         (expand "increasing_nn_isf?")
         (expand "pointwise_increasing?")
         (skosimp)
         (expand "increasing?")
         (propax))))
      ("2" (expand "nonempty?") (propax))))
    ("2"
     (hide 2)
     (expand "nn_integrable?")
     (skosimp)
     (expand "nonempty?")
     (expand "empty?")
     (inst - "u!1")
     (expand "member")
     (propax))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (typepred "g!1")
   (expand "nn_integrable?" -2)
   (skosimp)
   (lemma "nn_measurable_def" ("f" "g!1"))
   (replace -2)
   (split -1)
   (("1"
     (flatten)
     (skosimp)
     (typepred "w!1")
     (name "U" "lambda n: min(u!1(n),w!1(n))")
     (case "increasing_nn_isf?(U)")
     (("1"
       (hide -2)
       (case "forall n: nn_isf?(U(n))")
       (("1"
         (case "pointwise_converges_upto?(U, g!1)")
         (("1"
           (case "FORALL n: isf_integral(U(n)) <= (isf_integral o u!1)(n)")
           (("1"
             (case "convergent?(isf_integral o U)")
             (("1"
               (split 1)
               (("1"
                 (expand "nn_integrable?" 1)
                 (inst + "U")
                 (expand "pointwise_converges_upto?")
                 (flatten)
                 (assert))
                ("2"
                 (expand "nn_integral")
                 (case "nonempty?({u | pointwise_convergence?(u, f!1)})")
                 (("1"
                   (lemma "choose_member"
                    ("a" "{u | pointwise_convergence?(u, f!1)}"))
                   (split -1)
                   (("1"
                     (name-replace "CU"
                      "choose({u | pointwise_convergence?(u, f!1)})")
                     (expand "member")
                     (lemma "nn_convergence"
                      ("u1" "u!1" "u2" "CU" "f" "f!1"))
                     (assert)
                     (flatten)
                     (replace -2 1 rl)
                     (hide -1 -2 -3 -4)
                     (case "nonempty?({u_1: increasing_nn_isf |
                                                 pointwise_convergence?(u_1, g!1)})")
                     (("1"
                       (lemma "choose_member"
                        ("a"
                         "({u_1: increasing_nn_isf |
                                               pointwise_convergence?(u_1, g!1)})"))
                       (split -1)
                       (("1"
                         (name-replace "CUG"
                          "choose({u_1: increasing_nn_isf |
                                                pointwise_convergence?(u_1, g!1)})")
                         (expand "member")
                         (hide -2)
                         (lemma "nn_convergence" ("f" "g!1"))
                         (("1"
                           (inst - "U" "CUG")
                           (assert)
                           (expand "pointwise_converges_upto?")
                           (flatten)
                           (assert)
                           (flatten)
                           (replace -2 1 rl)
                           (hide -1 -2 -3)
                           (expand "convergent?")
                           (skosimp*)
                           (lemma "hausdorff_convergence.limit_def"
                            ("v" "isf_integral o U" "l" "l!1"))
                           (lemma "hausdorff_convergence.limit_def"
                            ("v" "isf_integral o u!1" "l" "l!2"))
                           (assert)
                           (replace -1)
                           (replace -2)
                           (hide -1 -2)
                           (case "l!1>l!2")
                           (("1"
                             (hide 1)
                             (rewrite "metric_convergence_def" *)
                             (rewrite "metric_convergence_def" *)
                             (expand "metric_converges_to")
                             (expand "ball")
                             (expand "member")
                             (inst - "(l!1-l!2)/2")
                             (inst -13 "(l!1-l!2)/2")
                             (skosimp*)
                             (inst - "n!1+n!2")
                             (inst -13 "n!1+n!2")
                             (assert)
                             (inst - "n!1+n!2")
                             (expand "o")
                             (name-replace "IL"
                              "isf_integral(U(n!1 + n!2))")
                             (name-replace "IH"
                              "isf_integral(u!1(n!1 + n!2))")
                             (hide-all-but (-1 -2 -3 -13))
                             (grind))
                            ("2" (assert))))
                          ("2"
                           (hide 2)
                           (split)
                           (("1"
                             (skosimp)
                             (inst -12 "x1!1")
                             (flatten)
                             (assert))
                            ("2"
                             (expand "nn_integrable?")
                             (inst + "U")
                             (assert)
                             (expand "pointwise_converges_upto?")
                             (propax))))))
                        ("2" (expand "nonempty?") (propax))))
                      ("2"
                       (hide 2 -1 -2)
                       (expand "nonempty?")
                       (expand "empty?")
                       (expand "member")
                       (inst - "U")
                       (expand "pointwise_converges_upto?")
                       (flatten))))
                    ("2" (expand "nonempty?") (propax))))
                  ("2"
                   (hide-all-but (-9 1))
                   (expand "nonempty?")
                   (expand "empty?")
                   (expand "member")
                   (inst - "u!1"))))))
              ("2"
               (hide 2)
               (lemma "increasing_bounded_convergence"
                ("v1" "isf_integral o U"))
               (("1"
                 (split -1)
                 (("1"
                   (expand "convergent?")
                   (expand "sup" -1)
                   (inst + "lub(Im(isf_integral o U))")
                   (hide-all-but (-1 1))
                   (rewrite "metric_convergence_def")
                   (expand "convergence")
                   (expand "metric_converges_to")
                   (skosimp)
                   (inst - "r!1")
                   (skosimp)
                   (inst + "n!1")
                   (skosimp)
                   (inst - "i!1")
                   (assert)
                   (expand "ball")
                   (name-replace "DRL1" "lub(Im(isf_integral o U))")
                   (name-replace "DRL2" "(isf_integral o U)(i!1)")
                   (grind))
                  ("2"
                   (hide 2)
                   (expand "increasing_nn_isf?")
                   (expand "pointwise_increasing?")
                   (expand "increasing?")
                   (skolem + ("n!1" "n!2"))
                   (flatten)
                   (expand "o")
                   (lemma "isf_integral_le"
                    ("i1" "U(n!1)" "i2" "U(n!2)"))
                   (split -1)
                   (("1" (propax))
                    ("2"
                     (skosimp)
                     (inst -5 "x!1")
                     (inst -5 "n!1" "n!2")
                     (assert))))))
                ("2"
                 (hide 2)
                 (expand "bounded_above?")
                 (expand "convergent?")
                 (skosimp)
                 (inst + "l!1")
                 (skolem + ("n!1"))
                 (expand "o")
                 (inst - "n!1")
                 (name-replace "IL" "isf_integral[T, S, m](U(n!1))")
                 (rewrite "metric_convergence_def" *)
                 (expand "metric_converges_to")
                 (case "l!1<IL")
                 (("1"
                   (hide 1)
                   (expand "ball")
                   (expand "member")
                   (inst -10 "IL-l!1")
                   (("1"
                     (skosimp)
                     (inst -10 "n!1+n!2")
                     (assert)
                     (hide-all-but (-1 -2 -10 -11))
                     (lemma "isf_integral_le"
                      ("i1" "u!1(n!1)" "i2" "u!1(n!1+n!2)"))
                     (split -1)
                     (("1"
                       (name-replace "II1" "isf_integral(u!1(n!1))")
                       (name-replace "II2" "isf_integral(u!1(n!1+n!2))")
                       (hide -5)
                       (grind))
                      ("2"
                       (skosimp)
                       (typepred "u!1")
                       (expand "increasing_nn_isf?")
                       (expand "pointwise_increasing?")
                       (inst - "x!1")
                       (expand "increasing?")
                       (inst - "n!1" "n!1+n!2")
                       (assert))))
                    ("2" (assert))))
                  ("2" (assert))))))))
            ("2"
             (hide 2)
             (skosimp)
             (expand "o" 1)
             (lemma "isf_integral_le" ("i1" "U(n!1)" "i2" "u!1(n!1)"))
             (assert)
             (hide 2)
             (skosimp)
             (expand "U")
             (hide-all-but 1)
             (grind))))
          ("2"
           (hide 2)
           (expand "pointwise_converges_upto?")
           (flatten)
           (case-replace "pointwise_increasing?(U)")
           (("1"
             (expand "pointwise_convergence?")
             (skosimp)
             (inst -5 "x!1")
             (inst -8 "x!1")
             (inst -10 "x!1")
             (flatten)
             (hide -9)
             (rewrite "metric_convergence_def" *)
             (rewrite "metric_convergence_def" *)
             (rewrite "metric_convergence_def" *)
             (expand "metric_converges_to")
             (skosimp)
             (expand "ball")
             (expand "member")
             (expand "U")
             (hide -2)
             (expand "min" 1)
             (case-replace "g!1(x!1)=f!1(x!1)")
             (("1"
               (inst - "r!1/2")
               (inst - "r!1/2")
               (skosimp*)
               (inst + "n!1+n!2")
               (skosimp)
               (inst - "i!1")
               (inst - "i!1")
               (assert)
               (hide-all-but (-6 -9 1))
               (grind))
              ("2"
               (case "g!1(x!1)<f!1(x!1)")
               (("1"
                 (hide -10 1)
                 (inst - "r!1/2")
                 (inst - "r!1/2")
                 (skosimp*)
                 (inst + "n!1+n!2")
                 (skosimp)
                 (inst - "i!1")
                 (inst - "i!1")
                 (assert)
                 (hide-all-but (-1 -6 -9 1))
                 (grind))
                ("2" (assert))))))
            ("2"
             (hide 2)
             (expand "U")
             (expand "increasing_nn_isf?")
             (propax))))))
        ("2"
         (hide 2)
         (expand "U")
         (skosimp)
         (typepred "u!1(n!1)")
         (hide-all-but (-1 -2 -4 1))
         (expand "nn_isf?")
         (skosimp)
         (expand "min")
         (expand "increasing_nn_simple?")
         (flatten)
         (expand "nn_simple?")
         (inst - "x!1")
         (inst - "n!1")
         (flatten)
         (inst - "x!1")
         (hide -1 -4 -5)
         (grind))
        ("3"
         (hide 2 -3 -4 -5 -6)
         (expand "increasing_nn_simple?")
         (flatten)
         (skosimp)
         (expand "U")
         (typepred "u!1(n!1)")
         (expand "isf?")
         (flatten)
         (expand "increasing_nn_isf?")
         (hide -4)
         (inst - "n!1")
         (expand "nn_simple?")
         (flatten)
         (rewrite "simple_min")
         (lemma "m_monotone"
          ("a"
           "nonzero_set?(min(u!1(n!1), w!1(n!1)))"
           "b"
           "nonzero_set?(u!1(n!1))"))
         (split -1)
         (("1" (expand "x_le") (expand "mu_fin?") (assert))
          ("2"
           (hide 2)
           (expand "subset?")
           (expand "nonzero_set?")
           (expand "member")
           (skosimp)
           (expand "min")
           (replace -1)
           (inst - "x!1")
           (hide-all-but (-5 1))
           (grind))))))
      ("2"
       (hide 2 -3 -5 -6)
       (expand "U")
       (typepred "u!1")
       (hide -2)
       (expand "increasing_nn_isf?")
       (expand "increasing_nn_simple?")
       (flatten)
       (hide -2 -4)
       (expand "pointwise_increasing?")
       (skosimp)
       (inst - "x!1")
       (inst - "x!1")
       (expand "increasing?")
       (skosimp)
       (inst - "x!2" "y!1")
       (inst - "x!2" "y!1")
       (assert)
       (hide-all-but (-1 -3 1))
       (grind))
      ("3"
       (skosimp)
       (expand "U")
       (typepred "u!1(x1!1)")
       (expand "nn_isf?")
       (expand "increasing_nn_simple?")
       (flatten)
       (hide -3)
       (hide 2)
       (split)
       (("1"
         (expand "isf?")
         (flatten)
         (inst -4 "x1!1")
         (expand "nn_simple?")
         (flatten)
         (rewrite "simple_min")
         (lemma "m_monotone"
          ("a"
           "nonzero_set?(min(u!1(x1!1), w!1(x1!1)))"
           "b"
           "nonzero_set?(u!1(x1!1))"))
         (split -1)
         (("1" (expand "x_le") (expand "mu_fin?") (assert))
          ("2"
           (hide-all-but 1)
           (expand "nonzero_set?")
           (expand "min")
           (expand "min")
           (expand "subset?")
           (expand "member")
           (skosimp*)
           (assert)
           (typepred "w!1")
           (expand "increasing_nn_simple?")
           (expand "nn_simple?")
           (flatten)
           (inst - "x1!1")
           (flatten)
           (inst - "x!1")
           (grind))))
        ("2"
         (skosimp)
         (inst - "x!1")
         (inst - "x1!1")
         (expand "nn_simple?")
         (flatten)
         (inst - "x!1")
         (hide-all-but (-2 -3 1))
         (grind))))))
    ("2" (skosimp) (inst - "x!1") (flatten))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (lemma "nn_integral_isf" ("i" "lambda x: 0"))
   (("1" (rewrite "isf_integral_zero"))
    ("2" (lemma "isf_zero") (assert) (expand "nn_isf?") (propax))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "nn_integral_isf" ("i" "phi(F!1)"))
   (("1" (rewrite "isf_integral_phi"))
    ("2"
     (lemma "isf_phi" ("E" "F!1"))
     (expand "nn_isf?")
     (skosimp)
     (hide-all-but 1)
     (grind))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f2!1")
   (typepred "f1!1")
   (lemma "nn_integrable_add" ("f1" "f1!1" "f2" "f2!1"))
   (flatten)
   (expand "nn_integral")
   (case "nonempty?({u | pointwise_convergence?(u, f2!1)})")
   (("1"
     (lemma "choose_member"
      ("a" "({u | pointwise_convergence?(u, f2!1)})"))
     (split -1)
     (("1"
       (name-replace "CU2"
        "choose({u | pointwise_convergence?(u, f2!1)})")
       (expand "member")
       (case "nonempty?({u_1: increasing_nn_isf |
                                pointwise_convergence?(u_1, f1!1)})")
       (("1"
         (lemma "choose_member"
          ("a"
           "({u_1: increasing_nn_isf |
                              pointwise_convergence?(u_1, f1!1)})"))
         (name-replace "CU1"
          "choose(({u_1: increasing_nn_isf |
                                  pointwise_convergence?(u_1, f1!1)}))")
         (split -1)
         (("1"
           (case "nonempty?({u_2: increasing_nn_isf |
                                       pointwise_convergence?(u_2, f1!1 + f2!1)})")
           (("1"
             (lemma "choose_member"
              ("a"
               "({u_2: increasing_nn_isf |
                                     pointwise_convergence?(u_2, f1!1 + f2!1)})"))
             (split -1)
             (("1"
               (name-replace "CU"
                "choose(({u_2: increasing_nn_isf |
                                        pointwise_convergence?(u_2, f1!1 + f2!1)}))")
               (expand "member")
               (hide -2 -4 -6)
               (expand "nn_integrable?")
               (skolem - ("u!3"))
               (skosimp*)
               (lemma "nn_convergence"
                ("f" "f1!1" "u1" "u!1" "u2" "CU1"))
               (assert)
               (flatten)
               (replace -2 * rl)
               (lemma "nn_convergence"
                ("f" "f2!1" "u1" "u!2" "u2" "CU2"))
               (assert)
               (flatten)
               (replace -2 * rl)
               (lemma "nn_convergence"
                ("f" "f1!1+f2!1" "u1" "u!3" "u2" "CU"))
               (assert)
               (flatten)
               (replace -2 * rl)
               (hide-all-but (1 -10 -11 -12 -13 -14 -15 -16))
               (lemma "nn_convergence"
                ("f" "f1!1+f2!1" "u1" "u!3" "u2" "u!1+u!2"))
               (("1"
                 (assert)
                 (lemma "pointwise_convergence_sum"
                  ("u" "u!1" "f0" "f1!1" "v" "u!2" "f1" "f2!1"))
                 (assert)
                 (flatten)
                 (replace -3 1)
                 (hide -1 -2 -3 -5 -6)
                 (case-replace
                  "isf_integral o (u!1 + u!2) = (isf_integral o u!1)+(isf_integral o u!2)")
                 (("1"
                   (hide -1)
                   (name-replace "I1" "isf_integral o u!1")
                   (name-replace "I2" "isf_integral o u!2")
                   (hide -1 -2 -4)
                   (expand "convergent?")
                   (skosimp*)
                   (lemma "hausdorff_convergence.limit_def"
                    ("v" "I2" "l" "l!2"))
                   (lemma "hausdorff_convergence.limit_def"
                    ("v" "I1" "l" "l!1"))
                   (assert)
                   (replace -1)
                   (replace -2)
                   (hide -1 -2)
                   (rewrite "hausdorff_convergence.limit_def")
                   (rewrite "metric_convergence_def" *)
                   (rewrite "metric_convergence_def" *)
                   (rewrite "metric_convergence_def" *)
                   (expand "metric_converges_to")
                   (skosimp)
                   (inst - "r!1/2")
                   (inst - "r!1/2")
                   (skosimp*)
                   (inst + "n!1+n!2")
                   (skosimp)
                   (inst - "i!1")
                   (inst - "i!1")
                   (assert)
                   (expand "ball")
                   (expand "+")
                   (hide -3)
                   (grind))
                  ("2"
                   (hide 2)
                   (apply-extensionality :hide? t)
                   (expand "+")
                   (expand "o")
                   (rewrite "isf_integral_add"))))
                ("2"
                 (hide 2)
                 (split)
                 (("1"
                   (expand "+")
                   (skosimp)
                   (typepred "u!1(x1!1)")
                   (typepred "u!2(x1!1)")
                   (expand "nn_isf?")
                   (skosimp)
                   (expand "+")
                   (inst - "x!1")
                   (inst - "x!1")
                   (assert))
                  ("2"
                   (typepred "u!1")
                   (typepred "u!2")
                   (expand "increasing_nn_isf?")
                   (expand "pointwise_increasing?")
                   (expand "+")
                   (skosimp)
                   (inst - "x!1")
                   (inst - "x!1")
                   (expand "increasing?")
                   (skosimp)
                   (inst - "x!2" "y!1")
                   (inst - "x!2" "y!1")
                   (assert)
                   (expand "+")
                   (assert))))))
              ("2" (expand "nonempty?") (propax))))
            ("2"
             (hide-all-but (-6 1))
             (expand "nn_integrable?")
             (skosimp)
             (expand "nonempty?")
             (expand "empty?")
             (expand "member")
             (inst - "u!1"))))
          ("2" (expand "nonempty?") (propax))))
        ("2"
         (hide-all-but (-5 1))
         (expand "nn_integrable?")
         (expand "nonempty?")
         (expand "empty?")
         (expand "member")
         (skosimp)
         (inst - "u!1"))))
      ("2" (expand "nonempty?") (propax))))
    ("2"
     (hide-all-but (-4 1))
     (expand "nn_integrable?")
     (skosimp)
     (expand "nonempty?")
     (expand "empty?")
     (inst - "u!1")
     (expand "member")
     (propax))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (expand "nn_integral")
   (lemma "nn_integrable_scal" ("c" "c!1" "f" "f!1"))
   (flatten)
   (expand "nn_integrable?")
   (skosimp*)
   (case "nonempty?({u | pointwise_convergence?(u, f!1)})")
   (("1"
     (lemma "choose_member"
      ("a" "({u | pointwise_convergence?(u, f!1)})"))
     (split -1)
     (("1"
       (name-replace "U2" "choose({u | pointwise_convergence?(u, f!1)})")
       (case "nonempty?({u_1: increasing_nn_isf |
                                   pointwise_convergence?(u_1, c!1 * f!1)})")
       (("1"
         (lemma "choose_member"
          ("a"
           "({u_1: increasing_nn_isf |
                                 pointwise_convergence?(u_1, c!1 * f!1)})"))
         (split -1)
         (("1"
           (name-replace "U1"
            "choose(({u_1: increasing_nn_isf |
                                    pointwise_convergence?(u_1, c!1 * f!1)}))")
           (expand "member")
           (hide -2 -4)
           (lemma "nn_convergence" ("u1" "u!1" "f" "c!1*f!1" "u2" "U1"))
           (assert)
           (flatten)
           (replace -2 1 rl)
           (hide -1 -2 -3)
           (lemma "nn_convergence" ("u1" "u!2" "f" "f!1" "u2" "U2"))
           (assert)
           (flatten)
           (replace -2 1 rl)
           (hide -1 -2 3)
           (lemma "nn_convergence"
            ("u1" "u!1" "f" "c!1*f!1" "u2" "c!1*u!2"))
           (("1"
             (assert)
             (lemma "pointwise_convergence_scal"
              ("u" "u!2" "f" "f!1" "c" "c!1"))
             (assert)
             (flatten)
             (replace -3)
             (hide -3 -4 -7 -6)
             (case-replace
              "isf_integral o (c!1 * u!2) = c!1*(isf_integral o u!2)")
             (("1"
               (hide -1)
               (rewrite "hausdorff_convergence.limit_def" 1)
               (hide -1 -2 -3)
               (expand "convergent?")
               (skosimp)
               (lemma "hausdorff_convergence.limit_def"
                ("v" "isf_integral o u!2" "l" "l!1"))
               (assert)
               (replace -1)
               (hide -1 -2)
               (rewrite "metric_convergence_def" *)
               (rewrite "metric_convergence_def" *)
               (expand "metric_converges_to")
               (skosimp)
               (expand "ball")
               (expand "member")
               (name-replace "FF" "isf_integral o u!2")
               (expand "*")
               (case-replace "c!1=0")
               (("1"
                 (inst + "0")
                 (skosimp)
                 (assert)
                 (expand "abs")
                 (assert))
                ("2"
                 (lemma "posreal_div_posreal_is_posreal"
                  ("px" "r!1" "py" "c!1"))
                 (("1"
                   (inst - "r!1 / c!1")
                   (("1"
                     (skosimp)
                     (inst + "n!1")
                     (skosimp)
                     (inst - "i!1")
                     (assert)
                     (lemma "abs_mult" ("x" "c!1" "y" "l!1 - FF(i!1)"))
                     (expand "abs" -1 2)
                     (replace -1)
                     (rewrite "div_mult_pos_lt2")
                     (assert))
                    ("2" (assert))))
                  ("2" (assert))))))
              ("2"
               (hide 2)
               (apply-extensionality :hide? t)
               (expand "o")
               (expand "*")
               (rewrite "isf_integral_scal"))))
            ("2"
             (hide 2)
             (split)
             (("1"
               (skosimp)
               (expand "*")
               (typepred "u!2(x1!1)")
               (expand "nn_isf?")
               (skosimp)
               (expand "*")
               (inst - "x!1")
               (assert)
               (case-replace "c!1=0")
               (("1" (assert))
                ("2"
                 (lemma "both_sides_times_pos_le1"
                  ("pz" "c!1" "x" "0" "y" "u!2(x1!1)(x!1)"))
                 (assert))))
              ("2"
               (typepred "u!2")
               (hide-all-but (-1 1))
               (expand "*")
               (expand "increasing_nn_isf?")
               (expand "pointwise_increasing?")
               (skosimp)
               (inst - "x!1")
               (expand "*")
               (expand "increasing?")
               (skosimp)
               (inst - "x!2" "y!1")
               (assert)
               (case-replace "c!1=0")
               (("1" (assert))
                ("2"
                 (lemma "both_sides_times_pos_le1"
                  ("pz" "c!1" "x" "u!2(x!2)(x!1)" "y" "u!2(y!1)(x!1)"))
                 (assert))))))))
          ("2" (expand "nonempty?") (propax))))
        ("2"
         (hide-all-but (1 -4))
         (expand "nonempty?")
         (expand "empty?")
         (expand "member")
         (inst - "u!1"))))
      ("2" (expand "nonempty?") (propax))))
    ("2"
     (hide-all-but (1 -4))
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (inst - "u!2"))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "nn_integrable_prod" ("f" "f!1" "h" "phi(E!1)"))
   (("1"
     (flatten)
     (case-replace "*[T](f!1, phi(E!1))=phi(E!1) * f!1")
     (hide-all-but 1)
     (apply-extensionality :hide? t)
     (expand "*")
     (assert))
    ("2"
     (hide 2)
     (typepred "E!1")
     (expand "measurable_set?")
     (expand "nn_bounded_measurable?")
     (split)
     (("1"
       (rewrite "simple_is_bounded_measurable")
       (rewrite "phi_is_simple"))
      ("2" (skosimp) (grind))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (name "U" "choose({u | pointwise_convergence?(u,f!1)})")
   (("1"
     (expand "nn_integral" 1)
     (replace -1)
     (inst + "U")
     (split)
     (("1"
       (lemma "choose_member"
        ("a" "{u | pointwise_convergence?(u, f!1)}"))
       (replace -2)
       (expand "member")
       (assert))
      ("2"
       (hide -1 -2)
       (rewrite "topological_convergence.limit_lemma"))))
    ("2"
     (hide 2)
     (expand "nn_integrable?")
     (skosimp)
     (expand "nonempty?")
     (expand "empty?")
     (inst - "u!1")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "increasing_nn_isf?")
   (expand "pointwise_increasing?")
   (skosimp)
   (expand "increasing?")
   (propax))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem + ("f!1"))
   (typepred "f!1")
   (expand "nn_integrable?")
   (skosimp)
   (lemma "pointwise_measurable" ("u" "u!1" "f" "f!1"))
   (assert))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (expand "nn_integrable?")
   (skosimp)
   (expand "nonempty?")
   (expand "empty?")
   (inst - "u!1")
   (expand "member")
   (propax))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "nn_integral_TCC1" ("f" "f!1"))
   (lemma "choose_member"
    ("a" "{u | pointwise_convergence?[T](u, f!1)}"))
   (split -1)
   (("1"
     (name-replace "U" "choose({u | pointwise_convergence?[T](u, f!1)})")
     (expand "member")
     (expand "o" 1)
     (hide -2)
     (typepred "U")
     (hide -2)
     (typepred "f!1")
     (expand "nn_integrable?")
     (skosimp)
     (lemma "nn_convergence" ("f" "f!1" "u1" "u!1" "u2" "U"))
     (assert)
     (flatten)
     (expand "o" -1)
     (propax))
    ("2" (expand "nonempty?") (propax))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "nn_integral_TCC1" ("f" "f!1"))
   (lemma "nn_integral_TCC2" ("f" "f!1"))
   (lemma "choose_member"
    ("a" "{u | pointwise_convergence?[T](u, f!1)}"))
   (split -1)
   (("1"
     (name-replace "U" "choose({u | pointwise_convergence?[T](u, f!1)})")
     (expand "member")
     (hide -3)
     (expand "convergent?")
     (skosimp)
     (lemma "hausdorff_convergence.limit_def"
      ("v"
       "o[nat, isf[T, S, m], real](isf_integral[T, S, m], U)"
       "l"
       "l!1"))
     (assert)
     (expand "limit" 1)
     (replace -1)
     (hide -1)
     (rewrite "metric_convergence_def" -)
     (case "l!1<0")
     (("1"
       (hide 1)
       (expand "metric_converges_to")
       (inst - "-l!1")
       (("1"
         (skosimp)
         (inst - "n!1")
         (assert)
         (expand "ball")
         (expand "o" -3)
         (lemma "isf_integral_pos" ("i" "U(n!1)"))
         (split -1)
         (("1"
           (name-replace "II" "isf_integral(U(n!1))")
           (hide -3)
           (grind))
          ("2" (typepred "U(n!1)") (expand "nn_isf?") (propax))))
        ("2" (assert))))
      ("2" (assert))))
    ("2" (expand "nonempty?") (propax))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f1!1")
   (typepred "f2!1")
   (split)
   (("1" (skosimp) (expand "+") (assert))
    ("2"
     (expand "nn_integrable?")
     (skosimp*)
     (inst + "u!2+u!1")
     (("1"
       (split)
       (("1"
         (hide -2 -4)
         (lemma "pointwise_convergence_sum"
          ("u" "u!2" "f0" "f1!1" "v" "u!1" "f1" "f2!1"))
         (assert))
        ("2"
         (expand "convergent?")
         (skosimp*)
         (inst + "l!1+l!2")
         (hide-all-but (-2 -4 1))
         (rewrite "metric_convergence_def" *)
         (rewrite "metric_convergence_def" *)
         (rewrite "metric_convergence_def" *)
         (expand "metric_converges_to")
         (skosimp)
         (inst - "r!1/2")
         (inst - "r!1/2")
         (skosimp*)
         (inst + " n!1+n!2")
         (skosimp)
         (inst - "i!1")
         (inst - "i!1")
         (assert)
         (expand "ball")
         (expand "o")
         (expand "+")
         (rewrite "isf_integral_add")
         (name-replace "I1" "isf_integral(u!1(i!1))")
         (name-replace "I2" "isf_integral(u!2(i!1))")
         (hide -1)
         (grind))))
      ("2"
       (typepred "u!1")
       (typepred "u!2")
       (split)
       (("1"
         (skosimp)
         (expand "+")
         (typepred "u!2(x1!1)")
         (typepred "u!1(x1!1)")
         (expand "nn_isf?")
         (skosimp)
         (expand "+")
         (inst - "x!1")
         (inst - "x!1")
         (assert))
        ("2"
         (expand "increasing_nn_isf?")
         (expand "pointwise_increasing?")
         (skosimp)
         (inst - "x!1")
         (inst - "x!1")
         (expand "+")
         (expand "+")
         (expand "increasing?")
         (skosimp)
         (inst - "x!2" "y!1")
         (inst - "x!2" "y!1")
         (assert))))))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (typepred "c!1")
   (expand "nn_integrable?")
   (skosimp)
   (split)
   (("1" (skosimp) (expand "*") (assert))
    ("2"
     (inst + "c!1*u!1")
     (("1"
       (split)
       (("1"
         (expand "pointwise_convergence?")
         (skosimp)
         (inst - "x!1")
         (expand "*")
         (expand "*")
         (hide -3)
         (rewrite "metric_convergence_def" *)
         (rewrite "metric_convergence_def" *)
         (expand "metric_converges_to")
         (skosimp)
         (expand "ball")
         (expand "member")
         (case-replace "c!1=0")
         (("1" (inst + "0") (skosimp) (assert) (expand "abs") (assert))
          ("2"
           (lemma "posreal_div_posreal_is_posreal"
            ("px" "r!1" "py" "c!1"))
           (("1"
             (inst - "r!1 / c!1")
             (("1"
               (skosimp)
               (inst + "n!1")
               (skosimp)
               (inst - "i!1")
               (assert)
               (lemma "abs_mult"
                ("x" "c!1" "y" "f!1(x!1) - u!1(i!1)(x!1)"))
               (expand "abs" -1 2)
               (replace -1 2)
               (rewrite "div_mult_pos_lt2" -5)
               (assert))
              ("2" (assert))))
            ("2" (assert))))))
        ("2"
         (hide -2)
         (expand "convergent?")
         (skosimp)
         (inst + "c!1*l!1")
         (rewrite "metric_convergence_def" *)
         (rewrite "metric_convergence_def" *)
         (expand "metric_converges_to")
         (skosimp)
         (expand "ball")
         (expand "member")
         (expand "o ")
         (expand "*")
         (case-replace "c!1=0")
         (("1"
           (inst + "0")
           (skosimp)
           (rewrite "isf_integral_scal")
           (assert)
           (expand "abs")
           (assert))
          ("2"
           (lemma "posreal_div_posreal_is_posreal"
            ("px" "r!1" "py" "c!1"))
           (("1"
             (inst - "r!1 / c!1")
             (("1"
               (skosimp)
               (inst + "n!1")
               (skosimp)
               (inst - "i!1")
               (assert)
               (rewrite "isf_integral_scal")
               (lemma "abs_mult"
                ("x" "c!1" "y" "l!1 - isf_integral(u!1(i!1))"))
               (expand "abs" -1 2)
               (replace -1 2)
               (rewrite "div_mult_pos_lt2")
               (assert))
              ("2" (assert))))
            ("2" (assert))))))))
      ("2"
       (typepred "u!1")
       (split)
       (("1"
         (skosimp)
         (expand "*")
         (typepred "u!1(x1!1)")
         (expand "nn_isf?")
         (skosimp)
         (expand "*")
         (inst - "x!1")
         (assert)
         (case-replace "c!1=0")
         (("1" (assert))
          ("2"
           (lemma "both_sides_times_pos_le1"
            ("x" "0" "y" "u!1(x1!1)(x!1)" "pz" "c!1"))
           (assert))))
        ("2"
         (expand "increasing_nn_isf?")
         (expand "pointwise_increasing?")
         (skosimp)
         (inst - "x!1")
         (expand "*")
         (expand "increasing?")
         (expand "*")
         (skosimp)
         (inst - "x!2" "y!1")
         (assert)
         (case-replace "c!1=0")
         (("1" (assert))
          ("2"
           (lemma "both_sides_times_pos_le1"
            ("pz" "c!1" "x" "u!1(x!2)(x!1)" "y" "u!1(y!1)(x!1)"))
           (assert))))))))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem + ("i!1"))
   (typepred "i!1")
   (expand "nn_isf?")
   (replace -2)
   (expand "nn_integrable?")
   (inst + "lambda n: i!1")
   (("1"
     (split)
     (("1"
       (expand "pointwise_convergence?")
       (skosimp)
       (expand "convergence?")
       (skosimp)
       (inst + "0")
       (skosimp))
      ("2"
       (expand "convergent?")
       (inst + "isf_integral(i!1)")
       (expand "o")
       (expand "convergence?")
       (skosimp)
       (inst + "0")
       (skosimp))))
    ("2"
     (expand "increasing_nn_isf?")
     (expand "pointwise_increasing?")
     (skosimp)
     (expand "increasing?")
     (propax))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "nn_isf_is_nn_integrable" ("x" "phi[T, S](F!1)"))
   (("1" (flatten))
    ("2"
     (hide 2)
     (expand "nn_isf?")
     (skosimp)
     (expand "phi")
     (expand "member")
     (grind))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: nn_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (typepred "h!1")
   (split)
   (("1"
     (skolem + ("x!1"))
     (expand "*")
     (typepred "f!1(x!1)")
     (expand "nn_bounded_measurable?")
     (flatten)
     (inst - "x!1")
     (lemma "le_times_le_pos"
      ("nnx" "0" "y" "f!1(x!1)" "nnz" "0" "w" "h!1(x!1)"))
     (assert))
    ("2"
     (expand "nn_bounded_measurable?")
     (expand "bounded_measurable?")
     (flatten)
     (expand "bounded?")
     (skolem - ("M"))
     (case "M>0")
     (("1"
       (lemma "nn_integrable_scal" ("c" "M" "f" "f!1"))
       (flatten)
       (lemma "nn_integrable_le"
        ("g" "*[T](f!1, h!1)" "f" "*[T](M, f!1)"))
       (split -1)
       (("1" (flatten))
        ("2"
         (skosimp)
         (expand "*")
         (inst -4 "x!1")
         (inst -6 "x!1")
         (typepred "f!1(x!1)")
         (expand "abs" -5)
         (assert)
         (lemma "le_times_le_pos"
          ("nnx" "0" "y" "f!1(x!1)" "nnz" "0" "w" "h!1(x!1)"))
         (assert)
         (case-replace "f!1(x!1)=0")
         (("1" (assert))
          ("2"
           (lemma "both_sides_times_pos_le1"
            ("pz" "f!1(x!1)" "x" "h!1(x!1)" "y" "M"))
           (assert))))))
      ("2"
       (case-replace "*[T](f!1, h!1)=lambda x: 0")
       (("1" (rewrite "nn_integrable_zero"))
        ("2"
         (apply-extensionality :hide? t)
         (expand "*")
         (inst - "x!1")
         (inst - "x!1")
         (expand "abs")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "nn_integral_add" ("f1" "g1!1" "f2" "g4!1"))
   (lemma "nn_integral_add" ("f1" "g2!1" "f2" "g3!1"))
   (case-replace "g2!1 + g3!1=g1!1 + g4!1")
   (("1" (assert))
    ("2"
     (apply-extensionality 1 :hide? t)
     (lemma "extensionality_postulate"
      ("f" "g1!1 - g3!1" "g" "g2!1 - g4!1"))
     (replace -1 -4 rl)
     (inst -4 "x!1")
     (hide-all-but (-4 1))
     (grind))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (expand "integrable?")
   (skosimp)
   (expand "integrals")
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (inst - "nn_integral(g!1)-nn_integral(h!1)")
   (inst + "g!1" "h!1"))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "nonempty_integrals" ("f" "f!1"))
   (expand "nonempty?")
   (expand "empty?")
   (skosimp)
   (expand "singleton?")
   (inst + "x!1")
   (("1"
     (skosimp)
     (typepred "y!1")
     (expand "member")
     (expand "integrals")
     (skosimp*)
     (replace -2)
     (replace -4)
     (hide -2 -4)
     (lemma "nn_integrable_add" ("f1" "g!2" "f2" "h!1"))
     (lemma "nn_integrable_add" ("f1" "g!1" "f2" "h!2"))
     (flatten)
     (lemma "nn_integral_add" ("f1" "g!2" "f2" "h!1"))
     (lemma "nn_integral_add" ("f1" "g!1" "f2" "h!2"))
     (assert)
     (case-replace "g!1 + h!2=g!2 + h!1")
     (("1" (assert))
      ("2"
       (apply-extensionality 1 :hide? t)
       (hide-all-but (-7 -8 1))
       (lemma "extensionality_postulate" ("f" "f!1" "g" "g!1-h!1"))
       (lemma "extensionality_postulate" ("f" "f!1" "g" "g!2-h!2"))
       (flatten)
       (split -2)
       (("1"
         (split -4)
         (("1"
           (hide -3 -4 -5 -6)
           (inst - "x!2")
           (inst - "x!2")
           (expand "+")
           (assert)
           (expand "-")
           (assert))
          ("2" (propax))))
        ("2" (propax))))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (expand "integrable?")
   (skosimp)
   (typepred "g!1")
   (typepred "h!1")
   (lemma "nn_integrable_le" ("f" "g!1" "g" "f!1"))
   (split -1)
   (("1" (flatten))
    ("2" (skosimp) (replace -3) (expand "-") (inst - "x!1") (assert))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "g!1")
   (name "CC" "integral(g!1)")
   (replace -1)
   (expand "integral")
   (typepred "choose[real](integrals(g!1))")
   (replace -2)
   (expand "integrals" -1)
   (skosimp)
   (lemma "nn_integral_add" ("f1" "g!1" "f2" "h!1"))
   (replace -3)
   (case "g!2=g!1+h!1")
   (("1" (assert))
    ("2"
     (hide-all-but (-2 1))
     (apply-extensionality :hide? t)
     (replace -1)
     (hide -1)
     (grind))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (lemma "integrable_zero")
   (lemma "nn_integrable_is_nn_integrable" ("f" "LAMBDA x: 0"))
   (("1"
     (split -1)
     (("1"
       (lemma "integral_nn" ("g" "LAMBDA x: 0"))
       (("1" (replace -1) (hide -1 -3) (rewrite "nn_integral_zero"))
        ("2" (propax))))
      ("2" (skosimp) (assert))))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "integral")
   (typepred "choose[real](integrals(f1!1 + f2!1))")
   (typepred "choose[real](integrals(f2!1))")
   (typepred "choose[real](integrals(f1!1))")
   (name-replace "XY" "choose[real](integrals(f1!1 + f2!1))")
   (name-replace "X" "choose[real](integrals(f1!1))")
   (name-replace "Y" "choose[real](integrals(f2!1))")
   (expand "integrals")
   (skosimp*)
   (replace -2)
   (replace -4)
   (replace -6)
   (hide -2 -4 -6)
   (replace -1)
   (replace -2)
   (hide -1 -2)
   (lemma "nn_integral_add" ("f1" "g!1" "f2" "g!2"))
   (lemma "nn_integral_add" ("f1" "h!1" "f2" "h!2"))
   (case "(g!1+g!2)+h!3=(h!1+h!2)+g!3")
   (("1"
     (lemma "nn_integral_add" ("f1" "g!1 + g!2" "f2" "h!3"))
     (lemma "nn_integral_add" ("f1" "h!1 + h!2" "f2" "g!3"))
     (assert))
    ("2"
     (lemma "extensionality_postulate"
      ("f" "g!1 - h!1 + (g!2 - h!2)" "g" "g!3 - h!3"))
     (flatten)
     (split -2)
     (("1"
       (hide-all-but (-1 1))
       (apply-extensionality :hide? t)
       (inst - "x!1")
       (grind))
      ("2" (propax))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "integral")
   (typepred "choose[real](integrals(f!1))")
   (typepred "choose[real](integrals(c!1*f!1))")
   (name-replace "X" "choose[real](integrals(f!1))")
   (name-replace "CX" "choose[real](integrals(c!1*f!1))")
   (expand "integrals")
   (skosimp*)
   (replace -3)
   (replace -2)
   (replace -4)
   (hide-all-but (-1 1))
   (case "c!1*g!2+h!1 = c!1*h!2+g!1")
   (("1"
     (hide -2)
     (case "c!1>=0")
     (("1"
       (lemma "nn_integral_scal" ("c" "c!1" "f" "g!2"))
       (("1"
         (lemma "nn_integral_scal" ("c" "c!1" "f" "h!2"))
         (lemma "nn_integral_add" ("f1" "c!1 * g!2" "f2" "h!1"))
         (lemma "nn_integral_add" ("f1" "c!1 * h!2" "f2" "g!1"))
         (assert))
        ("2" (propax))))
      ("2"
       (case "-c!1*h!2+h!1=-c!1*g!2+g!1")
       (("1"
         (hide -2)
         (lemma "nn_integral_scal" ("c" "-c!1" "f" "h!2"))
         (("1"
           (lemma "nn_integral_scal" ("c" "-c!1" "f" "g!2"))
           (lemma "nn_integral_add" ("f1" "-c!1 * g!2" "f2" "g!1"))
           (lemma "nn_integral_add" ("f1" "-c!1 * h!2" "f2" "h!1"))
           (assert))
          ("2" (assert))))
        ("2"
         (lemma "extensionality_postulate"
          ("f" "c!1 * g!2 + h!1" "g" "c!1 * h!2 + g!1"))
         (flatten)
         (split -2)
         (("1"
           (hide-all-but (-1 1))
           (apply-extensionality :hide? t)
           (inst - "x!1")
           (grind))
          ("2" (propax))))))))
    ("2"
     (lemma "extensionality_postulate"
      ("f" "c!1 * (g!2 - h!2)" "g" "g!1 - h!1"))
     (flatten)
     (split -2)
     (("1"
       (hide-all-but (1 -1))
       (apply-extensionality 1 :hide? t)
       (inst - "x!1")
       (grind))
      ("2" (propax))))))


