# Proofs

proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: outer_measure_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "outer_measurable_IUnion" ("X" "IComplement(X!1)"))
   (("1"
     (rewrite "IDemorgan2" * :dir rl)
     (lemma "outer_measurable_complement"
      ("a" "complement(IIntersection(X!1))"))
     (("1" (rewrite "complement_complement")) ("2" (propax))))
    ("2"
     (skolem + ("n!1"))
     (hide 2)
     (typepred "X!1(n!1)")
     (expand "IComplement")
     (propax))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: outer_measure_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "outer_measurable_is_sigma_algebra")
   (expand "fullset")
   (expand "extend")
   (expand "sigma_algebra?")
   (flatten)
   (split)
   (("1" (expand "subset_algebra_empty?") (expand "member") (propax))
    ("2"
     (expand "subset_algebra_complement?")
     (skosimp)
     (expand "member")
     (propax))
    ("3"
     (expand "sigma_algebra_union?")
     (skosimp)
     (expand "member")
     (inst -5 "X!1")
     (assert)
     (skosimp)
     (inst -2 "x!1")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: outer_measure_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "m")
   (expand "restrict")
   (expand "complete_measure?")
   (expand "measure?")
   (expand "outer_measure?")
   (flatten)
   (split)
   (("1" (expand "measure_empty?") (expand "om_empty?") (propax))
    ("2"
     (expand "measure_countably_additive?")
     (skosimp)
     (typepred "X!1")
     (lemma "outer_measure_disjoint_IUnion" ("X" "X!1"))
     (("1"
       (expand "disjoint_indexed_measurable?")
       (replace -2)
       (hide-all-but (-1 1))
       (expand "x_eq")
       (expand "o ")
       (case-replace "m(IUnion(X!1))`1")
       (("1" (flatten) (assert)) ("2" (assert))))
      ("2"
       (skolem + "n!1")
       (typepred "X!1(n!1)")
       (expand "induced_sigma_algebra")
       (propax))))
    ("3"
     (expand "measure_complete?")
     (skosimp)
     (expand "induced_sigma_algebra")
     (rewrite "outer_measurable_def")
     (skosimp)
     (expand "om_increasing?")
     (case-replace "m(intersection(y!1, x!1))=(TRUE,0)")
     (("1"
       (expand "x_add")
       (inst - "intersection(y!1, complement(x!1))" "y!1")
       (split -5)
       (("1"
         (expand "x_le")
         (case-replace "m(y!1)`1")
         (("1" (flatten) (assert) (replace -2) (propax)) ("2" (assert))))
        ("2" (hide-all-but 1) (grind))))
      ("2"
       (hide-all-but (-1 -2 -4 1))
       (inst-cp - "x!1" "a!1")
       (replace -2)
       (inst - "intersection(y!1, x!1)" "x!1")
       (split -3)
       (("1"
         (expand "x_le")
         (assert)
         (replace -2)
         (flatten)
         (assert)
         (replace -4)
         (flatten)
         (assert)
         (decompose-equality 1)
         (typepred "reals.<=")
         (expand "total_order?")
         (expand "partial_order?")
         (expand "preorder?")
         (flatten)
         (expand "transitive?")
         (inst - "m(intersection(y!1, x!1))`2" "m(x!1)`2" "0")
         (assert)
         (replace -6)
         (replace -10)
         (assert)
         (hide-all-but (-1 -2 -3 1))
         (typepred "m(intersection(y!1, x!1))`2")
         (expand ">=")
         (expand "antisymmetric?")
         (inst - "0" "m(intersection(y!1, x!1))`2")
         (replace -1)
         (replace -3)
         (assert))
        ("2" (hide-all-but 1) (grind))))))))


proof_type: j_proof
decl_type: tcc
library: measure_integration
theory: outer_measure_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "n2!1")
   (typepred "n1!1")
   (expand "outer_negligible?")
   (lemma "m_outer_subadditive"
    ("A"
     "lambda i: if i = 0 then n1!1 elsif i=1 then n2!1 else emptyset[T] endif"))
   (case-replace
    "IUnion(LAMBDA i:
                          IF i = 0 THEN n1!1
                          ELSIF i = 1 THEN n2!1
                          ELSE emptyset[T]
                          ENDIF)=union[T](n1!1, n2!1)")
   (("1"
     (hide -1)
     (name-replace "MM" "m(union[T](n1!1, n2!1))")
     (expand "o")
     (rewrite "m_outer_empty")
     (replace -2)
     (replace -3)
     (case-replace
      "(LAMBDA (x: nat):
                         IF x = 0 THEN (TRUE, 0)
                         ELSE IF x = 1 THEN (TRUE, 0) ELSE (TRUE, 0) ENDIF
                         ENDIF)=lambda i:(TRUE,0)")
     (("1"
       (hide -1 -3 -4)
       (expand "x_le")
       (assert)
       (expand "x_sum")
       (rewrite "zero_series_conv")
       (rewrite "zero_series_limit")
       (flatten)
       (assert)
       (decompose-equality))
      ("2" (hide-all-but 1) (apply-extensionality :hide? t))))
    ("2"
     (hide-all-but 1)
     (apply-extensionality :hide? t)
     (case-replace "union[T](n1!1, n2!1)(x!1)")
     (("1"
       (expand "IUnion")
       (expand "union")
       (expand "member")
       (split)
       (("1" (inst + "0")) ("2" (inst + "1") (assert))))
      ("2"
       (replace 1 2)
       (assert)
       (expand "union")
       (flatten)
       (expand "member")
       (expand "IUnion")
       (skosimp)
       (assert)
       (expand "emptyset")
       (propax))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: ast_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "forall (a:(A),E:disjoint_indexed_measurable,n:nat): finite_disjoint_union?(A)(difference(a, IUnion(n,E)))")
   (("1"
     (skosimp)
     (expand "finite_disjoint_union?" -3)
     (skosimp)
     (case-replace "n!1=0")
     (("1"
       (assert)
       (case-replace "b!1=emptyset")
       (("1"
         (rewrite "difference_emptyset1")
         (expand "finite_disjoint_union?")
         (inst + "lambda (i:nat): if i=0 then a!1 else emptyset endif"
          "1")
         (hide -1 -2 -3 -5 -6 -7)
         (split)
         (("1"
           (expand "disjoint?")
           (skosimp)
           (expand "disjoint?")
           (expand "intersection")
           (expand "empty?")
           (expand "member")
           (skosimp)
           (expand "emptyset")
           (prop)
           (assert))
          ("2"
           (apply-extensionality :hide? t)
           (expand "IUnion")
           (expand "emptyset")
           (case-replace "a!1(x!1)")
           (("1" (inst + "0")) ("2" (assert))))
          ("3"
           (skosimp)
           (case-replace "i!1=0")
           (("1" (assert))
            ("2"
             (assert)
             (expand "empty?")
             (expand "member")
             (expand "emptyset")
             (propax))))))
        ("2"
         (replace -5)
         (apply-extensionality :hide? t)
         (expand "emptyset")
         (expand "IUnion")
         (skosimp)
         (inst -7 "i!1")
         (expand "empty?")
         (inst -7 "x!1")
         (assert))))
      ("2"
       (case "n!1>0")
       (("1"
         (hide 1)
         (case "b!1=IUnion(n!1-1,E!1)")
         (("1"
           (case "FORALL (i:nat): A(E!1(i))")
           (("1"
             (hide -7 -8)
             (inst -4 "a!1" "E!1" "n!1-1")
             (("1" (assert)) ("2" (assert))
              ("3" (expand "disjoint_indexed_measurable?") (assert))))
            ("2"
             (skosimp)
             (inst -7 "i!1")
             (flatten)
             (case "i!1<n!1")
             (("1" (assert))
              ("2"
               (assert)
               (rewrite "emptyset_is_empty?")
               (replace -7)
               (rewrite "A_empty"))))))
          ("2"
           (hide -2 2)
           (apply-extensionality :hide? t)
           (case-replace "b!1(x!1)")
           (("1"
             (replace -5 -1)
             (expand "IUnion")
             (skosimp)
             (inst -6 "i!1")
             (expand "image")
             (expand "Union")
             (inst + "E!1(i!1)")
             (flatten)
             (case-replace "i!1 < n!1")
             (("1" (inst + "i!1") (assert))
              ("2"
               (assert)
               (rewrite "emptyset_is_empty?")
               (replace -6)
               (expand "emptyset")
               (propax))))
            ("2"
             (assert)
             (replace -5)
             (expand "IUnion")
             (expand "image")
             (expand "Union")
             (skosimp)
             (typepred "a!2")
             (skosimp)
             (inst + "x!2")
             (assert))))
          ("3" (assert))))
        ("2" (assert))))))
    ("2"
     (hide 2)
     (induct "n")
     (("1"
       (skosimp)
       (rewrite "IUnion_0_def")
       (lemma "A_difference" ("a" "a!1" "b" "E!1(0)"))
       (propax))
      ("2"
       (skosimp)
       (skosimp)
       (rewrite "IUnion_n_def")
       (rewrite "union_commutative" 1)
       (rewrite "difference_difference1" 1 :dir rl)
       (lemma "A_difference" ("a" "a!1" "b" "E!1(1+j!1)"))
       (expand "finite_disjoint_union?" -1)
       (skosimp)
       (case "forall (a,b,c:set[T]): difference(union(a,b),c)=union(difference(a,c),difference(b,c))")
       (("1"
         (case-replace "n!1=0")
         (("1"
           (assert)
           (case-replace "IUnion(E!2)=emptyset")
           (("1"
             (replace -5)
             (rewrite "difference_emptyset2")
             (hide-all-but 1)
             (expand "finite_disjoint_union?")
             (inst + "lambda (i:nat): emptyset" "0")
             (split)
             (("1" (grind))
              ("2"
               (apply-extensionality :hide? t)
               (expand "emptyset")
               (expand "IUnion")
               (propax))
              ("3"
               (expand "member")
               (expand "empty?")
               (expand "member")
               (expand "emptyset")
               (propax))))
            ("2"
             (hide-all-but (1 -5))
             (apply-extensionality :hide? t)
             (expand "emptyset")
             (expand "IUnion")
             (skosimp)
             (inst - "i!1")
             (expand "empty?")
             (inst - "x!1")
             (assert))))
          ("2"
           (case "n!1>0")
           (("1"
             (hide 1)
             (case-replace "IUnion(E!2)=IUnion(n!1-1,E!2)")
             (("1"
               (replace -5)
               (hide -1 -5)
               (case "forall (n:nat): finite_disjoint_union?(A)
                                                 (difference(IUnion(n, E!2),
                                                             IUnion(j!1, E!1)))")
               (("1" (inst - "n!1-1") (assert))
                ("2"
                 (hide 2)
                 (induct "n")
                 (("1"
                   (rewrite "IUnion_0_def")
                   (inst -5 "E!2(0)" "E!1")
                   (assert)
                   (inst -4 "0")
                   (flatten)
                   (assert))
                  ("2"
                   (skosimp)
                   (rewrite "IUnion_n_def")
                   (inst - "IUnion(j!2, E!2)" "E!2(1 + j!2)"
                    "IUnion(j!1, E!1)")
                   (replace -3)
                   (inst -6 "E!2(1 + j!2)" "E!1")
                   (("1"
                     (hide -3 -5 -2)
                     (name-replace "AA"
                      "difference(IUnion(j!2, E!2),
                                                                    IUnion(j!1, E!1))")
                     (name-replace "BB"
                      "difference(E!2(1 + j!2), IUnion(j!1, E!1))")
                     (case "disjoint?(AA,BB)")
                     (("1"
                       (expand "finite_disjoint_union?")
                       (skosimp*)
                       (inst +
                        "lambda (i:nat): if i<n!2 then E!3(i) else E!4(i-n!2) endif"
                        "n!2+n!3")
                       (("1"
                         (split)
                         (("1"
                           (expand "disjoint?" 1)
                           (skosimp)
                           (case-replace "i!1 < n!2")
                           (("1"
                             (case-replace "j!3 < n!2")
                             (("1"
                               (expand "disjoint?" -4)
                               (inst - "i!1" "j!3")
                               (assert))
                              ("2"
                               (assert)
                               (expand "disjoint?" (-2 3))
                               (expand "intersection")
                               (expand "empty?" (-2 3))
                               (skosimp)
                               (expand "member")
                               (flatten)
                               (inst - "x!1")
                               (replace -5)
                               (split)
                               (("1" (expand "IUnion" 1) (inst + "i!1"))
                                ("2"
                                 (replace -9)
                                 (expand "IUnion")
                                 (inst + "j!3-n!2"))))))
                            ("2"
                             (assert)
                             (case-replace "j!3 < n!2")
                             (("1"
                               (expand "disjoint?" (3 -2))
                               (expand "intersection")
                               (expand "empty?" (3 -2))
                               (expand "member")
                               (skosimp)
                               (inst -4 "x!1")
                               (split 3)
                               (("1"
                                 (replace -5)
                                 (expand "IUnion")
                                 (inst + "j!3"))
                                ("2"
                                 (replace -9)
                                 (expand "IUnion")
                                 (inst + "i!1-n!2"))))
                              ("2"
                               (assert)
                               (expand "disjoint?" -6)
                               (inst -6 "i!1 - n!2" "j!3 - n!2")
                               (assert))))))
                          ("2"
                           (apply-extensionality :hide? t)
                           (("1"
                             (expand "union")
                             (expand "disjoint?" -1)
                             (expand "intersection")
                             (expand "empty?" -1)
                             (expand "member")
                             (inst - "x!1")
                             (case-replace "AA(x!1)")
                             (("1"
                               (replace -3 -1)
                               (expand "IUnion" (-1 1))
                               (skosimp)
                               (inst -4 "i!1")
                               (inst + "i!1")
                               (case-replace "i!1 < n!2")
                               (assert)
                               (expand "empty?")
                               (inst -4 "x!1")
                               (assert))
                              ("2"
                               (assert)
                               (case-replace "BB(x!1)")
                               (("1"
                                 (replace -7)
                                 (expand "IUnion" (-1 2))
                                 (skosimp)
                                 (inst + "n!2+i!1")
                                 (assert))
                                ("2"
                                 (assert)
                                 (hide 3)
                                 (replace -3)
                                 (replace -7)
                                 (expand "IUnion" (1 2 -1))
                                 (skosimp)
                                 (case-replace "i!1 < n!2")
                                 (("1" (inst 2 "i!1"))
                                  ("2" (assert) (inst 2 "i!1-n!2"))))))))
                            ("2" (skosimp) (assert))))
                          ("3"
                           (skosimp)
                           (expand "member")
                           (assert)
                           (case-replace "i!1 < n!2")
                           (("1"
                             (assert)
                             (inst -5 "i!1")
                             (flatten)
                             (assert))
                            ("2"
                             (assert)
                             (inst -8 "i!1-n!2")
                             (flatten)
                             (assert)
                             (case "i!1 - n!2 < n!3")
                             (("1" (assert)) ("2" (assert))))))))
                        ("2" (skosimp) (assert))))
                      ("2"
                       (hide-all-but (-2 1))
                       (expand "disjoint?" 1)
                       (expand "intersection")
                       (expand "empty?")
                       (skosimp)
                       (expand "member")
                       (flatten)
                       (expand "AA")
                       (expand "BB")
                       (expand "difference")
                       (expand "member")
                       (flatten)
                       (hide 1 2)
                       (expand "IUnion")
                       (expand "image")
                       (expand "Union")
                       (skosimp)
                       (typepred "a!2")
                       (skolem - "i!1")
                       (replace -1)
                       (hide -1)
                       (expand "disjoint?")
                       (inst - "i!1" "1+j!2")
                       (assert)
                       (expand "disjoint?")
                       (expand "intersection")
                       (expand "empty?")
                       (expand "member")
                       (inst - "x!1")
                       (assert))))
                    ("2"
                     (inst -5 "1+j!2")
                     (assert)
                     (flatten)
                     (assert)
                     (rewrite "emptyset_is_empty?")
                     (replace -5)
                     (rewrite "A_empty"))))))))
              ("2"
               (hide-all-but (-1 1 -5))
               (apply-extensionality :hide? t)
               (case-replace "IUnion(E!2)(x!1)")
               (("1"
                 (expand "IUnion")
                 (skosimp)
                 (inst - "i!1")
                 (flatten)
                 (expand "image")
                 (expand "Union")
                 (inst + "E!2(i!1)")
                 (inst + "i!1")
                 (assert)
                 (expand "empty?")
                 (inst - "x!1")
                 (assert))
                ("2"
                 (assert)
                 (expand "IUnion")
                 (expand "image")
                 (expand "Union")
                 (skosimp)
                 (typepred "a!2")
                 (skosimp)
                 (inst + "x!2")
                 (assert))))
              ("3" (assert))))
            ("2" (assert))))))
        ("2"
         (hide-all-but 1)
         (skosimp)
         (apply-extensionality :hide? t)
         (expand "difference")
         (expand "union")
         (expand "member")
         (case-replace "a!2(x!1)")
         (("1" (assert) (case-replace "c!1(x!1)") (assert))
          ("2" (assert))))))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: ast_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "mu!1")
   (expand "measure?")
   (flatten)
   (lemma "disjoint_IUnion" ("A" "I!1"))
   (skosimp)
   (case "forall (n:nat): finite_disjoint_union?(A)(B!1(n))")
   (("1"
     (case "forall (n:nat): nonempty?({E: disjoint_indexed_measurable | B!1(n) = IUnion(E)})")
     (("1"
       (name "FDU"
             "lambda (n:nat): choose({E:disjoint_indexed_measurable | B!1(n) = IUnion(E)})")
       (("1"
         (case "forall (n:nat): IUnion(FDU(n)) = B!1(n)")
         (("1"
           (case "forall (j:nat): x_le(x_sum(mu!1 o FDU(j)),mu!1(I!1(j)))")
           (("1"
             (lemma "x_sum_le"
              ("S"
               "lambda (j:nat): x_sum(mu!1 o FDU(j))"
               "T"
               "mu!1 o I!1"))
             (split -1)
             (("1"
               (name "UU" "lambda (i,j:nat): FDU(i)(j)")
               (lemma "double_x_sum" ("U" "mu!1 o UU"))
               (expand "UU" -1 2)
               (expand "o" -1 2)
               (expand "o" -3 1)
               (name-replace "DRL1"
                "x_sum(LAMBDA (j: nat): x_sum(LAMBDA (x: nat): mu!1(FDU(j)(x))))")
               (case-replace
                "single_index(mu!1 o UU) = mu!1 o single_index(UU)")
               (("1"
                 (hide -1)
                 (expand "measure_countably_additive?")
                 (inst -15 "single_index(UU)")
                 (("1"
                   (name-replace "DRL2" "x_sum(mu!1 o single_index(UU))")
                   (name-replace "RHS" "x_sum(mu!1 o I!1)")
                   (case-replace "IUnion(single_index(UU))=IUnion(I!1)")
                   (("1"
                     (assert)
                     (name-replace "LHS" "mu!1(IUnion(I!1))")
                     (hide-all-but (-2 -4 -16 1))
                     (expand "x_le")
                     (expand "x_eq")
                     (flatten)
                     (assert)
                     (flatten)
                     (assert))
                    ("2"
                     (replace -13)
                     (expand "UU")
                     (hide-all-but (-5 -7 -8 -9 -10 -11 -12 1))
                     (apply-extensionality :hide? t)
                     (case-replace "IUnion(B!1)(x!1)")
                     (("1"
                       (expand "IUnion")
                       (skosimp)
                       (inst -2 "i!1")
                       (replace -2 -1 rl)
                       (assert)
                       (skosimp)
                       (expand "single_index")
                       (inst + "double_index_n(i!1,i!2)")
                       (lemma "double_index_ij_n" ("i" "i!1" "j" "i!2"))
                       (flatten)
                       (assert))
                      ("2"
                       (assert)
                       (expand "IUnion")
                       (skolem - "n!1")
                       (expand "single_index")
                       (lemma "double_index_n_ij" ("n" "n!1"))
                       (inst - "double_index_i(n!1)")
                       (inst + "double_index_i(n!1)")
                       (replace -3 1 rl)
                       (assert)
                       (inst + "double_index_j(n!1)"))))))
                  ("2"
                   (hide 2)
                   (expand "disjoint_indexed_measurable?")
                   (expand "disjoint?" 1)
                   (skosimp)
                   (expand "UU")
                   (assert)
                   (expand "single_index")
                   (hide-all-but (-9 -5 1 2))
                   (case-replace
                    "double_index_i(j!1)=double_index_i(i!1)")
                   (("1"
                     (inst - "double_index_i(i!1)")
                     (typepred "FDU(double_index_i(i!1))")
                     (expand "disjoint_indexed_measurable?")
                     (expand "disjoint?" -1)
                     (inst - "double_index_j(i!1)" "double_index_j(j!1)")
                     (assert)
                     (expand "/=" 1)
                     (lemma "double_index_n_ij" ("n" "i!1"))
                     (lemma "double_index_n_ij" ("n" "j!1"))
                     (expand "double_index_n")
                     (assert))
                    ("2"
                     (inst-cp - "double_index_i(i!1)")
                     (inst - "double_index_i(j!1)")
                     (expand "disjoint?" -3)
                     (inst - "double_index_i(i!1)" "double_index_i(j!1)")
                     (assert)
                     (replace -1 * rl)
                     (replace -2 * rl)
                     (hide -1 -2)
                     (expand "disjoint?")
                     (expand "intersection")
                     (expand "empty?")
                     (expand "member")
                     (skosimp)
                     (inst - "x!1")
                     (split)
                     (("1"
                       (expand "IUnion")
                       (inst + "double_index_j(i!1)"))
                      ("2"
                       (expand "IUnion")
                       (inst + "double_index_j(j!1)"))))))))
                ("2"
                 (apply-extensionality :hide? t)
                 (hide-all-but 1)
                 (expand "o ")
                 (expand "single_index")
                 (propax))
                ("3" (skolem + "n!1") (expand "single_index") (propax))))
              ("2" (skosimp) (inst - "i!1") (expand "o" 1 2) (propax))))
            ("2"
             (hide 2)
             (skosimp)
             (inst - "j!1")
             (inst -4 "j!1")
             (typepred "FDU(j!1)")
             (hide -2 -4 -5)
             (case "subset?(B!1(j!1),I!1(j!1))")
             (("1"
               (lemma "A_difference_union"
                ("a" "I!1(j!1)" "b" "B!1(j!1)"))
               (assert)
               (lemma "union_diff_subset"
                ("b" "I!1(j!1)" "a" "B!1(j!1)"))
               (assert)
               (lemma "difference_disjoint"
                ("a" "B!1(j!1)" "b" "I!1(j!1)"))
               (name-replace "DIFF" "difference(I!1(j!1), B!1(j!1))")
               (name-replace "BB" "B!1(j!1)")
               (name-replace "AA" "FDU(j!1)")
               (name-replace "II" "I!1(j!1)")
               (expand "finite_disjoint_union?")
               (skosimp)
               (expand "member")
               (name "XX"
                     "lambda (i:nat): if i<n!1 then E!1(i) else AA(i-n!1) endif")
               (("1"
                 (case "disjoint_indexed_measurable?(XX)")
                 (("1"
                   (expand "measure_countably_additive?")
                   (inst -18 "XX")
                   (case-replace "IUnion(XX)=II")
                   (("1"
                     (assert)
                     (lemma "x_add_sum"
                      ("S"
                       "lambda (i:nat): if i<n!1 then mu!1(E!1(i)) else (TRUE,0) endif"
                       "T"
                       "lambda (i:nat): if i<n!1 then (TRUE,0) else mu!1(AA(i-n!1)) endif"))
                     (("1"
                       (lemma "x_sum_eq"
                        ("S"
                         "LAMBDA (i_1: nat):
                                            x_add((LAMBDA (i: nat):
                                                     IF i < n!1 THEN mu!1(E!1(i))
                                                     ELSE (TRUE, 0)
                                                     ENDIF)
                                                      (i_1),
                                                  (LAMBDA (i: nat):
                                                     IF i < n!1 THEN (TRUE, 0)
                                                     ELSE mu!1(AA(i - n!1))
                                                     ENDIF)
                                                      (i_1))"
                         "T"
                         "mu!1 o XX"))
                       (("1"
                         (split -1)
                         (("1"
                           (name-replace "DRL1"
                            "x_sum(LAMBDA (i_1: nat):
                                               x_add((LAMBDA (i: nat):
                                                        IF i < n!1 THEN mu!1(E!1(i))
                                                        ELSE (TRUE, 0)
                                                        ENDIF)
                                                         (i_1),
                                                     (LAMBDA (i: nat):
                                                        IF i < n!1 THEN (TRUE, 0)
                                                        ELSE mu!1(AA(i - n!1))
                                                        ENDIF)
                                                         (i_1)))")
                           (("1"
                             (case "x_eq(x_sum(mu!1 o AA),x_sum(LAMBDA (i: nat):
                                                            IF i < n!1 THEN (TRUE, 0)
                                                            ELSE mu!1(AA(i - n!1))
                                                            ENDIF))")
                             (("1"
                               (name-replace "LHS" "x_sum(mu!1 o AA)")
                               (name-replace "RHS" "mu!1(II)")
                               (name-replace "DRL2" "x_sum(mu!1 o XX)")
                               (name-replace "DRL3"
                                "x_sum(LAMBDA (i: nat):
                                                   IF i < n!1 THEN (TRUE, 0) ELSE mu!1(AA(i - n!1)) ENDIF)")
                               (hide-all-but (-1 -2 -3 -22 1))
                               (expand "x_le")
                               (flatten)
                               (expand "x_eq")
                               (assert)
                               (flatten)
                               (assert)
                               (expand "x_add")
                               (assert)
                               (lift-if)
                               (prop)
                               (("1" (assert)) ("2" (assert))
                                ("3" (assert)) ("4" (assert))))
                              ("2"
                               (hide-all-but 1)
                               (expand "x_sum")
                               (expand "x_eq")
                               (case-replace
                                "FORALL (i:nat): (mu!1 o AA)(i)`1")
                               (("1"
                                 (case-replace
                                  "FORALL (i_1: nat):
                                                IF i_1 < n!1 THEN TRUE ELSE mu!1(AA(i_1 - n!1))`1 ENDIF")
                                 (("1"
                                   (case-replace
                                    "convergence_sequences.convergent?(series(LAMBDA (i:nat): (mu!1 o AA)(i)`2))")
                                   (("1"
                                     (case-replace
                                      "convergence_sequences.convergent?(series(LAMBDA (i_1: nat):
                                                                   IF i_1 < n!1 THEN 0
                                                                   ELSE mu!1(AA(i_1 - n!1))`2
                                                                   ENDIF))")
                                     (("1"
                                       (case-replace "n!1=0")
                                       (("1"
                                         (case-replace
                                          "(LAMBDA (i_1: nat):
                                                               IF i_1 < 0 THEN 0 ELSE mu!1(AA(i_1 - 0))`2 ENDIF)=(LAMBDA (i:nat): (mu!1 o AA)(i)`2)")
                                         (apply-extensionality :hide? t)
                                         (expand "o ")
                                         (propax))
                                        ("2"
                                         (lemma
                                          "limit_series_shift"
                                          ("a"
                                           "(LAMBDA (i_1: nat):
                                                                     IF i_1 < n!1 THEN 0
                                                                     ELSE mu!1(AA(i_1 - n!1))`2
                                                                     ENDIF)"
                                           "pn"
                                           "n!1"))
                                         (("1"
                                           (replace -2)
                                           (replace -1)
                                           (expand "o ")
                                           (lemma
                                            "sigma_eq"
                                            ("F"
                                             "(LAMBDA (i_1: nat):
                                                             IF i_1 < n!1 THEN 0 ELSE mu!1(AA(i_1 - n!1))`2 ENDIF)"
                                             "G"
                                             "lambda (i:nat): 0"
                                             "low"
                                             "0"
                                             "high"
                                             "n!1-1"))
                                           (split -1)
                                           (("1"
                                             (rewrite "sigma_zero")
                                             (assert))
                                            ("2" (skosimp) (assert))))
                                          ("2" (assert))))))
                                      ("2"
                                       (hide 2)
                                       (lemma
                                        "conv_series_shift"
                                        ("a"
                                         "(LAMBDA (i_1: nat):
                                                                   IF i_1 < n!1 THEN 0
                                                                   ELSE mu!1(AA(i_1 - n!1))`2
                                                                   ENDIF)"
                                         "N"
                                         "n!1"))
                                       (expand "o ")
                                       (assert))))
                                    ("2"
                                     (replace 1)
                                     (assert)
                                     (prop)
                                     (expand "o ")
                                     (lemma
                                      "conv_series_shift"
                                      ("a"
                                       "(LAMBDA (i_1: nat):
                                                                 IF i_1 < n!1 THEN 0
                                                                 ELSE mu!1(AA(i_1 - n!1))`2
                                                                 ENDIF)"
                                       "N"
                                       "n!1"))
                                     (assert))))
                                  ("2"
                                   (skosimp)
                                   (hide 2)
                                   (prop)
                                   (inst - "i!1-n!1")
                                   (("1" (expand "o ") (propax))
                                    ("2" (assert))))))
                                ("2"
                                 (replace 1)
                                 (case-replace
                                  "FORALL (i_1: nat):
                                                IF i_1 < n!1 THEN TRUE ELSE mu!1(AA(i_1 - n!1))`1 ENDIF")
                                 (("1"
                                   (hide 2)
                                   (skosimp)
                                   (expand "o ")
                                   (inst - "i!1+n!1")
                                   (assert))
                                  ("2" (replace 1) (propax))))))))
                            ("2"
                             (skosimp)
                             (lift-if 1)
                             (assert)
                             (prop)
                             (assert))
                            ("3"
                             (skosimp)
                             (lift-if 1)
                             (assert)
                             (prop)
                             (assert))))
                          ("2"
                           (hide -1 2)
                           (skosimp)
                           (expand "XX")
                           (expand "o")
                           (case-replace "i!1 < n!1")
                           (("1"
                             (expand "x_add")
                             (expand "x_eq")
                             (hide-all-but 1)
                             (prop)
                             (("1" (lift-if) (propax))
                              ("2" (lift-if) (assert))))
                            ("2"
                             (assert)
                             (hide-all-but (1 2))
                             (expand "x_add")
                             (expand "x_eq")
                             (lift-if 2)
                             (assert))))))
                        ("2"
                         (skosimp)
                         (lift-if 1)
                         (assert)
                         (prop)
                         (assert))
                        ("3" (skosimp) (assert))
                        ("4"
                         (skosimp)
                         (lift-if 1)
                         (assert)
                         (prop)
                         (assert))
                        ("5"
                         (skosimp)
                         (inst -11 "i!2")
                         (flatten)
                         (assert))))
                      ("2" (skosimp) (inst -9 "i!1") (assert))))
                    ("2"
                     (replace -4 1 rl)
                     (replace -6)
                     (replace -10 * rl)
                     (hide-all-but (-7 1))
                     (apply-extensionality :hide? t)
                     (expand "union")
                     (expand "member")
                     (case-replace "IUnion(E!1)(x!1)")
                     (("1"
                       (expand "IUnion")
                       (skosimp)
                       (inst + "i!1")
                       (expand "XX")
                       (inst - "i!1")
                       (flatten)
                       (assert)
                       (case-replace "i!1 < n!1")
                       (assert)
                       (expand "empty?")
                       (inst - "x!1")
                       (assert))
                      ("2"
                       (assert)
                       (case-replace "IUnion(AA)(x!1)")
                       (("1"
                         (hide 1)
                         (expand "IUnion")
                         (skosimp)
                         (expand "XX")
                         (inst + "n!1+i!1")
                         (assert))
                        ("2"
                         (assert)
                         (expand "IUnion")
                         (skosimp)
                         (expand "XX")
                         (case-replace "i!1<n!1")
                         (("1" (inst 2 "i!1"))
                          ("2" (assert) (inst 2 "i!1-n!1"))))))))))
                  ("2"
                   (hide 2)
                   (expand "disjoint_indexed_measurable?")
                   (expand "disjoint?" 1)
                   (skosimp)
                   (expand "XX")
                   (hide -1)
                   (case-replace "i!1 < n!1")
                   (("1"
                     (case-replace "j!2 < n!1")
                     (("1"
                       (expand "disjoint?" -5)
                       (inst -5 "i!1" "j!2")
                       (assert))
                      ("2"
                       (assert)
                       (replace -5)
                       (replace -9 -2 rl)
                       (expand "disjoint?" (3 -2))
                       (expand "intersection")
                       (expand "empty?")
                       (expand "member")
                       (skosimp)
                       (inst -4 "x!1")
                       (split 3)
                       (("1" (expand "IUnion") (inst + "j!2-n!1"))
                        ("2" (expand "IUnion") (inst + "i!1"))))))
                    ("2"
                     (case-replace "j!2 < n!1")
                     (("1"
                       (assert)
                       (replace -5)
                       (replace -9 -2 rl)
                       (expand "disjoint?" (-2 3))
                       (expand "intersection")
                       (expand "empty?")
                       (expand "member")
                       (skosimp)
                       (inst - "x!1")
                       (split 3)
                       (("1" (expand "IUnion") (inst + "i!1-n!1"))
                        ("2" (expand "IUnion") (inst + "j!2"))))
                      ("2"
                       (assert)
                       (expand "disjoint?" -7)
                       (inst -7 "i!1 - n!1" "j!2 - n!1")
                       (assert))))))
                  ("3"
                   (skosimp)
                   (expand "XX")
                   (case-replace "x1!1 < n!1")
                   (("1" (inst -6 "x1!1") (flatten) (assert))
                    ("2" (assert))))))
                ("2" (skosimp) (assert))))
              ("2"
               (hide 2)
               (expand "subset?")
               (skosimp)
               (expand "member")
               (case-replace "j!1=0")
               (("1" (assert))
                ("2"
                 (inst -8 "j!1-1")
                 (("1"
                   (assert)
                   (replace -8 -1)
                   (expand "difference")
                   (expand "member")
                   (propax))
                  ("2" (assert))))))))))
          ("2"
           (skosimp)
           (inst - "n!1")
           (lemma "choose_member"
            ("a"
             "{E: disjoint_indexed_measurable | B!1(n!1) = IUnion(E)}"))
           (expand "nonempty?")
           (assert))))
        ("2" (propax))))
      ("2"
       (hide-all-but (-1 1))
       (skosimp)
       (inst - "n!1")
       (expand "finite_disjoint_union?")
       (skosimp)
       (expand "nonempty?")
       (expand "empty?")
       (expand "member")
       (inst - "E!1")
       (expand "disjoint_indexed_measurable?")
       (assert)
       (skosimp)
       (inst - "x1!1")
       (flatten)
       (assert)
       (case-replace "E!1(x1!1)=emptyset")
       (("1" (rewrite "A_empty"))
        ("2"
         (apply-extensionality :hide? t)
         (inst - "x!1")
         (expand "emptyset")
         (propax))))))
    ("2"
     (hide -6 -7 -8 2)
     (lemma "NAT_induction"
      ("p" "lambda (n: nat): finite_disjoint_union?(A)(B!1(n))"))
     (split)
     (("1" (skosimp) (inst - "n!1"))
      ("2"
       (hide 2)
       (skosimp)
       (case-replace "j!1=0")
       (("1"
         (replace -5)
         (hide-all-but 1)
         (expand "finite_disjoint_union?")
         (inst + "lambda (i:nat): if i=0 then I!1(0) else emptyset endif"
          "1")
         (split)
         (("1" (grind))
          ("2"
           (apply-extensionality :hide? t)
           (expand "IUnion")
           (expand "emptyset")
           (case-replace "I!1(0)(x!1)")
           (("1" (inst + "0")) ("2" (assert))))
          ("3"
           (skosimp)
           (expand "member")
           (rewrite "A_empty")
           (assert)
           (flatten)
           (assert)
           (expand "empty?")
           (skosimp)
           (expand "emptyset")
           (assert))))
        ("2"
         (case "j!1>0")
         (("1"
           (hide 1)
           (inst -6 "j!1-1")
           (("1"
             (assert)
             (replace -6)
             (inst -4 "j!1-1")
             (case "forall (n:nat): n < j!1 => finite_disjoint_union?(A)(IUnion(n,B!1))")
             (("1"
               (inst - "j!1-1")
               (assert)
               (lemma "A_difference_union"
                ("a" "I!1(j!1)" "b" "IUnion(j!1 - 1, B!1)"))
               (assert))
              ("2"
               (hide 2)
               (induct "n")
               (("1"
                 (flatten)
                 (rewrite "IUnion_0_def")
                 (replace -6)
                 (hide-all-but 1)
                 (expand "finite_disjoint_union?")
                 (inst +
                  "lambda (i:nat): if i=0 then I!1(0) else emptyset endif"
                  "1")
                 (expand "member")
                 (rewrite "A_empty")
                 (split)
                 (("1" (grind))
                  ("2"
                   (apply-extensionality :hide? t)
                   (expand "IUnion")
                   (expand "emptyset")
                   (case-replace "I!1(0)(x!1)")
                   (("1" (inst + "0")) ("2" (assert))))
                  ("3"
                   (skosimp)
                   (split)
                   (("1" (flatten) (assert))
                    ("2"
                     (flatten)
                     (assert)
                     (expand "empty?")
                     (expand "emptyset")
                     (grind))))))
                ("2"
                 (skosimp)
                 (assert)
                 (rewrite "IUnion_n_def" 1)
                 (inst - "1+j!2")
                 (assert)
                 (name-replace "AA" "IUnion(j!2, B!1)")
                 (name-replace "BB" "B!1(1 + j!2)")
                 (hide-all-but (-1 -4 -5 1))
                 (expand "finite_disjoint_union?")
                 (skosimp*)
                 (inst +
                  "lambda (i:nat): if i < n!1 then E!1(i) else E!2(i-n!1) endif"
                  "n!1+n!2")
                 (("1"
                   (case "disjoint?(AA,BB)")
                   (("1"
                     (split)
                     (("1"
                       (expand "disjoint?" (1 -2 -5))
                       (skosimp)
                       (case-replace "i!1 < n!1")
                       (("1"
                         (case-replace "j!3 < n!1")
                         (("1" (inst - "i!1" "j!3") (assert))
                          ("2"
                           (assert)
                           (expand "disjoint?")
                           (expand "intersection")
                           (expand "empty?")
                           (skosimp)
                           (expand "member")
                           (flatten)
                           (inst - "x!1")
                           (split)
                           (("1"
                             (replace -5)
                             (expand "IUnion")
                             (inst + "i!1"))
                            ("2"
                             (replace -8)
                             (expand "IUnion")
                             (inst + "j!3-n!1"))))))
                        ("2"
                         (case-replace "j!3 < n!1")
                         (("1"
                           (assert)
                           (expand "disjoint?")
                           (expand "intersection")
                           (expand "empty?")
                           (expand "member")
                           (skosimp)
                           (inst - "x!1")
                           (split)
                           (("1"
                             (replace -5)
                             (expand "IUnion")
                             (inst + "j!3"))
                            ("2"
                             (replace -8)
                             (expand "IUnion")
                             (inst + "i!1-n!1"))))
                          ("2"
                           (assert)
                           (inst -5 "i!1-n!1" "j!3-n!1")
                           (assert))))))
                      ("2"
                       (apply-extensionality :hide? t)
                       (("1"
                         (expand "union")
                         (expand "member")
                         (replace -3)
                         (replace -6)
                         (case-replace "IUnion(E!1)(x!1)")
                         (("1"
                           (expand "IUnion")
                           (skosimp)
                           (inst + "i!1")
                           (inst -5 "i!1")
                           (case-replace "i!1<n!1")
                           (assert)
                           (expand "empty?")
                           (inst -5 "x!1")
                           (assert))
                          ("2"
                           (replace 1)
                           (case-replace "IUnion(E!2)(x!1)")
                           (("1"
                             (expand "IUnion")
                             (skosimp)
                             (hide 1)
                             (inst + "n!1+i!1")
                             (assert))
                            ("2"
                             (assert)
                             (expand "IUnion")
                             (skosimp)
                             (case-replace "i!1<n!1")
                             (("1" (inst 2 "i!1"))
                              ("2" (assert) (inst 2 "i!1-n!1"))))))))
                        ("2" (skosimp) (assert))))
                      ("3"
                       (skosimp)
                       (case-replace "i!1 < n!1")
                       (("1" (inst - "i!1") (assert))
                        ("2"
                         (assert)
                         (inst -7 "i!1-n!1")
                         (flatten)
                         (case-replace "i!1 < n!1 + n!2")
                         (("1" (assert)) ("2" (assert))))))))
                    ("2"
                     (hide 2)
                     (expand "BB")
                     (expand "AA")
                     (hide-all-but (-7 1))
                     (expand "disjoint?")
                     (expand "intersection")
                     (expand "empty?")
                     (expand "member")
                     (skosimp)
                     (expand "IUnion")
                     (expand "image")
                     (expand "Union")
                     (skosimp)
                     (typepred "a!1")
                     (skolem - "i!2")
                     (inst - "i!2" "1+j!2")
                     (assert)
                     (expand "disjoint?")
                     (expand "intersection")
                     (expand "empty?")
                     (expand "member")
                     (inst - "x!1")
                     (assert))))
                  ("2" (skosimp) (assert))))))))
            ("2" (assert))))
          ("2" (assert))))))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: ast_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "A_difference_union" ("a" "Y!1" "b" "IUnion(n!1, I!1)"))
   (assert)
   (split)
   (("1"
     (expand "finite_disjoint_union?")
     (skosimp)
     (lemma "union_diff_subset" ("a" "IUnion(n!1, I!1)" "b" "Y!1"))
     (assert)
     (replace -3)
     (name "XX"
           "lambda (i:nat): if i<n!1 then I!1(i) else E!1(i-n!1) endif")
     (("1"
       (case "disjoint_indexed_measurable?(XX)")
       (("1"
         (typepred "mu!1")
         (expand "measure?")
         (expand "measure_countably_additive?")
         (flatten)
         (inst - "XX")
         (case-replace "IUnion(XX)=Y!1")
         (("1"
           (assert)
           (lemma "x_add_sum"
            ("S"
             "lambda (i:nat): if i<n!1 then mu!1(I!1(i)) else (TRUE,0) endif"
             "T"
             "lambda (i:nat): if i<n!1 then (TRUE,0) else mu!1(E!1(i-n!1)) endif"))
           (("1"
             (lemma "x_sum_eq"
              ("S"
               "LAMBDA (i_1: nat):
                                  x_add((LAMBDA (i: nat):
                                           IF i < n!1 THEN mu!1(I!1(i))
                                           ELSE (TRUE, 0)
                                           ENDIF)
                                            (i_1),
                                        (LAMBDA (i: nat):
                                           IF i < n!1 THEN (TRUE, 0)
                                           ELSE mu!1(E!1(i - n!1))
                                           ENDIF)
                                            (i_1))"
               "T"
               "mu!1 o XX"))
             (("1"
               (split -1)
               (("1"
                 (name-replace "DRL1"
                  "x_sum(LAMBDA (i_1: nat):
                                     x_add((LAMBDA (i: nat):
                                              IF i < n!1 THEN mu!1(I!1(i))
                                              ELSE (TRUE, 0)
                                              ENDIF)
                                               (i_1),
                                           (LAMBDA (i: nat):
                                              IF i < n!1 THEN (TRUE, 0)
                                              ELSE mu!1(E!1(i - n!1))
                                              ENDIF)
                                               (i_1)))")
                 (("1"
                   (case "x_eq(x_sum(mu!1 o I!1),x_sum(LAMBDA (i: nat):
                                                  IF i < n!1 THEN mu!1(I!1(i))
                                                  ELSE (TRUE, 0)
                                                  ENDIF))")
                   (("1"
                     (name-replace "LHS" "x_sum(mu!1 o I!1)")
                     (name-replace "DRL2"
                      "x_sum(LAMBDA (i: nat):
                                         IF i < n!1 THEN mu!1(I!1(i)) ELSE (TRUE, 0) ENDIF)")
                     (hide-all-but (1 -1 -2 -3 -6))
                     (expand "x_eq")
                     (expand "x_le")
                     (expand "x_add")
                     (flatten)
                     (assert)
                     (assert)
                     (prop)
                     (("1" (assert)) ("2" (assert)) ("3" (assert))
                      ("4" (assert))))
                    ("2"
                     (hide 2 -2)
                     (lemma "x_sum_eq"
                      ("S"
                       "mu!1 o I!1"
                       "T"
                       "LAMBDA (i: nat):
                                          IF i < n!1 THEN mu!1(I!1(i)) ELSE (TRUE, 0) ENDIF"))
                     (assert)
                     (hide 2)
                     (skosimp)
                     (expand "o ")
                     (case-replace "i!1 < n!1")
                     (("1" (expand "x_eq") (propax))
                      ("2"
                       (assert)
                       (inst -13 "i!1")
                       (assert)
                       (expand "measure_empty?")
                       (case-replace "I!1(i!1)=emptyset")
                       (("1" (replace -4) (expand "x_eq") (propax))
                        ("2"
                         (apply-extensionality :hide? t)
                         (expand "emptyset")
                         (expand "empty?")
                         (inst -14 "x!1")
                         (assert))))))))
                  ("2"
                   (skosimp)
                   (case-replace "i!1 < n!1")
                   (("1" (assert)) ("2" (assert))))
                  ("3"
                   (skosimp)
                   (case-replace "i!1 < n!1")
                   (("1" (assert)) ("2" (assert))))))
                ("2"
                 (hide 2 -1)
                 (skosimp)
                 (expand "o" 1)
                 (expand "XX")
                 (case-replace "i!1 < n!1")
                 (("1"
                   (hide-all-but 1)
                   (expand "x_add")
                   (expand "x_eq")
                   (case-replace "mu!1(I!1(i!1))`1")
                   (assert))
                  ("2"
                   (assert)
                   (hide-all-but (1 2 -9))
                   (expand "x_add")
                   (expand "x_eq")
                   (inst - "i!1 - n!1")
                   (flatten)
                   (lift-if 2)
                   (assert))))))
              ("2" (skosimp) (lift-if 1) (assert) (prop) (assert))
              ("3"
               (skosimp)
               (replace -1)
               (inst -11 "i!1-n!1")
               (("1"
                 (flatten)
                 (replace 2)
                 (assert)
                 (case-replace "E!1(i!1 - n!1)=emptyset")
                 (("1" (rewrite "A_empty"))
                  ("2"
                   (apply-extensionality :hide? t)
                   (expand "emptyset")
                   (expand "empty?")
                   (inst -12 "x!1")
                   (assert))))
                ("2" (assert))))
              ("4" (skosimp) (assert))
              ("5" (skosimp) (lift-if 1) (assert) (prop) (assert))))
            ("2"
             (skosimp)
             (inst -9 "i!1-n!1")
             (("1"
               (flatten)
               (assert)
               (case-replace "E!1(i!1 - n!1)=emptyset")
               (("1" (rewrite "A_empty"))
                ("2"
                 (apply-extensionality :hide? t)
                 (expand "emptyset")
                 (expand "empty?")
                 (inst -10 "x!1")
                 (assert))))
              ("2" (assert))))))
          ("2"
           (hide 2)
           (apply-extensionality :hide? t)
           (replace -5 1 rl)
           (expand "XX")
           (hide-all-but (1 -11 -8))
           (expand "union")
           (expand "member")
           (expand "IUnion")
           (expand "image")
           (expand "Union")
           (case-replace
            "EXISTS (i_1: nat):
                     IF i_1 < n!1 THEN I!1(i_1)(x!1) ELSE E!1(i_1 - n!1)(x!1) ENDIF")
           (("1"
             (skosimp)
             (case "i!1<n!1")
             (("1" (assert) (inst 1 "I!1(i!1)") (inst 1 "i!1"))
              ("2" (assert) (inst 3 "i!1-n!1"))))
            ("2"
             (replace 1 2)
             (assert)
             (split)
             (("1"
               (skosimp)
               (typepred "a!1")
               (skolem - "j!1")
               (typepred "j!1")
               (expand "<=" -1)
               (split)
               (("1" (inst + "j!1") (assert))
                ("2"
                 (inst -5 "j!1")
                 (assert)
                 (expand "empty?")
                 (inst -5 "x!1")
                 (assert))))
              ("2" (skosimp) (inst + "i!1+n!1") (assert))))))))
        ("2"
         (hide -1 2)
         (expand "disjoint_indexed_measurable?")
         (expand "XX")
         (expand "disjoint?")
         (lemma "difference_disjoint" ("b" "Y!1" "a" "IUnion(n!1, I!1)"))
         (replace -4)
         (skosimp)
         (case-replace "i!1 < n!1")
         (("1"
           (case-replace "j!1 < n!1")
           (("1" (inst -8 "i!1" "j!1") (assert))
            ("2"
             (assert)
             (expand "disjoint?")
             (expand "intersection")
             (expand "empty?")
             (expand "member")
             (skosimp)
             (inst -2 "x!1")
             (expand "IUnion")
             (expand "image")
             (expand "Union")
             (split 2)
             (("1" (inst + "I!1(i!1)") (inst + "i!1"))
              ("2" (inst + "j!1 - n!1"))))))
          ("2"
           (case-replace "j!1 < n!1")
           (("1"
             (assert)
             (expand "disjoint?" (-2 3))
             (expand "intersection" (-2 3))
             (expand "empty?" (-2 3))
             (expand "member")
             (skosimp)
             (inst - "x!1")
             (expand "IUnion" 2)
             (expand "image")
             (expand "Union")
             (split)
             (("1" (inst + "I!1(j!1)") (inst + "j!1"))
              ("2" (inst + "i!1-n!1"))))
            ("2" (assert) (inst -3 "i!1-n!1" "j!1-n!1") (assert))))))
        ("3"
         (hide -1 2)
         (skolem + "i!1")
         (expand "XX")
         (case-replace "i!1<n!1")
         (("1" (assert))
          ("2"
           (assert)
           (inst - "i!1-n!1")
           (flatten)
           (case-replace "i!1 - n!1 < n!2")
           (assert)
           (case-replace "E!1(i!1 - n!1)=emptyset")
           (("1" (rewrite "A_empty"))
            ("2"
             (apply-extensionality :hide? t)
             (expand "emptyset")
             (expand "empty?")
             (inst -6 "x!1")
             (expand "member")
             (propax))))))))
      ("2" (skosimp) (assert))))
    ("2"
     (hide 2)
     (expand "finite_disjoint_union?")
     (inst + "I!1" "n!1")
     (split)
     (("1" (propax))
      ("2"
       (apply-extensionality :hide? t)
       (expand "IUnion")
       (case-replace "EXISTS (i: nat): I!1(i)(x!1)")
       (("1"
         (skosimp)
         (inst - "i!1")
         (expand "image")
         (expand "Union")
         (case-replace "i!1 >= n!1")
         (("1" (expand "empty?") (inst -5 "x!1") (assert))
          ("2" (inst + "I!1(i!1)") (inst + "i!1") (assert))))
        ("2"
         (replace 1 2)
         (assert)
         (expand "image")
         (expand "Union")
         (skosimp)
         (typepred "a!1")
         (skolem - "i!1")
         (inst + "i!1")
         (assert))))
      ("3"
       (skosimp)
       (expand "member")
       (flatten)
       (inst - "i!1")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: ast_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "generalized_monotonicity"
    ("mu"
     "mu!1"
     "Y"
     "b!1"
     "n"
     "1"
     "I"
     "lambda (i:nat): if i=0 then a!1 else emptyset endif"))
   (("1"
     (split)
     (("1"
       (case "x_eq(x_sum(mu!1 o
                               (LAMBDA (i: nat):
                                  IF i = 0 THEN a!1 ELSE emptyset ENDIF)),
                        mu!1(a!1))")
       (("1"
         (expand "x_eq")
         (expand "x_le")
         (flatten)
         (assert)
         (flatten)
         (assert))
        ("2"
         (hide-all-but 1)
         (expand "x_eq")
         (expand "o")
         (typepred "mu!1")
         (expand "measure?")
         (flatten)
         (expand "measure_empty?")
         (replace -1)
         (expand "x_sum")
         (case-replace
          "FORALL i: IF i = 0 THEN mu!1(a!1)`1 ELSE TRUE ENDIF")
         (("1"
           (case-replace
            "convergence_sequences.convergent?(series(LAMBDA i:
                                          IF i = 0 THEN mu!1(a!1)`2 ELSE 0 ENDIF))")
           (("1"
             (hide -1)
             (inst - "0")
             (assert)
             (replace -1)
             (lemma "zero_tail_series_limit"
              ("n"
               "0"
               "a"
               "LAMBDA i: IF i = 0 THEN mu!1(a!1)`2 ELSE 0 ENDIF"))
             (split)
             (("1"
               (replace -1)
               (expand "series")
               (expand "sigma")
               (expand "sigma")
               (assert))
              ("2" (hide 2) (skosimp) (assert))))
            ("2"
             (hide 2)
             (lemma "zero_tail_series_conv"
              ("n"
               "0"
               "a"
               "LAMBDA i: IF i = 0 THEN mu!1(a!1)`2 ELSE 0 ENDIF"))
             (assert)
             (hide 2)
             (skosimp)
             (assert))))
          ("2" (replace 1 2) (skosimp) (assert) (prop))))))
      ("2" (hide-all-but 1) (grind))
      ("3"
       (case-replace
        "IUnion(1,
                             LAMBDA (i: nat):
                               IF i = 0 THEN a!1 ELSE emptyset ENDIF)=a!1")
       (hide-all-but 1)
       (rewrite "IUnion_n_def")
       (rewrite "IUnion_0_def")
       (apply-extensionality :hide? t)
       (expand "union")
       (expand "member")
       (expand "emptyset")
       (propax))
      ("4" (hide-all-but 1) (skosimp) (assert) (grind))))
    ("2" (skosimp) (rewrite "A_empty"))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: ast_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem + ("_" "mu!1"))
   (case "FORALL (Y: (A)): x_le(ast(mu!1)(Y), mu!1(Y))")
   (("1"
     (case "FORALL (Y: (A)): x_le(mu!1(Y),ast(mu!1)(Y))")
     (("1"
       (skosimp)
       (inst - "Y!1")
       (inst - "Y!1")
       (expand "x_le")
       (expand "x_eq")
       (split)
       (("1" (flatten) (assert)) ("2" (assert))))
      ("2"
       (hide 2)
       (skosimp)
       (typepred "Y!1")
       (name "F" "ast(mu!1)")
       (typepred "ast(mu!1)")
       (replace -2)
       (case "forall I: A(IUnion(I)) => x_le(mu!1(IUnion(I)),x_sum(mu!1 o I))")
       (("1"
         (case "FORALL (I: sequence[(A)], Y: (A)):
                       subset?(Y, IUnion(I)) & A(IUnion(I)) =>
                        x_le(mu!1(Y), x_sum(mu!1 o I))")
         (("1"
           (expand "F" 1)
           (expand "ast" 1)
           (expand "x_le" 1)
           (flatten)
           (replace -6)
           (expand "x_inf")
           (prop)
           (("1"
             (skosimp)
             (typepred "x!1")
             (skosimp)
             (inst -4 "lambda (n:nat): intersection(Y!1,I!1(n))" "Y!1")
             (("1"
               (case-replace
                "IUnion(LAMBDA (n: nat): intersection(Y!1, I!1(n)))=Y!1")
               (("1"
                 (split -5)
                 (("1"
                   (lemma "x_sum_le"
                    ("S"
                     "mu!1 o (LAMBDA (n: nat): intersection(Y!1, I!1(n)))"
                     "T"
                     "mu!1 o I!1"))
                   (("1"
                     (split -1)
                     (("1"
                       (name-replace "MID"
                        "x_sum(mu!1 o (LAMBDA (n: nat): intersection(Y!1, I!1(n))))")
                       (hide-all-but (-6 -1 -2 -4 1))
                       (expand "x_le")
                       (expand "x_eq")
                       (flatten)
                       (assert)
                       (flatten))
                      ("2"
                       (hide-all-but 1)
                       (skosimp)
                       (expand "o ")
                       (lemma "generalized_measure_monotone"
                        ("mu"
                         "mu!1"
                         "a"
                         "intersection(Y!1, I!1(i!1))"
                         "b"
                         "I!1(i!1)"))
                       (assert)
                       (expand "intersection")
                       (expand "subset?")
                       (expand "member")
                       (skosimp))))
                    ("2" (skosimp) (rewrite "A_intersection"))))
                  ("2" (expand "subset?") (skosimp)) ("3" (propax))))
                ("2"
                 (hide-all-but (-2 1))
                 (apply-extensionality :hide? t)
                 (case-replace "Y!1(x!2)")
                 (("1"
                   (expand "subset?")
                   (inst - "x!2")
                   (expand "IUnion")
                   (expand "member")
                   (assert)
                   (skosimp)
                   (inst + "i!1")
                   (expand "intersection")
                   (assert))
                  ("2"
                   (assert)
                   (expand "IUnion")
                   (skosimp)
                   (expand "intersection")
                   (flatten)
                   (assert))))))
              ("2" (skosimp) (rewrite "A_intersection"))))
            ("2"
             (replace 1)
             (skosimp)
             (typepred
              "glb({z_1: real |
                              EXISTS (x:extended_nnreal):
                                (EXISTS I:
                                   x_eq(x_sum(mu!1 o I), x) AND subset?(Y!1, IUnion(I)))
                                 AND x`1 AND x`2 = z_1})")
             (("1"
               (name-replace "GLB"
                "glb({z_1: real |
                                EXISTS (x:extended_nnreal):
                                  (EXISTS I:
                                     x_eq(x_sum(mu!1 o I), x) AND subset?(Y!1, IUnion(I)))
                                   AND x`1 AND x`2 = z_1})")
               (expand "greatest_lower_bound?")
               (flatten)
               (expand "lower_bound?")
               (typepred "x!1")
               (skosimp)
               (case "FORALL (I: sequence[(A)], Y: (A)):
                             subset?(Y, IUnion(I)) =>
                              (EXISTS (U:[[nat,nat]->(A)]): (forall (i1,i2,j1,j2:nat): (i1/=i2 or j1/=j2) => disjoint?(U(i1,j1),U(i2,j2))) &
                                 Y = IUnion(lambda (i:nat): IUnion(lambda (j:nat): U(i,j))) & x_eq(mu!1(Y), x_sum(lambda (i:nat): x_sum(lambda (j:nat): mu!1(U(i,j))))) & forall (i:nat): subset?(IUnion(lambda (j:nat): U(i,j)),I(i))&EXISTS (n:nat): FORALL (j:nat): j >= n => empty?(U(i,j)))")
               (("1"
                 (inst-cp -1 "I!1" "Y!1")
                 (assert)
                 (skosimp)
                 (case "GLB<mu!1(Y!1)`2")
                 (("1"
                   (case "0<=GLB")
                   (("1"
                     (lemma "posreal_div_posreal_is_posreal"
                      ("px" "mu!1(Y!1)`2" "py" "2"))
                     (("1"
                       (hide 1)
                       (inst-cp -12 "mu!1(Y!1)`2")
                       (assert)
                       (skosimp)
                       (typepred "s!1")
                       (skosimp*)
                       (case "s!1<mu!1(Y!1)`2")
                       (("1"
                         (hide 1)
                         (inst -9 "I!2" "Y!1")
                         (assert)
                         (skosimp)
                         (lemma "x_sum_le"
                          ("S"
                           "LAMBDA (i: nat): x_sum(LAMBDA (j: nat): mu!1(U!2(i, j)))"
                           "T"
                           "mu!1 o I!2"))
                         (split -1)
                         (("1"
                           (name-replace "M3" "x_sum(mu!1 o I!2)")
                           (name-replace "M1"
                            "x_sum(LAMBDA (i: nat): x_sum(LAMBDA (j: nat): mu!1(U!1(i, j))))")
                           (name-replace "M2"
                            "x_sum(LAMBDA (i: nat): x_sum(LAMBDA (j: nat): mu!1(U!2(i, j))))")
                           (hide-all-but (-1 -2 -3 -5 -6 -12 -16 -22))
                           (expand "x_le")
                           (expand "x_eq")
                           (assert)
                           (flatten)
                           (assert)
                           (flatten)
                           (assert))
                          ("2"
                           (skosimp)
                           (inst -12 "i!1")
                           (hide-all-but (-9 -12 1))
                           (flatten)
                           (skosimp)
                           (lemma "generalized_monotonicity"
                            ("I"
                             "lambda (j:nat): U!2(i!1,j)"
                             "Y"
                             "I!2(i!1)"
                             "mu"
                             "mu!1"
                             "n"
                             "n!1"))
                           (split -1)
                           (("1" (expand "o") (propax))
                            ("2"
                             (hide-all-but (-1 1))
                             (expand "disjoint?" 1)
                             (skosimp)
                             (inst - "i!1" "i!1" "_" "_")
                             (assert)
                             (inst - "i!2" "j!1")
                             (assert))
                            ("3"
                             (hide -1 2)
                             (case-replace
                              "IUnion(n!1, LAMBDA (j: nat): U!2(i!1, j))=IUnion(LAMBDA (j: nat): U!2(i!1, j))")
                             (apply-extensionality :hide? t)
                             (hide -1 2)
                             (expand "IUnion")
                             (expand "image")
                             (expand "Union")
                             (case-replace
                              "EXISTS (i: nat): U!2(i!1, i)(x!3)")
                             (("1"
                               (skosimp)
                               (inst + "U!2(i!1, i!2)")
                               (inst + "i!2")
                               (inst - "i!2")
                               (assert)
                               (expand "empty?")
                               (inst - "x!3")
                               (assert))
                              ("2"
                               (replace 1 2)
                               (assert)
                               (skosimp)
                               (typepred "a!1")
                               (skosimp)
                               (inst + "x!4")
                               (assert))))
                            ("4" (skosimp) (inst -4 "i!2") (assert))))))
                        ("2" (assert))))
                      ("2" (assert))))
                    ("2"
                     (assert)
                     (inst -10 "0")
                     (assert)
                     (skosimp)
                     (typepred "s!1")
                     (skosimp)
                     (skosimp)
                     (assert))))
                  ("2" (assert))))
                ("2"
                 (hide 2)
                 (hide-all-but 1)
                 (skosimp)
                 (name "II" "lambda (i:nat): intersection(Y!2,I!2(i))")
                 (case "IUnion(II)=Y!2")
                 (("1"
                   (lemma "disjoint_IUnion" ("A" "II"))
                   (skosimp)
                   (case "forall (i:nat): A(II(i))")
                   (("1"
                     (hide -8 -9)
                     (case "forall (n:nat): finite_disjoint_union?(A)(B!1(n))")
                     (("1"
                       (case "forall n: subset?(B!1(n),II(n))")
                       (("1"
                         (case "FORALL (n):
                                       nonempty?[[disjoint_indexed_measurable[T, A], nat]]
                                           ({(E: disjoint_indexed_measurable[T, A]), (j: nat) |
                                               disjoint?[nat, T](E) AND
                                                B!1(n) = IUnion[nat, T](E) AND
                                                 (FORALL i: (i >= j => empty?[T](E(i))))})")
                         (("1"
                           (name "FN"
                                 "lambda n: choose({(E:disjoint_indexed_measurable,j:nat) | disjoint?(E) AND B!1(n) = IUnion(E) AND
                                                   (FORALL i: (i < j  => member(E(i),A)) AND
                                                              (i >= j => empty?(E(i))))})")
                           (("1"
                             (name "FF" "lambda n: FN(n)`1")
                             (name "NN" "lambda n: FN(n)`2")
                             (case "forall n: disjoint?(FF(n)) AND
                                                       B!1(n) = IUnion(FF(n)) AND
                                                        (FORALL i:
                                                           (i < NN(n) => member(FF(n)(i), A)) AND
                                                            (i >= NN(n) => empty?(FF(n)(i))))")
                             (("1"
                               (hide -2 -3 -4)
                               (inst + "lambda (i,j:nat): FF(i)(j)")
                               (split)
                               (("1"
                                 (skosimp)
                                 (case-replace "i1!1 = i2!1")
                                 (("1"
                                   (assert)
                                   (inst -3 "i2!1")
                                   (flatten)
                                   (expand "disjoint?" -2)
                                   (inst - "j1!1" "j2!1")
                                   (assert))
                                  ("2"
                                   (assert)
                                   (hide -1)
                                   (inst-cp - "i1!1")
                                   (inst - "i2!1")
                                   (flatten)
                                   (expand "disjoint?" -11)
                                   (inst -11 "i1!1" "i2!1")
                                   (assert)
                                   (replace -2)
                                   (replace -5)
                                   (hide-all-but (-11 2))
                                   (expand "disjoint?")
                                   (expand "intersection")
                                   (expand "empty?")
                                   (expand "member")
                                   (skosimp)
                                   (inst - "x!2")
                                   (expand "IUnion")
                                   (split)
                                   (("1" (inst + "j1!1"))
                                    ("2" (inst + "j2!1"))))))
                                ("2"
                                 (replace -10)
                                 (replace -11 1 rl)
                                 (apply-extensionality :hide? t)
                                 (case-replace "IUnion(B!1)(x!2)")
                                 (("1"
                                   (expand "IUnion" (-1 1))
                                   (skosimp)
                                   (inst -2 "i!1")
                                   (flatten)
                                   (replace -3 -1)
                                   (inst + "i!1")
                                   (expand "IUnion")
                                   (propax))
                                  ("2"
                                   (replace 1 2)
                                   (assert)
                                   (expand "IUnion" (-1 1))
                                   (skosimp)
                                   (inst - "i!1")
                                   (flatten)
                                   (inst + "i!1")
                                   (replace -3)
                                   (expand "IUnion")
                                   (propax))))
                                ("3"
                                 (typepred "mu!1")
                                 (expand "measure?")
                                 (flatten)
                                 (expand "measure_countably_additive?")
                                 (inst
                                  -
                                  "single_index(lambda (i,j:nat): FF(i)(j))")
                                 (("1"
                                   (case-replace
                                    "IUnion(single_index(LAMBDA (i, j: nat): FF(i)(j)))=Y!2")
                                   (("1"
                                     (assert)
                                     (hide -1)
                                     (lemma
                                      "double_x_sum"
                                      ("U"
                                       "lambda (i,j:nat): mu!1(FF(i)(j))"))
                                     (assert)
                                     (name-replace
                                      "RHS"
                                      "x_sum(LAMBDA (i_1: nat):
                                                         x_sum(LAMBDA (j_1: nat): mu!1(FF(i_1)(j_1))))")
                                     (lemma
                                      "x_sum_eq"
                                      ("S"
                                       "single_index(LAMBDA (i, j: nat): mu!1(FF(i)(j)))"
                                       "T"
                                       "mu!1 o single_index(LAMBDA (i, j: nat): FF(i)(j))"))
                                     (split -1)
                                     (("1"
                                       (hide-all-but (-1 -2 -4 1))
                                       (expand "x_eq")
                                       (flatten)
                                       (assert)
                                       (flatten)
                                       (assert))
                                      ("2"
                                       (hide-all-but 1)
                                       (skosimp)
                                       (assert)
                                       (expand "o ")
                                       (expand "single_index")
                                       (expand "x_eq")
                                       (propax))))
                                    ("2"
                                     (hide -2 -1 2)
                                     (apply-extensionality :hide? t)
                                     (replace -11)
                                     (replace -10)
                                     (case-replace "IUnion(B!1)(x!2)")
                                     (("1"
                                       (expand "IUnion" (-1 1))
                                       (skosimp)
                                       (inst - "i!1")
                                       (flatten)
                                       (replace -3 -1)
                                       (expand "IUnion")
                                       (skosimp)
                                       (expand "single_index")
                                       (inst + "double_index_n(i!1,i!2)")
                                       (lemma
                                        "double_index_ij_n"
                                        ("i" "i!1" "j" "i!2"))
                                       (flatten)
                                       (assert))
                                      ("2"
                                       (assert)
                                       (expand "IUnion" (-1 1))
                                       (skolem - "n!1")
                                       (expand "single_index")
                                       (inst -2 "double_index_i(n!1)")
                                       (flatten)
                                       (inst + "double_index_i(n!1)")
                                       (replace -3)
                                       (expand "IUnion")
                                       (inst
                                        +
                                        "double_index_j(n!1)"))))))
                                  ("2"
                                   (hide 2)
                                   (split)
                                   (("1"
                                     (skosimp)
                                     (expand "single_index")
                                     (propax))
                                    ("2"
                                     (expand
                                      "disjoint_indexed_measurable?")
                                     (expand "disjoint?" 1)
                                     (expand "single_index")
                                     (skolem + ("n!1" "n!2"))
                                     (flatten)
                                     (case-replace
                                      "double_index_i(n!2)=double_index_i(n!1)")
                                     (("1"
                                       (inst - "double_index_i(n!1)")
                                       (flatten)
                                       (expand "disjoint?" -3)
                                       (inst
                                        -3
                                        "double_index_j(n!1)"
                                        "double_index_j(n!2)")
                                       (assert)
                                       (lemma
                                        "double_index_n_ij"
                                        ("n" "n!1"))
                                       (lemma
                                        "double_index_n_ij"
                                        ("n" "n!2"))
                                       (assert))
                                      ("2"
                                       (expand "disjoint?" -7)
                                       (inst
                                        -7
                                        "double_index_i(n!1)"
                                        "double_index_i(n!2)")
                                       (assert)
                                       (inst-cp -2 "double_index_i(n!2)")
                                       (inst -2 "double_index_i(n!1)")
                                       (flatten)
                                       (replace -3)
                                       (replace -6)
                                       (hide-all-but (-12 1 2 3))
                                       (expand "disjoint?")
                                       (expand "intersection")
                                       (expand "empty?")
                                       (expand "member")
                                       (skosimp*)
                                       (inst - "x!2")
                                       (expand "IUnion")
                                       (split)
                                       (("1"
                                         (inst + "double_index_j(n!1)"))
                                        ("2"
                                         (inst
                                          +
                                          "double_index_j(n!2)"))))))))))
                                ("4"
                                 (skosimp)
                                 (inst -1 "i!1")
                                 (flatten)
                                 (split)
                                 (("1"
                                   (hide-all-but (-2 -5 1))
                                   (inst - "i!1")
                                   (expand "subset?")
                                   (skosimp)
                                   (expand "member")
                                   (inst - "x!2")
                                   (replace -2)
                                   (split -3)
                                   (("1"
                                     (expand "II")
                                     (expand "intersection")
                                     (expand "member")
                                     (flatten))
                                    ("2" (expand "IUnion") (propax))))
                                  ("2"
                                   (inst + "NN(i!1)")
                                   (skosimp)
                                   (inst -4 "j!1")
                                   (flatten)
                                   (assert))))))
                              ("2"
                               (hide 2)
                               (skosimp)
                               (hide -1 -2 -3)
                               (inst - "n!1")
                               (expand "NN")
                               (expand "FF")
                               (expand "FN")
                               (lemma "choose_member"
                                ("a"
                                 "{(E: disjoint_indexed_measurable), (j: nat) |
                                                        disjoint?(E) AND
                                                         B!1(n!1) = IUnion(E) AND
                                                          (FORALL i:
                                                             (i < j => member(E(i), A)) AND
                                                              (i >= j => empty?(E(i))))}"))
                               (expand "nonempty?")
                               (name-replace "CC"
                                "choose({(E: disjoint_indexed_measurable), (j: nat) |
                                                        disjoint?(E) AND
                                                         B!1(n!1) = IUnion(E) AND
                                                          (FORALL i:
                                                             (i < j => member(E(i), A)) AND
                                                              (i >= j => empty?(E(i))))})")
                               (("1"
                                 (split)
                                 (("1" (expand "member") (propax))
                                  ("2"
                                   (hide-all-but (-1 2))
                                   (expand "empty?" -1 1)
                                   (expand "empty?" 1 1)
                                   (expand "member")
                                   (propax))))
                                ("2" (assert))))))
                            ("2" (propax))))
                          ("2"
                           (hide 2)
                           (skosimp)
                           (expand "nonempty?")
                           (expand "empty?" -1 1)
                           (expand "member")
                           (inst -3 "n!1")
                           (expand "finite_disjoint_union?" -3)
                           (skosimp)
                           (inst -1 "(E!1,n!2)")
                           (("1"
                             (assert)
                             (skosimp)
                             (inst -5 "i!1")
                             (flatten)
                             (assert))
                            ("2"
                             (expand "disjoint_indexed_measurable?")
                             (assert)
                             (skosimp)
                             (inst -4 "x1!1")
                             (assert)
                             (flatten)
                             (assert)
                             (case-replace "E!1(x1!1)=emptyset")
                             (("1" (rewrite "A_empty"))
                              ("2"
                               (apply-extensionality :hide? t)
                               (expand "emptyset")
                               (expand "empty?")
                               (inst -5 "x!2")
                               (assert))))))))
                        ("2"
                         (hide 2)
                         (skosimp)
                         (case-replace "n!1=0")
                         (("1" (expand "subset?") (skosimp) (assert))
                          ("2"
                           (inst -6 "n!1-1")
                           (("1"
                             (assert)
                             (lemma "difference_subset"
                              ("a" "II(n!1)" "b" "IUnion(n!1 - 1, II)"))
                             (assert))
                            ("2" (assert))))))))
                      ("2"
                       (hide 2)
                       (lemma "NAT_induction"
                        ("p"
                         "lambda (n: nat): finite_disjoint_union?(A)(B!1(n))"))
                       (split)
                       (("1" (assert))
                        ("2"
                         (hide 2)
                         (skosimp)
                         (case-replace "j!1=0")
                         (("1"
                           (replace -6)
                           (expand "finite_disjoint_union?" 1)
                           (inst +
                            "lambda (i:nat): if i=0 then II(0) else emptyset endif"
                            "1")
                           (split)
                           (("1" (hide-all-but 1) (grind))
                            ("2"
                             (apply-extensionality :hide? t)
                             (expand "IUnion")
                             (expand "emptyset")
                             (case-replace "II(0)(x!2)")
                             (("1" (inst + "0")) ("2" (assert))))
                            ("3"
                             (skosimp)
                             (expand "member")
                             (inst -3 "0")
                             (replace -3)
                             (rewrite "A_empty")
                             (case-replace "i!1 = 0")
                             (("1" (flatten) (assert))
                              ("2"
                               (assert)
                               (expand "empty?")
                               (skosimp)
                               (expand "emptyset")
                               (assert))))))
                          ("2"
                           (case "j!1>0")
                           (("1"
                             (hide 1)
                             (inst -7 "j!1-1")
                             (("1"
                               (assert)
                               (replace -7)
                               (inst -5 "j!1-1")
                               (replace -5 * rl)
                               (case "forall (n:nat): n < j!1 => finite_disjoint_union?(A)(IUnion(n,B!1))")
                               (("1"
                                 (inst - "j!1-1")
                                 (assert)
                                 (lemma
                                  "A_difference_union"
                                  ("a"
                                   "II(j!1)"
                                   "b"
                                   "IUnion(j!1 - 1, B!1)"))
                                 (assert)
                                 (inst -4 "j!1"))
                                ("2"
                                 (hide 2)
                                 (induct "n")
                                 (("1"
                                   (flatten)
                                   (rewrite "IUnion_0_def")
                                   (expand "finite_disjoint_union?")
                                   (inst
                                    +
                                    "lambda (i:nat): if i=0 then II(0) else emptyset endif"
                                    "1")
                                   (replace -7)
                                   (split)
                                   (("1" (grind))
                                    ("2"
                                     (apply-extensionality :hide? t)
                                     (expand "IUnion")
                                     (expand "emptyset")
                                     (case-replace "II(0)(x!2)")
                                     (("1" (inst + "0")) ("2" (assert))))
                                    ("3"
                                     (skosimp*)
                                     (expand "member")
                                     (inst -4 "0")
                                     (assert)
                                     (case-replace "i!1=0")
                                     (("1" (flatten) (assert))
                                      ("2"
                                       (assert)
                                       (expand "emptyset")
                                       (expand "empty?")
                                       (skosimp)
                                       (expand "member")
                                       (propax))))))
                                  ("2"
                                   (skosimp*)
                                   (rewrite "IUnion_n_def")
                                   (assert)
                                   (inst - "1+j!2")
                                   (assert)
                                   (hide-all-but (-1 -4 -6 1))
                                   (expand "finite_disjoint_union?")
                                   (skosimp*)
                                   (name-replace "AA" "IUnion(j!2, B!1)")
                                   (name-replace "BB" "B!1(1 + j!2)")
                                   (inst
                                    +
                                    "lambda (i:nat): if i < n!1 then E!1(i) else E!2(i-n!1) endif"
                                    "n!1+n!2")
                                   (("1"
                                     (case "disjoint?(AA,BB)")
                                     (("1"
                                       (split)
                                       (("1"
                                         (expand "disjoint?")
                                         (skosimp)
                                         (case-replace "i!1 < n!1")
                                         (("1"
                                           (case-replace "j!3 < n!1")
                                           (("1"
                                             (inst - "i!1" "j!3")
                                             (assert))
                                            ("2"
                                             (assert)
                                             (expand "disjoint?")
                                             (expand "intersection")
                                             (expand "empty?")
                                             (expand "member")
                                             (skosimp)
                                             (inst - "x!2")
                                             (replace -5)
                                             (split)
                                             (("1"
                                               (expand "IUnion")
                                               (inst + "i!1"))
                                              ("2"
                                               (replace -8)
                                               (expand "IUnion")
                                               (inst + "j!3-n!1"))))))
                                          ("2"
                                           (case-replace "j!3 < n!1")
                                           (("1"
                                             (assert)
                                             (expand "disjoint?")
                                             (expand "intersection")
                                             (expand "empty?")
                                             (expand "member")
                                             (skosimp)
                                             (inst -4 "x!2")
                                             (replace -5)
                                             (replace -8)
                                             (expand "IUnion")
                                             (split)
                                             (("1" (inst + "j!3"))
                                              ("2" (inst + "i!1-n!1"))))
                                            ("2"
                                             (assert)
                                             (inst
                                              -5
                                              "i!1 - n!1"
                                              "j!3 - n!1")
                                             (assert))))))
                                        ("2"
                                         (apply-extensionality :hide? t)
                                         (("1"
                                           (expand "union")
                                           (expand "member")
                                           (case-replace "AA(x!2)")
                                           (("1"
                                             (replace -4 -1)
                                             (expand "IUnion")
                                             (skosimp)
                                             (inst + "i!1")
                                             (assert)
                                             (inst -5 "i!1")
                                             (flatten)
                                             (case-replace "i!1<n!1")
                                             (assert)
                                             (expand "empty?")
                                             (inst -6 "x!2")
                                             (assert))
                                            ("2"
                                             (assert)
                                             (case-replace "BB(x!2)")
                                             (("1"
                                               (replace -7)
                                               (expand "IUnion")
                                               (skosimp)
                                               (inst + "i!1+n!1")
                                               (assert))
                                              ("2"
                                               (assert)
                                               (replace -4)
                                               (replace -7)
                                               (expand "IUnion")
                                               (skosimp)
                                               (case-replace "i!1<n!1")
                                               (("1" (inst 2 "i!1"))
                                                ("2"
                                                 (assert)
                                                 (inst
                                                  2
                                                  "i!1-n!1"))))))))
                                          ("2" (skosimp) (assert))))
                                        ("3"
                                         (skosimp*)
                                         (expand "member")
                                         (case-replace "i!1<n!1")
                                         (("1"
                                           (assert)
                                           (inst -5 "i!1")
                                           (flatten)
                                           (assert))
                                          ("2"
                                           (assert)
                                           (inst -7 "i!1-n!1")
                                           (flatten)
                                           (assert)
                                           (split 2)
                                           (("1" (flatten) (assert))
                                            ("2"
                                             (flatten)
                                             (assert))))))))
                                      ("2"
                                       (hide 2)
                                       (expand "AA")
                                       (expand "BB")
                                       (hide-all-but (-7 1))
                                       (expand "disjoint?")
                                       (expand "disjoint?")
                                       (expand "IUnion")
                                       (expand "image")
                                       (expand "Union")
                                       (expand "intersection")
                                       (expand "empty?")
                                       (expand "member")
                                       (skosimp*)
                                       (typepred "a!1")
                                       (skolem - "j!3")
                                       (inst - "j!3" "1+j!2")
                                       (assert)
                                       (inst - "x!2")
                                       (assert))))
                                    ("2" (skosimp) (assert))))))))
                              ("2" (assert))))
                            ("2" (assert))))))))))
                    ("2"
                     (hide-all-but 1)
                     (skosimp)
                     (expand "II")
                     (rewrite "A_intersection"))))
                  ("2"
                   (apply-extensionality :hide? t)
                   (hide -1 2)
                   (expand "II")
                   (expand "IUnion")
                   (expand "intersection")
                   (expand "subset?")
                   (expand "member")
                   (inst - "x!2")
                   (case-replace "Y!2(x!2)")
                   (assert))))))
              ("2"
               (hide 2)
               (split)
               (("1"
                 (expand "nonempty?")
                 (expand "empty?")
                 (inst - "x!1`2")
                 (expand "member")
                 (inst + "x!1")
                 (assert))
                ("2"
                 (expand "bounded_below?")
                 (inst + "0")
                 (expand "lower_bound?")
                 (skosimp)
                 (typepred "s!1")
                 (skosimp)
                 (assert))))))))
          ("2"
           (hide-all-but (-1 1))
           (skosimp)
           (case "x_le(mu!1(Y!2), x_sum(mu!1 o lambda (n:nat): intersection(Y!2,I!1(n))))")
           (("1"
             (lemma "x_sum_le"
              ("S"
               "mu!1 o (LAMBDA (n: nat): intersection(Y!2, I!1(n)))"
               "T"
               "mu!1 o I!1"))
             (split)
             (("1"
               (name-replace "LHS" "mu!1(Y!2)")
               (name-replace "MID"
                "x_sum(mu!1 o (LAMBDA (n: nat): intersection(Y!2, I!1(n))))")
               (name-replace "RHS" "x_sum(mu!1 o I!1)")
               (expand "x_le")
               (flatten)
               (assert)
               (flatten)
               (assert)
               (flatten)
               (assert))
              ("2"
               (hide-all-but 1)
               (skosimp)
               (expand "o ")
               (lemma "generalized_measure_monotone"
                ("mu"
                 "mu!1"
                 "a"
                 "intersection(Y!2, I!1(i!1))"
                 "b"
                 "I!1(i!1)"))
               (assert)
               (expand "intersection")
               (expand "subset?")
               (expand "member")
               (skosimp))))
            ("2"
             (hide 2)
             (inst - "LAMBDA (n: nat): intersection(Y!2, I!1(n))")
             (("1"
               (case-replace
                "IUnion(LAMBDA (n: nat): intersection(Y!2, I!1(n)))=Y!2")
               (("1" (assert))
                ("2"
                 (hide-all-but (-1 1))
                 (apply-extensionality :hide? t)
                 (case-replace "Y!2(x!1)")
                 (("1"
                   (expand "subset?")
                   (inst - "x!1")
                   (expand "member")
                   (assert)
                   (expand "IUnion")
                   (skosimp)
                   (inst + "i!1")
                   (expand "intersection")
                   (assert))
                  ("2"
                   (assert)
                   (expand "IUnion")
                   (skosimp)
                   (expand "intersection")
                   (flatten)
                   (assert))))))
              ("2" (skosimp) (rewrite "A_intersection"))))
            ("3" (skosimp) (rewrite "A_intersection"))))))
        ("2"
         (hide-all-but 1)
         (lemma "measure_subadditive" ("mu" "mu!1"))
         (propax))))))
    ("2"
     (hide 2)
     (skosimp)
     (expand "x_le")
     (flatten)
     (expand "ast")
     (assert)
     (expand "x_inf")
     (case-replace
      "FORALL (x:
                          ({z:extended_nnreal |
                              EXISTS I:
                                x_eq(x_sum(mu!1 o I), z) AND
                                 subset?(Y!1, IUnion(I))})):
                  NOT x`1")
     (("1"
       (inst - "mu!1(Y!1)")
       (inst + "lambda (n:nat): if n=0 then Y!1 else emptyset[T] endif")
       (("1"
         (split)
         (("1"
           (typepred "mu!1")
           (expand "measure?")
           (flatten)
           (expand "measure_empty?")
           (expand "o")
           (replace -1)
           (expand "x_eq")
           (expand "x_sum")
           (assert)
           (replace -3)
           (assert)
           (lemma "zero_tail_series_conv"
            ("n"
             "0"
             "a"
             "LAMBDA (i:nat):
                                          IF i = 0 THEN mu!1(Y!1)`2 ELSE 0 ENDIF"))
           (lemma "zero_tail_series_limit"
            ("n"
             "0"
             "a"
             "LAMBDA (i:nat):
                                          IF i = 0 THEN mu!1(Y!1)`2 ELSE 0 ENDIF"))
           (case-replace
            "FORALL (m:nat):
                     0 < m =>
                      (LAMBDA (i: nat): IF i = 0 THEN mu!1(Y!1)`2 ELSE 0 ENDIF)(m) = 0")
           (("1"
             (replace -2)
             (replace -3)
             (expand "series")
             (expand "sigma")
             (assert))
            ("2" (hide-all-but 1) (skosimp) (assert))))
          ("2"
           (expand "subset?")
           (expand "member")
           (skosimp)
           (expand "IUnion")
           (inst + "0"))))
        ("2" (skosimp) (rewrite "A_empty"))))
      ("2"
       (replace 1)
       (skosimp)
       (typepred
        "glb({z_1: real |
                     EXISTS (x:extended_nnreal):
                       (EXISTS I:
                          x_eq(x_sum(mu!1 o I), x) AND subset?(Y!1, IUnion(I)))
                        AND x`1 AND x`2 = z_1})")
       (("1"
         (name-replace "GLB"
          "glb({z_1: real |
                       EXISTS (x:extended_nnreal):
                         (EXISTS I:
                            x_eq(x_sum(mu!1 o I), x) AND subset?(Y!1, IUnion(I)))
                          AND x`1 AND x`2 = z_1})")
         (case "mu!1(Y!1)`2<GLB")
         (("1"
           (hide 1)
           (expand "greatest_lower_bound?")
           (flatten)
           (expand "lower_bound?")
           (typepred "Y!1")
           (hide -4)
           (inst - "mu!1(Y!1)`2")
           (("1" (assert))
            ("2"
             (inst + "mu!1(Y!1)")
             (assert)
             (inst +
              "lambda (n:nat): if n=0 then Y!1 else emptyset[T] endif")
             (("1"
               (split)
               (("1"
                 (expand "o")
                 (typepred "mu!1")
                 (expand "measure?")
                 (flatten)
                 (expand "measure_empty?")
                 (replace -1)
                 (expand "x_sum")
                 (expand "x_eq")
                 (lift-if)
                 (assert)
                 (lemma "zero_tail_series_conv"
                  ("n"
                   "0"
                   "a"
                   "LAMBDA (i:nat):
                                                IF i = 0 THEN mu!1(Y!1)`2 ELSE 0 ENDIF"))
                 (lemma "zero_tail_series_limit"
                  ("n"
                   "0"
                   "a"
                   "LAMBDA (i:nat):
                                                IF i = 0 THEN mu!1(Y!1)`2 ELSE 0 ENDIF"))
                 (case-replace
                  "FORALL (m: nat):
                          0 < m =>
                           (LAMBDA (i: nat): IF i = 0 THEN mu!1(Y!1)`2 ELSE 0 ENDIF)(m) = 0")
                 (("1"
                   (replace -2)
                   (replace -3)
                   (expand "series")
                   (expand "sigma")
                   (assert))
                  ("2" (hide-all-but 1) (skosimp) (assert))))
                ("2"
                 (expand "subset?")
                 (expand "member")
                 (skosimp)
                 (expand "IUnion")
                 (inst + "0"))))
              ("2" (skosimp) (rewrite "A_empty"))))))
          ("2" (assert))))
        ("2"
         (hide 2)
         (split)
         (("1"
           (expand "nonempty?")
           (expand "empty?")
           (inst - "x!1`2")
           (expand "member")
           (inst + "x!1")
           (assert))
          ("2"
           (expand "bounded_below?")
           (inst + "0")
           (expand "lower_bound?")
           (skosimp)
           (typepred "s!1")
           (skosimp)
           (assert))))))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: ast_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "x_add")
   (case-replace "ast(mu!1)(X!1)`1")
   (("1"
     (expand "x_le")
     (expand "ast")
     (expand "x_inf")
     (case-replace
      "FORALL (x:
                         ({z:extended_nnreal |
                             EXISTS I:
                               x_eq(x_sum(mu!1 o I), z) AND
                                subset?(X!1, IUnion(I))})):
                 NOT x`1")
     (replace 1)
     (skosimp)
     (typepred
      "glb({z_1: real |
                         EXISTS (x:extended_nnreal):
                           (EXISTS I:
                              x_eq(x_sum(mu!1 o I), x) AND
                               subset?(X!1, IUnion(I)))
                            AND x`1 AND x`2 = z_1})")
     (("1"
       (name-replace "GLB"
        "glb({z_1: real |
                           EXISTS (x:extended_nnreal):
                             (EXISTS I:
                                x_eq(x_sum(mu!1 o I), x) AND
                                 subset?(X!1, IUnion(I)))
                              AND x`1 AND x`2 = z_1})")
       (expand "greatest_lower_bound?")
       (flatten)
       (typepred "epsilon!1")
       (inst -4 "GLB+epsilon!1")
       (split -4)
       (("1" (assert))
        ("2"
         (expand "lower_bound?")
         (hide -3)
         (skosimp)
         (case "s!1<GLB + epsilon!1")
         (("1"
           (hide 1)
           (typepred "s!1")
           (skosimp)
           (skosimp)
           (inst + "I!1")
           (expand "x_eq")
           (flatten)
           (assert))
          ("2" (assert))))))
      ("2"
       (hide 2)
       (split)
       (("1"
         (expand "nonempty?")
         (expand "empty?")
         (inst - "x!1`2")
         (assert)
         (inst + "x!1")
         (assert))
        ("2"
         (expand "bounded_below?")
         (inst + "0")
         (expand "lower_bound?")
         (skosimp)
         (typepred "s!1")
         (skosimp)
         (assert))))))
    ("2"
     (replace 1)
     (expand "x_le")
     (hide 1)
     (inst + "lambda (n:nat): fullset[T]")
     (("1"
       (expand "subset?")
       (expand "member")
       (expand "fullset")
       (expand "IUnion")
       (propax))
      ("2" (rewrite "A_fullset"))))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: ast_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "mu!1")
   (expand "outer_measure?")
   (name "F"
         "LAMBDA X:
                                          x_inf({z
                                                 |
                                                 EXISTS
                                                 I:
                                                 x_eq
                                                 (x_sum
                                                  (o[nat, (A), extended_nnreal]
                                                   (mu!1, I)),
                                                  z)
                                                 AND
                                                 subset?[T](X, IUnion[nat, T](I))})")
   (replace -1)
   (case-replace "om_empty?(F)")
   (("1"
     (case-replace "om_increasing?(F)")
     (("1"
       (expand "om_countably_subadditive?")
       (skosimp)
       (hide -3)
       (case "forall (epsilon:posreal): x_lt(F(IUnion(X!1)), x_add((TRUE,epsilon),x_sum(F o X!1)))")
       (("1"
         (expand "x_le")
         (flatten)
         (name-replace "LHS" "F(IUnion(X!1))")
         (name-replace "RHS" "x_sum(F o X!1)")
         (assert)
         (expand "x_add")
         (expand "x_lt")
         (inst-cp - "1")
         (flatten)
         (assert)
         (hide -3)
         (inst - "LHS`2-RHS`2")
         (assert))
        ("2"
         (hide 2)
         (skosimp)
         (case "x_lt(F(IUnion(X!1)),
                          x_sum(LAMBDA (n: nat):
                                  x_add((TRUE, epsilon!1 / expt(2, n + 1)), F(X!1(n)))))")
         (("1"
           (case "x_eq(x_sum(lambda (n:nat): x_add((TRUE,epsilon!1/expt(2,n+1)),F(X!1(n)))),x_add((TRUE, epsilon!1), x_sum(F o X!1)))")
           (("1"
             (expand "x_eq")
             (expand "x_lt")
             (flatten)
             (assert)
             (flatten)
             (assert))
            ("2"
             (hide 2 -1)
             (expand "x_add")
             (expand "x_sum")
             (expand "x_eq")
             (expand "o ")
             (lift-if)
             (case-replace "FORALL (i:nat): F(X!1(i))`1")
             (("1"
               (case "convergence(series(lambda (i:nat): epsilon!1 / expt(2, 1 + i)),epsilon!1)")
               (("1"
                 (case-replace
                  "convergence_sequences.convergent?(series(LAMBDA (i:nat): F(X!1(i))`2))")
                 (("1"
                   (lemma "convergence_sequences.limit_lemma"
                    ("v" "series(LAMBDA (i: nat): F(X!1(i))`2)"))
                   (("1"
                     (hide -2)
                     (lemma "cnv_seq_sum"
                      ("s1"
                       "series(LAMBDA (i: nat): F(X!1(i))`2)"
                       "l1"
                       "convergence_sequences.limit(series(LAMBDA (i:nat): F(X!1(i))`2))"
                       "s2"
                       "series(LAMBDA (i: nat): epsilon!1 / expt(2, 1 + i))"
                       "l2"
                       "epsilon!1"))
                     (assert)
                     (case-replace
                      "series(LAMBDA (i:nat):
                                                IF F(X!1(i))`1
                                                  THEN epsilon!1 / expt(2, 1 + i) + F(X!1(i))`2
                                                ELSE 0
                                                ENDIF)=series(LAMBDA (i: nat): F(X!1(i))`2) +
                                         series(LAMBDA (i: nat): epsilon!1 / expt(2, 1 + i))")
                     (("1"
                       (hide -1)
                       (name-replace "S1"
                        "series(LAMBDA (i: nat): F(X!1(i))`2)")
                       (name-replace "S2"
                        "series(LAMBDA (i: nat): epsilon!1 / expt(2, 1 + i))")
                       (case-replace
                        "convergence_sequences.convergent?(S1 + S2)")
                       (("1"
                         (rewrite "convergence_sequences.limit_def" -2
                          :dir rl)
                         (("1"
                           (assert)
                           (replace -2 1 rl)
                           (expand "limit")
                           (expand "+ ")
                           (propax))
                          ("2" (expand "+ ") (propax))))
                        ("2"
                         (hide 2)
                         (expand "convergence_sequences.convergent?")
                         (inst +
                          "convergence_sequences.limit(S1) + epsilon!1")
                         (expand "+ ")
                         (propax))))
                      ("2"
                       (hide-all-but (-4 1))
                       (expand "series")
                       (apply-extensionality :hide? t)
                       (expand "+")
                       (rewrite "sigma_sum")
                       (case-replace
                        "(LAMBDA (i: nat):
                                      IF F(X!1(i))`1 THEN epsilon!1 / expt(2, 1 + i) + F(X!1(i))`2
                                      ELSE 0
                                      ENDIF)
                               =LAMBDA (i_1: nat):
                                       epsilon!1 / expt(2, 1 + i_1) + F(X!1(i_1))`2")
                       (hide 2)
                       (apply-extensionality :hide? t)
                       (inst - "x!2")
                       (assert))))
                    ("2" (propax))))
                  ("2"
                   (replace 1)
                   (assert)
                   (case-replace
                    "convergence_sequences.convergent?(series(LAMBDA (i:nat):
                                                  IF F(X!1(i))`1
                                                    THEN epsilon!1 / expt(2, 1 + i)
                                                         +
                                                         F(X!1(i))`2
                                                  ELSE 0
                                                  ENDIF))")
                   (("1"
                     (lemma "convergent_diff"
                      ("s1"
                       "series(LAMBDA (i: nat):
                                                 IF F(X!1(i))`1
                                                   THEN epsilon!1 / expt(2, 1 + i) + F(X!1(i))`2
                                                 ELSE 0
                                                 ENDIF)"
                       "s2"
                       "series(LAMBDA (i: nat): epsilon!1 / expt(2, 1 + i))"))
                     (assert)
                     (split)
                     (("1"
                       (expand "-" -1)
                       (expand "series" (-1 1))
                       (case-replace
                        "(LAMBDA (x: nat):
                                           sigma(0, x,
                                                 LAMBDA (i: nat):
                                                   IF F(X!1(i))`1
                                                     THEN epsilon!1 / expt(2, 1 + i) + F(X!1(i))`2
                                                   ELSE 0
                                                   ENDIF)
                                            -
                                            sigma(0, x,
                                                  LAMBDA (i: nat): epsilon!1 / expt(2, 1 + i)))=(LAMBDA (n: nat): sigma(0, n, LAMBDA (i: nat): F(X!1(i))`2))")
                       (apply-extensionality :hide? t)
                       (hide-all-but (-4 1))
                       (rewrite "sigma_minus")
                       (case-replace
                        "(LAMBDA (i_1: nat):
                                      IF F(X!1(i_1))`1
                                        THEN epsilon!1 / expt(2, 1 + i_1) + F(X!1(i_1))`2
                                      ELSE 0
                                      ENDIF
                                       - epsilon!1 / expt(2, 1 + i_1))=LAMBDA (i: nat): F(X!1(i))`2")
                       (apply-extensionality :hide? t)
                       (inst - "x!2")
                       (assert))
                      ("2"
                       (hide 2)
                       (expand "convergence_sequences.convergent?")
                       (inst + "epsilon!1"))))
                    ("2" (assert))))))
                ("2"
                 (hide-all-but 1)
                 (lemma "geometric_series" ("x" "1/2"))
                 (split)
                 (("1"
                   (expand "geometric")
                   (expand "^")
                   (case-replace "1 / (1 - 1 / 2)=2")
                   (("1"
                     (hide -1)
                     (lemma "series_scal"
                      ("a"
                       "LAMBDA (n:nat): expt(1 / 2, n)"
                       "c"
                       "epsilon!1/2"))
                     (case-replace
                      "(LAMBDA (n_1: nat):
                                      epsilon!1 / 2 * (LAMBDA (n: nat): expt(1 / 2, n))(n_1))=(LAMBDA (i: nat): epsilon!1 / expt(2, 1 + i))")
                     (("1"
                       (hide -1)
                       (name-replace "S1"
                        "series((LAMBDA (i: nat): epsilon!1 / expt(2, 1 + i)))")
                       (lemma "cnv_seq_scal"
                        ("s1"
                         "series(LAMBDA (n:nat): expt(1 / 2, n))"
                         "l1"
                         "2"
                         "a"
                         "epsilon!1/2"))
                       (assert))
                      ("2"
                       (apply-extensionality :hide? t)
                       (hide-all-but 1)
                       (expand "expt" 1 2)
                       (rewrite "expt_of_inv")
                       (assert))))
                    ("2" (hide-all-but 1) (grind))))
                  ("2" (hide-all-but 1) (grind))))))
              ("2" (replace 1 2) (propax))))))
          ("2"
           (hide 2)
           (case "forall (x:(A)): x_le(F(x),mu!1(x))")
           (("1"
             (case "FORALL (n: nat):
                           nonempty?({I |
                                        subset?(X!1(n), IUnion(I)) &
                                         x_lt(x_sum(mu!1 o I),
                                              x_add((TRUE, epsilon!1 / expt(2, n + 1)),
                                                    F(X!1(n))))})")
             (("1"
               (name "II"
                     "lambda (n:nat): choose({I |
                                          subset?(X!1(n), IUnion(I)) &
                                           x_lt(x_sum(mu!1 o I),
                                                x_add((TRUE, epsilon!1 / expt(2, n + 1)),
                                                      F(X!1(n))))})")
               (("1"
                 (hide -1)
                 (lemma "x_sum_lt"
                  ("S"
                   "lambda (n:nat): x_sum(mu!1 o II(n))"
                   "T"
                   "LAMBDA (n: nat):
                                      x_add((TRUE, epsilon!1 / expt(2, n + 1)), F(X!1(n)))"))
                 (split -1)
                 (("1"
                   (case "x_le(F(IUnion(X!1)),x_sum(LAMBDA (n: nat): x_sum(mu!1 o II(n))))")
                   (("1"
                     (name-replace "LHS" "F(IUnion(X!1))")
                     (name-replace "RHS"
                      "x_sum(LAMBDA (n: nat):
                                         x_add((TRUE, epsilon!1 / expt(2, n + 1)), F(X!1(n))))")
                     (name-replace "DRL"
                      "x_sum(LAMBDA (n: nat): x_sum(mu!1 o II(n)))")
                     (hide-all-but (-1 -2 1))
                     (grind))
                    ("2"
                     (hide -1 2)
                     (hide -1)
                     (lemma "double_x_sum"
                      ("U" "lambda (i,j:nat): mu!1(II(i)(j))"))
                     (assert)
                     (expand "o" 1)
                     (name-replace "RHS"
                      "x_sum(LAMBDA (n: nat): x_sum(LAMBDA (x: nat): mu!1(II(n)(x))))")
                     (case "x_le(F(IUnion(X!1)),x_sum(single_index(LAMBDA (i, j: nat): mu!1(II(i)(j)))))")
                     (("1"
                       (name-replace "DRL"
                        "x_sum(single_index(LAMBDA (i, j: nat): mu!1(II(i)(j))))")
                       (name-replace "LHS" "F(IUnion(X!1))")
                       (hide-all-but (-1 -2 1))
                       (grind))
                      ("2"
                       (hide -1 2)
                       (expand "x_le" 1)
                       (expand "F" 1)
                       (expand "x_inf")
                       (flatten)
                       (replace -1)
                       (lift-if)
                       (assert)
                       (prop)
                       (("1"
                         (inst -
                          "x_sum(single_index(LAMBDA (i, j: nat): mu!1(II(i)(j))))")
                         (expand "o")
                         (expand "single_index")
                         (inst +
                          "lambda (n:nat): II(double_index_i(n))(double_index_j(n))")
                         (split)
                         (("1"
                           (name-replace "SUM"
                            "x_sum(LAMBDA (x: nat):
                                               mu!1(II(double_index_i(x))(double_index_j(x))))")
                           (hide-all-but (-1 1))
                           (grind))
                          ("2"
                           (hide-all-but 1)
                           (expand "subset?")
                           (expand "member")
                           (expand "IUnion")
                           (skosimp)
                           (skosimp)
                           (typepred "II(i!1)")
                           (hide -2)
                           (expand "subset?")
                           (inst - "x!1")
                           (expand "member")
                           (assert)
                           (expand "IUnion")
                           (skosimp)
                           (inst + "double_index_n(i!1,i!2)")
                           (lemma "double_index_ij_n"
                            ("i" "i!1" "j" "i!2"))
                           (flatten)
                           (replace -1)
                           (replace -2)
                           (propax))))
                        ("2"
                         (skosimp)
                         (typepred
                          "glb({z_1: real |
                                       EXISTS (x:extended_nnreal):
                                         (EXISTS I:
                                            x_eq(x_sum(o[nat, (A), extended_nnreal](mu!1, I)), x) AND
                                             subset?[T](IUnion(X!1), IUnion[nat, T](I)))
                                          AND x`1 AND x`2 = z_1})")
                         (("1"
                           (name-replace "GLB"
                            "glb({z_1: real |
                                         EXISTS (x:extended_nnreal):
                                           (EXISTS I:
                                              x_eq(x_sum(o[nat, (A), extended_nnreal](mu!1, I)), x) AND
                                               subset?[T](IUnion(X!1), IUnion[nat, T](I)))
                                            AND x`1 AND x`2 = z_1})")
                           (expand "greatest_lower_bound?")
                           (flatten)
                           (expand "lower_bound?")
                           (inst -
                            "x_sum(single_index(LAMBDA (i, j: nat): mu!1(II(i)(j))))`2")
                           (inst +
                            "x_sum(single_index(LAMBDA (i, j: nat): mu!1(II(i)(j))))")
                           (replace -3)
                           (hide -1 2)
                           (expand "single_index")
                           (inst +
                            "LAMBDA (n:nat): II(double_index_i(n))(double_index_j(n))")
                           (split)
                           (("1"
                             (expand "o")
                             (name-replace "SUM"
                              "x_sum(LAMBDA (x: nat):
                                                 mu!1(II(double_index_i(x))(double_index_j(x))))")
                             (hide-all-but (-1 1))
                             (grind))
                            ("2"
                             (expand "subset?")
                             (hide-all-but 1)
                             (expand "member")
                             (expand "IUnion")
                             (skosimp)
                             (skosimp)
                             (typepred "II(i!1)")
                             (hide -2)
                             (expand "subset?")
                             (inst - "x!2")
                             (expand "member")
                             (assert)
                             (expand "IUnion")
                             (skosimp)
                             (inst + "double_index_n(i!1,i!2)")
                             (lemma "double_index_ij_n"
                              ("i" "i!1" "j" "i!2"))
                             (flatten)
                             (assert))))
                          ("2"
                           (hide 2)
                           (split)
                           (("1"
                             (typepred "x!1")
                             (skosimp)
                             (expand "nonempty?")
                             (expand "empty?")
                             (inst -3 "x!1`2")
                             (expand "member")
                             (inst + "x!1")
                             (replace -3)
                             (inst + "I!1")
                             (assert))
                            ("2"
                             (expand "bounded_below?")
                             (inst + "0")
                             (expand "lower_bound?")
                             (skosimp)
                             (typepred "s!1")
                             (skosimp)
                             (assert))))))))))))
                  ("2"
                   (hide 2)
                   (skosimp)
                   (typepred "II(i!1)")
                   (assert))))
                ("2" (hide 2) (skosimp) (inst - "n!1") (assert))))
              ("2"
               (hide 2)
               (skosimp)
               (expand "nonempty?")
               (expand "empty?")
               (expand "member")
               (name "FX" "F(X!1(n!1))")
               (replace -1)
               (expand "F" -1)
               (expand "x_inf" -1)
               (lift-if -1)
               (assert)
               (case-replace
                "FORALL (x:
                                   ({z:extended_nnreal |
                                       EXISTS I:
                                         x_eq(x_sum(o[nat, (A), extended_nnreal](mu!1, I)),
                                              z)
                                          AND subset?[T](X!1(n!1), IUnion[nat, T](I))})):
                           NOT x`1")
               (("1"
                 (replace -2 -3 rl)
                 (expand "x_add")
                 (expand "x_lt")
                 (inst -3 "lambda (n:nat): fullset[T]")
                 (("1" (hide-all-but 1) (grind))
                  ("2" (rewrite "A_fullset"))))
                ("2"
                 (replace 1 -1)
                 (skosimp)
                 (typepred "x!1")
                 (skosimp)
                 (replace -4 -5 rl)
                 (hide -4)
                 (expand "x_add")
                 (expand "x_lt")
                 (typepred
                  "glb({z_1: real |
                                          EXISTS (x:extended_nnreal):
                                            (EXISTS I:
                                               x_eq(x_sum(o[nat, (A), extended_nnreal]
                                                          (mu!1, I)),
                                                    x)
                                                AND subset?[T](X!1(n!1), IUnion[nat, T](I)))
                                             AND x`1 AND x`2 = z_1})")
                 (("1"
                   (name-replace "GLB"
                    "glb({z_1: real |
                                            EXISTS (x:extended_nnreal):
                                              (EXISTS I:
                                                 x_eq(x_sum(o[nat, (A), extended_nnreal]
                                                            (mu!1, I)),
                                                      x)
                                                  AND subset?[T](X!1(n!1), IUnion[nat, T](I)))
                                               AND x`1 AND x`2 = z_1})")
                   (expand "greatest_lower_bound?")
                   (flatten)
                   (lemma "posreal_div_posreal_is_posreal"
                    ("px" "epsilon!1" "py" "expt(2, 1 + n!1)"))
                   (name-replace "R" "epsilon!1 / expt(2, 1 + n!1)")
                   (inst -3 "GLB+R")
                   (assert)
                   (expand "lower_bound?")
                   (skosimp)
                   (case "s!1<GLB+R")
                   (("1"
                     (hide 1)
                     (typepred "s!1")
                     (skosimp)
                     (skosimp)
                     (inst -11 "I!2")
                     (replace -2)
                     (expand "x_eq" -1)
                     (flatten)
                     (replace -1)
                     (replace -4)
                     (replace -2)
                     (replace -5)
                     (propax))
                    ("2" (assert))))
                  ("2"
                   (split)
                   (("1"
                     (expand "nonempty?")
                     (expand "empty?")
                     (inst - "x!1`2")
                     (expand "member")
                     (inst + "x!1")
                     (replace -3)
                     (inst + "I!1")
                     (replace -2)
                     (propax))
                    ("2"
                     (expand "bounded_below?")
                     (inst + "0")
                     (expand "lower_bound?")
                     (skosimp)
                     (assert)
                     (typepred "s!1")
                     (skosimp)
                     (assert))))))))))
            ("2"
             (hide 2)
             (skosimp)
             (expand "F" 1)
             (expand "x_le")
             (flatten)
             (replace -1)
             (expand "x_inf")
             (lift-if)
             (assert)
             (prop)
             (("1"
               (inst - "mu!1(x!1)")
               (inst +
                "lambda (n:nat): if n=0 then x!1 else emptyset[T] endif")
               (("1"
                 (split)
                 (("1"
                   (expand "o")
                   (expand "measure?")
                   (flatten)
                   (expand "measure_empty?")
                   (replace -4)
                   (expand "x_eq")
                   (expand "x_sum")
                   (replace -1)
                   (assert)
                   (lift-if 1)
                   (assert)
                   (lemma "zero_tail_series_conv"
                    ("n"
                     "0"
                     "a"
                     "LAMBDA (i:nat):
                                                  IF i = 0 THEN mu!1(x!1)`2 ELSE 0 ENDIF"))
                   (lemma "zero_tail_series_limit"
                    ("n"
                     "0"
                     "a"
                     "LAMBDA (i:nat):
                                                  IF i = 0 THEN mu!1(x!1)`2 ELSE 0 ENDIF"))
                   (case-replace
                    "FORALL (m:nat):
                             0 < m =>
                              (LAMBDA (i: nat): IF i = 0 THEN mu!1(x!1)`2 ELSE 0 ENDIF)(m) = 0")
                   (("1"
                     (replace -2)
                     (replace -3)
                     (expand "series")
                     (expand "sigma")
                     (assert))
                    ("2" (skosimp) (assert))))
                  ("2"
                   (expand "subset?")
                   (expand "member")
                   (skosimp)
                   (expand "IUnion")
                   (inst + "0"))))
                ("2" (skosimp) (rewrite "A_empty"))))
              ("2"
               (skosimp)
               (typepred "x!2")
               (skosimp)
               (typepred
                "glb({z_1: real |
                             EXISTS (x:extended_nnreal):
                               (EXISTS I:
                                  x_eq(x_sum(o[nat, (A), extended_nnreal](mu!1, I)), x) AND
                                   subset?[T](x!1, IUnion[nat, T](I)))
                                AND x`1 AND x`2 = z_1})")
               (("1"
                 (name-replace "LHS"
                  "glb({z_1: real |
                               EXISTS (x:extended_nnreal):
                                 (EXISTS I:
                                    x_eq(x_sum(o[nat, (A), extended_nnreal](mu!1, I)), x) AND
                                     subset?[T](x!1, IUnion[nat, T](I)))
                                  AND x`1 AND x`2 = z_1})")
                 (expand "greatest_lower_bound?")
                 (flatten)
                 (expand "lower_bound?")
                 (inst - "mu!1(x!1)`2")
                 (hide 2 -1)
                 (inst + "mu!1(x!1)")
                 (replace -4)
                 (inst +
                  "lambda (n:nat): if n=0 then x!1 else emptyset[T] endif")
                 (("1"
                   (split)
                   (("1"
                     (expand "o")
                     (expand "measure?")
                     (flatten)
                     (expand "measure_empty?")
                     (replace -7)
                     (expand "x_eq" 1)
                     (expand "x_sum" 1)
                     (replace -4)
                     (assert)
                     (lift-if)
                     (assert)
                     (lemma "zero_tail_series_conv"
                      ("a"
                       "LAMBDA (i:nat):
                                                    IF i = 0 THEN mu!1(x!1)`2 ELSE 0 ENDIF"
                       "n"
                       "0"))
                     (lemma "zero_tail_series_limit"
                      ("a"
                       "LAMBDA (i:nat):
                                                    IF i = 0 THEN mu!1(x!1)`2 ELSE 0 ENDIF"
                       "n"
                       "0"))
                     (case-replace
                      "FORALL (m:nat):
                               0 < m =>
                                (LAMBDA (i: nat): IF i = 0 THEN mu!1(x!1)`2 ELSE 0 ENDIF)(m) = 0")
                     (("1"
                       (replace -2)
                       (replace -3)
                       (expand "series")
                       (expand "sigma")
                       (assert))
                      ("2" (hide-all-but 1) (skosimp) (assert))))
                    ("2"
                     (hide-all-but 1)
                     (expand "subset?")
                     (expand "member")
                     (skosimp)
                     (expand "IUnion")
                     (inst + "0"))))
                  ("2" (skosimp) (rewrite "A_empty"))))
                ("2"
                 (hide 2)
                 (split)
                 (("1"
                   (expand "nonempty?")
                   (expand "empty?")
                   (expand "member")
                   (inst - "x!2`2")
                   (inst + "x!2")
                   (replace -3)
                   (inst + "I!1")
                   (replace -2)
                   (propax))
                  ("2"
                   (expand "bounded_below?")
                   (inst + "0")
                   (expand "lower_bound?")
                   (skosimp)
                   (typepred "s!1")
                   (skosimp)
                   (assert))))))))))))))
      ("2"
       (hide 2)
       (expand "om_increasing?")
       (skosimp)
       (expand "x_le" 1)
       (flatten)
       (assert)
       (replace -2)
       (hide -4)
       (expand "F")
       (expand "o")
       (expand "x_inf")
       (case-replace
        "FORALL (x_1:
                              ({z:extended_nnreal |
                                  EXISTS I:
                                    x_eq(x_sum(LAMBDA (x: nat): mu!1(I(x))), z) AND
                                     subset?[T](b!1, IUnion[nat, T](I))})):
                      NOT x_1`1")
       (replace 1)
       (skosimp)
       (case-replace
        "FORALL (x_1:
                            ({z:extended_nnreal |
                                EXISTS I:
                                  x_eq(x_sum(LAMBDA (x: nat): mu!1(I(x))), z) AND
                                   subset?[T](a!1, IUnion[nat, T](I))})):
                    NOT x_1`1")
       (("1"
         (inst - "x!1")
         (typepred "x!1")
         (skosimp)
         (inst + "I!1")
         (assert)
         (hide-all-but (-2 -4 1))
         (expand "subset?")
         (skosimp)
         (inst - "x!2")
         (inst - "x!2")
         (assert))
        ("2"
         (replace 1)
         (skosimp)
         (hide -4)
         (typepred "x!1")
         (skosimp)
         (typepred "x!2")
         (skosimp)
         (typepred
          "glb({z_1: real |
                        EXISTS (x_1: extended_nnreal):
                          (EXISTS I:
                             x_eq(x_sum(LAMBDA (x: nat): mu!1(I(x))), x_1) AND
                              subset?[T](b!1, IUnion[nat, T](I)))
                           AND x_1`1 AND x_1`2 = z_1})")
         (("1"
           (name-replace "RHS"
            "glb({z_1: real |
                          EXISTS (x_1: extended_nnreal):
                            (EXISTS I:
                               x_eq(x_sum(LAMBDA (x: nat): mu!1(I(x))), x_1) AND
                                subset?[T](b!1, IUnion[nat, T](I)))
                             AND x_1`1 AND x_1`2 = z_1})")
           (typepred
            "glb({z_1: real |
                          EXISTS (x_1: extended_nnreal):
                            (EXISTS I:
                               x_eq(x_sum(LAMBDA (x: nat): mu!1(I(x))), x_1) AND
                                subset?[T](a!1, IUnion[nat, T](I)))
                             AND x_1`1 AND x_1`2 = z_1})")
           (("1"
             (name-replace "LHS"
              "glb({z_1: real |
                            EXISTS (x_1: extended_nnreal):
                              (EXISTS I:
                                 x_eq(x_sum(LAMBDA (x: nat): mu!1(I(x))), x_1) AND
                                  subset?[T](a!1, IUnion[nat, T](I)))
                               AND x_1`1 AND x_1`2 = z_1})")
             (expand "greatest_lower_bound?")
             (flatten)
             (hide -3 -2)
             (expand "lower_bound?")
             (inst -2 "LHS")
             (split -2)
             (("1" (propax))
              ("2"
               (skosimp)
               (hide 2)
               (typepred "s!1")
               (skosimp)
               (skosimp)
               (inst -5 "s!1")
               (inst + "x!3")
               (replace -3)
               (replace -4)
               (inst + "I!3")
               (assert)
               (hide-all-but (-2 1 -11))
               (expand "subset?")
               (skosimp)
               (inst - "x!4")
               (inst - "x!4")
               (assert))))
            ("2"
             (hide-all-but (-2 -3 -6 1))
             (split)
             (("1"
               (expand "nonempty?")
               (expand "empty?")
               (inst - "x!2`2")
               (expand "member")
               (inst + "x!2")
               (assert))
              ("2"
               (expand "bounded_below?")
               (inst + "0")
               (expand "lower_bound?")
               (skosimp)
               (typepred "s!1")
               (skosimp)
               (assert))))))
          ("2"
           (hide-all-but (1 -6 -3 -4))
           (split)
           (("1"
             (expand "nonempty?")
             (expand "empty?")
             (inst - "x!1`2")
             (expand "member")
             (inst + "x!1")
             (assert))
            ("2"
             (expand "bounded_below?")
             (inst + "0")
             (expand "lower_bound?")
             (skosimp)
             (typepred "s!1")
             (skosimp)
             (assert))))))))))
    ("2"
     (hide 2)
     (hide -1)
     (expand "measure?")
     (flatten)
     (hide -2)
     (expand "om_empty?")
     (expand "F")
     (expand "emptyset")
     (expand "subset?")
     (expand "member")
     (expand "o")
     (expand "measure_empty?")
     (expand "x_inf")
     (lift-if 1)
     (assert)
     (prop)
     (("1"
       (inst - "(TRUE,0)")
       (inst + "lambda (n:nat): emptyset[T]")
       (replace -1)
       (hide -1)
       (expand "x_sum")
       (rewrite "zero_series_conv")
       (rewrite "zero_series_limit")
       (grind))
      ("2"
       (skosimp)
       (typepred "x!1")
       (skosimp)
       (typepred
        "glb({z_1: real |
                     EXISTS (x_1: extended_nnreal):
                       (EXISTS I: x_eq(x_sum(LAMBDA (x: nat): mu!1(I(x))), x_1))
                        AND x_1`1 AND x_1`2 = z_1})")
       (("1"
         (name-replace "GLB"
          "glb({z_1: real |
                       EXISTS (x_1: extended_nnreal):
                         (EXISTS I: x_eq(x_sum(LAMBDA (x: nat): mu!1(I(x))), x_1))
                          AND x_1`1 AND x_1`2 = z_1})")
         (expand "greatest_lower_bound?")
         (flatten)
         (inst -2 "0")
         (expand "lower_bound?")
         (split)
         (("1"
           (inst - "0")
           (("1"
             (expand "<=")
             (assert)
             (lemma "reals_totally_ordered")
             (expand "strict_total_order?")
             (expand "strict_order?")
             (flatten)
             (expand "irreflexive?")
             (inst - "0")
             (assert)
             (expand "transitive?")
             (inst - "0" "GLB" "0")
             (assert)
             (replace -2)
             (propax))
            ("2"
             (inst + "(TRUE,0)")
             (inst + "lambda (n:nat): emptyset[T]")
             (replace -4)
             (expand "x_eq")
             (expand "x_sum")
             (rewrite "zero_series_conv")
             (rewrite "zero_series_limit"))))
          ("2"
           (skosimp)
           (typepred "s!1")
           (skosimp)
           (assert)
           (skosimp)
           (assert)
           (typepred "x!2`2")
           (assert)
           (expand ">=")
           (replace -4)
           (propax))))
        ("2"
         (hide 2)
         (split)
         (("1"
           (expand "nonempty?")
           (expand "empty?")
           (inst - "x!1`2")
           (expand "member")
           (inst + "x!1")
           (assert)
           (replace -2)
           (inst + "I!1"))
          ("2"
           (expand "bounded_below?")
           (inst + "0")
           (expand "lower_bound?")
           (skosimp)
           (typepred "s!1")
           (skosimp)
           (skosimp)
           (typepred "x!2`2")
           (assert)
           (expand ">=")
           (replace -4)
           (propax))))))))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: outer_measure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "A")
   (expand "subset_algebra?")
   (flatten)
   (expand "subset_algebra_empty?")
   (expand "nonempty?")
   (expand "member")
   (expand "empty?")
   (inst - "emptyset[T]")
   (expand "member")
   (propax))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: outer_measure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "A")
   (expand "subset_algebra?")
   (flatten)
   (expand "subset_algebra_empty?")
   (assert)
   (expand "member")
   (propax))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: outer_measure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "subset_algebra_difference" ("x" "a!1" "y" "b!1"))
   (expand "finite_disjoint_union?")
   (inst +
    "lambda (i:nat): if i=0 then difference[T](a!1, b!1) else emptyset endif"
    "1")
   (split)
   (("1" (grind))
    ("2"
     (apply-extensionality :hide? t)
     (expand "IUnion")
     (expand "emptyset")
     (case-replace "difference[T](a!1, b!1)(x!1)")
     (("1" (inst + "0")) ("2" (assert))))
    ("3"
     (skosimp)
     (case-replace "i!1=0")
     (("1" (expand "member") (propax)) ("2" (assert) (grind))))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: hahn_kolmogorov
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "subset?")
   (skolem + "E!1")
   (expand "member")
   (flatten)
   (expand "induced_sigma_algebra")
   (rewrite "outer_measurable_def")
   (skolem + ("A!1"))
   (rewrite "epsilon_x_le")
   (("1"
     (skosimp)
     (expand "x_le")
     (flatten)
     (name "LHS"
           "x_add(ast(mu)(intersection(A!1, E!1)),
                        ast(mu)(intersection(A!1, complement(E!1))))")
     (("1"
       (replace -1)
       (replace -3)
       (expand "x_add" (-3 1))
       (case-replace "ast(mu)(A!1)`1")
       (("1"
         (lemma "outer_measure_def"
          ("mu" "mu" "epsilon" "epsilon!1" "X" "A!1"))
         (expand "x_add" -1)
         (replace -2)
         (skosimp*)
         (name "E1" "lambda (n:nat): intersection(I!1(n),E!1)")
         (name "E2"
               "lambda (n:nat): intersection(I!1(n),complement(E!1))")
         (hide -1 -2)
         (case "forall (n:nat): I!1(n) = union(E1(n),E2(n)) & A(E1(n)) & A(E2(n))")
         (("1"
           (case "subset?(intersection(A!1,E!1),IUnion(E1))")
           (("1"
             (case "subset?(intersection(A!1,complement(E!1)),IUnion(E2))")
             (("1"
               (typepred "ast(mu)")
               (expand "outer_measure?")
               (flatten)
               (expand "om_increasing?")
               (inst-cp - "intersection(A!1, complement(E!1))"
                "IUnion(E2)")
               (inst-cp - "intersection(A!1,E!1)" "IUnion(E1)")
               (assert)
               (expand "om_countably_subadditive?")
               (inst-cp - "E2")
               (inst - "E1")
               (lemma "x_sum_eq" ("S" "ast(mu) o E2" "T" "mu o E2"))
               (("1"
                 (split)
                 (("1"
                   (lemma "x_sum_eq" ("S" "ast(mu) o E1" "T" "mu o E1"))
                   (("1"
                     (split)
                     (("1"
                       (lemma "x_le_add"
                        ("x1"
                         "ast(mu)(intersection(A!1, E!1))"
                         "y1"
                         "x_sum(mu o E1)"
                         "x2"
                         "ast(mu)(intersection(A!1, complement(E!1)))"
                         "y2"
                         "x_sum(mu o E2)"))
                       (replace -16)
                       (split -1)
                       (("1"
                         (lemma "x_add_sum"
                          ("S" "mu o E1" "T" "mu o E2"))
                         (case "x_le(LHS,x_sum(LAMBDA (i:nat): x_add((mu o E1)(i), (mu o E2)(i))))")
                         (("1"
                           (lemma "x_sum_le"
                            ("S"
                             "(LAMBDA (i: nat): x_add((mu o E1)(i), (mu o E2)(i)))"
                             "T"
                             "mu o I!1"))
                           (split -1)
                           (("1"
                             (name-replace "DRL1"
                              "x_add(x_sum(mu o E1), x_sum(mu o E2))")
                             (name-replace "DRL2"
                              "x_sum(LAMBDA (i:nat): x_add((mu o E1)(i), (mu o E2)(i)))")
                             (name-replace "DRL3" "x_sum(mu o I!1)")
                             (hide-all-but (-1 -2 -17 1))
                             (name-replace "DRL4" "ast(mu)(A!1)`2")
                             (grind))
                            ("2"
                             (hide 2)
                             (skosimp)
                             (expand "o ")
                             (hide-all-but (-19 1 -14))
                             (inst - "i!1")
                             (flatten)
                             (replace -1)
                             (hide -1)
                             (lemma "measure_disjoint_union[T,A]"
                              ("f" "mu" "a" "E1(i!1)" "b" "E2(i!1)"))
                             (assert)
                             (split)
                             (("1"
                               (expand "x_eq")
                               (expand "x_le")
                               (flatten)
                               (assert))
                              ("2"
                               (hide-all-but 1)
                               (expand "E1")
                               (expand "E2")
                               (expand "disjoint?")
                               (expand "empty?")
                               (grind))
                              ("3" (rewrite "subset_algebra_union"))))))
                          ("2"
                           (hide-all-but (-1 -2 1))
                           (name-replace "DRL2"
                            "x_add(x_sum(mu o E1), x_sum(mu o E2))")
                           (name-replace "RHS"
                            "x_sum(LAMBDA (i: nat): x_add((mu o E1)(i), (mu o E2)(i)))")
                           (grind))))
                        ("2"
                         (name-replace "DRL1"
                          "ast(mu)(intersection(A!1, E!1))")
                         (name-replace "DRL2" "ast(mu)(IUnion(E1))")
                         (name-replace "DRL3" "x_sum(ast(mu) o E1)")
                         (name-replace "DRL4" "x_sum(mu o E1)")
                         (hide-all-but (1 -1 -5 -7))
                         (grind))
                        ("3"
                         (name-replace "DRL1"
                          "ast(mu)(intersection(A!1, complement(E!1)))")
                         (name-replace "DRL2" "ast(mu)(IUnion(E2))")
                         (name-replace "DRL3" "x_sum(ast(mu) o E2)")
                         (name-replace "DRL4" "x_sum(mu o E2)")
                         (hide-all-but (1 -2 -6 -8))
                         (grind))))
                      ("2"
                       (expand "o ")
                       (skosimp)
                       (inst -10 "i!1")
                       (rewrite "outer_measure_eq" 1))))
                    ("2" (skosimp) (inst -10 "x1!1") (flatten))))
                  ("2"
                   (skosimp)
                   (expand "o ")
                   (inst -9 "i!1")
                   (flatten)
                   (rewrite "outer_measure_eq" 1))))
                ("2" (skosimp) (inst -9 "x1!1") (flatten))))
              ("2"
               (hide-all-but (-3 1))
               (expand "subset?")
               (skosimp)
               (inst - "x!1")
               (expand "E2")
               (expand "intersection")
               (expand "member")
               (flatten)
               (assert)
               (expand "IUnion")
               (propax))))
            ("2"
             (hide-all-but (-2 1))
             (expand "E1")
             (expand "subset?")
             (skosimp)
             (inst - "x!1")
             (expand "member")
             (expand "intersection")
             (expand "member")
             (flatten)
             (assert)
             (expand "IUnion")
             (propax))))
          ("2"
           (hide-all-but (1 -5))
           (skosimp)
           (split)
           (("1"
             (expand "E1")
             (expand "E2")
             (apply-extensionality :hide? t)
             (grind))
            ("2"
             (expand "E1")
             (typepred "I!1(n!1)")
             (rewrite "subset_algebra_intersection"))
            ("3"
             (expand "E2")
             (rewrite "subset_algebra_intersection")
             (rewrite "subset_algebra_complement"))))))
        ("2" (assert))))
      ("2"
       (expand "nonempty?")
       (expand "empty?")
       (inst - "E!1")
       (expand "member")
       (propax))))
    ("2" (expand "nonempty?") (expand "empty?") (inst - "E!1") (assert))))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: hahn_kolmogorov
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (rewrite "induced_measure_rew")
   (("1" (rewrite "outer_measure_eq"))
    ("2"
     (typepred "x!1")
     (typepred "A")
     (hide 2)
     (lemma "algebra_in_induced_sigma_algebra")
     (expand "subset?")
     (inst - "x!1")
     (assert)
     (expand "induced_sigma_algebra")
     (propax))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: hahn_kolmogorov
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "A")
   (expand "subset_algebra?")
   (flatten)
   (expand "subset_algebra_empty?")
   (expand "nonempty?")
   (expand "empty?")
   (inst - "emptyset[T]"))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: hahn_kolmogorov
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (typepred "induced_measure[T, ast(mu)]")
   (("1" (expand "complete_measure?") (flatten))
    ("2"
     (typepred "A")
     (expand "subset_algebra?")
     (expand "nonempty?")
     (expand "subset_algebra_empty?")
     (flatten)
     (expand "empty?")
     (inst - "emptyset[T]"))))


proof_type: t_proof
decl_type: tcc
library: measure_integration
theory: hahn_kolmogorov
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "algebra_in_induced_sigma_algebra")
   (expand "subset?")
   (inst - "x!1")
   (expand "induced_sigma_algebra")
   (assert))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: composition_borel
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "o")
   (expand "borel_function?")
   (skosimp)
   (inst - "B!1")
   (inst - "inverse_image(f!1,B!1)")
   (expand "inverse_image")
   (expand "member")
   (propax))


proof_type: f_proof
decl_type: formula
library: measure_integration
theory: identity_borel
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "I")
   (expand "borel_function?")
   (skosimp)
   (typepred "B!1")
   (expand "inverse_image")
   (expand "member")
   (lemma "extensionality_postulate"
    ("f" "B!1" "g" "{x_1: T | B!1(x_1)}"))
   (flatten)
   (split -1)
   (("1" (assert)) ("2" (skosimp))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: countable_cross
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "cross_product")
   (expand "is_countable")
   (skolem - "F1")
   (skolem - "F2")
   (typepred "F1")
   (typepred "F2")
   (inst +
    "lambda (x:({x: [T1, T2] | X!1(x`1) AND Y!1(x`2)})): 2^(F1(x`1))*3^(F2(x`2))")
   (expand "injective?")
   (skosimp*)
   (inst - "x1!1`2" "x2!1`2")
   (inst - "x1!1`1" "x2!1`1")
   (name-replace "N1" "F1(x1!1`1)")
   (name-replace "N2" "F1(x2!1`1)")
   (name-replace "M1" "F2(x1!1`2)")
   (name-replace "M2" "F2(x2!1`2)")
   (case "forall (b,n,m:nat): 2 <= b => (b^n = b^m IFF n = m)")
   (("1"
     (case "forall (pn,pm:posnat): 1 < 2^pn * 3^pm")
     (("1"
       (case-replace "N1=N2")
       (("1"
         (lemma "both_sides_times2"
          ("n0z" "2^N2" "x" "3 ^ M1" "y" "3 ^ M2"))
         (inst -4 "3" "M1" "M2")
         (assert)
         (decompose-equality))
        ("2"
         (case "forall (pn:posnat,n,m:nat): 3^n /= 2^pn*3^m")
         (("1"
           (lemma "trich_lt" ("x" "N1" "y" "N2"))
           (split -1)
           (("1"
             (inst - "N2-N1" "M1" "M2")
             (("1"
               (assert)
               (lemma "both_sides_times2"
                ("n0z"
                 "2^N1"
                 "x"
                 "3 ^ M1"
                 "y"
                 "(2 ^ (N2 - N1)) * 3 ^ M2"))
               (lemma "expt_plus" ("n0x" "2" "i" "N1" "j" "N2-N1"))
               (assert))
              ("2" (assert))))
            ("2" (propax))
            ("3"
             (inst - "N1-N2" "M2" "M1")
             (("1"
               (lemma "both_sides_times2"
                ("n0z"
                 "2^N2"
                 "y"
                 "3 ^ M2"
                 "x"
                 "(2 ^ (N1 - N2)) * 3 ^ M1"))
               (lemma "expt_plus" ("n0x" "2" "i" "N2" "j" "N1-N2"))
               (assert))
              ("2" (assert))))))
          ("2"
           (hide-all-but (-1 -2 1))
           (skosimp)
           (lemma "trich_lt" ("x" "n!1" "y" "m!1"))
           (split -1)
           (("1"
             (inst -3 "pn!1" "m!1-n!1")
             (("1"
               (lemma "both_sides_times_pos_lt1"
                ("pz" "3^n!1" "x" "1" "y" "2 ^ pn!1 * 3 ^ (m!1 - n!1)"))
               (lemma "expt_plus" ("n0x" "3" "i" "m!1-n!1" "j" "n!1"))
               (assert))
              ("2" (assert))))
            ("2"
             (replace -1 * rl)
             (lemma "both_sides_times1"
              ("n0z" "3^n!1" "x" "1" "y" "2^pn!1"))
             (assert)
             (lemma "both_sides_expt_gt1_lt"
              ("gt1x" "2" "i" "0" "j" "pn!1"))
             (rewrite "expt_x0")
             (assert))
            ("3"
             (lemma "both_sides_times1"
              ("n0z" "3^m!1" "x" "3 ^ (n!1-m!1)" "y" "2 ^ pn!1"))
             (lemma "expt_plus" ("n0x" "3" "i" "n!1-m!1" "j" "m!1"))
             (simplify -1)
             (replace -1 * rl)
             (assert)
             (case "forall (n:posnat): even?(2^n)")
             (("1"
               (case "forall (n:posnat): odd?(3^n)")
               (("1"
                 (inst - "n!1-m!1")
                 (inst - "pn!1")
                 (rewrite "even_or_odd")
                 (assert))
                ("2"
                 (hide-all-but 1)
                 (induct "n")
                 (("1"
                   (case-replace "n!2=0")
                   (("1"
                     (rewrite "expt_x0")
                     (expand "odd?")
                     (inst + "0")
                     (assert))
                    ("2" (assert))))
                  ("2" (flatten) (assert))
                  ("3"
                   (skosimp*)
                   (case-replace "j!1=0")
                   (("1"
                     (expand "^")
                     (expand "expt")
                     (expand "expt")
                     (propax))
                    ("2"
                     (assert)
                     (expand "^")
                     (expand "expt" 2)
                     (lemma "odd_times_odd_is_odd"
                      ("o1" "3" "o2" "expt(3, j!1)"))
                     (("1" (propax)) ("2" (propax))))))))))
              ("2"
               (hide-all-but 1)
               (induct "n")
               (("1" (assert)) ("2" (assert))
                ("3"
                 (skosimp*)
                 (case-replace "j!1=0")
                 (("1" (expand "^") (expand "expt") (propax))
                  ("2"
                   (assert)
                   (expand "^")
                   (expand "expt" 2)
                   (propax))))))))))))))
      ("2"
       (hide-all-but 1)
       (skosimp)
       (lemma "both_sides_expt_gt1_lt" ("gt1x" "2" "i" "0" "j" "pn!1"))
       (lemma "both_sides_expt_gt1_lt" ("gt1x" "3" "i" "0" "j" "pm!1"))
       (rewrite "expt_x0")
       (rewrite "expt_x0")
       (assert)
       (lemma "lt_times_lt_pos1"
        ("px" "1" "y" "2^pn!1" "nnz" "1" "w" "3^pm!1"))
       (assert))))
    ("2"
     (hide-all-but 1)
     (skosimp*)
     (split)
     (("1"
       (flatten)
       (lemma "both_sides_expt1" ("px" "2"))
       (case-replace "n!1=0")
       (("1"
         (rewrite "expt_x0")
         (lemma "both_sides_expt_gt1_lt"
          ("gt1x" "b!1" "i" "0" "j" "m!1"))
         (("1" (assert) (rewrite "expt_x0") (assert)) ("2" (assert))))
        ("2"
         (case-replace "m!1=0")
         (("1"
           (rewrite "expt_x0")
           (lemma "both_sides_expt_gt1_lt"
            ("gt1x" "b!1" "i" "0" "j" "n!1"))
           (("1" (rewrite "expt_x0") (assert)) ("2" (assert))))
          ("2"
           (lemma "both_sides_expt1"
            ("px" "b!1" "n0i" "n!1" "n0j" "m!1"))
           (("1" (assert)) ("2" (assert)) ("3" (assert))
            ("4" (assert))))))))
      ("2" (flatten) (assert))))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "d")
   (expand "metric?")
   (expand "metric_zero?")
   (flatten)
   (inst - "x!1" "y!1"))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "metric_open?")
   (skosimp)
   (split)
   (("1"
     (flatten)
     (case-replace "x!2=x!1")
     (("1" (inst + "r!1") (rewrite "subset_reflexive"))
      ("2"
       (case "r!1 - d(x!1, x!2) > 0")
       (("1"
         (inst + "r!1-d(x!1,x!2)")
         (("1"
           (expand "subset?")
           (expand "member")
           (skosimp)
           (expand "ball")
           (lemma "metric_triangle" ("x" "x!1" "y" "x!2" "z" "x!3"))
           (assert))
          ("2" (assert))))
        ("2" (hide 3) (expand "ball") (assert))))))
    ("2"
     (skosimp*)
     (expand "subset?")
     (inst - "x!2")
     (rewrite "ball_centre")
     (expand "member")
     (propax))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "open?")
   (expand "member")
   (expand "metric_induced_topology")
   (propax))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "metric_closed?")
   (expand "closed?")
   (expand "metric_induced_topology")
   (expand "member")
   (propax))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "metric_adherent?")
   (expand "adherent_point?")
   (split)
   (("1"
     (flatten)
     (skosimp*)
     (expand "neighbourhood?")
     (expand "interior_point?")
     (skosimp)
     (expand "member")
     (typepred "U!2")
     (typepred "U!1")
     (rewrite "metric_open_def" -1 :dir rl)
     (expand "metric_open?")
     (expand "nonempty?")
     (expand "intersection")
     (expand "empty?")
     (expand "member")
     (expand "subset?")
     (expand "member")
     (inst -4 "x!1")
     (assert)
     (inst - "x!1")
     (assert)
     (skosimp)
     (inst -3 "r!1")
     (skosimp)
     (inst - "x!2")
     (assert)
     (inst - "x!2")
     (assert))
    ("2"
     (skosimp*)
     (expand "intersection")
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (inst - "ball(x!1, r!1)")
     (split -1)
     (("1" (skosimp) (inst - "x!2") (assert))
      ("2"
       (expand "neighbourhood?")
       (expand "interior_point?")
       (inst + "ball(x!1, r!1)")
       (expand "subset?")
       (expand "member")
       (split)
       (("1" (skosimp))
        ("2"
         (lemma "ball_centre" ("x" "x!1" "r" "r!1"))
         (expand "member")
         (propax))))))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (apply-extensionality :hide? t)
   (expand "metric_closure")
   (expand "Cl")
   (rewrite "metric_adherent_iff_adherent"))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "metric_converges_to")
   (expand "convergence?")
   (skosimp)
   (split)
   (("1"
     (skosimp*)
     (inst - "ball(x!1, r!1)")
     (lemma "ball_centre" ("x" "x!1" "r" "r!1"))
     (assert))
    ("2"
     (skosimp*)
     (typepred "U!1")
     (expand "open?")
     (expand "member")
     (expand "metric_induced_topology")
     (expand "metric_open?")
     (inst - "x!1")
     (assert)
     (skosimp)
     (inst - "r!1")
     (skosimp)
     (inst + "n!1")
     (skosimp)
     (inst - "i!1")
     (assert)
     (expand "subset?")
     (inst - "u!1(i!1)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (flatten)
   (lemma "compact_def[T,(metric_induced_topology)]")
   (flatten)
   (hide -2)
   (split)
   (("1"
     (expand "weierstrass_bolzano?")
     (skosimp)
     (name "AA"
           "lambda (n:nat): metric_closure({x | exists (m:nat): m>n & x = u!1(m)})")
     (case "forall (n,m:nat): n > m => subset?(AA(n),AA(m))")
     (("1"
       (inst -3 "image(AA,fullset[nat])")
       (hide -4)
       (split -3)
       (("1"
         (expand "fullset")
         (expand "image")
         (expand "Intersection")
         (expand "nonempty?")
         (expand "empty?")
         (expand "member")
         (skosimp*)
         (case "forall (n:nat): AA(n)(x!1)")
         (("1"
           (hide -2)
           (replace -3 -1 rl)
           (assert)
           (expand "metric_closure" -1)
           (expand "metric_adherent?")
           (expand "intersection")
           (expand "nonempty?")
           (expand "empty?")
           (expand "member")
           (expand "ball")
           (name "NEXT"
                 "lambda (i:nat,k:posnat): (choose({j:nat | j>i & d(x!1,u!1(j)) <1/k}),k+1)")
           (("1"
             (name "SEQ"
                   "lambda (n:nat): u!1((iterate[[nat, posnat]](NEXT, n)(0, 1))`1)")
             (("1"
               (inst + "SEQ")
               (split)
               (("1"
                 (expand "subseq?")
                 (expand "SEQ")
                 (inst +
                  "lambda (i:nat): (iterate[[nat, posnat]](NEXT, i)(0, 1))`1")
                 (("1" (skosimp))
                  ("2"
                   (expand "strict_increasing?")
                   (skolem + ("i!1" "j!1"))
                   (assert)
                   (flatten)
                   (lemma "iterate_add_applied[[nat, posnat]]"
                    ("f" "NEXT" "x" "(0, 1)" "n" "i!1" "m" "j!1-i!1"))
                   (("1"
                     (assert)
                     (replace -1 1 rl)
                     (name-replace "DRL1"
                      "(iterate[[nat, posnat]](NEXT, i!1)(0, 1))")
                     (hide-all-but (1 -4 -2))
                     (case "forall (pn:posnat,x:[[nat, posnat]]): x`1 < (iterate(NEXT, pn)(x))`1")
                     (("1" (inst - "j!1-i!1" "DRL1"))
                      ("2"
                       (hide 2)
                       (induct "pn")
                       (("1" (assert)) ("2" (assert))
                        ("3"
                         (skosimp*)
                         (case-replace "j!2=0")
                         (("1"
                           (hide -2 -1 -3 -4)
                           (expand "iterate")
                           (expand "iterate")
                           (expand "NEXT")
                           (lemma "choose_member"
                            ("a"
                             "{j: nat | j > x!2`1 & d(x!1, u!1(j)) < 1 / x!2`2}"))
                           (case-replace
                            "empty?({j: nat | j > x!2`1 & d(x!1, u!1(j)) < 1 / x!2`2})")
                           (("1"
                             (hide 1)
                             (expand "empty?")
                             (expand "member")
                             (inst -2 "x!2`1")
                             (inst -2 "1/x!2`2")
                             (skosimp)
                             (skosimp)
                             (inst - "m!1")
                             (assert))
                            ("2"
                             (replace 1 -1)
                             (name-replace "DRL4"
                              "choose({j: nat | j > x!2`1 & d(x!1, u!1(j)) < 1 / x!2`2})")
                             (("1" (expand "member") (flatten) (assert))
                              ("2" (expand "nonempty?") (propax))))))
                          ("2"
                           (case-replace "j!2>=1")
                           (("1"
                             (assert)
                             (hide 1)
                             (expand "iterate" 1)
                             (inst - "x!2")
                             (name-replace "DRL5"
                              "iterate(NEXT, j!2)(x!2)")
                             (expand "NEXT" 1)
                             (lemma "choose_member"
                              ("a"
                               "{j: nat | j > DRL5`1 & d(x!1, u!1(j)) < 1 / DRL5`2}"))
                             (case-replace
                              "empty?({j: nat | j > DRL5`1 & d(x!1, u!1(j)) < 1 / DRL5`2})")
                             (("1"
                               (hide-all-but (-1 -6))
                               (expand "empty?")
                               (expand "member")
                               (inst -2 "DRL5`1")
                               (inst -2 "1/DRL5`2")
                               (skosimp)
                               (skosimp)
                               (inst - "m!1")
                               (assert))
                              ("2"
                               (replace 1 -1)
                               (name-replace "DRL6"
                                "choose({j: nat | j > DRL5`1 & d(x!1, u!1(j)) < 1 / DRL5`2})")
                               (("1"
                                 (expand "member")
                                 (flatten)
                                 (assert))
                                ("2" (expand "nonempty?") (propax))))))
                            ("2" (assert))))))
                        ("4"
                         (hide 2)
                         (skosimp*)
                         (expand "NEXT")
                         (typepred "x1!1`2")
                         (assert))))))
                    ("2" (assert))))
                  ("3"
                   (expand "NEXT")
                   (skosimp)
                   (typepred "x1!1`2")
                   (assert))))
                ("2"
                 (expand "metric_convergent?")
                 (inst + "x!1")
                 (case "forall (n:nat): (iterate[[nat, posnat]](NEXT, n)(0, 1))`2 = 1+n")
                 (("1"
                   (case "FORALL (n: nat): d(x!1, SEQ(n + 1)) < 1 / (1 + n)")
                   (("1"
                     (expand "metric_converges_to")
                     (skosimp)
                     (lemma "archimedean" ("px" "r!1"))
                     (skosimp)
                     (inst + "1+n!1")
                     (skosimp)
                     (expand "member")
                     (expand "ball")
                     (inst - "i!1-1")
                     (("1"
                       (assert)
                       (lemma "both_sides_div_pos_lt2"
                        ("pz" "1" "py" "n!1" "px" "i!1"))
                       (assert))
                      ("2" (assert))))
                    ("2"
                     (hide-all-but (-1 -4 1))
                     (skosimp)
                     (expand "SEQ")
                     (expand "iterate" 1)
                     (expand "NEXT" 1 1)
                     (lemma "choose_member"
                      ("a"
                       "{j: nat |
                                             j > iterate(NEXT, n!1)(0, 1)`1 &
                                              d(x!1, u!1(j)) < 1 / iterate(NEXT, n!1)(0, 1)`2}"))
                     (("1"
                       (case-replace
                        "empty?({j: nat |
                                            j > iterate(NEXT, n!1)(0, 1)`1 &
                                             d(x!1, u!1(j)) < 1 / iterate(NEXT, n!1)(0, 1)`2})")
                       (("1"
                         (hide -2 1)
                         (inst - "iterate(NEXT, n!1)(0, 1)`1")
                         (("1"
                           (inst - "1/iterate(NEXT, n!1)(0, 1)`2")
                           (("1"
                             (skosimp)
                             (skosimp)
                             (expand "empty?")
                             (inst - "m!1")
                             (expand "member")
                             (assert))
                            ("2"
                             (skosimp)
                             (expand "NEXT")
                             (typepred "x1!1`2")
                             (assert))))
                          ("2"
                           (skosimp)
                           (typepred "x1!1`2")
                           (expand "NEXT")
                           (assert))))
                        ("2"
                         (replace 1 -1)
                         (name-replace "DRL11"
                          "choose({j: nat |
                                                 j > iterate(NEXT, n!1)(0, 1)`1 &
                                                  d(x!1, u!1(j)) < 1 / iterate(NEXT, n!1)(0, 1)`2})")
                         (("1"
                           (expand "member")
                           (flatten)
                           (inst - "n!1")
                           (replace -3)
                           (propax))
                          ("2" (expand "nonempty?") (propax))))))
                      ("2"
                       (skosimp)
                       (skosimp)
                       (expand "NEXT")
                       (typepred "x1!1`2")
                       (assert))))))
                  ("2"
                   (hide-all-but 1)
                   (induct "n")
                   (("1" (expand "iterate") (propax))
                    ("2"
                     (skosimp)
                     (expand "iterate" 1)
                     (expand "NEXT" 1 1)
                     (assert))
                    ("3"
                     (expand "NEXT")
                     (skosimp)
                     (typepred "x1!1`2")
                     (assert))))))))
              ("2"
               (expand "NEXT")
               (skosimp)
               (typepred "x1!1`2")
               (assert))))
            ("2"
             (hide 2)
             (skosimp)
             (expand "nonempty?")
             (expand "empty?")
             (expand "member")
             (inst -2 "i!1")
             (inst -2 "1/k!1")
             (skosimp)
             (skosimp)
             (inst - "m!1")
             (assert))))
          ("2"
           (hide-all-but (-1 1))
           (skosimp)
           (inst - "AA(n!1)")
           (inst + "n!1"))))
        ("2"
         (hide-all-but 1)
         (expand "fullset")
         (expand "image")
         (expand "every")
         (skosimp)
         (typepred "x!1")
         (skosimp)
         (replace -1)
         (hide -1)
         (expand "AA")
         (rewrite "metric_closure_is_Cl")
         (lemma "Cl_closed"
          ("A" "{x | EXISTS (m: nat): m > x!2 & x = u!1(m)}"))
         (propax))
        ("3"
         (hide -2 2)
         (skosimp)
         (case "FORALL (Y: setofsets[T], pn: posnat):
                       is_finite(Y) & card(Y) = pn & subset?(Y, image(AA, fullset[nat])) =>
                        exists (n:nat): Intersection(Y) = AA(n)")
         (("1"
           (case "card(Y1!1)>0")
           (("1"
             (inst - "Y1!1" "card(Y1!1)")
             (assert)
             (skosimp)
             (replace -2)
             (hide-all-but 1)
             (expand "nonempty?")
             (expand "empty?")
             (expand "member")
             (expand "AA")
             (inst - "u!1(n!1+1)")
             (expand "metric_closure")
             (expand "metric_adherent?")
             (skosimp)
             (expand "intersection")
             (expand "nonempty?")
             (expand "empty?")
             (expand "member")
             (inst - "u!1(1 + n!1)")
             (split)
             (("1" (inst + "1+n!1") (assert))
              ("2"
               (lemma "ball_centre" ("r" "r!1" "x" "u!1(1 + n!1)"))
               (expand "member")
               (propax))))
            ("2"
             (case "card(Y1!1)=0")
             (("1"
               (lemma "card_is_0[set[T]]" ("S" "Y1!1"))
               (assert)
               (replace -2 -1)
               (replace -1)
               (hide-all-but 2)
               (expand "Intersection")
               (expand "nonempty?")
               (expand "empty?")
               (expand "member")
               (inst - "u!1(0)")
               (skosimp)
               (typepred "a!1")
               (expand "emptyset")
               (propax))
              ("2" (assert))))
            ("3" (propax))))
          ("2"
           (hide-all-but (-3 1))
           (induct "pn")
           (("1" (assert)) ("2" (assert))
            ("3"
             (skosimp*)
             (assert)
             (case-replace "j!1=0")
             (("1"
               (hide -1 -2 -3)
               (assert)
               (lemma "card_one[set[T]]" ("S" "Y!1"))
               (assert)
               (skosimp)
               (expand "subset?" -4)
               (expand "member")
               (inst - "x!1")
               (assert)
               (replace -1 -4)
               (expand "singleton" -4)
               (expand "fullset")
               (expand "image")
               (skolem - ("n!1"))
               (inst + "n!1")
               (replace -4)
               (replace -1)
               (hide-all-but 1)
               (apply-extensionality :hide? t)
               (grind))
              ("2"
               (assert)
               (case "j!1>=1")
               (("1"
                 (hide 1)
                 (inst - "rest(Y!1)")
                 (lemma "choose_rest" ("a" "Y!1"))
                 (lemma "rest_subset" ("a" "Y!1"))
                 (lemma "subset_transitive"
                  ("a"
                   "rest(Y!1)"
                   "b"
                   "Y!1"
                   "c"
                   "image(AA, fullset[nat])"))
                 (assert)
                 (lemma "finite_rest[set[T]]" ("A" "Y!1"))
                 (assert)
                 (lemma "nonempty_card[set[T]]" ("S" "Y!1"))
                 (assert)
                 (expand "nonempty?" -1)
                 (lemma "card_rest[set[T]]" ("S" "Y!1"))
                 (assert)
                 (skosimp)
                 (lemma "choose_member" ("a" "Y!1"))
                 (replace 1)
                 (expand "member")
                 (expand "subset?" -12)
                 (expand "member")
                 (inst -12 "choose(Y!1)")
                 (assert)
                 (expand "fullset")
                 (expand "image")
                 (skolem - ("n!2"))
                 (inst + "max(n!1,n!2)")
                 (rewrite "Intersection_intersection_rew" 2)
                 (replace -8)
                 (replace -12)
                 (hide-all-but (-13 2))
                 (apply-extensionality :hide? t)
                 (expand "intersection")
                 (expand "member")
                 (expand "max")
                 (case-replace "n!1 < n!2")
                 (("1"
                   (inst - "n!2" "n!1")
                   (assert)
                   (expand "subset?")
                   (inst - "x!1")
                   (assert)
                   (case-replace "AA(n!2)(x!1)")
                   (assert))
                  ("2"
                   (assert)
                   (case-replace "n!2=n!1")
                   (("1" (assert) (case-replace "AA(n!1)(x!1)") (assert))
                    ("2"
                     (inst - "n!1" "n!2")
                     (assert)
                     (expand "subset?")
                     (inst - "x!1")
                     (expand "member")
                     (case-replace "AA(n!1)(x!1)")
                     (assert))))))
                ("2" (assert))))))))))))
      ("2"
       (hide-all-but 1)
       (skosimp)
       (expand "subset?")
       (expand "AA")
       (expand "member")
       (expand "metric_closure")
       (expand "metric_adherent?")
       (expand "intersection")
       (expand "nonempty?")
       (expand "empty?")
       (expand "member")
       (skosimp*)
       (inst -2 "r!1")
       (skosimp)
       (skosimp)
       (inst - "x!2")
       (assert)
       (inst + "m!2")
       (assert))))
    ("2"
     (hide 2)
     (expand "compact_space?")
     (expand "compact?")
     (case-replace "Union((metric_induced_topology)) = fullset[T]")
     (("1"
       (expand "fullset")
       (expand "Union")
       (replace -2)
       (typepred "metric_induced_topology")
       (expand "hausdorff_space?")
       (propax))
      ("2"
       (hide 2)
       (apply-extensionality :hide? t)
       (expand "fullset")
       (expand "Union")
       (inst + "ball(x!1,1)")
       (("1"
         (expand "ball")
         (assert)
         (typepred "d")
         (expand "metric?")
         (flatten)
         (expand "metric_zero?")
         (inst - "x!1" "x!1")
         (assert))
        ("2" (expand "metric_induced_topology") (propax))))))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "fullset")
   (expand "totally_bounded?")
   (skosimp)
   (case "is_finite(fullset[T])")
   (("1"
     (inst + "fullset[T]")
     (expand "epsilon_net?")
     (assert)
     (expand "fullset")
     (expand "subset?")
     (expand "member")
     (skosimp)
     (expand "image")
     (expand "Union")
     (inst + "ball(x!1,r!1)")
     (("1"
       (lemma "ball_centre" ("x" "x!1" "r" "r!1"))
       (expand "member")
       (propax))
      ("2" (inst + "x!1"))))
    ("2"
     (case "forall (X:set[T]): is_finite(X) & nonempty?(X) => exists (y:T): NOT X(y) & forall x: X(x) => d(x,y) >=r!1")
     (("1"
       (case "nonempty?(fullset[T])")
       (("1"
         (expand "nonempty?" -1)
         (expand "fullset" 1)
         (expand "empty?" 1)
         (skosimp)
         (expand "member")
         (name "NEXT"
               "lambda (X: non_empty_finite_set[T]):choose[T]
                                            ({y: T |
                                                NOT X(y) &
                                                 (FORALL x: X(x) => d(x, y) >= r!1)})")
         (("1"
           (name "ADD"
                 "LAMBDA (X: non_empty_finite_set[T]): add[T](NEXT(X),X)")
           (name "XX"
                 "lambda (n:nat): iterate(ADD,n)(singleton[T](x!1))")
           (name "UU" "lambda (n:nat): NEXT(XX(n))")
           (inst -6 "UU")
           (skosimp)
           (expand "subseq?")
           (skosimp)
           (replace -1 -7 rl)
           (assert)
           (hide 1 2)
           (expand "cauchy?")
           (inst -6 "r!1")
           (skosimp)
           (expand "ball")
           (expand "member")
           (case "forall (i,j:nat): i<j => d(v!1(j), v!1(i)) >= r!1")
           (("1" (inst - "n!1" "n!1+1") (inst -7 "n!1" "n!1+1") (assert))
            ("2"
             (hide -6)
             (hide -1)
             (skosimp)
             (inst-cp -6 "i!1")
             (inst -6 "j!1")
             (replace -6)
             (replace -7)
             (hide -6 -7)
             (typepred "f!1")
             (expand "strict_increasing?")
             (inst - "i!1" "j!1")
             (replace -2 -1)
             (hide -2)
             (name-replace "m" "f!1(i!1)")
             (name-replace "n" "f!1(j!1)")
             (expand "NEXT" 1)
             (lemma "choose_member[T]"
              ("a"
               "{y: T |
                               NOT XX(n)(y) & (FORALL x: XX(n)(x) => d(x, y) >= r!1)}"))
             (inst-cp -6 "XX(n)")
             (typepred "XX(n)")
             (expand "nonempty?" -8)
             (replace 1)
             (split -2)
             (("1"
               (name-replace "Xn"
                "choose[T]
                            ({y: T |
                                NOT XX(n)(y) & (FORALL x: XX(n)(x) => d(x, y) >= r!1)})")
               (("1"
                 (expand "member")
                 (flatten)
                 (lemma "choose_member[T]"
                  ("a"
                   "{y_1: T |
                                   NOT XX(m)(y_1) &
                                    (FORALL (x_1: T): XX(m)(x_1) => d(x_1, y_1) >= r!1)}"))
                 (name-replace "Xm"
                  "choose[T]
                              ({y_1: T |
                                  NOT XX(m)(y_1) &
                                   (FORALL (x_1: T): XX(m)(x_1) => d(x_1, y_1) >= r!1)})")
                 (("1"
                   (split -1)
                   (("1"
                     (expand "member")
                     (flatten)
                     (inst -2 "Xm")
                     (split -2)
                     (("1"
                       (hide-all-but (-1 4))
                       (rewrite "metric_symmetric"))
                      ("2"
                       (hide -1 5)
                       (case "forall (i:nat): XX(i+1+m)(Xm)")
                       (("1"
                         (inst - "n-m-1")
                         (("1" (assert)) ("2" (assert))))
                        ("2"
                         (hide -7 2 4 5 -1 -2)
                         (skosimp)
                         (case "XX(m+1)(Xm)")
                         (("1"
                           (case "forall (i,j:nat): subset?(XX(i),XX(i+j))")
                           (("1"
                             (inst - "m+1" "i!2")
                             (expand "subset?")
                             (inst - "Xm")
                             (assert))
                            ("2"
                             (hide 2 3 -1)
                             (induct "j")
                             (("1"
                               (skosimp)
                               (simplify 1)
                               (expand "subset?")
                               (skosimp))
                              ("2"
                               (skosimp*)
                               (inst - "i!3+1")
                               (expand "subset?")
                               (expand "member")
                               (skosimp)
                               (inst - "x!2")
                               (split -)
                               (("1" (propax))
                                ("2"
                                 (hide-all-but (-1 1))
                                 (expand "XX")
                                 (expand "iterate" 1)
                                 (expand "ADD" 1 1)
                                 (expand "add" 1)
                                 (flatten)
                                 (expand "member")
                                 (propax))))))))
                          ("2"
                           (hide 2 3)
                           (expand "Xm" 1)
                           (expand "XX" 1 1)
                           (expand "iterate" 1)
                           (assert)
                           (typepred "m")
                           (split 1)
                           (("1"
                             (flatten)
                             (hide-all-but (-1 -2))
                             (assert))
                            ("2"
                             (flatten)
                             (hide 1)
                             (expand "ADD" 1 1)
                             (expand "add" 1)
                             (flatten)
                             (hide 2)
                             (expand "NEXT" 1)
                             (expand "XX" 1)
                             (propax))))))))))
                    ("2"
                     (expand "empty?")
                     (expand "member")
                     (hide 2)
                     (hide -7 -9 2)
                     (inst -7 "XX(m)")
                     (assert)
                     (typepred "XX(m)")
                     (expand "nonempty?")
                     (skosimp)
                     (inst - "y!1")
                     (replace -7)
                     (propax))))
                  ("2"
                   (expand "nonempty?" 1)
                   (assert)
                   (hide-all-but (-1 -9))
                   (inst - "XX(m)")
                   (typepred "XX(m)")
                   (expand "nonempty?")
                   (assert)
                   (skosimp)
                   (expand "empty?" -2)
                   (expand "member")
                   (inst - "y!1")
                   (replace -2)
                   (propax))))
                ("2"
                 (expand "nonempty?")
                 (expand "empty?")
                 (skosimp)
                 (expand "member")
                 (skosimp)
                 (inst - "y!1")
                 (assert))))
              ("2"
               (expand "empty?")
               (expand "member")
               (skosimp)
               (skosimp)
               (inst - "y!1")
               (assert))))))
          ("2"
           (hide-all-but (-1 1))
           (skosimp)
           (typepred "X!1")
           (inst - "X!1")
           (expand "nonempty?")
           (assert)
           (expand "empty?")
           (skosimp)
           (expand "member")
           (skosimp)
           (inst - "y!1")
           (assert))))
        ("2"
         (expand "nonempty?")
         (rewrite "emptyset_is_empty?")
         (replace -1)
         (assert))))
      ("2"
       (skosimp)
       (expand "epsilon_net?")
       (inst 3 "X!1")
       (assert)
       (expand "image")
       (expand "Union")
       (expand "subset?")
       (expand "member")
       (skosimp)
       (inst 1 "x!1")
       (assert)
       (case-replace "X!1(x!1)")
       (("1"
         (inst + "ball(x!1,r!1)")
         (("1"
           (lemma "ball_centre" ("x" "x!1" "r" "r!1"))
           (expand "member")
           (propax))
          ("2" (inst + "x!1"))))
        ("2"
         (replace 1)
         (skosimp)
         (inst + "ball(x!2,r!1)")
         (("1" (expand "ball") (assert)) ("2" (inst + "x!2"))))))))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (flatten)
   (expand "fullset")
   (expand "totally_bounded?")
   (name "F"
         "lambda (n:nat): choose({X:set[T] | epsilon_net?({x: T | TRUE},X,1/(n+1))})")
   (("1"
     (name "A" "IUnion(F)")
     (case "is_countable(A)")
     (("1"
       (expand "separable?")
       (inst + "A")
       (replace -1)
       (expand "subset?")
       (expand "member")
       (expand "dense_in?")
       (expand "subset?")
       (expand "member")
       (skosimp)
       (expand "metric_closure")
       (expand "metric_adherent?")
       (skosimp)
       (lemma "archimedean" ("px" "r!1"))
       (skosimp)
       (expand "nonempty?")
       (expand "empty?")
       (hide -4 -5)
       (typepred "F(n!1-1)")
       (expand "epsilon_net?")
       (flatten)
       (hide -1 -2)
       (expand "image")
       (expand "Union")
       (expand "subset?")
       (expand "member")
       (inst - "x!1")
       (skosimp)
       (typepred "a!1")
       (skosimp)
       (typepred "x!2")
       (replace -2)
       (hide -2)
       (inst - "x!2")
       (expand "intersection")
       (expand "member")
       (split)
       (("1"
         (replace -5 * rl)
         (hide -5 -4)
         (expand "IUnion")
         (inst + "n!1-1"))
        ("2" (expand "ball") (rewrite "metric_symmetric") (assert))))
      ("2"
       (hide 2)
       (lemma "countable_union1[T]")
       (inst - "image[nat,set[T]](F,fullset[nat])")
       (expand "fullset")
       (case-replace "Union(image[nat, set[T]](F, {x: nat | TRUE}))=A")
       (("1"
         (split)
         (("1" (propax))
          ("2"
           (hide 2)
           (lemma "countable_image[nat, set[T]]"
            ("f" "F" "S" "{x_1: nat | TRUE}"))
           (split -1)
           (("1" (expand "image" -1) (propax))
            ("2"
             (hide-all-but 1)
             (expand "is_countable")
             (inst + "lambda (n:nat): n")
             (expand "injective?")
             (skosimp))))
          ("3"
           (hide 2)
           (expand "every")
           (skosimp)
           (typepred "x!1")
           (expand "image")
           (skosimp)
           (hide -2 -3 -4)
           (typepred "F(x!2)")
           (expand "epsilon_net?")
           (flatten)
           (replace -4 * rl)
           (hide-all-but (-1 1))
           (lemma "finite_countable" ("x" "x!1"))
           (("1" (propax)) ("2" (propax))))))
        ("2"
         (hide 2)
         (apply-extensionality :hide? t)
         (replace -2 1 rl)
         (hide-all-but 1)
         (expand "IUnion")
         (case-replace "EXISTS (i: nat): F(i)(x!1)")
         (("1"
           (skosimp)
           (expand "image")
           (expand "Union")
           (inst + "F(i!1)")
           (inst + "i!1"))
          ("2"
           (replace 1 2)
           (assert)
           (expand "image")
           (expand "Union")
           (skosimp)
           (typepred "a!1")
           (skosimp)
           (inst + "x!2")
           (assert))))))))
    ("2"
     (hide 2)
     (skosimp)
     (inst - "1/(n!1+1)")
     (skosimp)
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (inst - "X!1")
     (expand "epsilon_net?")
     (propax))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (flatten)
   (expand "has_countable_basis?")
   (expand "fullset")
   (expand "separable?")
   (skosimp)
   (expand "dense_in?")
   (flatten)
   (expand "subset?")
   (expand "member")
   (hide -1 -3)
   (copy -1)
   (expand "is_countable" -1)
   (skosimp)
   (name "BALLS"
         "{B:set[T] | exists (x:(X!1), n:nat): B = ball(x,1/(n+1))}")
   (case "is_countable(BALLS)")
   (("1"
     (inst + "BALLS")
     (assert)
     (hide -1 -3)
     (split)
     (("1"
       (expand "synthetic_base?")
       (split)
       (("1"
         (inst + "BALLS")
         (expand "subset?")
         (expand "member")
         (split)
         (("1" (skosimp))
          ("2"
           (apply-extensionality :hide? t)
           (expand "fullset")
           (inst - "x!1")
           (expand "metric_closure")
           (expand "metric_adherent?")
           (expand "Union")
           (expand "intersection")
           (expand "nonempty?")
           (expand "empty?")
           (expand "member")
           (inst - "1")
           (skosimp)
           (inst + "ball(x!2,1)")
           (("1" (expand "ball") (rewrite "metric_symmetric"))
            ("2" (expand "BALLS") (inst + "x!2" "0") (assert))))))
        ("2"
         (skosimp)
         (typepred "B2!1")
         (typepred "B1!1")
         (hide -3)
         (inst +
          "{B:set[T] | BALLS(B) & subset?(B,B1!1) & subset?(B,B2!1)}")
         (split)
         (("1" (expand "subset?") (expand "member") (skosimp))
          ("2"
           (apply-extensionality :hide? t)
           (expand "intersection")
           (expand "member")
           (expand "Union")
           (case-replace "B1!1(x!1) AND B2!1(x!1)")
           (("1"
             (flatten)
             (expand "BALLS")
             (skosimp*)
             (expand "ball")
             (replace -3)
             (replace -4)
             (assert)
             (expand "metric_closure")
             (expand "metric_adherent?")
             (inst - "x!1")
             (lemma "archimedean"
              ("px"
               "min(1 / (1 + n!1) - d(x!2, x!1),
                                                     1 / (1 + n!2) - d(x!3, x!1))"))
             (("1"
               (skosimp)
               (inst - "1/(2*n!3)")
               (expand "intersection")
               (expand "nonempty?")
               (expand "empty?")
               (skosimp)
               (expand "member")
               (flatten)
               (expand "ball")
               (inst + "ball(x!4,1 / (2 * n!3))")
               (("1" (expand "ball") (rewrite "metric_symmetric" 1))
                ("2"
                 (split)
                 (("1"
                   (expand "BALLS")
                   (inst + "x!4" "2*n!3-1")
                   (assert))
                  ("2"
                   (expand "subset?")
                   (expand "member")
                   (skosimp)
                   (replace -5)
                   (assert)
                   (expand "ball")
                   (lemma "metric_triangle"
                    ("x" "x!2" "y" "x!1" "z" "x!5"))
                   (lemma "metric_triangle"
                    ("x" "x!1" "y" "x!4" "z" "x!5"))
                   (assert))
                  ("3"
                   (expand "subset?")
                   (expand "member")
                   (skosimp)
                   (expand "ball")
                   (replace -6)
                   (assert)
                   (lemma "metric_triangle"
                    ("x" "x!3" "y" "x!1" "z" "x!5"))
                   (lemma "metric_triangle"
                    ("x" "x!1" "y" "x!4" "z" "x!5"))
                   (assert))))))
              ("2" (hide-all-but (-1 -2 1)) (grind))))
            ("2"
             (replace 1 2)
             (assert)
             (skosimp)
             (typepred "a!1")
             (expand "subset?")
             (inst - "x!1")
             (inst - "x!1")
             (expand "member")
             (assert))))))))
      ("2"
       (expand "metric_induced_topology")
       (expand "synthetic_generated_topology_set")
       (apply-extensionality :hide? t)
       (case-replace "metric_open?(x!1)")
       (("1"
         (inst + "{A:set[T] | BALLS(A) & subset?(A,x!1)}")
         (split)
         (("1" (expand "subset?") (expand "member") (skosimp))
          ("2"
           (apply-extensionality :hide? t)
           (case-replace "x!1(x!2)")
           (("1"
             (expand "Union")
             (inst - "x!2")
             (expand "metric_closure")
             (expand "metric_adherent?")
             (expand "metric_open?")
             (inst - "x!2")
             (assert)
             (skosimp)
             (expand "subset?")
             (expand "member")
             (hide -3)
             (expand "intersection")
             (expand "nonempty?")
             (expand "empty?")
             (expand "member")
             (lemma "archimedean" ("px" "r!1"))
             (skosimp)
             (inst -4 "1/(2*n!1)")
             (skosimp)
             (expand "ball")
             (inst + "ball(x!3,1/(2*n!1))")
             (("1" (expand "ball") (rewrite "metric_symmetric"))
              ("2"
               (split)
               (("1" (expand "BALLS") (inst + "x!3" "2*n!1-1") (assert))
                ("2"
                 (expand "subset?")
                 (skosimp)
                 (expand "member")
                 (expand "ball")
                 (lemma "metric_triangle"
                  ("x" "x!2" "y" "x!3" "z" "x!4"))
                 (inst - "x!4")
                 (assert))))))
            ("2"
             (assert)
             (expand "Union")
             (skosimp)
             (typepred "a!1")
             (expand "subset?")
             (inst - "x!2")
             (expand "member")
             (propax))))))
        ("2"
         (replace 1 2)
         (assert)
         (skosimp)
         (lemma "open_Union" ("Y" "V!1"))
         (rewrite "metric_open_def")
         (split -1)
         (("1" (assert))
          ("2"
           (hide-all-but (-1 1))
           (expand "every")
           (skosimp)
           (typepred "x!2")
           (expand "subset?")
           (inst - "x!2")
           (expand "member")
           (assert)
           (expand "BALLS")
           (skosimp)
           (lemma "metric_open_ball" ("x" "x!3" "r" "1/(1+n!1)"))
           (rewrite "metric_open_def")
           (assert))))))))
    ("2"
     (hide-all-but (-2 1))
     (lemma "is_countable_cross[T,nat]")
     (inst - "X!1" "fullset[nat]")
     (assert)
     (split -1)
     (("1"
       (hide -2)
       (expand "cross_product")
       (lemma "countable_image[[T, nat],set[T]]")
       (inst - "{x: [T, nat] | X!1(x`1) AND fullset[nat](x`2)}" "_")
       (replace -2)
       (inst - "lambda (xr:[T, nat]): ball(xr`1,1/(1+xr`2))")
       (expand "image")
       (expand "fullset")
       (hide -2)
       (case-replace
        "(image(LAMBDA (xr: [T, nat]): ball(xr`1, 1 / (1 + xr`2)),
                                 {x: [T, nat] | X!1(x`1)}))=BALLS")
       (hide -1 2)
       (apply-extensionality :hide? t)
       (expand "image")
       (case-replace "BALLS(x!1)")
       (("1" (expand "BALLS") (skosimp) (inst + "(x!2,n!1)"))
        ("2"
         (assert)
         (expand "BALLS")
         (skosimp)
         (inst + "x!2`1" "x!2`2"))))
      ("2"
       (hide-all-but 1)
       (expand "fullset")
       (expand "is_countable")
       (inst + "lambda (n:nat): n")
       (expand "injective?")
       (skosimp))))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (split)
   (("1" (flatten) (lemma "compact_is_weierstrass_bolzano") (assert))
    ("2"
     (flatten)
     (expand "weierstrass_bolzano?")
     (lemma "cauchy_subseq_is_totally_bounded")
     (split -1)
     (("1"
       (lemma "totally_bounded_is_separable")
       (assert)
       (lemma "lindelof[T,metric_induced_topology]")
       (("1"
         (expand "compact?")
         (expand "compact_subset?")
         (skosimp)
         (inst - "U!1")
         (assert)
         (skosimp)
         (expand "subcover?")
         (flatten)
         (lemma "Union_IUnion")
         (lemma "Union_IUnion" ("XS" "V!1"))
         (assert)
         (skosimp)
         (name "WW" "lambda (n:nat): IUnion[T](n,YS!1)")
         (case "forall (n:nat): nonempty?[T](difference(fullset[T],WW(n)))")
         (("1"
           (name "XX"
                 "lambda (n:nat): choose[T]({x:T | difference(fullset[T], WW(n))(x)})")
           (("1"
             (inst -13 "XX")
             (skosimp)
             (expand "metric_convergent?")
             (skosimp)
             (expand "open_cover?")
             (hide -1 1 -12 -11 -8 -6)
             (case "forall (n:nat): difference(fullset[T], WW(n))(XX(n))")
             (("1"
               (expand "cover?")
               (expand "subset?" -7)
               (inst -7 "x!1")
               (expand "member")
               (expand "fullset" -7)
               (expand "subset?" -11)
               (expand "member")
               (expand "metric_induced_topology")
               (replace -4 -7)
               (expand "IUnion" -7)
               (skosimp)
               (case "forall (n:nat): metric_open?(WW(n))")
               (("1"
                 (case "forall (i,j:nat): i<=j=>subset?(WW(i),WW(j))")
                 (("1"
                   (expand "subseq?")
                   (skosimp)
                   (typepred "f!1")
                   (case "FORALL (n: nat): n >= i!1 => WW(f!1(n))(x!1)")
                   (("1"
                     (inst - "i!1")
                     (assert)
                     (inst -4 "f!1(i!1)")
                     (name "II" "f!1(i!1)")
                     (replace -1)
                     (expand "metric_open?" -5)
                     (inst -5 "x!1")
                     (assert)
                     (skosimp)
                     (expand "metric_converges_to")
                     (expand "member")
                     (inst -15 "r!1")
                     (skosimp)
                     (inst -15 "i!1+n!1+1")
                     (inst -14 "i!1+n!1+1")
                     (assert)
                     (expand "strict_increasing?")
                     (inst -3 "i!1" "1 + i!1 + n!1")
                     (assert)
                     (replace -1)
                     (name "JJ" "f!1(1 + i!1 + n!1)")
                     (replace -1)
                     (replace -15)
                     (hide-all-but (-3 -4 -6 -5 -7 -16))
                     (inst - "II" "JJ")
                     (assert)
                     (inst - "JJ")
                     (expand "difference")
                     (expand "member")
                     (flatten)
                     (hide -5)
                     (expand "subset?")
                     (inst -4 "XX(JJ)")
                     (expand "member")
                     (inst - "XX(JJ)")
                     (assert))
                    ("2"
                     (skosimp)
                     (lemma "subseq_index" ("f" "f!1" "i" "n!1"))
                     (inst -4 "i!1" "f!1(n!1)")
                     (assert)
                     (expand "subset?" -4)
                     (inst - "x!1")
                     (assert)
                     (hide 1)
                     (replace -7 1 rl)
                     (assert)
                     (expand "IUnion" 1)
                     (expand "image")
                     (expand "Union")
                     (inst + "YS!1(i!1)")
                     (inst + "i!1"))))
                  ("2"
                   (hide-all-but 1)
                   (skosimp)
                   (expand "subset?")
                   (skosimp)
                   (expand "member")
                   (expand "WW")
                   (expand "IUnion")
                   (expand "image")
                   (expand "Union")
                   (skosimp)
                   (inst + "a!1")
                   (typepred "a!1")
                   (skosimp)
                   (inst + "x!3")
                   (assert))))
                ("2"
                 (induct "n")
                 (("1"
                   (expand "WW")
                   (rewrite "IUnion_0_def")
                   (inst -4 "0")
                   (split)
                   (("1"
                     (rewrite "emptyset_is_empty?")
                     (replace -1)
                     (assert)
                     (expand "metric_open?")
                     (expand "emptyset")
                     (skosimp)
                     (skosimp)
                     (expand "subset?")
                     (expand "member")
                     (inst -2 "x!2")
                     (hide-all-but 1)
                     (lemma "ball_centre" ("x" "x!2" "r" "r!1"))
                     (expand "member")
                     (propax))
                    ("2"
                     (expand "subset?")
                     (inst -7 "YS!1(0)")
                     (inst -10 "YS!1(0)")
                     (assert))))
                  ("2"
                   (skosimp)
                   (expand "WW")
                   (rewrite "IUnion_n_def" 1)
                   (assert)
                   (inst -5 "1 + j!1")
                   (hide-all-but (-1 -5 1 -8 -11))
                   (rewrite "metric_open_def")
                   (rewrite "metric_open_def")
                   (split)
                   (("1"
                     (rewrite "emptyset_is_empty?")
                     (replace -1)
                     (rewrite "union_empty"))
                    ("2"
                     (expand "subset?")
                     (inst - "YS!1(1 + j!1)")
                     (inst - "YS!1(1 + j!1)")
                     (assert)
                     (rewrite "metric_open_def")
                     (rewrite "union_is_open"))))))))
              ("2"
               (hide-all-but (-1 1))
               (skosimp)
               (expand "XX")
               (propax))))
            ("2"
             (skosimp)
             (inst - "n!1")
             (hide-all-but (-1 1))
             (expand "nonempty?")
             (expand "empty?")
             (skosimp)
             (inst - "x!1")
             (expand "member")
             (propax))))
          ("2"
           (skosimp)
           (expand "nonempty?")
           (hide -5)
           (name "VV"
                 "{X:set[T] | V!1(X) & exists (n:nat): n <= n!1 & YS!1(n) = X}")
           (inst + "VV")
           (split)
           (("1"
             (expand "subset?")
             (skosimp)
             (inst -10 "x!1")
             (assert)
             (replace -2 -1 rl)
             (assert))
            ("2"
             (expand "finite_cover?" 1)
             (split)
             (("1"
               (expand "VV")
               (hide -1)
               (lemma "finite_subset[set[T]]"
                ("A"
                 "image(YS!1,{n:nat| n <= n!1})"
                 "s"
                 "{X: set[T] |
                                    V!1(X) & (EXISTS (n: nat): n <= n!1 & YS!1(n) = X)}"))
               (("1"
                 (assert)
                 (hide 2)
                 (expand "subset?" 1)
                 (expand "member")
                 (skosimp)
                 (skosimp)
                 (expand "image")
                 (inst + "n!2")
                 (assert))
                ("2"
                 (hide 2)
                 (lemma "finite_image[nat,set[T]]"
                  ("f" "YS!1" "S" "{n: nat | n <= n!1}"))
                 (("1" (propax))
                  ("2"
                   (hide-all-but 1)
                   (expand "is_finite")
                   (inst + "n!1+1" "lambda (x:{n: nat | n <= n!1}): x")
                   (expand "injective?")
                   (skosimp))))))
              ("2"
               (hide -1)
               (expand "cover?" 1)
               (expand "subset?" 1)
               (skosimp)
               (expand "member")
               (expand "VV")
               (expand "Union")
               (expand "fullset")
               (expand "empty?")
               (inst - "x!1")
               (expand "difference")
               (expand "member")
               (replace -2 -1 rl)
               (assert)
               (expand "IUnion" -1)
               (expand "image" -1)
               (expand "Union" -1)
               (skosimp)
               (typepred "a!1")
               (skosimp)
               (inst + "a!1")
               (assert)
               (typepred "x!2")
               (inst -6 "x!2")
               (split -6)
               (("1" (inst - "x!1") (assert))
                ("2" (assert) (inst + "x!2") (assert))))))))))
        ("2"
         (hide 2 -3 -2)
         (expand "second_countable?")
         (expand "has_countable_basis?")
         (lemma "separable_has_countable_basis")
         (assert)
         (hide -2)
         (expand "has_countable_basis?")
         (split 1)
         (("1"
           (typepred "metric_induced_topology[T,d]")
           (expand "hausdorff_space?")
           (propax))
          ("2" (propax))))))
      ("2"
       (hide 2)
       (skosimp)
       (inst - "u!1")
       (skosimp)
       (inst + "v!1")
       (assert)
       (hide -1)
       (expand "metric_convergent?")
       (expand "cauchy?")
       (skosimp)
       (skosimp)
       (expand "metric_converges_to")
       (expand "ball")
       (expand "member")
       (inst - "r!1/2")
       (skosimp)
       (inst + "n!1")
       (skosimp)
       (inst-cp - "i!1")
       (inst - "j!1")
       (assert)
       (lemma "metric_triangle"
        ("x" "v!1(j!1)" "y" "x!1" "z" "v!1(i!1)"))
       (rewrite "metric_symmetric" -4)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (split)
   (("1"
     (flatten)
     (skosimp)
     (lemma "totally_bounded_is_separable")
     (assert)
     (expand "fullset")
     (expand "totally_bounded?")
     (expand "separable?")
     (skosimp)
     (hide -1)
     (case "FORALL (r:posreal,S): EXISTS (X: set[T]): epsilon_net?(S, X, r)")
     (("1"
       (hide -4)
       (name "seq_in" "lambda u,S: forall (n:nat): S(u(n))")
       (case "forall (SS:setofsets[T],u): is_finite(SS) & seq_in(u,Union(SS)) => exists v,S: subseq?(v,u) & SS(S) & seq_in(v,S)")
       (("1"
         (name "CENTRES"
               "LAMBDA (n: nat, S):
                        choose[set[T]]({X: set[T] | epsilon_net?(S, X, 1 / (n + 2))})")
         (("1"
           (case "FORALL (n: nat, S): is_finite(CENTRES(n, S)) & subset?(CENTRES(n, S), S)")
           (("1"
             (name "BALLS"
                   "LAMBDA (n: nat, S): image[T,set[T]](lambda (x:T): ball(x,1/(2+n)),CENTRES(n,S))")
             (hide -3)
             (case "FORALL (n: nat, S):
                           is_finite(BALLS(n, S)) & subset?(S,Union(BALLS(n, S)))")
             (("1"
               (hide -2)
               (name "SELECT_BALL_SUBSEQ"
                     "lambda (n:nat,S:set[T],u:(lambda u: seq_in(u,S))): choose[[sequence[T],set[T]]]({vx:[sequence[T],set[T]] | subseq?(vx`1, u) & BALLS(n,S)(vx`2) & seq_in(vx)})")
               (("1"
                 (case "forall (n: nat, S,u): seq_in(u, S)=>BALLS(n, S)(SELECT_BALL_SUBSEQ(n,S,u)`2)&subseq?(SELECT_BALL_SUBSEQ(n,S,u)`1, u)& seq_in(SELECT_BALL_SUBSEQ(n,S,u))")
                 (("1"
                   (name "GG"
                         "lambda (n:nat,S:set[T],u:(LAMBDA u: seq_in(u, S))): let (v,b)= SELECT_BALL_SUBSEQ(n,S,u) in (n+1,b,v)")
                   (name "F"
                         "lambda (n:nat): iterate(GG,n)(0,fullset[T],u!1)")
                   (("1"
                     (case "FORALL (n: nat, S, u):
                                   seq_in(u, S) =>
                                       GG(n, S, u)`1 = n + 1 & BALLS(n, S)(GG(n, S, u)`2)
                                     & seq_in(GG(n, S, u)`3, GG(n, S, u)`2)
                                     & subseq?(GG(n, S, u)`3, u)")
                     (("1"
                       (name "AA" "lambda (n:nat): F(n)`2")
                       (name "US" "lambda (n:nat): F(n)`3")
                       (case "forall (n:nat): F(n+1) = GG(F(n))")
                       (("1"
                         (case "forall (n:nat): F(n)`1=n")
                         (("1"
                           (case "AA(0) = fullset[T] & US(0) = u!1 & seq_in(US(0), AA(0))")
                           (("1"
                             (case "FORALL (n: nat):
                                           BALLS(n, AA(n))(AA(n + 1)) &
                                            seq_in(US(n + 1), AA(n + 1)) & subseq?(US(n + 1), US(n))")
                             (("1"
                               (case "forall (n,i:nat): seq_in(US(n+i),AA(n))")
                               (("1"
                                 (hide
                                  -9
                                  -10
                                  -11
                                  -12
                                  -13
                                  -14
                                  -15
                                  -16
                                  -17
                                  -18
                                  -19)
                                 (name
                                  "EXTRACT"
                                  "lambda (u:sequence[T],v:(LAMBDA v: subseq?(v,u))): choose[[nat->nat]]({f:[nat->nat] | strict_increasing?(f) &FORALL (i:nat): v(i) = u(f(i))})")
                                 (("1"
                                   (case
                                    "forall (n:nat): strict_increasing?(EXTRACT(US(n),US(n+1)))")
                                   (("1"
                                     (case
                                      "forall (n,i:nat): US(n + 1)(i) = US(n)(EXTRACT(US(n), US(n + 1))(i))")
                                     (("1"
                                       (name
                                        "EE"
                                        "LAMBDA (n:nat,f:{f:[nat->nat] | strict_increasing?(f)}): (n + 1, f o EXTRACT(US(n), US(n + 1)))")
                                       (("1"
                                         (name
                                          "E"
                                          "lambda (n:nat): iterate(EE,n)(0,lambda (n:nat):n)")
                                         (("1"
                                           (case
                                            "forall (n:nat): E(n)`1=n")
                                           (("1"
                                             (case
                                              "forall (n:nat): E(n+1)`2=E(n)`2 o EXTRACT(US(n), US(n + 1))")
                                             (("1"
                                               (name
                                                "H"
                                                "lambda (n:nat): E(n)`2")
                                               (case
                                                "H(0)=lambda (n:nat):n")
                                               (("1"
                                                 (case
                                                  "forall (n:nat): H(n+1)=H(n) o EXTRACT(US(n), US(n + 1))")
                                                 (("1"
                                                   (case
                                                    "forall (n:nat): US(n) = u!1 o H(n)")
                                                   (("1"
                                                     (case
                                                      "forall (n:nat): strict_increasing?(H(n))")
                                                     (("1"
                                                       (name
                                                        "FF"
                                                        "lambda (n:nat): H(n)(n)")
                                                       (case
                                                        "strict_increasing?(FF)")
                                                       (("1"
                                                         (name
                                                          "U"
                                                          "lambda (n:nat): US(n)(n)")
                                                         (case
                                                          "forall (n:nat): U(n) = u!1(FF(n))")
                                                         (("1"
                                                           (case
                                                            "subseq?(U,u!1)")
                                                           (("1"
                                                             (case
                                                              "cauchy?(U)")
                                                             (("1"
                                                               (inst
                                                                +
                                                                "U")
                                                               (assert))
                                                              ("2"
                                                               (hide 2)
                                                               (expand
                                                                "cauchy?")
                                                               (skosimp)
                                                               (expand
                                                                "member")
                                                               (lemma
                                                                "archimedean"
                                                                ("px"
                                                                 "r!1/2"))
                                                               (skosimp)
                                                               (inst
                                                                +
                                                                "n!1+2")
                                                               (skosimp)
                                                               (inst
                                                                -22
                                                                "n!1")
                                                               (flatten)
                                                               (inst-cp
                                                                -21
                                                                "n!1+1"
                                                                "i!1-(n!1+1)")
                                                               (("1"
                                                                 (inst
                                                                  -21
                                                                  "n!1+1"
                                                                  "j!1-(n!1+1)")
                                                                 (("1"
                                                                   (assert)
                                                                   (hide-all-but
                                                                    (-1
                                                                     -2
                                                                     -3
                                                                     -21
                                                                     -22
                                                                     -23
                                                                     1))
                                                                   (expand
                                                                    "BALLS")
                                                                   (expand
                                                                    "image")
                                                                   (skosimp)
                                                                   (replace
                                                                    -6)
                                                                   (hide
                                                                    -6)
                                                                   (expand
                                                                    "seq_in")
                                                                   (expand
                                                                    "U")
                                                                   (inst
                                                                    -4
                                                                    "j!1")
                                                                   (inst
                                                                    -5
                                                                    "i!1")
                                                                   (expand
                                                                    "ball")
                                                                   (typepred
                                                                    "d")
                                                                   (expand
                                                                    "metric?")
                                                                   (flatten)
                                                                   (expand
                                                                    "metric_symmetric?")
                                                                   (inst
                                                                    -
                                                                    "x!1"
                                                                    "US(j!1)(j!1)")
                                                                   (expand
                                                                    "metric_triangle?")
                                                                   (inst
                                                                    -
                                                                    "US(j!1)(j!1)"
                                                                    "x!1"
                                                                    "US(i!1)(i!1)")
                                                                   (assert)
                                                                   (replace
                                                                    -2)
                                                                   (case
                                                                    "1 / (2 + n!1)+1 / (2 + n!1)<r!1")
                                                                   (("1"
                                                                     (assert))
                                                                    ("2"
                                                                     (hide-all-but
                                                                      (-4
                                                                       1))
                                                                     (assert)
                                                                     (rewrite
                                                                      "div_mult_pos_lt1"
                                                                      -1)
                                                                     (lemma
                                                                      "div_mult_pos_lt1"
                                                                      ("py"
                                                                       "2+n!1"
                                                                       "z"
                                                                       "2"
                                                                       "x"
                                                                       "r!1"))
                                                                     (assert))))
                                                                  ("2"
                                                                   (assert))))
                                                                ("2"
                                                                 (assert))))))
                                                            ("2"
                                                             (expand
                                                              "subseq?"
                                                              1)
                                                             (inst
                                                              +
                                                              "FF"))))
                                                          ("2"
                                                           (hide 2)
                                                           (skosimp)
                                                           (expand "U")
                                                           (inst
                                                            -5
                                                            "n!1")
                                                           (replace -5)
                                                           (expand "o ")
                                                           (expand "FF")
                                                           (propax))))
                                                        ("2"
                                                         (hide 2)
                                                         (case
                                                          "forall (n:nat): FF(n)<FF(n+1)")
                                                         (("1"
                                                           (case
                                                            "forall (n:nat,k:posnat): FF(n)<FF(n+k)")
                                                           (("1"
                                                             (expand
                                                              "strict_increasing?")
                                                             (skosimp)
                                                             (inst
                                                              -
                                                              "x!1"
                                                              "y!1-x!1")
                                                             (("1"
                                                               (assert))
                                                              ("2"
                                                               (assert))))
                                                            ("2"
                                                             (hide 2)
                                                             (induct "k")
                                                             (("1"
                                                               (assert))
                                                              ("2"
                                                               (assert))
                                                              ("3"
                                                               (skosimp)
                                                               (skosimp)
                                                               (case-replace
                                                                "j!1=0")
                                                               (("1"
                                                                 (inst
                                                                  -4
                                                                  "n!1")
                                                                 (assert))
                                                                ("2"
                                                                 (assert)
                                                                 (inst
                                                                  -
                                                                  "n!1")
                                                                 (inst
                                                                  -3
                                                                  "n!1+j!1")
                                                                 (assert))))))))
                                                          ("2"
                                                           (hide 2)
                                                           (skosimp)
                                                           (expand "FF")
                                                           (inst
                                                            -4
                                                            "n!1")
                                                           (replace -4)
                                                           (inst
                                                            -1
                                                            "n!1")
                                                           (inst
                                                            -11
                                                            "n!1")
                                                           (hide-all-but
                                                            (-1 -11 1))
                                                           (name-replace
                                                            "XX"
                                                            "EXTRACT(US(n!1), US(n!1 + 1))")
                                                           (lemma
                                                            "subseq_index"
                                                            ("f"
                                                             "XX"
                                                             "i"
                                                             "n!1"))
                                                           (expand
                                                            "strict_increasing?")
                                                           (inst
                                                            -3
                                                            "n!1"
                                                            "n!1+1")
                                                           (expand "o ")
                                                           (inst
                                                            -
                                                            "n!1"
                                                            "XX(n!1 + 1)")
                                                           (assert))))))
                                                      ("2"
                                                       (hide 2)
                                                       (expand
                                                        "strict_increasing?"
                                                        1)
                                                       (induct "n" 1)
                                                       (("1"
                                                         (skosimp)
                                                         (replace -4)
                                                         (assert))
                                                        ("2"
                                                         (skosimp)
                                                         (skosimp)
                                                         (inst -4 "j!1")
                                                         (replace -4)
                                                         (inst -12 "j!1")
                                                         (name-replace
                                                          "XX"
                                                          "EXTRACT(US(j!1), US(j!1 + 1))")
                                                         (hide-all-but
                                                          (-1 -2 1 -12))
                                                         (expand "o ")
                                                         (expand
                                                          "strict_increasing?")
                                                         (inst
                                                          -3
                                                          "x!1"
                                                          "y!1")
                                                         (assert)
                                                         (inst
                                                          -
                                                          "XX(x!1)"
                                                          "XX(y!1)")
                                                         (assert))))))
                                                    ("2"
                                                     (hide 2)
                                                     (induct "n")
                                                     (("1"
                                                       (replace -2)
                                                       (expand "US")
                                                       (expand "F")
                                                       (expand "iterate")
                                                       (apply-extensionality
                                                        :hide?
                                                        t)
                                                       (expand "o ")
                                                       (propax))
                                                      ("2"
                                                       (skosimp)
                                                       (inst - "j!1")
                                                       (replace -2)
                                                       (apply-extensionality
                                                        1
                                                        :hide?
                                                        t)
                                                       (inst
                                                        -9
                                                        "j!1"
                                                        "x!1")
                                                       (replace -9)
                                                       (name-replace
                                                        "XX"
                                                        "EXTRACT(US(j!1), US(1 + j!1))")
                                                       (replace -1)
                                                       (expand "o ")
                                                       (propax))))))
                                                  ("2"
                                                   (hide 2 -1 -2)
                                                   (skosimp)
                                                   (expand "H")
                                                   (inst - "n!1")
                                                   (assert))
                                                  ("3"
                                                   (skosimp)
                                                   (inst -11 "n!1")
                                                   (assert))))
                                                ("2"
                                                 (expand "H")
                                                 (expand "E")
                                                 (expand "iterate")
                                                 (propax))))
                                              ("2"
                                               (hide 2)
                                               (skosimp)
                                               (expand "E")
                                               (expand "iterate" 1 1)
                                               (expand "EE" 1 1)
                                               (inst - "n!1")
                                               (replace -1)
                                               (propax))
                                              ("3"
                                               (skosimp)
                                               (inst -8 "n!1")
                                               (flatten)
                                               (assert))))
                                            ("2"
                                             (hide-all-but 1)
                                             (induct "n")
                                             (("1"
                                               (expand "E")
                                               (expand "iterate")
                                               (propax))
                                              ("2"
                                               (skosimp)
                                               (expand "E")
                                               (expand "iterate" 1)
                                               (expand "EE")
                                               (propax))))))
                                          ("2"
                                           (skosimp)
                                           (expand "EE")
                                           (assert)
                                           (typepred "x1!1`2")
                                           (inst -4 "x1!1`1")
                                           (split 1)
                                           (("1"
                                             (hide-all-but (-1 -4 1))
                                             (expand
                                              "strict_increasing?")
                                             (skosimp)
                                             (expand "o ")
                                             (inst -3 "x!1" "y!1")
                                             (assert)
                                             (inst
                                              -
                                              "EXTRACT(US(x1!1`1), US(1 + x1!1`1))(x!1)"
                                              "EXTRACT(US(x1!1`1), US(1 + x1!1`1))(y!1)")
                                             (assert))
                                            ("2" (assert))))
                                          ("3"
                                           (hide-all-but 1)
                                           (grind))))
                                        ("2"
                                         (skosimp)
                                         (inst -5 "n!1")
                                         (flatten)
                                         (assert))))
                                      ("2"
                                       (hide 2)
                                       (skosimp)
                                       (case
                                        "nonempty?[[nat -> nat]]
                                                     ({f: [nat -> nat] |
                                                         strict_increasing?(f) &
                                                          (FORALL (i: nat): US(n!1+1)(i) = US(n!1)(f(i)))})")
                                       (("1"
                                         (copy -1)
                                         (expand "nonempty?" -1)
                                         (lemma
                                          "choose_member[[nat -> nat]]"
                                          ("a"
                                           "{f: [nat -> nat] |
                                                         strict_increasing?(f) &
                                                          (FORALL (i: nat): US(n!1 + 1)(i) = US(n!1)(f(i)))}"))
                                         (replace 1)
                                         (expand "EXTRACT")
                                         (assert)
                                         (inst -1 "i!1"))
                                        ("2"
                                         (inst -4 "n!1")
                                         (flatten)
                                         (hide-all-but (1 -6))
                                         (expand "subseq?")
                                         (skosimp)
                                         (expand "nonempty?")
                                         (expand "empty?")
                                         (inst - "f!1")
                                         (expand "member")
                                         (propax))))
                                      ("3"
                                       (skosimp)
                                       (inst -4 "n!1")
                                       (flatten)
                                       (assert))))
                                    ("2"
                                     (hide 2)
                                     (skosimp)
                                     (case
                                      "nonempty?[[nat -> nat]]
                                                   ({f: [nat -> nat] |
                                                       strict_increasing?(f) &
                                                        (FORALL (i: nat): US(n!1+1)(i) = US(n!1)(f(i)))})")
                                     (("1"
                                       (copy -1)
                                       (expand "nonempty?" -1)
                                       (lemma
                                        "choose_member[[nat -> nat]]"
                                        ("a"
                                         "{f: [nat -> nat] |
                                                       strict_increasing?(f) &
                                                        (FORALL (i: nat): US(n!1 + 1)(i) = US(n!1)(f(i)))}"))
                                       (replace 1)
                                       (expand "EXTRACT")
                                       (propax))
                                      ("2"
                                       (inst -3 "n!1")
                                       (flatten)
                                       (hide-all-but (-5 1))
                                       (expand "subseq?")
                                       (skosimp)
                                       (expand "nonempty?")
                                       (expand "empty?")
                                       (inst - "f!1")
                                       (expand "member")
                                       (propax))))
                                    ("3"
                                     (skosimp)
                                     (inst -3 "n!1")
                                     (flatten)
                                     (assert))))
                                  ("2"
                                   (skosimp)
                                   (hide-all-but 1)
                                   (typepred "v!1")
                                   (expand "subseq?")
                                   (skosimp)
                                   (expand "nonempty?")
                                   (expand "empty?")
                                   (inst -2 "f!1")
                                   (expand "member")
                                   (propax))))
                                ("2"
                                 (hide 2)
                                 (induct "i")
                                 (("1"
                                   (skosimp)
                                   (case-replace "n!1=0")
                                   (inst - "n!1-1")
                                   (("1" (flatten) (assert))
                                    ("2" (assert))))
                                  ("2"
                                   (skosimp)
                                   (skosimp)
                                   (inst - "n!1")
                                   (inst - "n!1+j!1")
                                   (flatten)
                                   (hide-all-but (-1 -4 1 -3))
                                   (name-replace
                                    "U2"
                                    "US(n!1 + (j!1 + 1))")
                                   (name-replace "U1" "US(n!1 + j!1)")
                                   (hide -2)
                                   (expand "seq_in")
                                   (skosimp)
                                   (expand "subseq?")
                                   (skosimp)
                                   (inst -2 "n!2")
                                   (replace -2)
                                   (inst - "f!1(n!2)"))))))
                              ("2"
                               (hide-all-but (1 -2 -3 -6 -1))
                               (flatten)
                               (induct "n")
                               (("1"
                                 (inst -6 "0" "AA(0)" "US(0)")
                                 (assert)
                                 (flatten)
                                 (expand "AA" 1 2)
                                 (inst -5 "0")
                                 (replace -5)
                                 (case-replace "(0, AA(0), US(0))=F(0)")
                                 (expand "US")
                                 (expand "AA")
                                 (inst - "0")
                                 (assert))
                                ("2"
                                 (inst -6 "0" "AA(0)" "US(0)")
                                 (assert)
                                 (flatten)
                                 (expand "US" 1)
                                 (expand "AA" 1)
                                 (inst -5 "0")
                                 (replace -5)
                                 (case-replace "(0, AA(0), US(0))=F(0)")
                                 (inst - "0")
                                 (assert)
                                 (expand "AA")
                                 (expand "US")
                                 (assert))
                                ("3"
                                 (inst -6 "0" "AA(0)" "US(0)")
                                 (assert)
                                 (flatten)
                                 (expand "US" 1 1)
                                 (inst -5 "0")
                                 (replace -5)
                                 (case-replace "(0, AA(0), US(0))=F(0)")
                                 (inst - "0")
                                 (expand "US")
                                 (expand "AA")
                                 (assert))
                                ("4"
                                 (skosimp*)
                                 (inst
                                  -
                                  "j!1+1"
                                  "AA(j!1 + 1)"
                                  "US(j!1 + 1)")
                                 (assert)
                                 (flatten)
                                 (split)
                                 (("1"
                                   (expand "AA" 1 2)
                                   (inst -8 "1+j!1")
                                   (replace -8)
                                   (inst -7 "1+j!1")
                                   (case-replace
                                    "(1 + j!1, AA(1 + j!1), US(1 + j!1))=F(1 + j!1)")
                                   (expand "US")
                                   (expand "AA")
                                   (assert))
                                  ("2"
                                   (expand "AA" 1)
                                   (inst -8 "1+j!1")
                                   (replace -8)
                                   (inst - "1+j!1")
                                   (expand "US" 1)
                                   (replace -8)
                                   (case-replace
                                    "(1 + j!1, AA(1 + j!1), US(1 + j!1))=F(1 + j!1)")
                                   (assert)
                                   (expand "US")
                                   (expand "AA")
                                   (assert))
                                  ("3"
                                   (expand "US" 1 1)
                                   (inst - "1+j!1")
                                   (inst - "1+j!1")
                                   (replace -8)
                                   (case-replace
                                    "(1 + j!1, AA(1 + j!1), US(1 + j!1))=F(1 + j!1)")
                                   (expand "US")
                                   (expand "AA")
                                   (assert))))))))
                            ("2"
                             (hide 2)
                             (expand "US")
                             (expand "AA")
                             (expand "F")
                             (expand "iterate")
                             (expand "fullset")
                             (expand "seq_in")
                             (propax))))
                          ("2"
                           (hide-all-but (1 -1 -4))
                           (induct "n")
                           (("1"
                             (expand "F")
                             (expand "iterate")
                             (propax))
                            ("2"
                             (skosimp)
                             (inst - "j!1")
                             (replace -2)
                             (expand "GG")
                             (propax))))))
                        ("2"
                         (hide-all-but (-3 1))
                         (skosimp)
                         (expand "F")
                         (expand "iterate" 1 1)
                         (propax))))
                      ("2"
                       (hide 2 -1 -2)
                       (skosimp)
                       (inst - "n!1" "S!1" "u!2")
                       (replace -1 -2)
                       (flatten)
                       (expand "GG")
                       (replace -2)
                       (replace -3)
                       (expand "seq_in")
                       (propax))))
                    ("2"
                     (skosimp)
                     (expand "GG")
                     (hide -1)
                     (inst - "x1!1`1" "x1!1`2" "x1!1`3")
                     (split -1)
                     (("1"
                       (flatten)
                       (assert)
                       (hide-all-but (-3 1))
                       (name-replace "DRL2"
                        "SELECT_BALL_SUBSEQ(x1!1`1, x1!1`2, x1!1`3)")
                       (expand "seq_in")
                       (propax))
                      ("2" (typepred "x1!1`3") (propax))))
                    ("3"
                     (hide-all-but 1)
                     (expand "fullset")
                     (expand "seq_in")
                     (propax))))
                  ("2"
                   (hide -1)
                   (skosimp)
                   (expand "SELECT_BALL_SUBSEQ")
                   (case "nonempty?[[sequence[T], set[T]]]
                                         ({vx: [sequence[T], set[T]] |
                                             subseq?(vx`1, u!2) &
                                              BALLS(n!1, S!1)(vx`2) & seq_in(vx)})")
                   (("1"
                     (copy -1)
                     (expand "nonempty?" -1)
                     (lemma "choose_member[[sequence[T], set[T]]]"
                      ("a"
                       "{vx: [sequence[T], set[T]] |
                                           subseq?(vx`1, u!2) &
                                            BALLS(n!1, S!1)(vx`2) & seq_in(vx)}"))
                     (replace 1)
                     (name-replace "CC"
                      "choose[[sequence[T], set[T]]]
                                         ({vx: [sequence[T], set[T]] |
                                             subseq?(vx`1, u!2) &
                                              BALLS(n!1, S!1)(vx`2) & seq_in(vx)})")
                     (expand "member")
                     (flatten)
                     (replace -2)
                     (propax))
                    ("2"
                     (hide 2 3)
                     (expand "nonempty?")
                     (inst -3 "n!1" "S!1")
                     (flatten)
                     (inst -6 "BALLS(n!1,S!1)" "u!2")
                     (assert)
                     (split -6)
                     (("1"
                       (skosimp)
                       (expand "empty?")
                       (inst - "(v!1,S!2)")
                       (expand "member")
                       (assert))
                      ("2"
                       (hide-all-but (-2 -4 1))
                       (expand "seq_in")
                       (skosimp)
                       (inst - "n!2")
                       (expand "subset?")
                       (inst - "u!2(n!2)")
                       (assert))))))))
                ("2"
                 (skosimp)
                 (hide 2)
                 (expand "nonempty?")
                 (expand "empty?")
                 (inst -2 "n!1" "S!1")
                 (flatten)
                 (inst -5 "BALLS(n!1, S!1)" "u!2")
                 (assert)
                 (split -5)
                 (("1" (skosimp) (inst -4 "(v!1,S!2)") (assert))
                  ("2"
                   (typepred "u!2")
                   (hide-all-but (-1 1 -4))
                   (name-replace "DRL" "Union(BALLS(n!1, S!1))")
                   (expand "seq_in")
                   (expand "subset?")
                   (skosimp)
                   (inst - "n!2")
                   (inst - "u!2(n!2)")
                   (assert))))))
              ("2"
               (skosimp)
               (hide -1)
               (expand "BALLS")
               (rewrite "finite_image" 1)
               (("1"
                 (hide-all-but (-4 1))
                 (expand "subset?")
                 (skosimp)
                 (expand "member")
                 (expand "CENTRES")
                 (case "nonempty?[set[T]]
                                            ({X: set[T] | epsilon_net?(S!1, X, 1 / (2 + n!1))})")
                 (("1"
                   (copy -1)
                   (expand "nonempty?" -1)
                   (lemma "choose_member[set[T]]"
                    ("a"
                     "{X: set[T] | epsilon_net?(S!1, X, 1 / (2 + n!1))}"))
                   (replace 1)
                   (name-replace "CC"
                    "choose[set[T]]
                                         ({X: set[T] | epsilon_net?(S!1, X, 1 / (2 + n!1))})")
                   (expand "member")
                   (expand "epsilon_net?" -1)
                   (flatten)
                   (expand "subset?" -3)
                   (inst - "x!1")
                   (assert))
                  ("2"
                   (hide 2 -1)
                   (inst - "1/(2+n!1)" "S!1")
                   (skosimp)
                   (expand "nonempty?")
                   (expand "empty?")
                   (inst - "X!2")
                   (assert))))
                ("2" (inst - "n!1" "S!1") (flatten))))))
            ("2"
             (skosimp)
             (expand "CENTRES")
             (hide -1 2)
             (case "nonempty?[set[T]]
                                      ({X: set[T] | epsilon_net?(S!1, X, 1 / (2 + n!1))})")
             (("1"
               (copy -1)
               (expand "nonempty?" -1)
               (lemma "choose_member[set[T]]"
                ("a"
                 "{X: set[T] | epsilon_net?(S!1, X, 1 / (2 + n!1))}"))
               (assert)
               (expand "epsilon_net?" -1 1)
               (flatten)
               (assert))
              ("2"
               (hide-all-but (-3 1))
               (inst - "1/(2+n!1)" "S!1")
               (skosimp)
               (expand "nonempty?")
               (expand "empty?")
               (inst - "X!2")
               (assert))))))
          ("2"
           (hide-all-but (-3 1))
           (skosimp)
           (inst - "1/(n!1+2)" "S!1")
           (skosimp)
           (expand "nonempty?")
           (expand "empty?")
           (inst - "X!2")
           (assert))))
        ("2"
         (hide-all-but 1)
         (case "forall (X,Y:set[T],u): seq_in(u, union(X,Y)) =>
                        (EXISTS v, S: subseq?(v, u) & (S=X or S=Y) & seq_in(v, S))")
         (("1"
           (case "FORALL (SS: setofsets[T], n:nat,u):
                         is_finite(SS) & card(SS) <= n & seq_in(u, Union(SS)) =>
                          (EXISTS v, S: subseq?(v, u) & SS(S) & seq_in(v, S))")
           (("1" (skosimp) (inst - "SS!1" "card(SS!1)" "u!2") (assert))
            ("2"
             (hide 2)
             (induct "n")
             (("1"
               (skosimp)
               (expand "<=" -2)
               (split)
               (("1" (assert))
                ("2"
                 (lemma "card_is_0" ("S" "SS!1"))
                 (replace -2 -1)
                 (replace -1)
                 (hide-all-but -4)
                 (expand "seq_in")
                 (expand "emptyset")
                 (expand "Union")
                 (inst - "0")
                 (skosimp))))
              ("2"
               (skosimp*)
               (expand "<=" -3)
               (split -3)
               (("1" (inst - "SS!1" "u!2") (assert))
                ("2"
                 (lemma "nonempty_card" ("S" "SS!1"))
                 (assert)
                 (copy -1)
                 (expand "nonempty?" -1)
                 (lemma "choose_rest" ("a" "SS!1"))
                 (replace 1 -1)
                 (inst -7 "Union(rest(SS!1))" "choose(SS!1)" "u!2")
                 (split -7)
                 (("1"
                   (skosimp)
                   (split)
                   (("1"
                     (replace -1)
                     (inst -7 "rest(SS!1)" "v!1")
                     (rewrite "finite_rest")
                     (replace -3)
                     (lemma "card_rest" ("S" "SS!1"))
                     (replace 1)
                     (replace -7)
                     (replace -1)
                     (assert)
                     (skosimp)
                     (inst + "v!2" "S!2")
                     (assert)
                     (expand "rest")
                     (expand "remove")
                     (expand "member")
                     (flatten)
                     (assert)
                     (hide-all-but (3 -8 -3))
                     (lemma "transitive_subseq"
                      ("u" "v!2" "v" "v!1" "w" "u!2"))
                     (assert))
                    ("2" (inst + "v!1" "S!1") (assert))))
                  ("2"
                   (hide-all-but (-2 -6 1 2))
                   (expand "seq_in")
                   (skosimp)
                   (inst - "n!1")
                   (expand "union")
                   (expand "member")
                   (flatten)
                   (expand "Union")
                   (skosimp)
                   (case-replace "a!1=choose(SS!1)")
                   (inst + "a!1")
                   (expand "rest")
                   (replace 4)
                   (expand "remove")
                   (expand "member")
                   (assert))))))))))
          ("2"
           (hide 2)
           (skosimp)
           (name "N2" "inverse_image[nat,T](u!2,Y!1)")
           (name "N1" "inverse_image[nat,T](u!2,X!2)")
           (case "union(N1,N2)=fullset[nat]")
           (("1"
             (case "forall S: is_infinite(inverse_image[nat, T](u!2,S)) => exists v: subseq?(v, u!2)&seq_in(v, S)")
             (("1"
               (case "is_finite(N1)")
               (("1"
                 (inst - "Y!1")
                 (split)
                 (("1" (skosimp) (inst + "v!1" "Y!1") (assert))
                  ("2"
                   (replace -5)
                   (lemma "finite_union[nat]" ("A" "N1" "B" "N2"))
                   (("1"
                     (replace -4)
                     (hide-all-but -1)
                     (lemma "infinite_def[nat]" ("X" "fullset[nat]"))
                     (replace -2)
                     (assert)
                     (inst + "lambda (n:nat): n")
                     (("1" (expand "injective?") (skosimp))
                      ("2" (expand "fullset") (propax))))
                    ("2" (propax)) ("3" (propax))))))
                ("2"
                 (inst - "X!2")
                 (replace -3)
                 (replace 1)
                 (skosimp)
                 (inst + "v!1" "X!2")
                 (assert))))
              ("2"
               (hide-all-but 1)
               (skosimp)
               (expand "seq_in")
               (name "N" "inverse_image[nat, T](u!2, S!1)")
               (replace -1)
               (name "GX"
                     "lambda (S:infinite_set[nat]): remove(min(S),S)")
               (name "F"
                     "lambda (n:nat): iterate[infinite_set[nat]](GX,n)(N)")
               (("1"
                 (inst + "lambda (n:nat): u!2(min(F(n)))")
                 (split)
                 (("1"
                   (expand "subseq?")
                   (inst + "lambda (n:nat): min(F(n))")
                   (("1" (skosimp))
                    ("2"
                     (hide 2)
                     (expand "strict_increasing?")
                     (case "forall (n:nat): min[nat](F(n)) < min[nat](F(n+1))")
                     (("1"
                       (case "forall (i:nat,pn:posnat): min[nat](F(i)) < min[nat](F(i + pn))")
                       (("1"
                         (skosimp)
                         (inst - "x!1" "y!1-x!1")
                         (("1" (assert)) ("2" (assert))))
                        ("2"
                         (hide-all-but (-1 1))
                         (induct "pn")
                         (("1" (assert)) ("2" (assert))
                          ("3"
                           (skosimp)
                           (skosimp)
                           (case-replace "j!1=0")
                           (("1" (assert) (inst - "i!1"))
                            ("2"
                             (assert)
                             (inst - "i!1")
                             (inst - "i!1+j!1")
                             (assert))))))))
                      ("2"
                       (hide 2)
                       (skosimp)
                       (expand "F")
                       (expand "iterate" 1 2)
                       (name "MINS"
                             "iterate[infinite_set[nat]](GX, n!1)(N)")
                       (replace -1)
                       (expand "GX")
                       (hide -2 -3)
                       (typepred "min[nat](MINS)")
                       (typepred "min[nat](remove(min(MINS), MINS))")
                       (expand "remove" -1 1)
                       (flatten)
                       (expand "member")
                       (inst -4 "min[nat](remove(min(MINS), MINS))")
                       (assert))))))
                  ("2"
                   (case "forall (n:nat): subset?(F(n),N)")
                   (("1"
                     (skosimp)
                     (inst - "n!1")
                     (expand "subset?")
                     (expand "member")
                     (expand "N")
                     (typepred "min(F(n!1))")
                     (inst -3 "min(F(n!1))")
                     (assert)
                     (expand "inverse_image")
                     (expand "member")
                     (propax))
                    ("2"
                     (hide 2)
                     (case "forall (n:nat): subset?(F(n+1),F(n))")
                     (("1"
                       (induct "n")
                       (("1"
                         (expand "F")
                         (expand "iterate")
                         (hide-all-but 1)
                         (grind))
                        ("2"
                         (skosimp)
                         (inst - "j!1")
                         (hide-all-but (-1 -2 1))
                         (expand "subset?")
                         (skosimp)
                         (inst - "x!1")
                         (inst - "x!1")
                         (ground))))
                      ("2"
                       (hide 2)
                       (skosimp)
                       (expand "subset?")
                       (expand "F")
                       (expand "member")
                       (skosimp)
                       (expand "iterate" -1)
                       (expand "GX" -1 1)
                       (expand "remove")
                       (flatten)
                       (expand "member")
                       (propax))))))))
                ("2" (propax))))))
            ("2"
             (apply-extensionality :hide? t)
             (expand "fullset")
             (hide-all-but (-3 1))
             (expand "seq_in")
             (expand "union")
             (expand "N1")
             (expand "N2")
             (expand "inverse_image")
             (expand "member")
             (flatten)
             (inst - "x!1")
             (split)
             (("1" (propax)) ("2" (propax))))))))))
      ("2"
       (hide 2)
       (skosimp)
       (inst - "r!1/3")
       (skosimp)
       (expand "epsilon_net?")
       (flatten)
       (hide -4)
       (expand "subset?" -4)
       (expand "member")
       (name "BALLS" "image(LAMBDA (x_1: T): ball(x_1, r!1 / 3), X!2)")
       (replace -1)
       (lemma "finite_image"
        ("f" "LAMBDA (x_1: T): ball(x_1, r!1 / 3)" "S" "X!2"))
       (("1"
         (replace -2)
         (name "BALLS2"
               "{S | exists (b:(BALLS),x): S = b & S!1(x) & b(x)}")
         (lemma "finite_subset" ("A" "BALLS" "s" "BALLS2"))
         (("1"
           (split -1)
           (("1"
             (case "subset?(BALLS2,BALLS)")
             (("1"
               (name "CENTRES"
                     "image[(BALLS2), T]
                               (LAMBDA (S: (BALLS2)): choose({x | S!1(x) & S(x)}),
                                restrict[set[T], ((BALLS2)), boolean](BALLS2))")
               (("1"
                 (lemma "finite_image[(BALLS2), T]"
                  ("f"
                   "LAMBDA (S: (BALLS2)): choose({x | S!1(x) & S(x)})"
                   "S"
                   "restrict[set[T], ((BALLS2)), boolean](BALLS2)"))
                 (("1"
                   (replace -2)
                   (case "subset?(CENTRES,S!1)")
                   (("1"
                     (inst + "CENTRES")
                     (assert)
                     (expand "subset?")
                     (skosimp)
                     (expand "member")
                     (expand "image" 1)
                     (expand "Union" 1)
                     (inst-cp -13 "x!1")
                     (expand "Union" -14)
                     (skosimp)
                     (typepred "a!1")
                     (case "BALLS2(a!1)")
                     (("1"
                       (name "XX"
                             "(LAMBDA (S: (BALLS2)): choose({x | S!1(x) & S(x)}))(a!1)")
                       (("1"
                         (assert)
                         (inst + "ball(XX,r!1)")
                         (("1"
                           (expand "BALLS" -3)
                           (expand "image")
                           (skosimp)
                           (replace -3)
                           (lemma "choose_member"
                            ("a" "{x | S!1(x) & ball(x!2, r!1 / 3)(x)}"))
                           (replace -2)
                           (split)
                           (("1"
                             (expand "member")
                             (hide-all-but (-1 -18 1))
                             (expand "ball")
                             (typepred "d")
                             (expand "metric?")
                             (flatten)
                             (expand "metric_triangle?")
                             (expand "metric_symmetric?")
                             (inst - "XX" "x!2")
                             (replace -2 * rl)
                             (inst - "XX" "x!2" "x!1")
                             (assert))
                            ("2"
                             (expand "empty?")
                             (inst - "x!1")
                             (expand "member")
                             (propax))))
                          ("2"
                           (inst + "XX")
                           (expand "CENTRES")
                           (expand "restrict")
                           (expand "image")
                           (inst + "a!1")
                           (assert))))
                        ("2"
                         (hide 2)
                         (skosimp)
                         (replace -1)
                         (expand "BALLS2")
                         (skosimp)
                         (expand "nonempty?")
                         (expand "empty?")
                         (expand "member")
                         (inst -2 "x!2")
                         (assert))
                        ("3" (propax))))
                      ("2"
                       (hide-all-but (-1 1 -10 -15))
                       (expand "BALLS2")
                       (inst + "a!1" "x!1")
                       (assert))))
                    ("2"
                     (hide-all-but 1)
                     (expand "CENTRES")
                     (expand "subset?")
                     (expand "member")
                     (expand "restrict")
                     (expand "image")
                     (skosimp*)
                     (assert))))
                  ("2"
                   (hide-all-but (-3 1))
                   (expand "restrict")
                   (expand "is_finite")
                   (propax))))
                ("2"
                 (hide 2)
                 (skosimp)
                 (typepred "S!2")
                 (expand "BALLS2")
                 (skosimp)
                 (expand "nonempty?")
                 (expand "empty?")
                 (inst -4 "x!1")
                 (assert))))
              ("2"
               (hide-all-but 1)
               (expand "BALLS2")
               (expand "subset?")
               (expand "member")
               (skosimp*)
               (assert))))
            ("2"
             (hide 2)
             (expand "subset?" 1)
             (skosimp)
             (expand "member")
             (replace -2 -1 rl)
             (assert)
             (skosimp)
             (typepred "b!1")
             (assert))))
          ("2" (propax))))
        ("2" (propax))))))
    ("2" (flatten) (lemma "cauchy_subseq_is_totally_bounded") (assert))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (split)
   (("1"
     (flatten)
     (lemma "compact_is_weierstrass_bolzano")
     (assert)
     (expand "weierstrass_bolzano?")
     (case-replace "totally_bounded?(fullset[T])")
     (("1"
       (expand "fullset" 1)
       (expand "metric_complete?")
       (skosimp)
       (inst - "u!1")
       (skosimp)
       (hide -1 -4)
       (expand "metric_convergent?")
       (skosimp)
       (inst + "x!1")
       (expand "metric_converges_to")
       (skosimp)
       (expand "cauchy?")
       (inst -3 "r!1/2")
       (skosimp)
       (expand "subseq?")
       (skosimp)
       (typepred "f!1")
       (case "forall (i:nat): f!1(i)>=i")
       (("1"
         (inst -4 "r!1/2")
         (expand "ball")
         (expand "member")
         (skosimp)
         (inst + "n!1+n!2")
         (skosimp)
         (inst - "i!1")
         (inst - "i!1")
         (inst - "i!1")
         (assert)
         (inst - "i!1" "f!1(i!1)")
         (assert)
         (lemma "metric_triangle"
          ("x" "x!1" "y" "v!1(i!1)" "z" "u!1(i!1)"))
         (assert))
        ("2"
         (hide-all-but (-1 1))
         (induct "i")
         (("1" (assert))
          ("2"
           (skosimp)
           (assert)
           (expand "strict_increasing?")
           (inst - "j!1" "1+j!1")
           (assert))))))
      ("2"
       (hide 2)
       (hide -1)
       (expand "fullset")
       (expand "compact?")
       (expand "compact_subset?")
       (expand "totally_bounded?")
       (skosimp)
       (expand "epsilon_net?")
       (expand "subset?" 1 1)
       (expand "member")
       (inst - "image(lambda x: ball(x,r!1),fullset[T])")
       (split -1)
       (("1"
         (skosimp)
         (expand "finite_cover?")
         (flatten)
         (inst +
          "{x | exists (a:(V!1)): x = choose({x| a=ball(x,r!1)})}")
         (("1"
           (split)
           (("1"
             (lemma "finite_image[(V!1),T]"
              ("S"
               "V!1"
               "f"
               "lambda (a:(V!1)): choose({x | a = ball(x, r!1)})"))
             (("1" (expand "restrict") (expand "image") (propax))
              ("2"
               (hide 2)
               (skosimp)
               (expand "nonempty?")
               (expand "empty?")
               (expand "fullset")
               (expand "image")
               (expand "subset?")
               (expand "member")
               (inst -2 "a!1")
               (assert)
               (skosimp)
               (inst - "x!1"))
              ("3"
               (hide-all-but (-2 1))
               (expand "restrict")
               (expand "is_finite")
               (propax))))
            ("2"
             (expand "subset?")
             (expand "fullset")
             (expand "image")
             (expand "Union")
             (expand "member")
             (skosimp)
             (hide -2)
             (expand "cover?")
             (expand "subset?")
             (expand "member")
             (expand "Union")
             (inst -2 "x!1")
             (skosimp)
             (inst + "a!1")
             (inst - "a!1")
             (assert)
             (typepred "a!1")
             (case "nonempty?[T]({x | a!1 = ball[T, d](x, r!1)})")
             (("1"
               (typepred "choose[T]({x | a!1 = ball[T, d](x, r!1)})")
               (("1"
                 (inst + "choose[T]({x | a!1 = ball[T, d](x, r!1)})")
                 (inst + "a!1"))
                ("2" (propax))))
              ("2"
               (hide 2)
               (skosimp)
               (expand "nonempty?")
               (expand "empty?")
               (inst - "x!2")
               (assert))))))
          ("2"
           (skosimp)
           (expand "fullset")
           (expand "image")
           (expand "subset?")
           (expand "member")
           (inst - "a!1")
           (assert)
           (skosimp)
           (expand "nonempty?")
           (expand "empty?")
           (inst - "x!2")
           (assert))))
        ("2"
         (hide 2)
         (expand "fullset")
         (expand "metric_induced_topology")
         (expand "image")
         (expand "open_cover?")
         (split)
         (("1" (expand "subset?") (expand "member") (skosimp*) (assert))
          ("2"
           (expand "cover?")
           (expand "subset?")
           (expand "Union")
           (expand "member")
           (skosimp)
           (inst + "ball(x!1,r!1)")
           (("1"
             (lemma "ball_centre" ("x" "x!1" "r" "r!1"))
             (expand "member")
             (propax))
            ("2" (inst + "x!1"))))))))))
    ("2"
     (flatten)
     (lemma "totally_bounded_iff_cauchy_subseq")
     (assert)
     (expand "fullset" -2)
     (expand "metric_complete?")
     (rewrite "compact_iff_convergent_subseq")
     (expand "weierstrass_bolzano?")
     (skosimp)
     (inst - "u!1")
     (skosimp)
     (inst - "v!1")
     (inst + "v!1")
     (assert)
     (expand "metric_convergent?")
     (propax))))


proof_type: t_proof
decl_type: tcc
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "metric_open_set")
   (expand "emptyset")
   (expand "metric_open?")
   (skosimp)
   (skosimp)
   (expand "subset?")
   (inst - "x!1")
   (rewrite "ball_centre")
   (expand "member")
   (propax))


proof_type: t_proof
decl_type: tcc
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "metric_closed_set")
   (expand "metric_closed?")
   (rewrite "complement_complement")
   (rewrite "metric_open_TCC1"))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "metric_open?")
   (skosimp)
   (split)
   (("1"
     (flatten)
     (case-replace "x!2=x!1")
     (("1" (inst + "r!1") (rewrite "subset_reflexive"))
      ("2"
       (lemma "metric_zero" ("x" "x!1" "y" "x!2"))
       (assert)
       (case "r!1-d(x!1,x!2)>0")
       (("1"
         (inst + "r!1 - d(x!1, x!2)")
         (("1"
           (expand "subset?")
           (skosimp)
           (expand "member")
           (expand "ball")
           (lemma "metric_triangle" ("x" "x!1" "y" "x!2" "z" "x!3"))
           (assert))
          ("2" (assert))))
        ("2" (expand "ball") (assert))))))
    ("2"
     (skosimp*)
     (expand "subset?")
     (inst - "x!2")
     (rewrite "ball_centre")
     (expand "member")
     (propax))))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "metric_induced_topology")
   (expand "topology?")
   (split)
   (("1"
     (expand "topology_empty?")
     (expand "member")
     (expand "metric_open?")
     (skosimp)
     (expand "emptyset")
     (skosimp)
     (expand "subset?")
     (inst - "x!1")
     (expand "member")
     (expand "ball")
     (rewrite "metric_is_0")
     (assert))
    ("2"
     (expand "topology_full?")
     (expand "fullset")
     (expand "member")
     (expand "metric_open?")
     (skosimp)
     (expand "subset?")
     (expand "member")
     (propax))
    ("3"
     (expand "topology_Union?")
     (expand "subset?")
     (expand "member")
     (skosimp)
     (expand "metric_open?")
     (skosimp)
     (split 1)
     (("1"
       (flatten)
       (expand "Union")
       (skosimp)
       (typepred "a!1")
       (inst - "a!1")
       (assert)
       (inst - "x!1")
       (assert)
       (skosimp)
       (inst + "r!1")
       (expand "subset?")
       (skosimp)
       (inst - "x!2")
       (expand "member")
       (inst + "a!1")
       (assert))
      ("2"
       (skosimp*)
       (expand "subset?")
       (expand "Union")
       (expand "member")
       (inst - "x!1")
       (lemma "ball_centre" ("x" "x!1" "r" "r!1"))
       (expand "member")
       (assert))))
    ("4"
     (expand "topology_intersection?")
     (skosimp)
     (typepred "A!1")
     (typepred "B!1")
     (expand "intersection")
     (expand "metric_open?")
     (expand "member")
     (skosimp)
     (inst - "x!1")
     (inst - "x!1")
     (split 1)
     (("1"
       (flatten)
       (assert)
       (skosimp*)
       (inst + "min(r!1,r!2)")
       (hide -4 -6)
       (expand "subset?")
       (skosimp)
       (inst - "x!2")
       (inst - "x!2")
       (expand "member")
       (expand "ball")
       (expand "min")
       (grind))
      ("2"
       (flatten)
       (skosimp)
       (assert)
       (expand "subset?")
       (inst - "x!1")
       (rewrite "ball_centre")
       (expand "member")
       (propax))))))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: metric_space
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "hausdorff?")
   (expand "is_T2?")
   (skosimp)
   (lemma "metric_zero" ("x" "x!1" "y" "y!1"))
   (assert)
   (name "R" "d(x!1,y!1)/2")
   (inst + "ball(x!1,R)" "ball(y!1,R)")
   (("1"
     (split 3)
     (("1"
       (expand "disjoint?")
       (expand "intersection")
       (expand "empty?")
       (expand "member")
       (skosimp)
       (expand "ball")
       (lemma "metric_triangle" ("x" "x!1" "y" "x!2" "z" "y!1"))
       (lemma "metric_symmetric" ("x" "y!1" "y" "x!2"))
       (assert))
      ("2"
       (lemma "ball_centre" ("x" "x!1" "r" "R"))
       (expand "member")
       (propax))
      ("3"
       (lemma "ball_centre" ("x" "y!1" "r" "R"))
       (expand "member")
       (propax))))
    ("2" (expand "metric_induced_topology") (propax))
    ("3" (expand "metric_induced_topology") (propax)) ("4" (assert))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "metric_continuous_at?")
   (expand "continuous_at?")
   (expand "neighbourhood?")
   (expand "interior_point?")
   (split)
   (("1"
     (skosimp*)
     (expand "member")
     (inst - "ball(f!1(x0!1), epsilon!1)")
     (split -1)
     (("1"
       (skosimp)
       (typepred "U!1")
       (lemma "metric_open_def" ("S" "U!1"))
       (assert)
       (expand "metric_open?")
       (inst - "x0!1")
       (assert)
       (skosimp)
       (inst + "r!1")
       (skosimp)
       (expand "subset?")
       (inst - "x!1")
       (inst - "x!1")
       (assert)
       (expand "inverse_image")
       (expand "member")
       (propax))
      ("2"
       (hide 2)
       (lemma "metric_open_ball" ("x" "f!1(x0!1)" "r" "epsilon!1"))
       (rewrite "metric_open_def")
       (inst + "ball(f!1(x0!1), epsilon!1)")
       (lemma "ball_centre" ("x" "f!1(x0!1)" "r" "epsilon!1"))
       (assert)
       (rewrite "subset_reflexive"))))
    ("2"
     (skosimp*)
     (typepred "U!2")
     (lemma "metric_open_def[T2,d2]" ("S" "U!2"))
     (assert)
     (expand "metric_open?")
     (inst - "f!1(x0!1)")
     (assert)
     (skosimp)
     (inst - "r!1")
     (skosimp)
     (inst + "ball(x0!1, delta!1)")
     (("1"
       (lemma "ball_centre" ("x" "x0!1" "r" "delta!1"))
       (assert)
       (expand "subset?")
       (skosimp)
       (assert)
       (inst -4 "x!1")
       (assert)
       (expand "inverse_image")
       (expand "member")
       (inst -2 "f!1(x!1)")
       (inst - "f!1(x!1)")
       (assert))
      ("2"
       (assert)
       (rewrite "metric_open_def" 1 :dir rl)
       (rewrite "metric_open_ball"))))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "continuous?")
   (expand "metric_continuous?")
   (split)
   (("1"
     (skosimp*)
     (inst - "x!1")
     (lemma "metric_continuous_at_def" ("f" "f!1" "x0" "x!1"))
     (assert))
    ("2"
     (skosimp*)
     (inst - "x!1")
     (lemma "metric_continuous_at_def" ("f" "f!1" "x0" "x!1"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "convergence?")
   (skosimp*)
   (rewrite "metric_continuous_at_def" -2 :dir rl)
   (expand "continuous_at?")
   (inst -2 "U!1")
   (split -2)
   (("1"
     (expand "neighbourhood?")
     (expand "interior_point?")
     (skosimp)
     (typepred "U!2")
     (inst -4 "U!2")
     (assert)
     (skosimp)
     (inst + "n!1")
     (skosimp)
     (inst -4 "i!1")
     (assert)
     (expand "o")
     (expand "subset?")
     (inst - "u!1(i!1)")
     (expand "member")
     (expand "inverse_image")
     (expand "member")
     (propax))
    ("2"
     (hide 2)
     (expand "neighbourhood?")
     (expand "interior_point?")
     (typepred "U!1")
     (inst + "U!1")
     (expand "member")
     (rewrite "subset_reflexive"))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "metric_continuous_def")
   (expand "metric_continuous?")
   (expand "uniform_continuous?")
   (expand "metric_continuous_at?")
   (expand "ball")
   (expand "member")
   (skosimp*)
   (inst - "epsilon!1")
   (skosimp)
   (inst + "delta!1")
   (skosimp)
   (inst - "x!2" "x!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: metric_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1"
     (flatten)
     (expand "uniform_continuous?")
     (skosimp*)
     (rewrite "metric_continuous_def")
     (name "DELTA"
           "LAMBDA x: {delta| forall (y:T1): d1(x,y)<2*delta => d2(f!1(x),f!1(y))<epsilon!1/2}")
     (case "forall x: nonempty?[posreal](DELTA(x))")
     (("1"
       (name "Delta" "LAMBDA x: choose[posreal](DELTA(x))")
       (("1"
         (hide -3)
         (case "forall x: Delta(x)>0")
         (("1"
           (expand "compact_subset?")
           (inst -5 "image((LAMBDA x: ball(x,Delta(x))),fullset[T1])")
           (split -5)
           (("1"
             (skosimp)
             (expand "finite_cover?")
             (flatten)
             (name "N" "card(V!1)")
             (("1"
               (name "Centres" "{x| V!1(ball(x,Delta(x)))}")
               (name "F" "lambda x: ball(x,Delta(x))")
               (replace -1)
               (case "nonempty?(V!1)")
               (("1"
                 (lemma "nonempty_card[set[T1]]" ("S" "V!1"))
                 (assert)
                 (replace -5)
                 (case "surjective?[(Centres),(V!1)](F)")
                 (("1"
                   (lemma "surjective_inverse_exists[(Centres),(V!1)]"
                    ("f" "F"))
                   (("1"
                     (skosimp)
                     (expand "restrict")
                     (expand "inverse?")
                     (case "injective?[(V!1),(Centres)](g!1)")
                     (("1"
                       (name "X" "image(g!1, fullset[(V!1)])")
                       (case "bijective?[(V!1),(X)](g!1)")
                       (("1"
                         (case "is_finite(X)")
                         (("1"
                           (case "card(X) = N")
                           (("1"
                             (lemma "comp_inverse_right_alt[(V!1), (X)]"
                              ("f" "g!1" "g" "F"))
                             (("1"
                               (expand "restrict")
                               (name "SS" "image[(X),posreal](Delta,X)")
                               (lemma "finite_image[(X),posreal]"
                                ("f" "Delta" "S" "X"))
                               (("1"
                                 (replace -2)
                                 (hide -2)
                                 (case "nonempty?(SS)")
                                 (("1"
                                   (lemma
                                    "min_lem"
                                    ("SS" "SS" "a" "min(SS)"))
                                   (("1"
                                     (assert)
                                     (case
                                      "forall x: exists (y:(X)): F(y)(x)")
                                     (("1"
                                       (inst + "min(SS)")
                                       (("1"
                                         (skosimp)
                                         (expand "F" -1)
                                         (expand "ball" (-1 -25 1))
                                         (inst - "x0!1")
                                         (skosimp)
                                         (typepred "y!1")
                                         (inst - "Delta(y!1)")
                                         (("1"
                                           (lemma
                                            "metric_triangle"
                                            ("x"
                                             "y!1"
                                             "y"
                                             "x0!1"
                                             "z"
                                             "x!1"))
                                           (case
                                            "d1(y!1, x!1) < 2*Delta(y!1)")
                                           (("1"
                                             (hide -2)
                                             (inst -26 "y!1")
                                             (lemma
                                              "choose_member[posreal]"
                                              ("a" "DELTA(y!1)"))
                                             (split -1)
                                             (("1"
                                               (expand "member")
                                               (expand "DELTA" -1 1)
                                               (inst - "x!1")
                                               (split -1)
                                               (("1"
                                                 (lemma
                                                  "choose_member[posreal]"
                                                  ("a" "DELTA(y!1)"))
                                                 (split -1)
                                                 (("1"
                                                   (expand "member")
                                                   (expand "DELTA" -1 1)
                                                   (inst - "x0!1")
                                                   (split -1)
                                                   (("1"
                                                     (lemma
                                                      "metric_triangle"
                                                      ("x"
                                                       "f!1(x0!1)"
                                                       "y"
                                                       "f!1(y!1)"
                                                       "z"
                                                       "f!1(x!1)"))
                                                     (rewrite
                                                      "metric_symmetric"
                                                      -2)
                                                     (assert))
                                                    ("2"
                                                     (expand "Delta" -5)
                                                     (assert))))
                                                  ("2"
                                                   (expand "nonempty?")
                                                   (propax))))
                                                ("2"
                                                 (expand "Delta")
                                                 (propax))))
                                              ("2"
                                               (expand "nonempty?")
                                               (propax))))
                                            ("2" (assert))))
                                          ("2"
                                           (expand "SS")
                                           (expand "restrict")
                                           (expand "image")
                                           (inst + "y!1"))))
                                        ("2"
                                         (expand "nonempty?")
                                         (propax))))
                                      ("2"
                                       (hide -23 2)
                                       (skosimp)
                                       (expand "cover?")
                                       (expand "Union")
                                       (expand "subset?")
                                       (expand "member")
                                       (inst -19 "x!1")
                                       (split -19)
                                       (("1"
                                         (skosimp)
                                         (typepred "a!1")
                                         (inst -19 "a!1")
                                         (assert)
                                         (expand "fullset")
                                         (expand "image")
                                         (skosimp)
                                         (typepred "g!1(a!1)")
                                         (inst -13 "a!1")
                                         (split -13)
                                         (("1"
                                           (inst + "g!1(a!1)")
                                           (("1" (assert))
                                            ("2"
                                             (assert)
                                             (expand "X")
                                             (expand "fullset")
                                             (expand "image")
                                             (inst + "a!1"))))
                                          ("2"
                                           (hide 2)
                                           (expand "surjective?")
                                           (inst -13 "a!1"))))
                                        ("2"
                                         (hide-all-but 1)
                                         (lemma
                                          "ball_centre"
                                          ("x" "x!1" "r" "1"))
                                         (expand "member")
                                         (expand "fullset")
                                         (propax))))))
                                    ("2" (expand "nonempty?") (assert))))
                                  ("2"
                                   (expand "nonempty?" 1)
                                   (expand "SS")
                                   (expand "restrict")
                                   (expand "image")
                                   (expand "nonempty?")
                                   (expand "empty?")
                                   (skosimp)
                                   (expand "member")
                                   (inst - "Delta(g!1(x!1))")
                                   (inst + "g!1(x!1)")
                                   (assert)
                                   (expand "X")
                                   (expand "image")
                                   (inst + "x!1")
                                   (expand "fullset")
                                   (propax))))
                                ("2"
                                 (hide-all-but (-4 1))
                                 (expand "restrict")
                                 (expand "is_finite")
                                 (propax))))
                              ("2"
                               (hide 2)
                               (expand "inverse?")
                               (skosimp)
                               (skosimp)
                               (typepred "r!1")
                               (typepred "d!1")
                               (inst -10 "d!1")
                               (split -10)
                               (("1"
                                 (assert)
                                 (replace -5)
                                 (expand "restrict")
                                 (replace -1)
                                 (propax))
                                ("2"
                                 (hide 2)
                                 (expand "surjective?")
                                 (inst -10 "d!1"))))
                              ("3" (propax))))
                            ("2"
                             (hide-all-but (-1 -2 -11 1 -13))
                             (lemma "card_bij_inv[T1]" ("S" "X" "N" "N"))
                             (("1"
                               (hide -1)
                               (lemma "card_bij_inv[set[T1]]"
                                ("S" "V!1" "N" "N"))
                               (assert)
                               (skosimp)
                               (expand "bijective?")
                               (flatten)
                               (expand "injective?")
                               (assert)
                               (rewrite "card_bij_inv" +)
                               (inst +
                                "lambda (x:below[N]): g!1(f!2(x))")
                               (("1"
                                 (expand "bijective?")
                                 (split)
                                 (("1"
                                   (expand "injective?")
                                   (skosimp)
                                   (inst - "x1!1" "x2!1")
                                   (assert)
                                   (inst - "f!2(x1!1)" "f!2(x2!1)")
                                   (assert))
                                  ("2"
                                   (hide-all-but (-2 -5 1))
                                   (expand "surjective?")
                                   (skosimp)
                                   (inst -2 "y!1")
                                   (skosimp)
                                   (typepred "x!1")
                                   (inst - "x!1")
                                   (skosimp)
                                   (inst + "x!2")
                                   (assert))))
                                ("2"
                                 (skosimp)
                                 (typepred "g!1(f!2(x!1))")
                                 (expand "X" 1)
                                 (expand "fullset")
                                 (expand "image")
                                 (inst + "f!2(x!1)"))))
                              ("2"
                               (hide-all-but (-1 1))
                               (expand "is_finite")
                               (skolem - ("NN" "FF"))
                               (inst + "NN"
                                "lambda (x:(extend[T1, ((Centres)), bool, FALSE](X))): FF(x)")
                               (("1"
                                 (expand "injective?")
                                 (skosimp)
                                 (inst - "x1!1" "x2!1")
                                 (assert))
                                ("2"
                                 (skosimp)
                                 (typepred "x!1")
                                 (expand "extend")
                                 (prop))))))
                            ("3" (propax))))
                          ("2"
                           (hide-all-but (-1 -12 1))
                           (lemma "is_finite_surj[set[T1]]" ("s" "V!1"))
                           (assert)
                           (skosimp)
                           (expand "bijective?")
                           (flatten)
                           (lemma "is_finite_surj[(Centres)]" ("s" "X"))
                           (replace -1 1 rl)
                           (hide -1 -3 -5)
                           (expand "surjective?")
                           (inst + "N!1"
                            "lambda (x:below[N!1]): g!1(f!2(x))")
                           (("1"
                             (skosimp)
                             (inst -2 "y!1")
                             (skosimp)
                             (inst - "x!1")
                             (skosimp)
                             (inst + "x!2")
                             (assert))
                            ("2"
                             (skosimp)
                             (expand "X")
                             (expand "fullset")
                             (expand "image")
                             (inst + "f!2(x!1)"))))))
                        ("2"
                         (hide-all-but (-1 -2 1))
                         (lemma "bijective_image[(V!1),(Centres)]"
                          ("inj" "g!1"))
                         (("1"
                           (expand "bijective?")
                           (flatten)
                           (split)
                           (("1" (expand "injective?") (propax))
                            ("2"
                             (expand "surjective?")
                             (skosimp)
                             (typepred "y!1")
                             (expand "X")
                             (inst - "y!1"))))
                          ("2" (propax))))
                        ("3"
                         (hide-all-but (-1 1))
                         (expand "fullset")
                         (expand "image")
                         (replace -1 1 rl)
                         (skosimp)
                         (inst + "x1!1"))))
                      ("2"
                       (hide -14 2 -3 -4 -7 -9)
                       (expand "injective?")
                       (skosimp)
                       (typepred "x1!1")
                       (typepred "x2!1")
                       (inst-cp - "x1!1")
                       (inst - "x2!1")
                       (split -4)
                       (("1"
                         (split -5)
                         (("1" (expand "F") (assert))
                          ("2"
                           (expand "subset?")
                           (inst -8 "x1!1")
                           (expand "fullset")
                           (expand "image")
                           (expand "member")
                           (skosimp)
                           (inst + "x!1")
                           (("1" (assert)) ("2" (assert))))))
                        ("2"
                         (expand "subset?")
                         (expand "fullset")
                         (expand "image")
                         (expand "member")
                         (inst -8 "x2!1")
                         (assert)
                         (skosimp)
                         (inst + "x!1")
                         (("1" (assert)) ("2" (assert))))))))
                    ("2" (propax))))
                  ("2"
                   (hide 2)
                   (expand "restrict")
                   (expand "surjective?")
                   (skosimp)
                   (typepred "y!1")
                   (expand "subset?")
                   (inst - "y!1")
                   (expand "member")
                   (expand "fullset")
                   (expand "image")
                   (skosimp)
                   (inst + "x!1")
                   (("1" (assert))
                    ("2" (expand "Centres") (expand "F") (assert))))))
                ("2"
                 (expand "nonempty?")
                 (lemma "empty_card[set[T1]]" ("S" "V!1"))
                 (lemma "emptyset_is_empty?" ("a" "V!1"))
                 (assert)
                 (replace -1)
                 (hide -3 -6 -7 -8)
                 (expand "cover?")
                 (expand "subset?")
                 (expand "emptyset" -5)
                 (expand "member")
                 (case "nonempty?(fullset[T1])")
                 (("1"
                   (expand "nonempty?")
                   (expand "fullset")
                   (expand "empty?")
                   (skosimp)
                   (inst -6 "x!1")
                   (expand "Union" -6)
                   (skosimp))
                  ("2"
                   (expand "nonempty?")
                   (expand "fullset")
                   (expand "empty?")
                   (expand "member")
                   (inst + "1")
                   (skosimp)
                   (inst - "x0!1"))))))
              ("2" (propax))))
            ("2"
             (hide 2)
             (expand "open_cover?")
             (split)
             (("1"
               (expand "subset?")
               (expand "image")
               (expand "member")
               (skosimp)
               (skosimp)
               (expand "metric_induced_topology")
               (replace -1)
               (expand "metric_open?")
               (skosimp)
               (case-replace "ball(x!2, Delta(x!2))(x!3)")
               (("1"
                 (assert)
                 (expand "ball")
                 (inst + "Delta(x!2)-d1(x!2,x!3)")
                 (("1"
                   (expand "subset?")
                   (expand "member")
                   (skosimp)
                   (typepred "d1")
                   (expand "metric?")
                   (flatten)
                   (expand "metric_triangle?")
                   (inst - "x!2" "x!3" "x!4")
                   (assert))
                  ("2" (assert))))
                ("2"
                 (assert)
                 (skosimp)
                 (expand "subset?")
                 (inst - "x!3")
                 (rewrite "ball_centre")
                 (expand "member")
                 (propax))))
              ("2"
               (expand "cover?")
               (expand "subset?")
               (expand "member")
               (skosimp*)
               (expand "fullset")
               (expand "image")
               (expand "Union")
               (inst + "ball(x!1,Delta(x!1))")
               (("1"
                 (lemma "ball_centre" ("x" "x!1" "r" "Delta(x!1)"))
                 (expand "member")
                 (propax))
                ("2" (inst + "x!1"))))))))
          ("2"
           (skosimp)
           (expand "Delta")
           (inst - "x!1")
           (expand "nonempty?")
           (lemma "choose_member[posreal]" ("a" "DELTA(x!1)"))
           (assert))))
        ("2" (propax))))
      ("2"
       (expand "nonempty?")
       (skosimp)
       (expand "empty?")
       (expand "DELTA")
       (hide -2)
       (expand "member")
       (expand "metric_continuous?")
       (expand "metric_continuous_at?")
       (inst -2 "x!1")
       (inst -2 "epsilon!1/2")
       (expand "member")
       (expand "ball")
       (skosimp)
       (inst - "delta!1/2")
       (hide -2 2)
       (skosimp)
       (inst - "y!1")
       (assert))))
    ("2" (flatten) (rewrite "uniform_continuous"))))


proof_type: t_proof
decl_type: tcc
library: metric_space
theory: continuity_subspace
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "d1")
   (expand "restrict")
   (expand "metric?")
   (flatten)
   (split)
   (("1" (expand "metric_zero?") (skosimp*) (inst - "x!1" "y!1"))
    ("2" (expand "metric_symmetric?") (skosimp) (inst - "x!1" "y!1"))
    ("3"
     (expand "metric_triangle?")
     (skosimp)
     (inst - "x!1" "y!1" "z!1"))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "base?")
   (split)
   (("1"
     (expand "subset?")
     (skosimp*)
     (expand "fullset")
     (expand "metric_induced_topology")
     (expand "extend")
     (expand "member")
     (prop)
     (skosimp)
     (replace -1)
     (expand "metric_open?")
     (skosimp)
     (case-replace "ball(x!2, r!1)(x!3)")
     (("1"
       (assert)
       (expand "ball")
       (hide -2)
       (inst + "r!1-abs(x!2-x!3)")
       (("1"
         (expand "subset?")
         (skosimp)
         (expand "member")
         (lemma "triangle")
         (inst - "x!2-x!3" "x!3-x!4")
         (assert))
        ("2" (assert))))
      ("2"
       (replace 1 2)
       (assert)
       (hide -1)
       (skosimp)
       (expand "subset?")
       (expand "member")
       (inst - "x!3")
       (lemma "ball_centre" ("x" "x!3" "r" "r!2"))
       (expand "member")
       (assert))))
    ("2"
     (skosimp)
     (typepred "A!1")
     (expand "extend")
     (expand "subset?")
     (expand "member")
     (expand "fullset")
     (expand "metric_induced_topology")
     (expand "metric_open?")
     (name "VV"
           "{X:set[real]| EXISTS (x:real,r:posreal): X=ball(x,r) & subset?[real](X,A!1)}")
     (inst + "VV")
     (split)
     (("1"
       (skosimp)
       (hide -2)
       (prop)
       (expand "VV")
       (skosimp)
       (inst + "x!2" "r!1"))
      ("2"
       (apply-extensionality :hide? t)
       (hide -1)
       (expand "Union")
       (inst - "x!1")
       (case-replace "A!1(x!1)")
       (("1"
         (assert)
         (skosimp)
         (inst + "ball(x!1,r!1)")
         (("1"
           (lemma "ball_centre" ("x" "x!1" "r" "r!1"))
           (expand "member")
           (propax))
          ("2" (expand "VV") (replace -2) (inst + "x!1" "r!1"))))
        ("2"
         (assert)
         (assert)
         (skosimp)
         (typepred "a!1")
         (expand "VV")
         (skosimp)
         (expand "subset?")
         (inst - "x!1")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "open_basis")
   (expand "extend")
   (expand "base?")
   (flatten)
   (split)
   (("1"
     (expand "subset?")
     (expand "member")
     (skosimp)
     (prop)
     (skosimp)
     (inst -3 "x!1")
     (prop)
     (("1" (expand "fullset") (propax)) ("2" (inst + "q!1" "pq!1"))))
    ("2"
     (skosimp)
     (inst - "A!1")
     (skosimp)
     (inst +
      "{X:set[real] | EXISTS q, pq: X = ball(q, pq) & subset?[real](X,A!1)}")
     (split)
     (("1"
       (expand "subset?")
       (skosimp)
       (expand "member")
       (prop)
       (("1" (expand "fullset") (propax))
        ("2" (skosimp*) (inst + "q!1" "pq!1"))))
      ("2"
       (apply-extensionality 1 :hide? t)
       (expand "Union")
       (case-replace "A!1(x!1)")
       (("1"
         (replace -4 -1 rl)
         (assert)
         (skosimp)
         (typepred "a!1")
         (expand "subset?" -4)
         (expand "member")
         (inst -4 "a!1")
         (assert)
         (prop)
         (skosimp)
         (hide -5)
         (replace -1 -4)
         (expand "ball" -4)
         (name "AA" "ball(x!1,r!1-abs(x!2-x!1))")
         (("1"
           (case "subset?[real](AA,a!1)")
           (("1"
             (name-replace "R" "r!1 - abs(x!2 - x!1)")
             (case "R>0")
             (("1"
               (lemma "density" ("x" "x!1-R/8" "y" "x!1+R/8"))
               (assert)
               (skolem - ("q!1"))
               (flatten)
               (lemma "density" ("x" "R/4" "y" "R/2"))
               (assert)
               (skosimp)
               (case "ball(q!1,r!2)(x!1)")
               (("1"
                 (case "subset?[real](ball(q!1, r!2),AA)")
                 (("1"
                   (inst + "ball(q!1, r!2)")
                   (("1"
                     (inst + "q!1" "r!2")
                     (("1"
                       (expand "subset?")
                       (expand "member")
                       (skosimp)
                       (replace -15 1 rl)
                       (assert)
                       (hide -15)
                       (inst - "x!3")
                       (assert)
                       (inst - "x!3")
                       (inst + "a!1")
                       (assert))
                      ("2" (assert))))
                    ("2" (assert))))
                  ("2" (hide -13 2) (expand "AA") (expand "R") (grind))
                  ("3" (assert))))
                ("2" (grind)) ("3" (assert))))
              ("2" (assert) (expand "R") (assert))))
            ("2"
             (expand "subset?")
             (skosimp)
             (expand "member")
             (expand "AA")
             (expand "ball")
             (replace -3)
             (assert)
             (lemma "triangle")
             (inst - "x!2-x!1" "x!1-x!3")
             (assert))))
          ("2" (assert))))
        ("2"
         (assert)
         (skosimp)
         (typepred "a!1")
         (skosimp)
         (expand "subset?")
         (inst - "x!1")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (lemma "is_countable_cross"
    ("X" "fullset[rat]" "Y" "fullset[posrat]"))
   (lemma "nat_posrat")
   (lemma "nat_rational")
   (split)
   (("1"
     (hide -2 -3)
     (expand "fullset")
     (expand "cross_product")
     (expand "is_countable")
     (skosimp)
     (typepred "f!1")
     (name "F" "lambda (r:rat,pq:posrat): ball(r,pq)")
     (case "bijective?[[rat, posrat],rational_open_interval](F)")
     (("1"
       (lemma "bij_inv_is_bij[[rat, posrat], rational_open_interval]"
        ("f" "F"))
       (split)
       (("1"
         (assert)
         (inst +
          "f!1 o inverse[[rat, posrat], rational_open_interval](F)")
         (expand "bijective?")
         (flatten)
         (hide-all-but (-1 -6 1))
         (expand "o")
         (expand "injective?")
         (skosimp)
         (inst -3
          "inverse[[rat, posrat], rational_open_interval](F)(x1!1)"
          "inverse[[rat, posrat], rational_open_interval](F)(x2!1)")
         (assert)
         (inst - "x1!1" "x2!1")
         (assert))
        ("2" (propax))))
      ("2"
       (hide-all-but 1)
       (expand "bijective?")
       (split)
       (("1"
         (expand "injective?")
         (skosimp*)
         (expand "F")
         (rewrite "extensionality_postulate" -1 :dir rl)
         (lemma "trich_lt" ("x" "x1!1`1" "y" "x2!1`1"))
         (split)
         (("1"
           (lemma "trich_lt" ("x" "x1!1`2" "y" "x2!1`2"))
           (split)
           (("1"
             (inst - "max(x1!1`1+x1!1`2,x2!1`1)")
             (expand "ball")
             (grind))
            ("2"
             (inst - "max(x1!1`1+x1!1`2,x2!1`1)")
             (expand "ball")
             (grind))
            ("3"
             (expand "ball")
             (inst - "min(x1!1`1-x2!1`2,x1!1`1)")
             (grind))))
          ("2"
           (lemma "trich_lt" ("x" "x1!1`2" "y" "x2!1`2"))
           (split)
           (("1" (inst - "x1!1`1+x1!1`2") (expand "ball") (grind))
            ("2" (decompose-equality))
            ("3" (inst - "x1!1`1+x2!1`2") (expand "ball") (grind))))
          ("3"
           (lemma "trich_lt" ("x" "x1!1`2" "y" "x2!1`2"))
           (split)
           (("1"
             (inst - "min(x2!1`1-x1!1`2,x2!1`1)")
             (expand "ball")
             (grind))
            ("2"
             (inst - "min(x1!1`1-x1!1`2,x2!1`1)")
             (expand "ball")
             (grind))
            ("3"
             (inst - "max(x1!1`1+x2!1`2,x1!1`1)")
             (expand "ball")
             (grind))))))
        ("2"
         (expand "surjective?")
         (skosimp)
         (typepred "y!1")
         (skosimp)
         (inst + "(q!1, pq!1)")
         (expand "F")
         (assert))))
      ("3" (skosimp) (inst + "x1!1`1" "x1!1`2") (expand "F") (propax))))
    ("2"
     (hide -2 2)
     (expand "fullset")
     (expand "is_countable")
     (expand "is_countably_infinite_type")
     (skosimp)
     (inst + "f!1"))
    ("3"
     (hide -1 2)
     (expand "fullset")
     (expand "is_countably_infinite_type")
     (expand "is_countable")
     (skosimp)
     (inst + "f!1"))))


proof_type: t_proof
decl_type: tcc
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "metric?")
   (expand "metric_zero?")
   (expand "metric_symmetric?")
   (expand "metric_triangle?")
   (grind))


proof_type: t_proof
decl_type: tcc
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "fullset")
   (expand "unbounded_interval?")
   (split)
   (("1" (grind))
    ("2"
     (expand "unbounded?")
     (expand "bounded?")
     (expand "nonempty?")
     (split)
     (("1" (expand "empty?") (inst - "0") (assert))
      ("2"
       (flatten)
       (hide 1)
       (expand "above_bounded")
       (skosimp)
       (expand "upper_bound")
       (inst - "n!1+1")
       (assert))))))


proof_type: t_proof
decl_type: tcc
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "bounded_open_interval?")
   (split)
   (("1" (grind))
    ("2" (lemma "open_emptyset") (rewrite "metric_open_def"))))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + "X!1")
   (typepred "X!1")
   (skosimp)
   (replace -1)
   (hide -1)
   (expand "bounded_open_interval?")
   (expand "bounded_interval?")
   (split)
   (("1" (grind))
    ("2"
     (expand "bounded?")
     (flatten)
     (hide 1)
     (split)
     (("1" (expand "nonempty?") (expand "empty?") (inst - "x!1") (grind))
      ("2" (expand "above_bounded") (inst + "x!1+r!1") (grind))
      ("3" (expand "below_bounded") (inst + "x!1-r!1") (grind))))
    ("3" (rewrite "metric_open_ball"))))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "second_countable?")
   (typepred
    "metric_induced_topology
                        [real, (LAMBDA (x, y: real): abs(x - y))]")
   (expand "hausdorff_space?")
   (assert)
   (expand "has_countable_basis?")
   (lemma "rational_basis")
   (lemma "base_is_synthetic_base"
    ("t"
     "metric_induced_topology"
     "U"
     "fullset[rational_open_interval]"))
   (assert)
   (inst + "fullset[rational_open_interval]")
   (replace -1)
   (hide -1 -2 -3)
   (split)
   (("1"
     (case "is_countable(fullset[rat])")
     (("1"
       (lemma "countable_subset[rat]"
        ("S" "fullset[posrat]" "Count" "fullset[rat]"))
       (("1"
         (split)
         (("1"
           (lemma "is_countable_cross[rat,posrat]"
            ("X" "fullset[rat]" "Y" "fullset[posrat]"))
           (assert)
           (split)
           (("1"
             (hide -2 -3 -4)
             (name "F" "lambda (q:rat,pq:posrat): ball(q,pq)")
             (case "bijective?[(cross_product(fullset[rat], fullset[posrat])),rational_open_interval](F)")
             (("1"
               (case "bijective?[[rat, posrat],rational_open_interval](F)")
               (("1"
                 (hide -2)
                 (lemma
                  "bijective_inverse_is_bijective[[rat, posrat], rational_open_interval]"
                  ("f" "F"))
                 (("1"
                   (expand "is_countable")
                   (skosimp)
                   (inst +
                    "lambda (x:rational_open_interval): f!1(inverse[[rat,posrat],rational_open_interval](F)(x))")
                   (("1"
                     (typepred "f!1")
                     (expand "bijective?")
                     (flatten)
                     (hide -3 -4 -5 -6)
                     (expand "injective?")
                     (skosimp)
                     (inst -
                      "inverse[[rat, posrat], rational_open_interval](F)(x1!1)"
                      "inverse[[rat, posrat], rational_open_interval](F)(x2!1)")
                     (assert)
                     (inst - "x1!1" "x2!1")
                     (assert))
                    ("2"
                     (skosimp)
                     (prop)
                     (("1" (expand "fullset") (expand "extend") (prop))
                      ("2" (expand "fullset") (expand "extend") (prop))))
                    ("3"
                     (skosimp)
                     (expand "fullset")
                     (expand "cross_product")
                     (propax))))
                  ("2" (propax))))
                ("2"
                 (hide-all-but (-1 1))
                 (expand "restrict")
                 (expand "bijective?")
                 (flatten)
                 (split)
                 (("1"
                   (hide -2)
                   (expand "injective?")
                   (skosimp)
                   (inst - "x1!1" "x2!1")
                   (("1" (assert))
                    ("2"
                     (expand "fullset")
                     (expand "cross_product")
                     (propax))
                    ("3"
                     (expand "fullset")
                     (expand "cross_product")
                     (propax))))
                  ("2"
                   (hide -1)
                   (expand "surjective?")
                   (skosimp)
                   (inst - "y!1")
                   (skosimp)
                   (inst + "x!1"))))
                ("3"
                 (replace -2 1 rl)
                 (skosimp)
                 (inst + "x1!1`1" "x1!1`2"))))
              ("2"
               (hide 2)
               (hide-all-but 1)
               (expand "bijective?")
               (expand "restrict")
               (split)
               (("1"
                 (expand "injective?")
                 (skosimp)
                 (expand "F")
                 (rewrite "extensionality_postulate" -1 :dir rl)
                 (case-replace "x2!1`1=x1!1`1")
                 (("1"
                   (case-replace "x2!1`2=x1!1`2")
                   (("1" (decompose-equality))
                    ("2"
                     (case "x2!1`2 > x1!1`2")
                     (("1"
                       (inst - "x1!1`1-x1!1`2")
                       (expand "ball")
                       (assert)
                       (grind))
                      ("2" (inst - "x1!1`1-x2!1`2") (grind))))))
                  ("2"
                   (case-replace "x2!1`2=x1!1`2")
                   (("1"
                     (case "x2!1`1>x1!1`1")
                     (("1" (inst - "max(x1!1`1+x1!1`2,x2!1`1)") (grind))
                      ("2"
                       (inst - "max(x2!1`1+x1!1`2,x1!1`1)")
                       (grind))))
                    ("2"
                     (case "x2!1`2>x1!1`2")
                     (("1"
                       (case "x2!1`1>x1!1`1")
                       (("1"
                         (inst - "max(x1!1`1+x2!1`2,x2!1`1)")
                         (grind))
                        ("2" (inst - "x2!1`1-x1!1`2") (grind))))
                      ("2"
                       (case "x2!1`1>x1!1`1")
                       (("1" (inst - "x1!1`1-x2!1`2") (grind))
                        ("2" (inst - "x1!1`1+x2!1`2") (grind))))))))))
                ("2"
                 (expand "F")
                 (expand "surjective?")
                 (skosimp)
                 (typepred "y!1")
                 (skosimp)
                 (inst + "(q!1,pq!1)")
                 (("1" (assert))
                  ("2"
                   (expand "cross_product")
                   (expand "fullset")
                   (propax))))))
              ("3"
               (skosimp)
               (inst + "x1!1`1" "x1!1`2")
               (expand "F")
               (propax))))
            ("2"
             (hide -2 2 -3)
             (expand "fullset")
             (expand "extend")
             (expand "is_countable")
             (skosimp)
             (inst + "f!1"))))
          ("2" (hide-all-but 1) (grind))))
        ("2" (propax))))
      ("2"
       (hide-all-but 1)
       (lemma "nat_rational")
       (expand "is_countably_infinite_type")
       (expand "fullset")
       (expand "is_countable")
       (skosimp)
       (inst + "f!1"))))
    ("2"
     (apply-extensionality :hide? t)
     (expand "metric_induced_topology")
     (case-replace "metric_open?(x!1)")
     (("1"
       (expand "fullset")
       (expand "extend")
       (expand "synthetic_generated_topology_set")
       (lemma "rational_basis")
       (expand "base?")
       (flatten)
       (inst - "x!1")
       (("1"
         (skosimp)
         (inst + "V!1")
         (expand "fullset")
         (expand "extend")
         (assert))
        ("2" (expand "metric_induced_topology") (propax))))
      ("2"
       (expand "fullset")
       (expand "extend")
       (expand "synthetic_generated_topology_set")
       (assert)
       (skosimp)
       (replace -2 * rl)
       (rewrite "metric_open_def")
       (lemma "open_Union" ("Y" "V!1"))
       (assert)
       (expand "every")
       (skosimp)
       (typepred "x!2")
       (expand "subset?")
       (expand "member")
       (inst - "x!2")
       (assert)
       (prop)
       (skosimp)
       (replace -1)
       (rewrite "metric_open_def" 1 :dir rl)
       (rewrite "metric_open_ball"))))))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "complete_metric_space?")
   (split)
   (("1" (grind))
    ("2"
     (expand "fullset")
     (expand "metric_complete?")
     (skosimp)
     (case "forall (u:sequence[real]): (exists (a:real): forall (i:nat): u(i) <= a) & (forall (i,j:nat): i <= j => u(i) <= u(j)) => metric_convergent?({x: real | TRUE},u)")
     (("1"
       (case "forall (X:set[real]): is_finite(X) & nonempty?(X) => exists (a:(X)): forall (x:(X)): x <= a")
       (("1"
         (copy -3)
         (expand "cauchy?" -1)
         (inst - "1")
         (expand "ball")
         (expand "member")
         (skosimp)
         (case "forall (n:nat): nonempty?(image(u!1,{m:nat | m>=n}))")
         (("1"
           (case "forall (n:nat):bounded_real_defs. bounded?(image(u!1,{m:nat | m>=n}))")
           (("1"
             (name "V"
                   "LAMBDA (n: nat):
                            bounded_real_defs.lub(image(u!1, {m: nat | m >= n}))")
             (("1"
               (case "FORALL (i, j: nat): i <= j => V(i) >= V(j)")
               (("1"
                 (case "metric_convergent?({x: real | TRUE}, V)")
                 (("1"
                   (hide -8 -7)
                   (expand "metric_convergent?")
                   (skosimp)
                   (inst + "x!1")
                   (expand "metric_converges_to")
                   (skosimp)
                   (inst - "r!1/3")
                   (skosimp)
                   (expand "ball")
                   (expand "member")
                   (hide -6)
                   (expand "cauchy?")
                   (inst -6 "r!1/3")
                   (skosimp)
                   (expand "ball")
                   (expand "member")
                   (case "FORALL (i: nat):
                                 i >= max(n!2, n!3) => abs(V(i)-u!1(i)) < 2 * r!1 / 3")
                   (("1"
                     (inst + "max(n!2, n!3)")
                     (skosimp)
                     (inst - "i!1")
                     (inst - "i!1")
                     (assert)
                     (lemma "triangle"
                      ("x" "x!1 - V(i!1)" "y" "V(i!1) - u!1(i!1)"))
                     (assert))
                    ("2"
                     (hide 2)
                     (skosimp)
                     (expand "V" 1)
                     (hide -4)
                     (inst -4 "i!1")
                     (inst -5 "i!1")
                     (expand "bounded?")
                     (flatten)
                     (typepred
                      "bounded_real_defs.lub(image(u!1, {m: nat | m >= i!1}))")
                     (name-replace "LUB"
                      "bounded_real_defs.lub(image(u!1, {m: nat | m >= i!1}))")
                     (expand "least_upper_bound?")
                     (flatten)
                     (expand "upper_bound?")
                     (inst - "u!1(i!1)")
                     (("1"
                       (expand "abs" 1)
                       (assert)
                       (inst - "u!1(i!1)+r!1/3")
                       (assert)
                       (hide 2)
                       (skosimp)
                       (typepred "s!1")
                       (expand "image" -1)
                       (skolem - ("M"))
                       (typepred "M")
                       (inst -10 "i!1" "M")
                       (assert)
                       (expand "abs" -10)
                       (assert))
                      ("2" (expand "image") (inst + "i!1"))))))
                  ("2"
                   (hide -8 2)
                   (inst -7 "lambda (i:nat): -V(i)")
                   (hide -2)
                   (split -6)
                   (("1"
                     (hide-all-but (-1 1))
                     (expand "metric_convergent?")
                     (skosimp)
                     (inst + "-x!1")
                     (expand "metric_converges_to")
                     (skosimp)
                     (inst - "r!1")
                     (skosimp)
                     (inst + "n!2")
                     (skosimp)
                     (inst - "i!1")
                     (assert)
                     (expand "ball")
                     (grind))
                    ("2"
                     (hide 2)
                     (inst-cp -2 "0")
                     (expand "bounded?" -3)
                     (flatten)
                     (expand "bounded_below?")
                     (skosimp)
                     (inst + "-x!1")
                     (skosimp)
                     (hide -3)
                     (expand "lower_bound?")
                     (expand "V" 1)
                     (inst -2 "i!1")
                     (inst -4 "i!1")
                     (expand "bounded?")
                     (flatten)
                     (typepred
                      "bounded_real_defs.lub(image(u!1, {m: nat | m >= i!1}))")
                     (expand "least_upper_bound?")
                     (flatten)
                     (expand "upper_bound?")
                     (inst - "u!1(i!1)")
                     (("1"
                       (inst -6 "u!1(i!1)")
                       (("1" (assert))
                        ("2" (expand "image") (inst + "i!1"))))
                      ("2" (expand "image") (inst + "i!1"))))
                    ("3" (skosimp) (inst - "i!1" "j!1") (assert))))))
                ("2"
                 (hide -6 2 -5)
                 (skosimp)
                 (hide -2)
                 (inst-cp - "i!1")
                 (inst - "j!1")
                 (inst-cp - "i!1")
                 (inst - "j!1")
                 (expand "bounded?")
                 (flatten)
                 (expand "V")
                 (typepred
                  "bounded_real_defs.lub(image(u!1, {m: nat | m >= i!1}))")
                 (typepred
                  "bounded_real_defs.lub(image(u!1, {m: nat | m >= j!1}))")
                 (name-replace "LUB_I"
                  "bounded_real_defs.lub(image(u!1, {m: nat | m >= i!1}))")
                 (name-replace "LUB_J"
                  "bounded_real_defs.lub(image(u!1, {m: nat | m >= j!1}))")
                 (expand "least_upper_bound?")
                 (flatten)
                 (expand "upper_bound?")
                 (hide-all-but (-2 -3 -5 1))
                 (inst - "LUB_I")
                 (split -1)
                 (("1" (assert))
                  ("2"
                   (skosimp)
                   (typepred "s!1")
                   (expand "image")
                   (skolem - "M")
                   (typepred "M")
                   (inst - "u!1(M)")
                   (("1" (assert))
                    ("2" (expand "image") (inst + "M") (assert))))))))
              ("2"
               (skosimp)
               (inst - "n!2")
               (inst - "n!2")
               (expand "bounded?")
               (flatten)
               (assert))))
            ("2"
             (hide 2 -5 -4)
             (skosimp)
             (expand "bounded?")
             (split)
             (("1"
               (expand "bounded_above?")
               (inst -3 "image(u!1, {m: nat | m < n!1})")
               (case-replace "n!1=0")
               (("1"
                 (inst + "u!1(0)+1")
                 (expand "upper_bound?")
                 (skosimp)
                 (typepred "s!1")
                 (expand "image")
                 (skosimp)
                 (replace -1)
                 (inst -4 "0" "x!1")
                 (assert)
                 (hide-all-but (-4 1))
                 (grind))
                ("2"
                 (case "n!1>=1")
                 (("1"
                   (hide 1)
                   (lemma "finite_image[nat,real]"
                    ("f" "u!1" "S" "{m: nat | m < n!1}"))
                   (("1"
                     (replace -1)
                     (split -5)
                     (("1"
                       (skosimp)
                       (typepred "a!1")
                       (inst + "max(a!1,u!1(n!1)+1)")
                       (expand "upper_bound?")
                       (skosimp)
                       (typepred "s!1")
                       (expand "image" -1)
                       (skolem - "j!1")
                       (replace -1)
                       (case "j!1<n!1")
                       (("1"
                         (inst -4 "u!1(j!1)")
                         (("1"
                           (expand "max")
                           (case-replace "a!1 < 1 + u!1(n!1)")
                           (("1" (assert)) ("2" (assert))))
                          ("2" (expand "image") (inst + "j!1"))))
                        ("2"
                         (case "j!1>=n!1")
                         (("1"
                           (hide 1)
                           (inst -8 "n!1" "j!1")
                           (assert)
                           (hide-all-but (-8 1))
                           (grind))
                          ("2" (assert))))))
                      ("2"
                       (hide-all-but (-2 1))
                       (expand "image")
                       (expand "nonempty?")
                       (expand "empty?")
                       (inst - "u!1(0)")
                       (expand "member")
                       (inst + "0")
                       (assert))))
                    ("2"
                     (hide-all-but (-1 1))
                     (expand "is_finite")
                     (inst + "n!1" "lambda (x:{m: nat | m < n!1}): x")
                     (expand "injective?")
                     (skosimp))))
                  ("2" (assert))))))
              ("2"
               (hide -1)
               (expand "bounded_below?")
               (case-replace "n!1=0")
               (("1"
                 (hide -3)
                 (inst + "-(1+abs(u!1(0)))")
                 (expand "lower_bound?")
                 (skosimp)
                 (typepred "s!1")
                 (expand "image")
                 (skolem - ("M"))
                 (replace -1)
                 (typepred "M")
                 (inst - "M" "0")
                 (assert)
                 (grind))
                ("2"
                 (case "n!1>=1")
                 (("1"
                   (hide 1)
                   (inst -3
                    "image[nat,real](lambda (i:nat): -u!1(i),{m: nat | m < n!1})")
                   (lemma "finite_image[nat,real]"
                    ("f"
                     "LAMBDA (i: nat): -u!1(i)"
                     "S"
                     "{m: nat | m < n!1}"))
                   (("1"
                     (replace -1)
                     (split -4)
                     (("1"
                       (skosimp)
                       (inst + "-max(a!1,abs(u!1(n!1))+1)")
                       (expand "lower_bound?")
                       (skosimp)
                       (typepred "s!1")
                       (expand "image")
                       (hide -3)
                       (skolem - ("M"))
                       (replace -1)
                       (typepred "M")
                       (hide -2)
                       (case "M>=n!1")
                       (("1"
                         (inst -5 "M" "n!1")
                         (assert)
                         (hide-all-but (-5 1))
                         (grind))
                        ("2"
                         (case "M<n!1")
                         (("1"
                           (hide 1)
                           (inst - "-u!1(M)")
                           (("1" (hide -5) (grind))
                            ("2" (expand "image") (inst + "M"))))
                          ("2" (assert))))))
                      ("2"
                       (expand "nonempty?")
                       (expand "image")
                       (expand "empty?")
                       (expand "member")
                       (inst - "-u!1(0)")
                       (inst + "0")
                       (assert))))
                    ("2"
                     (hide-all-but 1)
                     (expand "is_finite")
                     (inst + "n!1" "lambda (x: {m: nat | m < n!1}): x")
                     (expand "injective?")
                     (skosimp))))
                  ("2" (assert))))))))
            ("3" (propax))))
          ("2"
           (hide-all-but 1)
           (skosimp)
           (expand "image")
           (expand "nonempty?")
           (expand "empty?")
           (inst - "u!1(n!2)")
           (expand "member")
           (inst + "n!2"))))
        ("2"
         (hide-all-but 1)
         (case "FORALL (n:posnat,X: set[real]):
                       is_finite[real](X) & card[real](X)=n & nonempty?[real](X) =>
                        (EXISTS (a: (X)): FORALL (x: (X)): x <= a)")
         (("1"
           (skosimp)
           (inst - "card[real](X!1)" "X!1")
           (("1" (assert)) ("2" (rewrite "nonempty_card"))))
          ("2"
           (hide 2)
           (induct "n")
           (("1" (assert)) ("2" (assert))
            ("3"
             (skosimp*)
             (case-replace "j!1=0")
             (("1"
               (hide -1 -2 -3)
               (lemma "card_one[real]" ("S" "X!1"))
               (assert)
               (skosimp)
               (inst + "x!1")
               (("1"
                 (skosimp)
                 (typepred "x!2")
                 (replace -2 -1)
                 (expand "singleton")
                 (assert))
                ("2" (replace -1 *) (expand "singleton") (propax))))
              ("2"
               (case "j!1>=1")
               (("1"
                 (assert)
                 (hide 1)
                 (lemma "card_rest[real]" ("S" "X!1"))
                 (split -1)
                 (("1"
                   (replace -6)
                   (assert)
                   (inst - "rest[real](X!1)")
                   (assert)
                   (lemma "nonempty_card[real]" ("S" "rest[real](X!1)"))
                   (assert)
                   (rewrite "finite_rest[real]")
                   (lemma "choose_rest[real]" ("a" "X!1"))
                   (split)
                   (("1"
                     (skosimp)
                     (inst + "max(choose[real](X!1),a!1)")
                     (("1"
                       (skosimp)
                       (typepred "x!1")
                       (replace -2 -1 rl)
                       (hide -2)
                       (expand "add" -1)
                       (split -1)
                       (("1"
                         (expand "max")
                         (replace -1)
                         (lift-if 1)
                         (assert))
                        ("2"
                         (expand "member")
                         (inst - "x!1")
                         (expand "max")
                         (lift-if 1)
                         (assert))))
                      ("2"
                       (typepred "a!1")
                       (lemma "choose_member[real]" ("a" "X!1"))
                       (split -1)
                       (("1"
                         (expand "member")
                         (expand "max")
                         (replace -1)
                         (expand "rest" -2)
                         (expand "nonempty?")
                         (assert)
                         (expand "remove")
                         (expand "member")
                         (flatten)
                         (assert))
                        ("2" (expand "nonempty?") (propax))))))
                    ("2" (expand "nonempty?") (propax))))
                  ("2" (expand "nonempty?") (propax))))
                ("2" (assert))))))))))))
      ("2"
       (hide-all-but 1)
       (skosimp)
       (skosimp)
       (lemma "lub_exists" ("SA" "image(u!2,fullset[nat])"))
       (("1"
         (skosimp)
         (expand "metric_convergent?")
         (inst + "x!1")
         (expand "metric_converges_to")
         (skosimp)
         (expand "ball")
         (expand "member")
         (expand "fullset")
         (expand "image")
         (expand "least_upper_bound?")
         (flatten)
         (expand "upper_bound?")
         (case "EXISTS (n:nat): FORALL (i:nat): i >= n => x!1 - u!2(i) < r!1")
         (("1"
           (skosimp)
           (inst + "n!1")
           (skosimp)
           (inst - "i!1")
           (inst - "u!2(i!1)")
           (("1" (assert) (grind)) ("2" (inst + "i!1"))))
          ("2"
           (hide 2)
           (inst -2 "x!1-r!1")
           (assert)
           (skosimp)
           (typepred "s!1")
           (skosimp)
           (replace -1)
           (inst + "x!2")
           (skosimp)
           (inst -5 "x!2" "i!1")
           (assert))))
        ("2"
         (split 1)
         (("1"
           (expand "fullset")
           (expand "image")
           (expand "nonempty?")
           (expand "empty?")
           (expand "member")
           (inst - "u!2(0)")
           (inst + "0"))
          ("2"
           (expand "fullset")
           (expand "image")
           (expand "bounded_above?")
           (inst + "a!1")
           (expand "upper_bound?")
           (skosimp)
           (typepred "s!1")
           (skosimp)
           (inst - "x!1")
           (assert))))))))))


proof_type: t_proof
decl_type: tcc
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (case "open?({y| x!1+r!1<y})")
   (("1"
     (case "open?({y| y < x!1-r!1})")
     (("1"
       (lemma "open_union"
        ("U1" "{y | x!1 + r!1 < y}" "U2" "{y | y < x!1 - r!1}"))
       (("1"
         (rewrite "open_complement" 1 :dir rl)
         (case-replace
          "union({y | x!1 + r!1 < y}, {y | y < x!1 - r!1})=complement({y | abs(x!1 - y) <= r!1})")
         (hide-all-but 1)
         (apply-extensionality :hide? t)
         (grind))
        ("2" (propax)) ("3" (assert))))
      ("2"
       (hide-all-but 1)
       (expand "open?")
       (expand "member")
       (expand "metric_induced_topology")
       (expand "metric_open?")
       (skosimp)
       (split)
       (("1"
         (flatten)
         (inst + "x!1-(r!1+x!2)")
         (("1" (expand "ball") (grind)) ("2" (assert))))
        ("2"
         (skosimp*)
         (expand "subset?")
         (expand "member")
         (expand "ball")
         (inst - "x!2")
         (grind))))))
    ("2"
     (hide-all-but 1)
     (expand "open?")
     (expand "member")
     (expand "metric_induced_topology")
     (expand "metric_open?")
     (skosimp)
     (split)
     (("1"
       (flatten)
       (inst + "x!2-(r!1+x!1)")
       (("1"
         (expand "subset?")
         (expand "ball")
         (expand "member")
         (skosimp)
         (grind))
        ("2" (assert))))
      ("2"
       (skosimp*)
       (expand "subset?")
       (expand "member")
       (expand "ball")
       (inst - "x!2")
       (grind))))
    ("3"
     (typepred
      "metric_induced_topology
                      [real, (LAMBDA (x, y: real): abs(x - y))]")
     (expand "hausdorff_space?")
     (propax))))


proof_type: t_proof
decl_type: tcc
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "metric_open_def" + :dir rl)
   (expand "metric_open?")
   (skosimp)
   (split)
   (("1" (flatten) (inst + "x!1-a!1") (("1" (grind)) ("2" (assert))))
    ("2"
     (skosimp*)
     (expand "subset?")
     (expand "member")
     (inst - "x!1")
     (grind))))


proof_type: t_proof
decl_type: tcc
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "metric_open_def" + :dir rl)
   (expand "metric_open?")
   (skosimp)
   (split)
   (("1" (flatten) (inst + "a!1-x!1") (("1" (grind)) ("2" (assert))))
    ("2" (skosimp*) (expand "subset?") (inst - "x!1") (grind))))


proof_type: t_proof
decl_type: tcc
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "open_complement" 1 :dir rl)
   (lemma "inf_open_TCC1" ("a" "a!1"))
   (case-replace "complement({x | a!1 <= x})={x | x < a!1}")
   (hide-all-but 1)
   (apply-extensionality :hide? t)
   (grind))


proof_type: t_proof
decl_type: tcc
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "open_complement" 1 :dir rl)
   (lemma "open_inf_TCC1" ("a" "a!1"))
   (case-replace "complement({x | x <= a!1})={x | a!1 < x}")
   (hide-all-but 1)
   (apply-extensionality :hide? t)
   (grind))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + "X!1")
   (typepred "X!1")
   (skosimp)
   (replace -1)
   (hide -1)
   (expand "closed_inf")
   (expand "interval?")
   (skosimp)
   (typepred "x!1")
   (assert))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + "X!1")
   (typepred "X!1")
   (skosimp)
   (replace -1)
   (hide -1)
   (expand "inf_closed")
   (expand "interval?")
   (skosimp)
   (typepred "x!1")
   (assert))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + "X!1")
   (typepred "X!1")
   (skosimp)
   (typepred "closed_inf(a!1)")
   (replace -2 * rl)
   (propax))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + "X!1")
   (typepred "X!1")
   (skosimp)
   (typepred "inf_closed(a!1)")
   (replace -2)
   (propax))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: test_cont
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "metric_continuous?")
   (skosimp)
   (expand "metric_continuous_at?")
   (skosimp)
   (expand "member")
   (expand "ball")
   (expand "restrict")
   (case "forall (x,y:nzreal): 1 / x - 1 / y = (y-x)/(x*y)")
   (("1"
     (case "FORALL (x, y: nzreal,delta:posreal): abs(x-y)<delta & delta < abs(x)/2 => (abs(x)/2<abs(y) & abs(y)< 3*abs(x)/2)")
     (("1"
       (inst + "min(abs(x!1)/3,epsilon!1*(abs(x!1)*abs(x!1)/2))")
       (skosimp)
       (inst -2 "x!1" "x!2")
       (replace -2)
       (rewrite "abs_div")
       (rewrite "abs_mult")
       (rewrite "div_mult_pos_lt1" 1)
       (inst - "x!1" "x!2"
        "min(abs(x!1) / 3, epsilon!1 * (abs(x!1) * abs(x!1) / 2))")
       (assert)
       (flatten)
       (lemma "both_sides_times_pos_lt1"
        ("pz" "epsilon!1 * abs(x!1)" "x" "abs(x!1) / 2" "y" "abs(x!2)"))
       (assert)
       (hide -4 -2 -3)
       (grind))
      ("2" (hide-all-but 1) (grind))))
    ("2" (hide 2) (grind))))


proof_type: t_proof
decl_type: tcc
library: metric_space
theory: test_cont
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "restrict")
   (expand "metric?")
   (expand "metric_zero?")
   (expand "metric_symmetric?")
   (expand "metric_triangle?")
   (grind))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: continuity_link
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "continuous?")
   (rewrite "metric_continuous_at_def")
   (expand "metric_continuous_at?")
   (expand "member")
   (expand "ball")
   (split)
   (("1"
     (skosimp*)
     (inst - "epsilon!1")
     (skosimp)
     (inst + "delta!1")
     (skosimp)
     (inst - "x!1")
     (split)
     (("1" (hide -2) (grind)) ("2" (hide 2) (grind))))
    ("2"
     (skosimp*)
     (inst - "epsilon!1")
     (skosimp)
     (inst + "delta!1")
     (skosimp)
     (inst - "x!1")
     (split)
     (("1" (grind)) ("2" (grind))))))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: continuity_link
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "continuous?")
   (split)
   (("1"
     (flatten)
     (skosimp)
     (inst - "x!1")
     (rewrite "continuous_iff_continuous_at?"))
    ("2"
     (skosimp*)
     (inst - "x0!1")
     (rewrite "continuous_iff_continuous_at?"))))


proof_type: t_proof
decl_type: tcc
library: metric_space
theory: continuity_link
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "metric?")
   (split)
   (("1"
     (expand "metric_zero?")
     (skosimp)
     (split)
     (("1" (flatten) (grind)) ("2" (grind))))
    ("2" (expand "metric_symmetric?") (skosimp) (grind))
    ("3" (expand "metric_triangle?") (grind))))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "g2!1")
   (typepred "g1!1")
   (expand "metric_continuous?")
   (skosimp)
   (inst - "x!1")
   (inst - "x!1")
   (expand "metric_continuous_at?")
   (skosimp)
   (inst - "epsilon!1/2")
   (inst - "epsilon!1/2")
   (skosimp*)
   (inst + "min(delta!1,delta!2)")
   (skosimp)
   (inst - "x!2")
   (inst - "x!2")
   (expand "member")
   (expand "ball")
   (expand "+")
   (assert)
   (lemma "triangle"
    ("x" "g1!1(x!1) - g1!1(x!2)" "y" "g2!1(x!1) - g2!1(x!2)"))
   (assert))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "g!1")
   (expand "metric_continuous?")
   (skosimp)
   (inst - "x!1")
   (expand "metric_continuous_at?")
   (skosimp)
   (inst - "epsilon!1")
   (skosimp)
   (inst + "delta!1")
   (skosimp)
   (inst - "x!2")
   (grind))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "opp_continuous" ("g" "g2!1"))
   (lemma "sum_continuous" ("g1" "g1!1" "g2" "-g2!1"))
   (expand "+")
   (expand "-")
   (assert))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "g!1")
   (expand "*")
   (expand "metric_continuous?")
   (skosimp)
   (inst - "x!1")
   (expand "metric_continuous_at?")
   (skosimp)
   (case-replace "c!1=0")
   (("1"
     (inst + "1")
     (expand "member")
     (expand "ball")
     (skosimp)
     (expand "abs")
     (assert))
    ("2"
     (expand "member")
     (expand "ball")
     (lemma "posreal_div_posreal_is_posreal"
      ("px" "epsilon!1" "py" "abs(c!1)"))
     (("1"
       (inst - "epsilon!1 / abs(c!1)")
       (("1"
         (skosimp)
         (inst + "delta!1")
         (skosimp)
         (inst - "x!2")
         (assert)
         (rewrite "div_mult_pos_lt2" -2)
         (rewrite "abs_mult" -2 :dir rl)
         (assert))
        ("2" (assert))))
      ("2" (hide 3 -1) (grind))))))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "g!1")
   (expand "metric_continuous?")
   (expand "metric_continuous_at?")
   (skosimp)
   (skosimp)
   (inst - "x!1")
   (inst - "epsilon!1")
   (skosimp)
   (inst + "delta!1")
   (expand "member")
   (skosimp)
   (inst - "x!2")
   (assert)
   (hide -2)
   (expand "ball")
   (expand "abs")
   (expand "abs")
   (grind))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "forall (a,eps:posreal,x:nnreal): exists (delta:posreal): forall (y:nnreal): abs(x-y) < delta => abs(x^a-y^a) < eps")
   (("1"
     (skosimp)
     (expand "metric_continuous?")
     (expand "^" 1)
     (expand "metric_continuous_at?")
     (expand "member")
     (expand "ball")
     (skosimp*)
     (typepred "a!1")
     (typepred "h!1")
     (inst -5 "a!1" "epsilon!1" "h!1(x!1)")
     (("1"
       (skosimp)
       (expand "metric_continuous?")
       (expand "metric_continuous_at?")
       (inst - "x!1")
       (inst - "delta!1")
       (skosimp)
       (expand "member")
       (expand "ball")
       (inst + "delta!2")
       (skosimp)
       (inst - "x!2")
       (inst -5 "h!1(x!2)")
       (("1" (assert)) ("2" (inst - "x!2"))))
      ("2" (inst - "x!1"))))
    ("2"
     (hide 2)
     (skosimp)
     (case-replace "x!1=0")
     (("1"
       (rewrite "real_expt_0x")
       (case "EXISTS (delta: posreal):
                     FORALL (y: nnreal): y < delta => y ^ a!1 < eps!1")
       (("1"
         (skosimp)
         (inst + "delta!1")
         (skosimp)
         (inst - "y!1")
         (expand "abs")
         (assert)
         (case-replace "y!1=0")
         (("1" (assert) (rewrite "real_expt_0x") (assert))
          ("2"
           (assert)
           (assert)
           (lemma "real_expt_pos" ("px" "y!1" "a" "a!1"))
           (assert))))
        ("2"
         (hide 2)
         (inst + "eps!1^(1/a!1)")
         (("1"
           (skosimp)
           (lemma "real_expt_strict_increasing"
            ("x" "y!1" "y" "eps!1 ^ (1 / a!1)" "pa" "a!1"))
           (assert)
           (rewrite "real_expt_times" -1 :dir rl)
           (assert)
           (rewrite "real_expt_x1"))
          ("2" (rewrite "real_expt_pos"))))))
      ("2"
       (case "x!1>0")
       (("1"
         (hide 1)
         (case "EXISTS (delta: posreal):
                       FORALL (y: nnreal): y>x!1& y-x!1<delta => y^a!1-x!1^a!1<eps!1")
         (("1"
           (case "EXISTS (delta: posreal):
                         FORALL (y: nnreal): y<x!1& x!1-y<delta => x!1^a!1-y^a!1<eps!1")
           (("1"
             (skosimp*)
             (inst + "min(delta!1,delta!2)")
             (skosimp)
             (lemma "trich_lt" ("x" "x!1" "y" "y!1"))
             (split -1)
             (("1"
               (inst -3 "y!1")
               (assert)
               (lemma "real_expt_strict_increasing"
                ("x" "x!1" "y" "y!1" "pa" "a!1"))
               (expand "abs")
               (assert))
              ("2" (replace -1) (assert) (expand "abs") (assert))
              ("3"
               (inst - "y!1")
               (assert)
               (lemma "real_expt_strict_increasing"
                ("y" "x!1" "x" "y!1" "pa" "a!1"))
               (expand "abs")
               (assert))))
            ("2"
             (hide -1 2)
             (lemma "trich_lt" ("x" "x!1^a!1" "y" "eps!1"))
             (split -1)
             (("1"
               (inst + "1")
               (skosimp)
               (lemma "real_expt_pos" ("px" "y!1" "a" "a!1"))
               (("1" (assert)) ("2" (assert))))
              ("2"
               (replace -1)
               (inst + "x!1/2")
               (("1"
                 (skosimp)
                 (lemma "real_expt_pos" ("px" "y!1" "a" "a!1"))
                 (("1" (assert)) ("2" (assert))))
                ("2" (assert))))
              ("3"
               (inst + "x!1-(x!1^a!1-eps!1)^(1/a!1)")
               (("1"
                 (skosimp)
                 (lemma "real_expt_strict_increasing"
                  ("x"
                   "(x!1 ^ a!1 - eps!1) ^ (1 / a!1)"
                   "y"
                   "y!1"
                   "pa"
                   "a!1"))
                 (("1"
                   (assert)
                   (rewrite "real_expt_times" -1 :dir rl)
                   (rewrite "real_expt_x1")
                   (assert))
                  ("2" (assert))))
                ("2"
                 (lemma "real_expt_strict_increasing"
                  ("x" "x!1 ^ a!1 - eps!1" "y" "x!1 ^ a!1" "pa" "1/a!1"))
                 (("1"
                   (assert)
                   (rewrite "real_expt_times" -1 :dir rl)
                   (rewrite "real_expt_x1")
                   (assert))
                  ("2" (assert))))
                ("3" (flatten) (assert)) ("4" (assert))))))))
          ("2"
           (hide 2)
           (inst + "(eps!1+x!1^a!1)^(1/a!1)-x!1")
           (("1"
             (skosimp)
             (lemma "real_expt_strict_increasing"
              ("x"
               "y!1"
               "y"
               "(eps!1 + x!1 ^ a!1) ^ (1 / a!1)"
               "pa"
               "a!1"))
             (assert)
             (rewrite "real_expt_times" -1 :dir rl)
             (rewrite "real_expt_x1" -1)
             (assert))
            ("2"
             (lemma "real_expt_strict_increasing"
              ("x" "x!1^a!1" "y" "x!1 ^ a!1 + eps!1" "pa" "1/a!1"))
             (assert)
             (rewrite "real_expt_times" -1 :dir rl)
             (rewrite "real_expt_x1")
             (assert))
            ("3" (flatten) (assert))))))
        ("2" (assert))))))))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case-replace "n!1=0")
   (("1"
     (expand "expt")
     (expand "expt")
     (lemma "const_continuous" ("a" "1"))
     (rewrite "metric_continuous_def")
     (expand "const_fun")
     (propax))
    ("2"
     (case "n!1>0")
     (("1"
       (hide 1)
       (typepred "g!1")
       (case "FORALL (epsilon:posreal,x:real): EXISTS (delta:posreal): FORALL (y:real): abs(x-y)<delta => abs(expt(x,n!1)-expt(y,n!1))<epsilon")
       (("1"
         (expand "metric_continuous?")
         (skosimp)
         (inst - "x!1")
         (expand "metric_continuous_at?")
         (expand "ball")
         (expand "member")
         (skosimp)
         (inst - "epsilon!1" "g!1(x!1)")
         (skosimp)
         (inst -2 "delta!1")
         (skosimp)
         (inst + "delta!2")
         (skosimp)
         (inst -2 "x!2")
         (assert)
         (inst - "g!1(x!2)")
         (assert)
         (expand "expt" 1)
         (propax))
        ("2"
         (hide -1 2)
         (skosimp)
         (case "forall (n:nat,x:nnreal): EXISTS (delta: posreal):
                       FORALL (y: nnreal):
                         abs(x - y) < delta =>
                          abs(expt(x, n) - expt(y, n)) < epsilon!1")
         (("1"
           (case "forall (n:nat,x:negreal): EXISTS (delta: posreal):
                         FORALL (y: negreal):
                           abs(x - y) < delta =>
                            abs(expt(x, n) - expt(y, n)) < epsilon!1")
           (("1"
             (case "x!1>=0")
             (("1"
               (hide -2)
               (inst - "n!1" "x!1")
               (skosimp)
               (expand ">=" -1)
               (expand "<=" -1)
               (split -1)
               (("1"
                 (inst + "min(x!1,delta!1)")
                 (("1"
                   (skosimp)
                   (inst - "y!1")
                   (("1" (assert)) ("2" (hide 2) (grind))))
                  ("2" (hide -2) (grind))))
                ("2"
                 (replace -1 * rl)
                 (expand "expt" -2 1)
                 (expand "expt" 1 1)
                 (assert)
                 (inst + "delta!1")
                 (skosimp)
                 (inst - "abs(y!1)")
                 (split -2)
                 (("1"
                   (rewrite "expt_of_abs")
                   (name-replace "YN" "expt(y!1, n!1)")
                   (grind))
                  ("2" (hide 2) (grind))))))
              ("2"
               (hide -2)
               (inst - "n!1" "x!1")
               (("1"
                 (skosimp)
                 (inst + "min(delta!1,-x!1)")
                 (("1"
                   (skosimp)
                   (inst - "y!1")
                   (("1"
                     (split -1)
                     (("1" (propax)) ("2" (hide 3) (grind))))
                    ("2" (hide 3) (grind))))
                  ("2" (hide -1) (grind))))
                ("2" (assert))))))
            ("2"
             (hide 2)
             (hide -2)
             (skosimp)
             (lemma "odd_or_even_int" ("x" "n!2"))
             (split -1)
             (("1"
               (case "forall (x:real): expt(-x,n!2)=-expt(x,n!2)")
               (("1"
                 (inst - "n!2" "-x!2")
                 (skosimp)
                 (inst + "min(delta!1,-x!2)")
                 (("1"
                   (skosimp)
                   (inst -4 "-y!1")
                   (split -4)
                   (("1"
                     (inst-cp - "x!2")
                     (inst - "y!1")
                     (replace -2)
                     (replace -3)
                     (hide -2 -3 -4 -5)
                     (name-replace "XN" "expt(x!2, n!2)")
                     (name-replace "YN" "expt(y!1, n!2)")
                     (grind))
                    ("2" (hide-all-but (-3 1)) (grind))))
                  ("2" (hide-all-but 1) (grind))))
                ("2"
                 (hide -2 2)
                 (case "forall (j:nat,x:real): expt(-x, 1+2*j) = -expt(x, 1+2*j)")
                 (("1"
                   (expand "odd?")
                   (skosimp*)
                   (replace -2)
                   (inst - "j!1" "x!3")
                   (assert))
                  ("2"
                   (hide -1 2)
                   (induct "j")
                   (("1" (expand "expt") (expand "expt") (propax))
                    ("2"
                     (skosimp*)
                     (expand "expt" 1)
                     (expand "expt" 1)
                     (inst - "x!3")
                     (assert))))))))
              ("2"
               (case "forall (x:real): expt(-x,n!2)=expt(x,n!2)")
               (("1"
                 (typepred "x!2")
                 (inst - "n!2" "-x!2")
                 (skosimp)
                 (inst + "min(delta!1,-x!2)")
                 (("1"
                   (skosimp)
                   (inst -6 "-y!1")
                   (split -6)
                   (("1"
                     (inst-cp - "x!2")
                     (inst - "y!1")
                     (replace -4)
                     (replace -5)
                     (propax))
                    ("2" (hide -3 2) (grind))))
                  ("2" (hide -3 -4 -5) (grind))))
                ("2"
                 (hide-all-but (-1 1))
                 (case "forall (x:real,j:nat): expt(-x,2*j) = expt(x,2*j)")
                 (("1"
                   (expand "even?")
                   (skosimp)
                   (skosimp)
                   (replace -2)
                   (inst - "x!3" "j!1")
                   (assert))
                  ("2"
                   (hide-all-but 1)
                   (induct "j")
                   (("1" (skosimp) (expand "expt") (propax))
                    ("2"
                     (skosimp*)
                     (expand "expt" 1)
                     (expand "expt" 1)
                     (inst - "x!3")
                     (assert))))))))))))
          ("2"
           (hide 2)
           (skosimp)
           (hide -1)
           (case-replace "n!2=0")
           (("1" (expand "expt") (expand "abs") (propax))
            ("2"
             (case "n!2>0")
             (("1"
               (hide 1)
               (case "EXISTS (delta: posreal):
                             FORALL (y: nnreal):
                               x!2 <= y &y < x!2+delta =>
                                expt(y, n!2) < expt(x!2, n!2)+epsilon!1")
               (("1"
                 (case "EXISTS (delta: posreal):
                               FORALL (y: nnreal):
                                 x!2 - delta < y & y <= x!2 =>
                                  expt(x!2, n!2) - epsilon!1 < expt(y, n!2)")
                 (("1"
                   (skosimp*)
                   (inst + "min(delta!1,delta!2)")
                   (skosimp)
                   (inst - "y!1")
                   (inst - "y!1")
                   (case-replace "x!2=0")
                   (("1"
                     (expand "expt" 1 1)
                     (expand "expt" -2 1)
                     (expand "expt" -3 2)
                     (assert)
                     (name-replace "YN" "expt(y!1, n!2)")
                     (grind))
                    ("2"
                     (case "x!2>0")
                     (("1"
                       (hide 1)
                       (case-replace "y!1=0")
                       (("1"
                         (expand "expt" 1 2)
                         (expand "expt" -3 2)
                         (assert)
                         (name-replace "XN" "expt(x!2, n!2)")
                         (grind))
                        ("2"
                         (case "y!1>0")
                         (("1"
                           (hide 1)
                           (lemma "trich_lt" ("x" "x!2" "y" "y!1"))
                           (split -1)
                           (("1"
                             (lemma "both_sides_expt_pos_lt_aux"
                              ("px" "x!2" "py" "y!1" "m" "n!2-1"))
                             (("1"
                               (assert)
                               (name-replace "XN" "expt(x!2, n!2)")
                               (name-replace "YN" "expt(y!1, n!2)")
                               (grind))
                              ("2" (propax)) ("3" (propax))
                              ("4" (assert))))
                            ("2"
                             (assert)
                             (replace -1)
                             (assert)
                             (expand "abs")
                             (assert))
                            ("3"
                             (lemma "both_sides_expt_pos_lt_aux"
                              ("py" "x!2" "px" "y!1" "m" "n!2-1"))
                             (("1"
                               (assert)
                               (name-replace "XN" "expt(x!2, n!2)")
                               (name-replace "YN" "expt(y!1, n!2)")
                               (grind))
                              ("2" (propax)) ("3" (propax))
                              ("4" (assert))))))
                          ("2" (assert))))))
                      ("2" (assert))))))
                  ("2"
                   (hide -1 2)
                   (case-replace "x!2=0")
                   (("1"
                     (expand "expt" 1 1)
                     (assert)
                     (inst + "1")
                     (skosimp)
                     (assert))
                    ("2"
                     (case "x!2>0")
                     (("1"
                       (hide 1)
                       (case "expt(x!2, n!2) - epsilon!1>0")
                       (("1"
                         (lemma "posreal_div_posreal_is_posreal"
                          ("px" "1" "py" "n!2"))
                         (("1"
                           (lemma "real_expt_pos"
                            ("px"
                             "expt(x!2, n!2) - epsilon!1"
                             "a"
                             "1/n!2"))
                           (("1"
                             (lemma "real_expt_strict_increasing"
                              ("x"
                               "expt(x!2, n!2) - epsilon!1"
                               "y"
                               "expt(x!2, n!2)"
                               "pa"
                               "1 / n!2"))
                             (("1"
                               (assert)
                               (lemma "real_expt_times"
                                ("x" "x!2" "a" "n!2" "b" "1/n!2"))
                               (rewrite "real_expt_x1")
                               (rewrite "real_expt_int_rew" -1)
                               (expand "^" -1 1)
                               (replace -1 * rl)
                               (hide -1)
                               (inst +
                                "x!2-(expt(x!2, n!2) - epsilon!1) ^ (1 / n!2)")
                               (("1"
                                 (skosimp)
                                 (assert)
                                 (lemma
                                  "real_expt_strict_increasing"
                                  ("x"
                                   "(expt(x!2, n!2) - epsilon!1) ^ (1 / n!2)"
                                   "y"
                                   "y!1"
                                   "pa"
                                   "n!2"))
                                 (assert)
                                 (rewrite "real_expt_times" -1 :dir rl)
                                 (rewrite "real_expt_x1")
                                 (rewrite "real_expt_int_rew" -1)
                                 (expand "^" -1)
                                 (propax))
                                ("2" (assert))))
                              ("2" (assert)) ("3" (assert))))
                            ("2" (assert))))
                          ("2" (propax))))
                        ("2"
                         (inst + "x!2/2")
                         (("1"
                           (skosimp)
                           (assert)
                           (lemma "expt_pos_aux" ("px" "y!1" "n" "n!2"))
                           (assert))
                          ("2" (assert))))))
                      ("2" (assert))))))))
                ("2"
                 (hide 2)
                 (lemma "real_expt_pos"
                  ("px" "expt(x!2, n!2) + epsilon!1" "a" "1/n!2"))
                 (("1"
                   (lemma "real_expt_strict_increasing"
                    ("x"
                     "expt(x!2, n!2)"
                     "y"
                     "expt(x!2, n!2) + epsilon!1"
                     "pa"
                     "1 / n!2"))
                   (("1"
                     (assert)
                     (lemma "real_expt_times"
                      ("x" "x!2" "a" "n!2" "b" "1/n!2"))
                     (("1"
                       (rewrite "real_expt_x1")
                       (rewrite "real_expt_int_rew" -1)
                       (expand "^" -1 1)
                       (replace -1 * rl)
                       (hide -1)
                       (inst +
                        "(expt(x!2, n!2) + epsilon!1) ^ (1 / n!2)-x!2")
                       (("1"
                         (skosimp)
                         (assert)
                         (lemma "real_expt_strict_increasing"
                          ("x"
                           "y!1"
                           "y"
                           "(expt(x!2, n!2) + epsilon!1) ^ (1 / n!2)"
                           "pa"
                           "n!2"))
                         (assert)
                         (rewrite "real_expt_times" -1 :dir rl)
                         (rewrite "real_expt_x1" -1)
                         (rewrite "real_expt_int_rew" -1)
                         (expand "^" -1 1)
                         (propax))
                        ("2" (assert))))
                      ("2"
                       (flatten)
                       (lemma "posreal_div_posreal_is_posreal"
                        ("px" "1" "py" "n!2"))
                       (assert))))
                    ("2"
                     (assert)
                     (lemma "posreal_div_posreal_is_posreal"
                      ("px" "1" "py" "n!2"))
                     (assert))))
                  ("2" (assert))))))
              ("2" (assert))))))))))
      ("2" (assert))))))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "expt_nat_continuous" ("g" "g!1" "n" "2"))
   (expand "sq")
   (expand "sq")
   (expand "expt")
   (expand "expt")
   (expand "expt")
   (expand "expt")
   (propax))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "g2!1")
   (typepred "g1!1")
   (expand "metric_continuous?")
   (skosimp)
   (inst - "x!1")
   (inst - "x!1")
   (expand "min")
   (expand "metric_continuous_at?")
   (skosimp)
   (inst - "epsilon!1")
   (inst - "epsilon!1")
   (skosimp*)
   (inst + "min(delta!1,delta!2)")
   (skosimp)
   (inst - "x!2")
   (inst - "x!2")
   (expand "member")
   (expand "ball")
   (expand "min")
   (grind))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "g2!1")
   (typepred "g1!1")
   (expand "metric_continuous?")
   (skosimp)
   (inst - "x!1")
   (inst - "x!1")
   (expand "metric_continuous_at?")
   (skosimp)
   (inst - "epsilon!1")
   (inst - "epsilon!1")
   (skosimp*)
   (inst + "min(delta!1,delta!2)")
   (skosimp)
   (inst - "x!2")
   (inst - "x!2")
   (grind))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skosimp) (expand "minimum") (propax))
    ("2"
     (skosimp*)
     (expand "minimum" 1)
     (inst - "u!1")
     (lemma "min_continuous"
      ("g1" "u!1(1+j!1)" "g2" "minimum(u!1, j!1)"))
     (("1" (propax)) ("2" (propax))))
    ("3" (hide 2) (skosimp) (expand "metric?") (grind))))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skosimp) (expand "maximum") (propax))
    ("2"
     (skosimp*)
     (inst - "u!1")
     (expand "maximum" 1)
     (lemma "max_continuous"
      ("g1" "u!1(1+j!1)" "g2" "maximum(u!1, j!1)"))
     (("1" (propax)) ("2" (propax))))
    ("3" (hide 2) (grind))))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "max_continuous" ("g1" "g!1" "g2" "const_fun[T,real](0)"))
   (("1" (expand "plus") (expand "const_fun") (expand "max" -1) (propax))
    ("2"
     (hide 2)
     (expand "const_fun")
     (expand "metric_continuous?")
     (expand "metric_continuous_at?")
     (skosimp*)
     (inst + "1")
     (grind))))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "minus")
   (lemma "min_continuous" ("g1" "g!1" "g2" "const_fun[T,real](0)"))
   (("1"
     (expand "min" -1)
     (expand "const_fun")
     (lemma "opp_continuous" ("g" "LAMBDA (x_1: T): min(g!1(x_1), 0)"))
     (("1" (expand "-" -1) (propax)) ("2" (propax))))
    ("2"
     (hide 2)
     (expand "const_fun")
     (expand "metric_continuous?")
     (expand "metric_continuous_at?")
     (skosimp*)
     (inst + "1")
     (grind))))


proof_type: j_proof
decl_type: tcc
library: metric_space
theory: real_continuity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "sum_continuous" ("g1" "g1!1" "g2" "g2!1"))
   (lemma "diff_continuous" ("g1" "g1!1" "g2" "g2!1"))
   (lemma "sq_continuous" ("g" "(+[T])(g1!1, g2!1)"))
   (lemma "sq_continuous" ("g" "(-[T])(g1!1, g2!1)"))
   (hide -3 -4)
   (lemma "diff_continuous"
    ("g1" "sq[T]((+[T])(g1!1, g2!1))" "g2" "sq[T]((-[T])(g1!1, g2!1))"))
   (lemma "scal_continuous"
    ("c"
     "1/4"
     "g"
     "(-[T])(sq[T]((+[T])(g1!1, g2!1)), sq[T]((-[T])(g1!1, g2!1)))"))
   (case-replace
    "(*[T]
                   (1 / 4,
                    (-[T])
                        (sq[T]((+[T])(g1!1, g2!1)), sq[T]((-[T])(g1!1, g2!1)))))=(*[T](g1!1, g2!1))")
   (hide-all-but 1)
   (apply-extensionality :hide? t)
   (grind))


proof_type: f_proof
decl_type: formula
library: metric_space
theory: complete_product
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (flatten)
   (expand "fullset")
   (expand "metric_complete?")
   (skosimp)
   (inst - "lambda (n:nat): u!1(n)`1")
   (inst - "lambda (n:nat): u!1(n)`2")
   (split)
   (("1"
     (split)
     (("1"
       (hide -3)
       (expand "metric_convergent?")
       (skosimp*)
       (inst + "(x!2,x!1)")
       (expand "metric_converges_to")
       (skosimp)
       (inst - "r!1/2")
       (inst - "r!1/2")
       (skosimp*)
       (inst + "max(n!1,n!2)")
       (skosimp)
       (inst - "i!1")
       (inst - "i!1")
       (expand "member")
       (assert)
       (hide -3)
       (expand "ball")
       (rewrite "sq_lt" -1 :dir rl)
       (rewrite "sq_lt" -2 :dir rl)
       (rewrite "sq_div")
       (expand "sq" -1 3)
       (expand "sq" -2 3)
       (rewrite "sq_lt" 1 :dir rl)
       (assert))
      ("2"
       (hide-all-but (-2 1))
       (expand "cauchy?")
       (skosimp)
       (expand "ball")
       (expand "member")
       (inst - "r!1")
       (skosimp)
       (inst + "n!1")
       (skosimp)
       (inst - "i!1" "j!1")
       (assert)
       (rewrite "sq_lt" 1 :dir rl)
       (rewrite "sq_lt" -3 :dir rl)
       (rewrite "sq_sqrt")
       (assert))))
    ("2"
     (hide-all-but (-2 1))
     (expand "cauchy?")
     (skosimp)
     (inst - "r!1")
     (skosimp)
     (inst + "n!1")
     (skosimp)
     (expand "ball")
     (expand "member")
     (inst - "i!1" "j!1")
     (assert)
     (rewrite "sq_lt" -3 :dir rl)
     (rewrite "sq_sqrt")
     (rewrite "sq_lt" 1 :dir rl)
     (assert))))


proof_type: t_proof
decl_type: tcc
library: metric_space
theory: complete_product
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "metric?")
   (split)
   (("1"
     (expand "metric_zero?")
     (skosimp)
     (split)
     (("1"
       (flatten)
       (lemma "sqrt_eq_0"
        ("nnx" "sq(d0(x!1`1, y!1`1)) + sq(d1(x!1`2, y!1`2))"))
       (replace -2)
       (hide -2)
       (lemma "sq_eq_0" ("a" "d0(x!1`1, y!1`1)"))
       (assert)
       (lemma "sq_eq_0" ("a" "d1(x!1`2, y!1`2)"))
       (assert)
       (hide -3)
       (typepred "d0")
       (typepred "d1")
       (expand "metric?")
       (flatten)
       (expand "metric_zero?")
       (inst - "x!1`2" "y!1`2")
       (inst - "x!1`1" "y!1`1")
       (assert)
       (hide-all-but (-1 -4 1))
       (decompose-equality))
      ("2"
       (flatten)
       (replace -1)
       (typepred "d0")
       (typepred "d1")
       (expand "metric?")
       (flatten)
       (expand "metric_zero?")
       (inst - "y!1`2" "y!1`2")
       (assert)
       (replace -1)
       (inst - "y!1`1" "y!1`1")
       (assert))))
    ("2"
     (typepred "d0")
     (typepred "d1")
     (expand "metric?")
     (flatten)
     (expand "metric_symmetric?")
     (skosimp)
     (inst - "x!1`2" "y!1`2")
     (inst - "x!1`1" "y!1`1")
     (assert))
    ("3"
     (typepred "d0")
     (typepred "d1")
     (expand "metric?")
     (flatten)
     (expand "metric_triangle?")
     (skosimp)
     (inst - "x!1`2" "y!1`2" "z!1`2")
     (inst - "x!1`1" "y!1`1" "z!1`1")
     (hide-all-but (-3 -6 1))
     (rewrite "sq_le" 1 :dir rl)
     (rewrite "sq_sqrt")
     (rewrite "sq_plus")
     (rewrite "sq_le" -1 :dir rl)
     (rewrite "sq_le" -2 :dir rl)
     (assert)
     (rewrite "sq_plus" -1)
     (rewrite "sq_plus" -2)
     (assert)
     (name-replace "D1_XZ" "d1(x!1`2, z!1`2)")
     (name-replace "D0_XZ" "d0(x!1`1, z!1`1)")
     (name-replace "D1_XY" "d1(x!1`2, y!1`2)")
     (name-replace "D0_XY" "d0(x!1`1, y!1`1)")
     (name-replace "D1_YZ" "d1(y!1`2, z!1`2)")
     (name-replace "D0_YZ" "d0(y!1`1, z!1`1)")
     (case "D1_XY * D1_YZ+D0_XY * D0_YZ<=sqrt(sq(D0_XY) + sq(D1_XY)) * sqrt(sq(D0_YZ) + sq(D1_YZ))")
     (("1" (assert))
      ("2"
       (hide 2 -1 -2)
       (lemma "sqrt_cauchy"
        ("a" "D1_XY" "c" "D1_YZ" "b" "D0_XY" "d" "D0_YZ"))
       (assert))))))


