# Proofs

proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skolem-typepred) (expand* "suffix" "ascending_chain?"))
    ("2"
     (skosimp* t)
     (expand "ascending_chain?")
     (skolem!)
     (expand "suffix" +)
     (lift-if)
     (lift-if)
     (lift-if)
     (ground)
     (("1" (expand "prefix?" +) (propax))
      ("2" (expand "prefix?" +) (propax))
      ("3" (inst - "n!1") (expand "prefix?" -2) (propax))
      ("4"
       (inst -3
        "LAMBDA n: IF empty?(chain!1(n)) THEN empty_cseq ELSE rest(chain!1(n)) ENDIF")
       (("1" (inst -3 "n!1") (assert))
        ("2"
         (hide -2 2 3 4)
         (expand "ascending_chain?")
         (skolem!)
         (lift-if)
         (lift-if)
         (lift-if)
         (ground)
         (("1" (expand "prefix?" +) (propax))
          ("2" (expand "prefix?" +) (propax))
          ("3" (inst - "n!2") (expand "prefix?" -) (propax))
          ("4" (inst - "n!2") (expand "prefix?" -) (propax))))
        ("3" (skosimp) (assert))))))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (typepred "suffix_chain(chain!1, 1)")
   (expand* "suffix_chain" "suffix" "suffix" "ascending_chain?")
   (skolem!)
   (reduce))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_insert_remove
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "n" ("cseq" "n") :skolem-typepreds? t)
   (case-replace "x!2 = 0")
   (("1"
     (expand* "remove" "nth" "insert" "index?")
     (lift-if)
     (assert)
     (decompose-equality))
    ("2"
     (expand "index?")
     (ground)
     (inst - "rest(x!1)" "x!2 - 1")
     (assert)
     (expand "insert" +)
     (expand "remove" +)
     (expand "nth" +)
     (decompose-equality 2))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_induction
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "every_weak_coinduction")
   (inst - "p!1"
    "LAMBDA cseq: (index?(cseq)(0) IMPLIES p!1(nth(cseq, 0))) AND (FORALL n: (index?(cseq)(n) IMPLIES p!1(nth(cseq, n))) IMPLIES (index?(cseq)(n + 1) IMPLIES p!1(nth(cseq, n + 1))))")
   (split)
   (("1" (inst - "cseq!1") (prop))
    ("2"
     (delete -1 -2 2)
     (skosimp)
     (expand "nth" -)
     (expand "index?" -)
     (expand "nth" 1 1)
     (expand "index?" 1 1)
     (lift-if)
     (ground)
     (("1" (inst - 0) (expand* "nth" "index?"))
      ("2" (skosimp) (inst - "1 + n!1") (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_induction
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (use "cseq_induction")
   (assert)
   (skosimp)
   (use "index?_infinite")
   (assert)
   (inst - "n!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_induction
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "every_coinduction")
   (inst - "p!1"
    "LAMBDA cseq: (index?(cseq)(0) IMPLIES p!1(nth(cseq, 0))) AND (FORALL n: (FORALL m: m < n IMPLIES (index?(cseq)(m) IMPLIES p!1(nth(cseq, m)))) IMPLIES (index?(cseq)(n) IMPLIES p!1(nth(cseq, n))))")
   (split)
   (("1" (inst - "cseq!1") (prop) (inst - 0) (prop) (skosimp) (assert))
    ("2"
     (delete -1 2)
     (skosimp)
     (lift-if)
     (expand "nth" -1)
     (expand "index?" -1)
     (expand "index?" 1 1)
     (ground)
     (("1"
       (inst - 1)
       (expand "nth" -3 2)
       (expand "index?" -3 2)
       (expand "index?" -3 2)
       (skosimp)
       (expand "nth")
       (assert))
      ("2"
       (skosimp)
       (inst -4 "1 + n!1")
       (expand "index?" -4 2)
       (expand "nth" -4 2)
       (prop)
       (skosimp)
       (expand "nth" 1)
       (ground)
       (inst - "m!1 - 1")
       (expand "index?" -2)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_induction
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (use "CSEQ_induction")
   (assert)
   (skosimp)
   (inst -3 "n!1")
   (assert)
   (skosimp)
   (inst - "m!1")
   (assert)
   (use "index?_infinite"))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_induction
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "nat_induction")
   (inst -
    "LAMBDA (n: nat): FORALL fseq: length(fseq) = n IMPLIES sp!1(fseq)")
   (prop)
   (("1" (inst - "length(fseq!1)") (inst - "fseq!1"))
    ("2"
     (skosimp)
     (lemma "length_empty?_rew" ("cseq" "fseq!2"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_induction
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "NAT_induction")
   (inst -
    "LAMBDA (n: nat): FORALL fseq: length(fseq) = n IMPLIES sp!1(fseq)")
   (prop)
   (("1" (inst - "length(fseq!1)") (inst - "fseq!1"))
    ("2"
     (skosimp*)
     (inst -3 "j!1")
     (split)
     (("1" (inst - "fseq!2") (assert))
      ("2"
       (skosimp)
       (inst - "length(fseq!3)")
       (assert)
       (inst - "fseq!3"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_generate_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skolem!)
     (expand* "has_length" "iterate")
     (rewrite "generate_empty")
     (prop)
     (skolem-typepred))
    ("2"
     (skosimp*)
     (inst - "f!1" "f!1(t!1)" "stop?!1")
     (rewrite "iterate_add_one")
     (expand "has_length" +)
     (expand* "generate" "generate_limit_struct")
     (expand "coreduce" +)
     (smash)
     (("1" (inst -6 0) (expand "iterate" +) (propax))
      ("2"
       (hide 2)
       (skolem!)
       (expand "iterate" -4)
       (ground)
       (inst - "m!1 - 1")
       (rewrite "iterate_add_one")
       (expand "iterate" +)
       (propax))
      ("3" (inst -5 0) (expand "iterate" +) (propax))
      ("4" (inst - 0) (expand "iterate" +) (propax))
      ("5" (inst - 0) (expand "iterate" +) (propax))
      ("6" (skolem!) (rewrite "iterate_add_one") (inst - "1 + m!1"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_generate_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "is_finite_def")
   (prop)
   (("1" (skolem!) (rewrite "generate_has_length") (flatten) (inst? +))
    ("2"
     (skolem!)
     (name "len" "min({n | stop?!1(iterate(f!1, n)(t!1))})")
     (("1"
       (inst + "len")
       (rewrite "generate_has_length")
       (rewrite "min_def")
       (expand "minimum?")
       (assert)
       (skolem!)
       (inst - "m!1")
       (assert))
      ("2" (expand* "nonempty?" "empty?" "member") (inst?))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_generate_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "n" ("f" "t" "stop?" "n") :skolem-typepreds? t)
   (expand "iterate" +)
   (expand "nth" +)
   (lift-if)
   (ground)
   (("1"
     (hide -3)
     (expand* "generate" "generate_limit_struct" "coreduce" "index?"
      "is_finite")
     (reduce))
    ("2"
     (inst - "x!1" "x!1(x!2)" "x!3" "x!4 - 1")
     (("1"
       (assert)
       (rewrite "iterate_invariant")
       (use "generate_rest")
       (ground)
       (hide -3 2)
       (expand* "generate" "generate_limit_struct" "coreduce" "index?"))
      ("2"
       (expand "index?" -)
       (flatten)
       (use "generate_rest")
       (assert)
       (expand* "generate" "generate_limit_struct" "coreduce"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_generate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skolem!)
     (expand* "iterate" "nth" "generate" "generate_struct" "coreduce"))
    ("2"
     (skosimp*)
     (expand "iterate" +)
     (expand "nth" +)
     (inst - "f!1" "f!1(t!1)")
     (rewrite "generate_rest")
     (rewrite "iterate_invariant"))
    ("3" (skolem!) (use "generate_nth_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_generate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "generate_nth")
   (skolem!)
   (use "nth_some")
   (ground)
   (("1" (skolem!) (inst?))
    ("2" (skolem!) (inst + "n!1") (use "generate_nth_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_generate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "generate_nth")
   (skolem!)
   (use "nth_every")
   (ground)
   (("1" (skolem!) (inst - "n!1") (use "generate_nth_TCC1"))
    ("2" (skolem!) (inst - "i!1"))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_generate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (x: nat, f: [T -> T], t: T): NOT has_length(coreduce[T, [[T -> T], T]](generate_struct)(f, t), x)")
   (("1"
     (skolem!)
     (rewrite "is_finite_def")
     (skolem!)
     (inst - "n!1" "f!1" "t!1"))
    ("2"
     (delete 2)
     (induct "x")
     (("1" (skolem!) (expand* "has_length" "generate_struct" "coreduce"))
      ("2"
       (skosimp*)
       (inst - "f!1" "f!1(t!1)")
       (expand "generate_struct")
       (expand "coreduce" -)
       (expand "has_length" -)
       (propax))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_first_p
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "nth_some")
   (expand* "nonempty?" "empty?" "member" "p_indexes")
   (rewrite "not_exists")
   (prop))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_first_p
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "first_p")
   (typepred "min(p_indexes(cseq!1, p!1))")
   (expand "p_indexes" -2 1)
   (propax))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_first_p
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "some_weak_induction")
   (inst - "p!1"
    "LAMBDA cseq: some(p!1)(cseq) AND first_p(p!1, cseq) = IF p!1(first(cseq)) THEN 0 ELSE first_p(p!1, rest(cseq)) + 1 ENDIF")
   (("1"
     (split)
     (("1" (inst - "cseq!1") (assert))
      ("2"
       (delete -1 2)
       (skosimp)
       (smash)
       (("1"
         (expand "first_p")
         (use "p_indexes_nonempty")
         (prop)
         (("1"
           (rewrite "min_def")
           (("1" (expand* "minimum?" "p_indexes" "nth"))
            ("2"
             (expand* "nonempty?" "empty?" "member" "p_indexes"
              "index?"))))
          ("2" (expand "some") (propax))))
        ("2"
         (replace -3)
         (hide -3)
         (expand "first_p")
         (rewrite "min_def")
         (("1"
           (expand* "minimum?" "p_indexes")
           (expand "nth" 3 1)
           (expand "nth" 3 1)
           (skosimp)
           (expand "nth" -3)
           (assert))
          ("2" (expand* "index?" "index?"))))
        ("3"
         (replace -2)
         (hide -2)
         (expand "first_p")
         (lemma "p_indexes_nonempty")
         (inst-cp - "rest(rest(a!1))" "p!1")
         (inst-cp - "rest(a!1)" "p!1")
         (inst - "a!1" "p!1")
         (ground)
         (("1"
           (name "min_first" "min(p_indexes(a!1, p!1))")
           (name "min_rr" "min(p_indexes(rest(rest(a!1)), p!1))")
           (replace*)
           (rewrite "min_def")
           (rewrite "min_def")
           (expand "minimum?")
           (inst - "min_first - 2")
           (("1"
             (inst - "2 + min_rr")
             (("1"
               (split)
               (("1"
                 (assert)
                 (typepred "min_rr")
                 (expand "p_indexes" (-2 +))
                 (expand "nth" +)
                 (expand "nth" +)
                 (propax))
                ("2"
                 (typepred "min_first")
                 (expand "p_indexes" (-2 +))
                 (expand "nth" -)
                 (expand "nth" -)
                 (ground))))
              ("2"
               (expand "index?" +)
               (expand "index?" +)
               (expand "some")
               (assert))))
            ("2"
             (typepred "min_first")
             (split)
             (("1"
               (expand "p_indexes" -2)
               (expand "nth" -2)
               (expand "nth" -2)
               (ground))
              ("2"
               (expand "index?" -)
               (split)
               (("1" (expand "p_indexes" -2) (expand "nth") (assert))
                ("2"
                 (expand "index?" -1)
                 (ground)
                 (expand "p_indexes" -3)
                 (expand* "nth" "nth"))))))))
          ("2" (expand "some" -5) (lift-if) (assert))
          ("3" (expand "some" +) (propax))
          ("4" (expand "some" +) (propax))))
        ("4" (expand "some") (propax)) ("5" (expand "some" +) (propax))
        ("6" (expand "some" +) (propax))))))
    ("2" (skosimp) (forward-chain "first_p_rest_TCC2"))
    ("3" (skosimp) (forward-chain "first_p_rest_TCC1"))
    ("4" (skosimp) (forward-chain "first_p_rest_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter_of
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "cseq" :name "is_finite_induction")
   (("1" (assert))
    ("2"
     (skosimp*)
     (expand "filter_of?" -2)
     (expand "is_finite" +)
     (expand "some")
     (ground)
     (("1" (inst - "rest(filt_seq!1)" "p!1") (assert))
      ("2"
       (inst - "filt_seq!1" "p!1")
       (expand "is_finite" -5)
       (propax))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter_of
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "every_coinduction")
   (inst - "p!1"
    "LAMBDA filt_seq: EXISTS cseq: filter_of?(filt_seq, cseq, p!1)")
   (split)
   (("1" (inst - "filt_seq!1") (assert) (inst + "cseq!1"))
    ("2"
     (delete -1 2)
     (skosimp*)
     (expand "filter_of?" -)
     (lift-if)
     (ground)
     (("1" (inst + "rest(cseq!2)"))
      ("2"
       (lemma "some_induction")
       (inst - "p!1"
        "LAMBDA cseq: nonempty?(cseq) AND (FORALL filt_seq: nonempty?(filt_seq) AND filter_of?(filt_seq, rest(cseq), p!1) IMPLIES p!1(first(filt_seq)) OR p!1(first(cseq)))")
       (split)
       (("1" (inst - "cseq!2") (ground) (inst - "a!1") (assert))
        ("2"
         (delete -1 -2 -3 2 3 4)
         (skosimp)
         (lift-if)
         (ground)
         (skosimp)
         (expand "filter_of?" -2)
         (prop)
         (("1" (inst - "rest(filt_seq!2)") (assert))
          ("2" (inst - "filt_seq!2") (assert))))))
      ("3"
       (lemma "some_induction")
       (inst - "p!1"
        "LAMBDA cseq: nonempty?(cseq) AND (FORALL filt_seq: nonempty?(filt_seq) AND filter_of?(filt_seq, rest(cseq), p!1) IMPLIES every(p!1)(rest(filt_seq)) OR (EXISTS cseq2: filter_of?(rest(filt_seq), cseq2, p!1)) OR p!1(first(cseq)))")
       (split)
       (("1" (inst - "cseq!2") (ground) (inst - "a!1") (assert))
        ("2"
         (delete -1 -2 -3 2 3 4 5)
         (skosimp)
         (lift-if)
         (ground)
         (skosimp)
         (expand "filter_of?" -2)
         (prop)
         (("1" (inst + "rest(rest(a!2))"))
          ("2" (inst - "filt_seq!2") (assert))))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter_of
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "some_induction")
   (inst - "p!1"
    "LAMBDA cseq: some(p!1)(cseq) AND (FORALL filt_seq: filter_of?(filt_seq, cseq, p!1) IMPLIES nth(cseq, first_p(p!1, cseq)) = first(filt_seq))")
   (("1"
     (split)
     (("1" (inst - "cseq!1") (assert) (inst - "filt_seq!1") (assert))
      ("2"
       (delete -1 -2 2)
       (skosimp)
       (expand "some" +)
       (lift-if)
       (ground)
       (("1"
         (skosimp)
         (use "first_p_rest")
         (expand "some")
         (assert)
         (expand* "nth" "filter_of?")
         (ground)
         (expand "some")
         (propax))
        ("2"
         (skosimp)
         (use "first_p_rest")
         (expand "some" -1)
         (lift-if)
         (ground)
         (("1"
           (expand "nth" +)
           (expand "filter_of?" -3)
           (ground)
           (expand "some" +)
           (propax))
          ("2"
           (replace -1)
           (expand "nth" +)
           (inst - "filt_seq!2")
           (assert)
           (expand "filter_of?" -)
           (flatten)
           (expand "some" +)
           (propax))))))))
    ("2" (skosimp*) (use "filter_of?_nonempty") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter_of
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "some_induction")
   (inst - "p!1"
    "LAMBDA cseq: some(p!1)(cseq) AND (FORALL filt_seq: filter_of?(filt_seq, cseq, p!1) IMPLIES filter_of?(rest(filt_seq), suffix(cseq, 1 + first_p(p!1, cseq)), p!1))")
   (("1"
     (split)
     (("1" (inst - "cseq!1") (assert) (inst - "filt_seq!1") (assert))
      ("2"
       (delete -1 -2 2)
       (skosimp)
       (expand "some" +)
       (lift-if)
       (ground)
       (("1"
         (skosimp)
         (use "first_p_rest")
         (expand "filter_of?" -)
         (ground)
         (("1" (expand "some") (propax))
          ("2" (expand* "suffix" "suffix"))
          ("3" (expand "some") (propax))))
        ("2"
         (skosimp)
         (expand "filter_of?" -1)
         (expand "some" -1 1)
         (expand "some" -1 1)
         (smash)
         (("1"
           (use "first_p_rest")
           (expand "some" -1 1)
           (expand* "suffix" "suffix")
           (assert))
          ("2"
           (inst - "filt_seq!2")
           (assert)
           (use "first_p_rest")
           (expand "some" -1 1)
           (expand "suffix" +)
           (assert))))))))
    ("2" (skosimp*) (use "filter_of?_nonempty") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter_of
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "coinduction")
   (inst -
    "LAMBDA filt_seq1, filt_seq2: EXISTS cseq: filter_of?(filt_seq1, cseq, p!1) AND filter_of?(filt_seq2, cseq, p!1)"
    "filt_seq1!1" "filt_seq2!1")
   (("1" (assert) (inst + "cseq!1") (assert))
    ("2"
     (delete -1 -2 2)
     (expand "bisimulation?")
     (skosimp*)
     (expand "filter_of?" -)
     (smash)
     (("1" (inst + "rest(cseq!2)") (assert))
      ("2"
       (inst + "suffix(cseq!2, 1 + first_p(p!1, cseq!2))")
       (lemma "filter_of?_suffix")
       (inst-cp - "y!1" "cseq!2" "p!1")
       (inst - "x!1" "cseq!2" "p!1")
       (expand "filter_of?" -2 1)
       (expand "filter_of?" -1 1)
       (assert))
      ("3"
       (lemma "filter_of?_first_p")
       (inst-cp - "y!1" "rest(cseq!2)" "p!1")
       (inst - "x!1" "rest(cseq!2)" "p!1")
       (expand "some" -4)
       (lift-if)
       (ground))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter_of
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "o_empty_left")
   (auto-rewrite "o_first")
   (auto-rewrite "o_rest")
   (induct "cseq1" :name "is_finite_induction")
   (("1" (assert))
    ("2"
     (skosimp*)
     (ground)
     (("1" (expand "filter_of?" -3) (expand "some") (assert))
      ("2"
       (expand "filter_of?" -4)
       (smash)
       (("1"
         (use "o_nonempty_left" ("nseq" "cseq!1"))
         (expand "filter_of?" +)
         (smash)
         (("1" (rewrite "o_some") (use "filter_of?_empty") (assert))
          ("2"
           (use "filter_of?_empty")
           (assert)
           (use "o_nonempty_right")
           (("1"
             (expand "some" +)
             (lift-if)
             (ground)
             (expand "filter_of?" -9)
             (propax))
            ("2" (expand "some" -1) (assert))))
          ("3"
           (expand "some")
           (lift-if)
           (ground)
           (expand "filter_of?" -7)
           (propax))
          ("4"
           (rewrite "o_first")
           (lift-if)
           (ground)
           (("1" (expand "filter_of?" -7) (propax))
            ("2"
             (inst - "filt_seq1!1" "filt_seq2!1" "cseq2!1" "p!1")
             (assert)
             (expand "filter_of?" 3)
             (expand "some" +)
             (propax))))
          ("5" (rewrite "o_some") (expand "filter_of?" -6) (assert))))
        ("2"
         (use "o_nonempty_left" ("nseq" "cseq!1"))
         (expand "filter_of?" +)
         (smash)
         (("1" (rewrite "o_empty"))
          ("2"
           (rewrite "o_rest")
           (lift-if)
           (ground)
           (("1" (expand "some") (propax))
            ("2"
             (inst - "rest(filt_seq1!1)" "filt_seq2!1" "cseq2!1" "p!1")
             (assert))))
          ("3" (rewrite "o_first") (expand "some") (lift-if) (ground))
          ("4" (rewrite "o_first") (expand "some") (lift-if) (ground))
          ("5" (rewrite "o_some"))))
        ("3"
         (use "o_nonempty_left" ("nseq" "cseq!1"))
         (expand "filter_of?" +)
         (smash)
         (("1" (rewrite "o_empty"))
          ("2" (rewrite "o_first") (expand "some") (lift-if) (ground))
          ("3" (rewrite "o_first") (expand "some") (lift-if) (ground))
          ("4"
           (rewrite "o_rest")
           (expand "some")
           (lift-if)
           (ground)
           (inst - "filt_seq1!1" "filt_seq2!1" "cseq2!1" "p!1")
           (assert))
          ("5" (rewrite "o_some"))))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter_of
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "some_induction")
   (inst - "p!1"
    "LAMBDA cseq: FORALL filt_seq: filter_of?(filt_seq, cseq, q!1) IMPLIES some(p!1)(filt_seq)")
   (split)
   (("1" (inst - "cseq!1") (assert) (inst - "filt_seq!1") (assert))
    ("2"
     (delete -2 -3 2)
     (skosimp*)
     (lift-if)
     (ground)
     (("1"
       (inst - "first(a!1)")
       (expand* "pred_IMPLIES" "filter_of?" "some")
       (lift-if)
       (ground))
      ("2"
       (forward-chain "some_implies")
       (expand "filter_of?" -4)
       (ground)
       (("1" (expand "some" 1) (propax))
        ("2" (inst - "rest(filt_seq!2)") (expand "some" +) (assert))
        ("3" (inst - "filt_seq!2") (assert))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter_of
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "some_induction")
   (inst - "q!1"
    "LAMBDA filt_seq: FORALL cseq: filter_of?(filt_seq, cseq, p!1) IMPLIES some(q!1)(cseq)")
   (split)
   (("1" (inst - "filt_seq!1") (assert) (inst - "cseq!1") (assert))
    ("2"
     (delete -1 -2 2)
     (skosimp*)
     (lift-if)
     (ground)
     (("1"
       (use "filter_of?_empty")
       (assert)
       (use "filter_of?_first_p")
       (assert)
       (rewrite "nth_some" +)
       (inst + "first_p(p!1, cseq!2)")
       (assert))
      ("2"
       (use "filter_of?_empty")
       (assert)
       (forward-chain "filter_of?_suffix")
       (inst - "suffix(cseq!2, 1 + first_p(p!1, cseq!2))")
       (assert)
       (rewrite "suffix_some")
       (rewrite "nth_some" +)
       (skosimp)
       (inst + "i!1"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter_of
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (forward-chain "filter_of?_def")
     (lemma "filter_of?_implication_rev")
     (inst - "filt_seq1!1" "cseq!1" "p!1" "pred_AND(p!1, q!1)")
     (assert)
     (rewrite "nth_every")
     (rewrite "nth_some")
     (rewrite "nth_some" -3)
     (skolem!)
     (inst - "i!1")
     (inst + "i!1")
     (expand "pred_AND" 1)
     (assert))
    ("2"
     (rewrite "nth_some")
     (rewrite "nth_some")
     (expand "pred_AND")
     (skosimp)
     (inst + "i!1"))
    ("3"
     (lemma "filter_of?_implication")
     (inst - "filt_seq1!1" "cseq!1" "pred_AND(p!1, q!1)" "p!1")
     (ground)
     (("1"
       (lemma "some_implies")
       (inst - "filt_seq1!1" "pred_AND(p!1, q!1)" "q!1")
       (expand* "pred_AND" "pred_IMPLIES")
       (assert)
       (skosimp))
      ("2" (expand* "pred_AND" "pred_IMPLIES") (skosimp))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter_of
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (lemma "filter_of?_coinduction")
   (inst - "pred_AND(p!1, q!1)"
    "LAMBDA filt_seq2, cseq: EXISTS filt_seq1: filter_of?(filt_seq1, cseq, p!1) AND filter_of?(filt_seq2, filt_seq1, q!1)")
   (split)
   (("1"
     (inst - "filt_seq2!1" "cseq!1")
     (assert)
     (inst + "filt_seq1!1")
     (assert))
    ("2"
     (delete -1 -2 2)
     (skosimp*)
     (use "filter_of?_some")
     (expand "pred_AND")
     (smash)
     (("1"
       (lemma "filter_of?_empty")
       (inst - "filt_seq!1" "filt_seq1!2" "q!1")
       (assert))
      ("2"
       (expand "filter_of?" -)
       (ground)
       (inst + "rest(filt_seq1!2)")
       (assert))
      ("3" (expand "filter_of?") (ground))
      ("4"
       (expand "filter_of?" -1)
       (smash)
       (("1"
         (expand "filter_of?" -5)
         (flatten)
         (inst + "rest(filt_seq1!2)")
         (assert))
        ("2" (inst + "filt_seq1!2") (assert))))
      ("5"
       (expand "filter_of?" -1)
       (flatten)
       (inst + "filt_seq1!2")
       (assert))
      ("6"
       (lemma "filter_of?_nonempty")
       (inst - "filt_seq!1" "filt_seq1!2" "q!1")
       (assert))
      ("7"
       (lemma "filter_of?_nonempty")
       (inst-cp - "filt_seq!1" "filt_seq1!2" "q!1")
       (inst - "filt_seq1!2" "cseq!2" "p!1")
       (assert)
       (expand "some" -)
       (propax))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "every_weak_coinduction")
   (inst - "p!1"
    "LAMBDA cseq: EXISTS (cseq2: csequence): cseq = filter(cseq2, p!1)")
   (split)
   (("1" (inst - "filter(cseq!1, p!1)") (assert) (inst + "cseq!1"))
    ("2"
     (delete 2)
     (skosimp*)
     (replace -1)
     (hide -1)
     (lift-if)
     (ground)
     (("1"
       (expand* "filter" "filter_struct" "coreduce" "first_p"
        "p_indexes")
       (reduce))
      ("2"
       (expand* "filter" "filter_struct")
       (expand "coreduce" 1 1)
       (expand "coreduce" 2)
       (smash)
       (inst + "suffix(cseq2!1, 1 + first_p(p!1, cseq2!1))"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand* "filter" "filter_struct" "coreduce")
   (smash)
   (("1"
     (forward-chain "first_p_rest")
     (assert)
     (replace -1)
     (expand "nth" 3 1)
     (decompose-equality)
     (rewrite "suffix_rest1"))
    ("2" (expand "some" -) (propax)) ("3" (expand "some" +) (propax))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lift-if)
   (prop)
   (("1"
     (case "first_p(p!1, add(t!1, cseq!1)) = 0")
     (("1"
       (expand* "filter" "filter_struct")
       (expand "coreduce" 1 1)
       (smash)
       (("1"
         (expand "nth" 1 1)
         (decompose-equality)
         (expand "suffix" 1 2)
         (expand "suffix" 1 2)
         (propax))
        ("2" (expand "some") (propax))))
      ("2"
       (expand* "first_p" "p_indexes")
       (rewrite "min_def")
       (("1" (expand* "minimum?" "nth"))
        ("2"
         (expand* "nonempty?" "empty?" "member")
         (inst - 0)
         (("1" (expand "nth") (propax))
          ("2" (expand "index?") (propax))))
        ("3" (expand "index?") (propax))))
      ("3" (expand "some") (flatten))))
    ("2" (use "filter_reduce") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "filter_add")
   (inst - "rest(nseq!1)" "p!1" "first(nseq!1)")
   (apply-eta "nseq!1")
   (reduce))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (use "filter_nonempty")
   (assert)
   (expand* "filter" "filter_struct")
   (expand "coreduce" 2 1)
   (propax))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (lemma "coinduction")
     (inst -
      "LAMBDA cseq1, cseq2: cseq1 = filter(cseq2, p!1) AND every(p!1)(cseq2)"
      "filter(cseq!1, p!1)" "cseq!1")
     (("1" (assert))
      ("2"
       (delete -1 2)
       (expand "bisimulation?")
       (skosimp)
       (smash)
       (("1"
         (expand* "filter" "filter_struct" "coreduce" "every" "some")
         (reduce))
        ("2" (expand* "filter" "filter_struct" "coreduce" "some"))
        ("3"
         (expand "every" -)
         (expand* "filter" "filter_struct" "coreduce" "some")
         (reduce))
        ("4"
         (use "filter_rest")
         (expand* "filter" "filter_struct" "coreduce" "every" "some")
         (reduce))
        ("5"
         (replace -1)
         (hide -1)
         (case "some(p!1)(y!1)")
         (("1"
           (forward-chain "first_p_rest")
           (expand* "filter" "filter_struct" "coreduce" "every" "some")
           (reduce)
           (expand "nth" +)
           (propax))
          ("2"
           (hide 2)
           (expand* "filter" "filter_struct" "coreduce" "every" "some")
           (reduce))))))))
    ("2" (use "filter_def") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (lemma "some_induction")
     (inst - "q!1"
      "LAMBDA cseq: FORALL cseq2: cseq = filter(cseq2, p!1) IMPLIES some(pred_AND(p!1, q!1))(cseq2)")
     (split)
     (("1" (inst - "filter(cseq!1, p!1)") (assert) (inst - "cseq!1"))
      ("2"
       (delete -1 2)
       (skosimp*)
       (lift-if)
       (replace -2)
       (hide -2)
       (ground)
       (("1"
         (rewrite "nth_some")
         (expand* "filter" "filter_struct")
         (expand "coreduce" -)
         (smash)
         (("1"
           (expand "pred_AND")
           (inst + "first_p(p!1, cseq2!1)")
           (assert)
           (hide-all-but 2)
           (expand* "first_p" "p_indexes")
           (assert))
          ("2" (expand "coreduce") (propax))))
        ("2"
         (expand* "filter" "filter_struct" "pred_AND")
         (expand "coreduce" -1 1)
         (smash)
         (("1"
           (inst - "suffix(cseq2!1, 1 + first_p(p!1, cseq2!1))")
           (hide -1 -2 1)
           (rewrite "suffix_some")
           (rewrite "nth_some")
           (expand "coreduce" -1 1)
           (skosimp)
           (inst + "i!1")
           (assert))
          ("2" (expand "coreduce" +) (propax))))))))
    ("2"
     (lemma "some_induction")
     (inst - "pred_AND(p!1, q!1)"
      "LAMBDA cseq: some(q!1)(filter(cseq, p!1))")
     (split)
     (("1" (inst - "cseq!1") (assert))
      ("2"
       (delete -1 2)
       (skosimp)
       (expand "pred_AND")
       (lift-if)
       (ground)
       (("1"
         (expand* "filter" "filter_struct" "coreduce" "some")
         (flatten)
         (case "first_p(p!1, a!1) = 0")
         (("1" (expand "nth" +) (assert))
          ("2"
           (hide 3 4)
           (expand* "first_p" "p_indexes")
           (rewrite "min_def")
           (("1" (expand* "minimum?" "nth"))
            ("2"
             (expand* "nonempty?" "empty?" "member")
             (inst - 0)
             (("1" (expand "nth") (propax))
              ("2" (expand "index?") (propax))))
            ("3" (expand "index?") (propax))))))
        ("2"
         (use "filter_rest")
         (expand "some" +)
         (lift-if)
         (ground)
         (expand* "filter" "filter_struct" "coreduce" "some"))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "every_some_rew")
   (inst-cp - "pred_IMPLIES(p!1, q!1)" "cseq!1")
   (inst - "q!1" "filter(cseq!1, p!1)")
   (use "filter_some")
   (expand* "pred_AND" "pred_NOT" "pred_IMPLIES")
   (case "(LAMBDA t: p!1(t) AND NOT q!1(t)) = (LAMBDA t: NOT (p!1(t) IMPLIES q!1(t)))")
   (("1" (ground))
    ("2" (hide-all-but 1) (decompose-equality) (iff) (prop))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (lemma "filter_of?_coinduction")
     (inst - "p!1" "LAMBDA filt_seq, cseq: filter(cseq, p!1) = filt_seq")
     (split)
     (("1" (inst - "filt_seq!1" "cseq!1") (assert))
      ("2"
       (delete -1 2)
       (skosimp)
       (use "filter_nonempty")
       (lemma "filter_rest")
       (lemma "filter_first_first")
       (reduce))))
    ("2"
     (lemma "coinduction")
     (inst -
      "LAMBDA cseq1, filt_seq: EXISTS cseq2: cseq1 = filter(cseq2, p!1) AND filter_of?(filt_seq, cseq2, p!1)"
      "filter(cseq!1, p!1)" "filt_seq!1")
     (("1" (assert) (inst + "cseq!1"))
      ("2"
       (delete -1 2)
       (expand "bisimulation?")
       (skosimp*)
       (replace -1)
       (hide -1)
       (use "filter_nonempty")
       (use "filter_of?_empty")
       (smash)
       (("1"
         (expand "filter_of?" -)
         (prop)
         (("1" (inst + "rest(cseq2!1)") (use "filter_rest") (assert))
          ("2"
           (lemma "filter_of?_suffix")
           (inst - "y!1" "cseq2!1" "p!1")
           (inst + "suffix(cseq2!1, 1 + first_p(p!1, cseq2!1))")
           (use "filter_suffix")
           (assert))))
        ("2"
         (forward-chain "filter_of?_first_p")
         (expand* "filter" "filter_struct" "coreduce"))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lift-if)
   (ground)
   (("1"
     (name "filt_conc" "filter(cseq1!1 o cseq2!1, p!1)")
     (name "filt2" "filter(cseq2!1, p!1)")
     (name "filt1" "filter(cseq1!1, p!1)")
     (replace*)
     (rewrite "filter_filter_of")
     (rewrite "filter_filter_of")
     (rewrite "filter_filter_of")
     (lemma "filter_of?_concatenate")
     (inst - "filt1" "filt2" "cseq1!1" "cseq2!1" "p!1")
     (assert)
     (lemma "filter_of?_injective")
     (inst - "filt1 o filt2" "filt_conc" "cseq1!1 o cseq2!1" "p!1")
     (assert))
    ("2" (rewrite "o_infinite"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (name "filter_and" "filter(cseq!1, pred_AND(p!1, q!1))")
   (name "filter_q" "filter(filter(cseq!1, p!1), q!1)")
   (name "filter_p" "filter(cseq!1, p!1)")
   (replace*)
   (rewrite "filter_filter_of")
   (rewrite "filter_filter_of")
   (rewrite "filter_filter_of")
   (lemma "filter_of?_filter_of?")
   (inst - "filter_p" "filter_q" "cseq!1" "p!1" "q!1")
   (assert)
   (use "filter_of?_injective")
   (assert))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_filter
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "subsequence?_coinduction")
   (inst -
    "LAMBDA cseq1, cseq2: cseq1 = coreduce[T, [csequence, pred[T]]](filter_struct)(cseq2, p!1)")
   (split)
   (("1"
     (inst -
      "coreduce[T, [csequence, pred[T]]](filter_struct)(cseq!1, p!1)"
      "cseq!1"))
    ("2"
     (delete 2)
     (skosimp)
     (expand "coreduce" -)
     (lift-if)
     (ground)
     (decompose-equality)
     (expand "filter_struct" (-1 1))
     (expand "filter_struct" -2 2)
     (reduce))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "every_some_rew")
   (case-replace "pred_NOT(empty?) = nonempty?")
   (("1" (assert)) ("2" (hide 2) (expand "pred_NOT") (reduce-with-ext))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand "flatten")
   (use "filter_nonempty")
   (rewrite "some_every_empty")
   (expand* "flatten_struct" "coreduce")
   (reduce))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (use "filter_def")
   (lemma "filter_full")
   (inst-cp -
    "add(rest(first(filter(cseq!1, nonempty?))), rest(filter(cseq!1, nonempty?)))"
    "nonempty?")
   (expand "every" (-2 -3))
   (expand* "flatten" "flatten_struct")
   (expand "coreduce" 1 1)
   (expand "coreduce" -)
   (smash)
   (use "filter_add")
   (assert)
   (inst - "rest(filter(cseq!1, nonempty?))" "nonempty?")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand* "flatten" "flatten_struct")
   (expand "coreduce" 3 1)
   (smash)
   (("1" (use "filter_nonempty") (expand "some") (propax))
    ("2"
     (use "filter_first_first")
     (assert)
     (expand "some")
     (use "filter_add")
     (assert)
     (use "filter_rest")
     (assert))
    ("3"
     (use "filter_first_first")
     (assert)
     (expand "some")
     (use "filter_add")
     (assert)
     (use "filter_rest")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "some_induction[csequence[T]]")
   (inst - "nonempty?"
    "LAMBDA cseq: some(nonempty?)(cseq) AND  flatten(cseq) = flatten(suffix(cseq, first_p(nonempty?, cseq)))")
   (split)
   (("1" (skosimp) (inst - "cseq!1") (assert))
    ("2"
     (delete 2)
     (skosimp)
     (lift-if)
     (ground)
     (("1" (expand "some") (propax))
      ("2" (use "first_p_rest") (expand* "some" "suffix") (assert))
      ("3" (expand "some" +) (propax))
      ("4"
       (use "first_p_rest")
       (expand "some" -1)
       (expand "suffix" +)
       (lift-if)
       (ground)
       (use "flatten_reduce")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case "is_finite(first(cseq!1))")
   (("1"
     (lemma "is_finite_induction[T]")
     (inst -
      "LAMBDA tseq: FORALL cseq: nonempty?(cseq) AND tseq = first(cseq) IMPLIES flatten(cseq) = tseq o flatten(rest(cseq))")
     (split)
     (("1" (inst - "first(cseq!1)") (assert) (inst - "cseq!1") (assert))
      ("2"
       (delete -1 -2 2)
       (skosimp*)
       (case "empty?(cseq!2)")
       (("1" (rewrite "o_empty_left") (use "flatten_reduce") (assert))
        ("2"
         (ground)
         (use "flatten_nonempty")
         (expand "some")
         (replace -5)
         (hide -5)
         (inst - "add(rest(first(cseq!3)), rest(cseq!3))")
         (assert)
         (lemma "o_nonempty[T]")
         (inst - "first(cseq!3)" "flatten(rest(cseq!3))")
         (assert)
         (decompose-equality +)
         (("1"
           (rewrite "o_first")
           (lemma "filter_first_first")
           (inst - "cseq!3" "nonempty?")
           (assert)
           (expand "some")
           (forward-chain "flatten_first")
           (assert))
          ("2" (rewrite "o_rest") (use "flatten_rest2") (assert))))))))
    ("2"
     (rewrite "o_infinite")
     (lemma "coinduction[T]")
     (inst -
      "LAMBDA (tseq1, tseq2: csequence[T]): EXISTS cseq: nonempty?(cseq) AND tseq1 = flatten(cseq) AND tseq2 = first(cseq) AND is_infinite(tseq2)"
      "flatten(cseq!1)" "first(cseq!1)")
     (("1" (assert) (inst + "cseq!1"))
      ("2"
       (delete -1 2 3)
       (expand "bisimulation?")
       (skosimp*)
       (replace*)
       (hide -2 -3)
       (smash)
       (("1" (rewrite "flatten_empty") (expand "every") (propax))
        ("2" (expand "is_finite") (propax))
        ("3"
         (lemma "filter_first_first")
         (inst - "cseq!2" "nonempty?")
         (prop)
         (("1"
           (use "flatten_rest")
           (assert)
           (replace -2)
           (inst +
            "add(rest(first(cseq!2)), rest(filter(cseq!2, nonempty?)))")
           (assert)
           (expand "is_finite" +)
           (propax))
          ("2" (expand* "some" "is_finite") (ground))
          ("3" (expand "is_finite") (ground))))
        ("4"
         (rewrite "flatten_first")
         (expand "is_finite")
         (ground)
         (rewrite "filter_first_first")
         (expand "some")
         (propax))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (use "flatten_rest")
   (assert)
   (rewrite "flatten_nonempty")
   (rewrite "filter_first")
   (use "filter_nonempty")
   (use "filter_suffix")
   (ground)
   (case-replace
    "flatten(add(rest(nth(cseq!1, first_p(nonempty?, cseq!1))), rest(filter(cseq!1, nonempty?)))) = flatten(add(rest(nth(cseq!1, first_p(nonempty?, cseq!1))), suffix(cseq!1, 1 + first_p(nonempty?, cseq!1))))")
   (hide -4 2)
   (lemma "flatten_concatenate")
   (inst-cp -
    "add(rest(nth(cseq!1, first_p(nonempty?, cseq!1))), suffix(cseq!1, 1 + first_p(nonempty?, cseq!1)))")
   (inst -
    "add(rest(nth(cseq!1, first_p(nonempty?, cseq!1))), rest(filter(cseq!1, nonempty?)))")
   (assert)
   (replace*)
   (rewrite "flatten_filter"))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (lemma "is_finite_induction[T]")
     (inst -
      "LAMBDA tseq: FORALL cseq: tseq = flatten(cseq) IMPLIES is_finite(filter(cseq, nonempty?))")
     (split)
     (("1" (inst - "flatten(cseq!1)") (assert) (inst - "cseq!1"))
      ("2"
       (delete -1 2)
       (skosimp*)
       (replace -2)
       (hide -2)
       (prop)
       (("1"
         (rewrite "flatten_empty")
         (rewrite "some_every_empty")
         (rewrite "filter_nonempty")
         (expand "is_finite")
         (ground))
        ("2"
         (use "flatten_rest_suffix")
         (assert)
         (split)
         (("1"
           (inst -
            "add(rest(nth(cseq!3, first_p(nonempty?, cseq!3))), suffix(cseq!3, 1 + first_p(nonempty?, cseq!3)))")
           (assert)
           (rewrite "filter_add")
           (lift-if)
           (ground)
           (("1"
             (expand "is_finite" -2)
             (lemma "filter_suffix")
             (inst - "cseq!3" "nonempty?")
             (expand "is_finite" +)
             (ground))
            ("2"
             (lemma "filter_suffix")
             (inst - "cseq!3" "nonempty?")
             (expand "is_finite" +)
             (ground))))
          ("2"
           (rewrite "flatten_nonempty")
           (rewrite "filter_nonempty")
           (expand "is_finite" +)
           (ground))))))))
    ("2"
     (lemma "every_coinduction[csequence[T]]")
     (inst - "is_finite" "LAMBDA cseq: is_finite(flatten(cseq))")
     (split)
     (("1" (inst - "cseq!1") (assert))
      ("2"
       (delete -1 2)
       (skosimp)
       (lift-if)
       (rewrite "flatten_concatenate")
       (ground)
       (("1" (use "o_infinite1[T]")) ("2" (use "o_infinite2[T]"))))))
    ("3"
     (lemma "is_finite_induction[csequence[T]]")
     (inst -
      "LAMBDA (filt: csequence[csequence[T]]): FORALL cseq: filt = filter(cseq, nonempty?) IMPLIES (NOT every(is_finite)(cseq) OR is_finite(flatten(cseq)))")
     (split)
     (("1"
       (inst - "filter(cseq!1, nonempty?)")
       (assert)
       (inst - "cseq!1")
       (assert))
      ("2"
       (delete -1 -2 2)
       (skosimp*)
       (replace -2)
       (hide -2)
       (ground)
       (("1"
         (use "filter_nonempty")
         (use "some_every_empty")
         (use "flatten_empty")
         (expand "is_finite" +)
         (ground))
        ("2"
         (lemma "some_every_empty" ("cseq" "cseq!3"))
         (prop)
         (("1" (use "flatten_empty") (expand "is_finite" +) (ground))
          ("2"
           (use "filter_suffix")
           (use "filter_nonempty")
           (assert)
           (inst - "suffix(cseq!3, 1 + first_p(nonempty?, cseq!3))")
           (ground)
           (("1"
             (rewrite "suffix_every")
             (rewrite "nth_every" -5)
             (skosimp)
             (inst - "i!1"))
            ("2"
             (expand "is_finite" +)
             (flatten)
             (use "flatten_rest_suffix")
             (assert)
             (replace -1 +)
             (hide -1)
             (rewrite "flatten_concatenate" 3)
             (use "o_finite[T]")
             (rewrite "nth_every" -6)
             (inst - "first_p(nonempty?, cseq!3)")
             (expand "is_finite" -6)
             (assert)
             (expand "first_p")
             (typepred "min(p_indexes(cseq!3, nonempty?))")
             (expand "p_indexes" -2 1)
             (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "flatten_finite")
   (rewrite "every_some_rew")
   (expand "pred_NOT")
   (ground))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "length_of_flatten" 1 1)
   (lift-if)
   (ground)
   (("1"
     (rewrite "flatten_concatenate" -)
     (rewrite "o_empty")
     (flatten)
     (expand* "length" "length_of_flatten")
     (assert))
    ("2"
     (expand "nth")
     (lift-if)
     (ground)
     (("1" (expand* "suffix" "suffix"))
      ("2"
       (use "first_p_rest")
       (assert)
       (expand "some")
       (ground)
       (("1"
         (expand "length" 2 2)
         (expand "length_of_flatten" 2 2)
         (lift-if)
         (lift-if)
         (lift-if)
         (ground)
         (("1" (rewrite "flatten_concatenate" 4) (rewrite "o_empty"))
          ("2" (expand "suffix" 2 1) (assert))))
        ("2"
         (rewrite "flatten_concatenate" 5)
         (rewrite "o_empty")
         (rewrite "flatten_empty")
         (rewrite "some_every_empty"))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "is_finite_induction[T]")
   (inst -
    "LAMBDA tseq: FORALL cseq: tseq = flatten(cseq) and is_finite(tseq) IMPLIES length(tseq) = length_of_flatten(cseq)")
   (("1"
     (split)
     (("1" (inst - "flatten(cseq!1)") (assert) (inst - "cseq!1"))
      ("2"
       (delete -1 2)
       (skosimp*)
       (replace -2)
       (hide -2)
       (expand "length" +)
       (lift-if)
       (ground)
       (("1" (expand "length_of_flatten") (propax))
        ("2" (expand "length_of_flatten") (propax))
        ("3"
         (use "flatten_rest_suffix")
         (assert)
         (inst -
          "add(rest(nth(cseq!3, first_p(nonempty?, cseq!3))), suffix(cseq!3, 1 + first_p(nonempty?, cseq!3)))")
         (assert)
         (expand "length_of_flatten" +)
         (lemma "length_of_flatten_add")
         (inst - "suffix(cseq!3, 1 + first_p(nonempty?, cseq!3))"
          "rest(nth(cseq!3, first_p(nonempty?, cseq!3)))")
         (split)
         (("1"
           (expand "length" 2 2)
           (lift-if)
           (ground)
           (hide-all-but -1)
           (expand "first_p")
           (typepred "min(p_indexes(cseq!3, nonempty?))")
           (expand "p_indexes" -2 1)
           (assert))
          ("2"
           (rewrite "flatten_finite")
           (flatten)
           (rewrite "nth_every")
           (inst - "first_p(nonempty?, cseq!3)")
           (expand "is_finite" -5)
           (assert)
           (hide-all-but -5)
           (expand "first_p")
           (typepred "min(p_indexes(cseq!3, nonempty?))")
           (expand "p_indexes" -2 1)
           (assert))))))))
    ("2" (skosimp) (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "some_induction[T]")
   (inst - "p!1"
    "LAMBDA tseq: FORALL cseq: tseq = flatten(cseq) IMPLIES some(some(p!1))(cseq)")
   (split)
   (("1" (inst - "flatten(cseq!1)") (assert) (inst - "cseq!1"))
    ("2"
     (delete -1 2)
     (skosimp*)
     (replace -2)
     (hide -2)
     (lift-if)
     (ground)
     (("1"
       (rewrite "flatten_first")
       (use "flatten_empty")
       (assert)
       (rewrite "some_every_empty")
       (rewrite "filter_first")
       (rewrite "nth_some" +)
       (inst + "first_p(nonempty?, cseq!2)")
       (expand "some" +)
       (lift-if)
       (ground)
       (hide-all-but -1)
       (expand "first_p")
       (typepred "min(p_indexes(cseq!2, nonempty?))")
       (expand "p_indexes" -2 1)
       (assert))
      ("2"
       (use "flatten_rest_suffix")
       (assert)
       (inst -
        "add(rest(nth(cseq!2, first_p(nonempty?, cseq!2))), suffix(cseq!2, 1 + first_p(nonempty?, cseq!2)))")
       (assert)
       (expand "some" -3 1)
       (split)
       (("1"
         (rewrite "nth_some" +)
         (inst + "first_p(nonempty?, cseq!2)")
         (expand "some" +)
         (lift-if)
         (ground)
         (hide-all-but -1)
         (expand "first_p")
         (typepred "min(p_indexes(cseq!2, nonempty?))")
         (expand "p_indexes" -2 1)
         (assert))
        ("2"
         (rewrite "suffix_some")
         (skosimp)
         (rewrite "nth_some" +)
         (inst + "i!1"))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (use "flatten_some")
   (smash)
   (lemma "some_induction[csequence[T]]")
   (inst - "some(p!1)"
    "LAMBDA cseq: NOT every(is_finite)(cseq) OR some(p!1)(flatten(cseq))")
   (split)
   (("1" (inst - "cseq!1") (assert))
    ("2"
     (delete -1 -2 2)
     (skosimp)
     (lift-if)
     (ground)
     (("1" (rewrite "flatten_concatenate") (rewrite "o_some"))
      ("2" (expand "every" -) (propax))
      ("3"
       (rewrite "flatten_concatenate" +)
       (rewrite "o_some")
       (flatten)
       (expand "every" -)
       (flatten))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "every_coinduction[T]")
   (inst - "p!1"
    "LAMBDA tseq: EXISTS cseq: tseq = flatten(cseq) AND every(every(p!1))(cseq)")
   (split)
   (("1" (inst - "flatten(cseq!1)") (assert) (inst + "cseq!1"))
    ("2"
     (delete -1 2)
     (skosimp*)
     (replace -1)
     (hide -1)
     (lift-if)
     (ground)
     (("1"
       (rewrite "flatten_first")
       (use "flatten_empty")
       (assert)
       (rewrite "some_every_empty")
       (rewrite "filter_first")
       (rewrite "nth_every")
       (inst - "first_p(nonempty?, cseq!2)")
       (expand "every")
       (lift-if)
       (ground)
       (hide-all-but -1)
       (expand "first_p")
       (typepred "min(p_indexes(cseq!2, nonempty?))")
       (expand "p_indexes" -2 1)
       (assert))
      ("2"
       (use "flatten_rest_suffix")
       (assert)
       (inst +
        "add(rest(nth(cseq!2, first_p(nonempty?, cseq!2))), suffix(cseq!2, 1 + first_p(nonempty?, cseq!2)))")
       (assert)
       (expand "every" 2 1)
       (split)
       (("1"
         (rewrite "nth_every" -)
         (inst - "first_p(nonempty?, cseq!2)")
         (expand "every" -)
         (lift-if)
         (ground)
         (hide-all-but -1)
         (expand "first_p")
         (typepred "min(p_indexes(cseq!2, nonempty?))")
         (expand "p_indexes" -2 1)
         (assert))
        ("2"
         (rewrite "suffix_every")
         (skosimp)
         (rewrite "nth_every" -)
         (inst - "i!1"))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (use "flatten_every")
   (smash)
   (lemma "every_coinduction[csequence[T]]")
   (inst - "every(p!1)"
    "LAMBDA cseq: every(p!1)(flatten(cseq)) AND every(is_finite)(cseq)")
   (split)
   (("1" (inst - "cseq!1") (assert))
    ("2"
     (delete -1 -2 2)
     (skosimp)
     (lift-if)
     (rewrite "flatten_concatenate")
     (ground)
     (("1" (rewrite "o_every"))
      ("2" (rewrite "o_every") (flatten) (expand "every" -2) (flatten))
      ("3" (expand "every" -2) (propax))))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (use "filter_def")
   (expand* "flatten" "flatten_struct" "coreduce" "every")
   (reduce))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "first_p")
   (typepred "min(p_indexes(cseq!1, nonempty?))")
   (expand "p_indexes" -2 1)
   (assert))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (rewrite "flatten_finite")
   (flatten)
   (rewrite "nth_every")
   (inst - "first_p(nonempty?, fseq!1)"))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (rewrite "flatten_finite")
   (rewrite "flatten_finite")
   (prop)
   (("1"
     (lemma "filter_suffix")
     (inst - "fseq!1" "nonempty?")
     (expand "is_finite" -2)
     (smash)
     (rewrite "flatten_empty")
     (use "filter_nonempty")
     (rewrite "some_every_empty")
     (assert))
    ("2"
     (rewrite "suffix_every")
     (rewrite "nth_every")
     (skosimp)
     (inst - "i!1"))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_flatten
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (lemma "filter_suffix")
   (inst - "fseq!1" "nonempty?")
   (split)
   (("1"
     (rewrite "flatten_empty")
     (use "filter_nonempty")
     (rewrite "some_every_empty")
     (assert))
    ("2"
     (expand "length" 2 2)
     (lift-if)
     (ground)
     (use "filter_nonempty")
     (rewrite "flatten_empty")
     (rewrite "some_every_empty")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_finseq
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "fs`length" ("fs"))
   (expand "from_finseq" +)
   (expand "length" +)
   (lift-if)
   (ground)
   (inst -
    "(# length := x!1`length - 1, seq := LAMBDA (x: below[x!1`length - 1]): x!1`seq(1 + x) #)")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_finseq
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "n" ("fs" "n"))
   (("1"
     (expand "from_finseq" +)
     (expand "nth" +)
     (lift-if)
     (ground)
     (inst -
      "(# length := x!1`length - 1, seq := LAMBDA (x: below[x!1`length - 1]): x!1`seq(1 + x) #)"
      "x!2 - 1")
     (assert))
    ("2" (use "from_finseq_nth_TCC1")) ("3" (use "from_finseq_nth_TCC1"))
    ("4" (use "from_finseq_nth_TCC1"))
    ("5" (use "from_finseq_nth_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_finseq
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "from_finseq_index")
   (auto-rewrite "from_finseq_length")
   (skolem!)
   (expand "to_finseq")
   (decompose-equality)
   (("1"
     (decompose-equality)
     (("1" (typepred "x!1") (use "from_finseq_nth") (assert))
      ("2" (skolem-typepred) (assert))))
    ("2" (rewrite "length_def" :dir rl))
    ("3" (skolem-typepred) (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_finseq
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "nth_extensionality")
   (assert)
   (delete 2)
   (split)
   (("1"
     (decompose-equality)
     (rewrite "from_finseq_index")
     (rewrite "to_finseq_length")
     (rewrite "index?_finite"))
    ("2"
     (skolem-typepred)
     (rewrite "from_finseq_index")
     (assert)
     (rewrite "from_finseq_nth")
     (rewrite "to_finseq_nth"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter_map
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (use "map_some")
   (assert)
   (lemma "some_induction[T1]")
   (inst - "p!1 o f!1"
    "LAMBDA (cseq1: csequence[T1]): some(p!1 o f!1)(cseq1) AND some(p!1)(map(f!1, cseq1)) AND first_p(p!1, map(f!1, cseq1)) = first_p(p!1 o f!1, cseq1)")
   (split)
   (("1" (inst - "cseq!1") (assert))
    ("2"
     (delete -1 -2 2)
     (skosimp)
     (smash)
     (("1"
       (expand* "o" "first_p" "p_indexes")
       (typepred
        "min({i: indexes[T2](map(f!1, a!1)) | p!1(nth(map(f!1, a!1), i))})")
       (("1"
         (typepred "min({i: indexes[T1](a!1) | p!1(f!1(nth(a!1, i)))})")
         (("1"
           (inst - 0)
           (("1"
             (inst - 0)
             (("1"
               (expand "nth" -3 1)
               (expand "nth" -6 1)
               (expand "map" -6 1)
               (assert))
              ("2" (expand* "map" "index?"))))
            ("2" (expand "index?" 1) (propax))))
          ("2"
           (expand* "nonempty?" "empty?" "member")
           (inst - 0)
           (("1" (expand "nth" 1) (propax))
            ("2" (expand "index?" 1) (propax))))))
        ("2"
         (expand* "nonempty?" "empty?" "member")
         (inst - 0)
         (("1" (expand "nth" 1) (expand "map" 1) (propax))
          ("2" (expand "index?" 1) (expand "map" 1) (propax))))))
      ("2"
       (lemma "first_p_rest[T1]")
       (inst-cp - "a!1" "p!1 o f!1")
       (inst - "rest(a!1)" "p!1 o f!1")
       (lemma "first_p_rest[T2]")
       (inst-cp - "map(f!1, a!1)" "p!1")
       (inst - "map(f!1, rest(a!1))" "p!1")
       (expand "some" (-2 -4))
       (auto-rewrite "map_rest")
       (auto-rewrite "map_empty")
       (smash)
       (("1" (expand "map" -4) (expand "o" 1) (propax))
        ("2" (expand "o" -8) (expand "map" 1) (propax))
        ("3" (expand "map" -3) (expand "o" 3) (propax))
        ("4" (expand "o" -6) (expand "map" 2) (propax))))
      ("3" (expand* "o" "map" "some") (flatten))
      ("4"
       (expand "some" +)
       (lift-if)
       (rewrite "map_empty")
       (flatten)
       (rewrite "map_rest"))
      ("5" (expand "some") (propax)) ("6" (expand "some" +) (propax))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter_map
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "map_empty")
   (auto-rewrite "map_rest")
   (induct "n")
   (("1" (skolem!) (expand "suffix") (assert))
    ("2"
     (skosimp*)
     (expand "suffix" +)
     (lift-if)
     (lift-if)
     (lift-if)
     (ground)
     (("1" (inst - "f!1" "rest(cseq!1)") (assert))
      ("2" (inst - "f!1" "rest(cseq!1)") (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter_map
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skolem!) (expand "suffix") (propax))
    ("2"
     (skosimp*)
     (expand "suffix" +)
     (lift-if)
     (lift-if)
     (lift-if)
     (rewrite "map_empty")
     (ground)
     (inst - "f!1" "rest(cseq!1)")
     (rewrite "map_rest"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_filter_map
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (name "filter1" "filter(cseq!1, p!1 o f!1)")
   (name "filter2" "filter(map(f!1, cseq!1), p!1)")
   (replace*)
   (rewrite "filter_filter_of")
   (rewrite "filter_filter_of")
   (lemma "coinduction[T2]")
   (inst -
    "LAMBDA (filt2, cseq: csequence[T2]): (empty?(filt2) AND empty?(cseq)) OR (EXISTS (cseq1, filt1: csequence[T1]): filter_of?(filt2, map(f!1, cseq1), p!1) AND filter_of?(filt1, cseq1, p!1 o f!1) AND cseq = map(f!1, filt1))"
    "filter2" "map(f!1, filter1)")
   (("1" (reduce))
    ("2"
     (delete -1 -2 2)
     (expand "bisimulation?")
     (skosimp)
     (smash)
     (("1"
       (skosimp)
       (replace -5)
       (rewrite "map_nonempty")
       (expand "filter_of?")
       (assert)
       (flatten)
       (assert)
       (rewrite "map_some"))
      ("2"
       (skosimp)
       (replace -5)
       (rewrite "map_empty")
       (expand "filter_of?")
       (flatten)
       (assert)
       (rewrite "map_some"))
      ("3"
       (skosimp)
       (replace -4)
       (hide -4)
       (inst + "suffix(cseq1!1, 1 + first_p(p!1 o f!1, cseq1!1))"
        "rest(filt1!1)")
       (("1"
         (rewrite "map_rest")
         (("1"
           (split)
           (("1"
             (lemma "filter_of?_suffix[T2]")
             (inst - "x!1" "map(f!1, cseq1!1)" "p!1")
             (assert)
             (split)
             (("1"
               (rewrite "map_first_p")
               (("1" (rewrite "map_suffix"))
                ("2" (expand "filter_of?" (-3 -4)) (propax))))
              ("2" (expand "filter_of?" -) (assert))))
            ("2"
             (use "filter_of?_suffix[T1]")
             (assert)
             (expand "filter_of?" -)
             (flatten)
             (rewrite "map_some"))))
          ("2" (expand "filter_of?" -) (flatten) (rewrite "map_some"))))
        ("2"
         (expand "filter_of?")
         (ground)
         (("1"
           (expand "some" +)
           (lift-if)
           (ground)
           (("1" (expand "some" -7) (lift-if) (rewrite "map_empty"))
            ("2" (expand "o" 2) (expand "map" -2) (propax))))
          ("2" (rewrite "map_some"))))
        ("3"
         (expand "filter_of?")
         (assert)
         (flatten)
         (rewrite "map_some"))))
      ("4"
       (skosimp)
       (replace -4)
       (hide -4)
       (expand "filter_of?" -)
       (flatten)
       (use "map_some")
       (ground)
       (("1"
         (inst + "rest(cseq1!1)" "rest(filt1!1)")
         (assert)
         (rewrite "map_rest")
         (rewrite "map_rest"))
        ("2"
         (expand "o" 1)
         (expand "map" -4)
         (lift-if)
         (expand "some" -8)
         (ground))
        ("3"
         (expand "map" 1)
         (expand "some" -8)
         (expand "o" -1)
         (lift-if)
         (ground))
        ("4"
         (inst + "suffix(cseq1!1, 1 + first_p(p!1 o f!1, cseq1!1))"
          "rest(filt1!1)")
         (rewrite "map_rest")
         (rewrite "map_rest")
         (split)
         (("1"
           (rewrite "map_suffix" :dir rl)
           (lemma "filter_of?_suffix[T2]")
           (inst - "x!1" "map(f!1, cseq1!1)" "p!1")
           (assert)
           (rewrite "map_first_p")
           (expand "filter_of?")
           (propax))
          ("2"
           (use "filter_of?_suffix[T1]")
           (expand "filter_of?")
           (propax))))))
      ("5"
       (skosimp)
       (replace -4)
       (hide -4)
       (expand "map" +)
       (lift-if)
       (ground)
       (("1" (expand "filter_of?") (flatten) (rewrite "map_some"))
        ("2"
         (use "filter_of?_first_p[T2]")
         (assert)
         (use "filter_of?_first_p[T1]")
         (assert)
         (prop)
         (("1"
           (rewrite "map_first_p")
           (("1" (rewrite "map_nth") (assert))
            ("2" (expand "filter_of?" -4) (propax))))
          ("2" (expand "filter_of?" -3) (assert))
          ("3" (expand "filter_of?" -4) (assert))
          ("4" (expand "filter_of?") (assert))))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_constant
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand* "constant_cseq" "length"))
    ("2"
     (skosimp*)
     (expand "constant_cseq" +)
     (expand "length" +)
     (inst - "t!1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_constant
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skolem-typepred))
    ("2"
     (skosimp*)
     (expand "constant_cseq" +)
     (expand "nth" +)
     (lift-if)
     (ground)
     (inst - "t!1" "m!1 - 1"))
    ("3" (skolem!) (use "constant_cseq_nth_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_constant
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skosimp) (assert))
    ("2"
     (skosimp*)
     (expand "constant_cseq" +)
     (expand "last")
     (expand "nth" +)
     (expand "length" +)
     (lift-if)
     (inst - "t!1")
     (expand "constant_cseq" 1 1)
     (expand "length" 1 1)
     (ground))
    ("3" (skosimp) (use "constant_cseq_first_TCC1") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_constant
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand* "constant_cseq" "some"))
    ("2"
     (skosimp*)
     (inst - "t!1" "p!1")
     (expand "constant_cseq" +)
     (expand "some" +)
     (ground))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_constant
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand* "constant_cseq" "every"))
    ("2"
     (skosimp*)
     (inst - "t!1" "p!1")
     (expand "constant_cseq" +)
     (expand "every" +)
     (ground))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_constant
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (expand* "nth" "constant_cseq" "constant_cseq_struct" "coreduce"))
    ("2"
     (skosimp*)
     (inst - "t!1")
     (expand "nth" +)
     (expand* "constant_cseq" "constant_cseq_struct")
     (expand "coreduce" +)
     (propax))
    ("3" (skolem!) (use "constant_cseq_inf_nth_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_constant
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (lemma "some_induction")
     (inst - "p!1"
      "LAMBDA (cseq: csequence): FORALL t: cseq = constant_cseq(t) IMPLIES p!1(t)")
     (split)
     (("1" (inst - "constant_cseq(t!1)") (assert) (inst - "t!1"))
      ("2"
       (delete -1 2)
       (skosimp*)
       (lift-if)
       (ground)
       (("1" (use "constant_cseq_inf_first") (assert))
        ("2"
         (inst - "t!2")
         (replace -3)
         (rewrite "constant_cseq_inf_rest"))))))
    ("2"
     (expand* "constant_cseq" "constant_cseq_struct" "coreduce" "some")
     (flatten))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_constant
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "every_some_rew")
   (rewrite "constant_cseq_inf_some")
   (expand "pred_NOT")
   (propax))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_constant
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "is_finite_def")
   (rewrite "not_exists")
   (induct "x")
   (("1" (expand* "has_length" "constant_cseq_struct" "coreduce"))
    ("2"
     (skosimp)
     (expand "constant_cseq_struct")
     (expand "coreduce" -)
     (expand "has_length" -)
     (propax))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate_extract
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "o_empty_left")
   (auto-rewrite "o_empty_right")
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (ground)
     (("1" (expand "^") (assert))
      ("2"
       (expand "^" +)
       (smash)
       (("1" (inst - "i!1 - 1" "j!1 - 1" "k!1 - 1") (assert))
        ("2" (rewrite "o_add") (decompose-equality))
        ("3"
         (rewrite "o_add")
         (decompose-equality 5)
         (inst - "i!1" "j!1 - 1" "k!1 - 1")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate_extract
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "o_extract")
   (inst - "fseq!1" 0 "i!1" "j!1")
   (assert)
   (replace -1)
   (rewrite "extract_def" 1)
   (expand "^" +)
   (propax))


proof_type: f_proof
decl_type: formula
library: complex
theory: trig_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1"
     (flatten)
     (lemma "cos_minus" ("a" "a!1" "b" "b!1"))
     (replace -2)
     (replace -3)
     (rewrite "sq_rew")
     (rewrite "sq_rew")
     (lemma "sin2_cos2" ("a" "b!1"))
     (assert)
     (replace -1)
     (rewrite "cos_eq_1" -2)
     (skosimp)
     (inst + "i!1")
     (assert))
    ("2"
     (skosimp*)
     (replace -1)
     (rewrite "sin_period" 1 :dir rl)
     (rewrite "cos_period" 1 :dir rl))))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (split)
   (("1"
     (flatten)
     (rewrite "minus_add")
     (rewrite "minus_add")
     (lemma "both_sides_plus1" ("x" "-x!1" "y" "-y!1" "z" "z!1"))
     (assert)
     (hide -1)
     (lemma "inverse_add" ("x" "x!1"))
     (lemma "both_sides_plus2" ("x" "-x!1" "y" "-y!1" "z" "x!1"))
     (replace -2 -1)
     (grind)
     (lemma "both_sides_plus2" ("z" "y!1" "x" "0" "y" "-y!1+x!1"))
     (rewrite "identity_add" -1)
     (lemma "associative_add" ("x" "y!1" "y" "-y!1" "z" "x!1"))
     (rewrite "inverse_add" -1)
     (rewrite "identity_add" -1)
     (replace -1 -2)
     (hide -1 -4)
     (lemma "commutative_add" ("x" "0" "y" "x!1"))
     (lemma "identity_add" ("x" "x!1"))
     (replace -1)
     (assert))
    ("2" (flatten) (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "both_sides_plus1" ("z" "-x!1" "x" "-(-x!1)" "y" "x!1"))
   (rewrite "inverse_add" -1)
   (lemma "commutative_add" ("x" "-(-x!1)" "y" "-x!1"))
   (rewrite "inverse_add" -1)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "inverse_add" ("x" "x!1"))
   (lemma "distributive" ("x" "0" "y" "x!1" "z" "-x!1"))
   (grind))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case-replace "x!1=0")
   (("1" (rewrite "zero_times1") (assert))
    ("2"
     (case-replace "y!1=0")
     (("1" (rewrite "zero_times2") (assert))
      ("2"
       (assert)
       (lemma "nznum_times_nznum_is_nznum" ("nzx" "x!1" "nzy" "y!1"))
       (assert))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "inverse_add" ("x" "y!1"))
   (lemma "distributive" ("x" "x!1" "y" "y!1" "z" "-y!1"))
   (replace -2 -1)
   (rewrite "zero_times2" -1)
   (lemma "both_sides_minus1"
    ("x" "0" "y" "(x!1 * y!1) + (x!1 * -y!1)" "z" "x!1 * -y!1"))
   (assert)
   (lemma "associative_mult" ("x" "-1" "y" "x!1" "z" "-y!1"))
   (case-replace "-1*x!1=-x!1")
   (("1" (assert))
    ("2"
     (hide-all-but 1)
     (grind)
     (lemma "both_sides_plus2" ("z" "x!1" "x" "-1*x!1" "y" "-x!1"))
     (rewrite "inverse_add" -1)
     (lemma "inverse_add" ("x" "1"))
     (lemma "zero_times1" ("x" "x!1"))
     (lemma "distributive" ("x" "x!1" "y" "1" "z" "-1"))
     (lemma "commutative_mult")
     (inst-cp - "x!1" "1+ -1")
     (replace -2 -3)
     (replace -5)
     (replace -4)
     (inst-cp - "x!1" "1")
     (rewrite "identity_mult" -2)
     (replace -2)
     (inst - "x!1" "-1")
     (replace -1)
     (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (split)
   (("1"
     (flatten)
     (lemma "both_sides_minus1"
      ("x" "x!1*n0z!1" "y" "y!1*n0z!1" "z" "y!1 * n0z!1"))
     (lemma "inverse_add" ("x" "y!1 * n0z!1"))
     (lemma "minus_add" ("x" "y!1 * n0z!1" "y" "y!1 * n0z!1"))
     (replace -1 -2 rl)
     (replace -2 -3)
     (hide -1 -2)
     (assert)
     (hide -2)
     (case-replace "x!1 * n0z!1 - y!1 * n0z!1 = n0z!1*(x!1-y!1)")
     (("1"
       (lemma "zero_times3" ("x" "n0z!1" "y" "x!1-y!1"))
       (replace -3 -1)
       (hide -2 -3)
       (flatten -1)
       (typepred "n0z!1")
       (split -3)
       (("1" (assert))
        ("2"
         (hide -2 -3)
         (lemma "both_sides_plus1" ("x" "x!1-y!1" "y" "0" "z" "y!1"))
         (assert))))
      ("2"
       (hide -1 2)
       (rewrite "minus_add")
       (rewrite "minus_add")
       (rewrite "distributive" 1)
       (lemma "commutative_mult" ("x" "x!1" "y" "n0z!1"))
       (replace -1)
       (assert)
       (hide -1)
       (lemma "inverse_add" ("x" "y!1"))
       (lemma "distributive" ("x" "n0z!1" "y" "y!1" "z" "-y!1"))
       (replace -2)
       (rewrite "zero_times2" -1)
       (rewrite "commutative_mult" -1)
       (lemma "both_sides_plus2"
        ("z"
         "-(y!1 * n0z!1)"
         "x"
         "0"
         "y"
         "y!1 * n0z!1 + (n0z!1 * -y!1)"))
       (lemma "identity_add" ("x" "-(y!1*n0z!1)"))
       (replace -1)
       (hide -1)
       (lemma "inverse_add" ("x" "y!1*n0z!1"))
       (case-replace
        "-(y!1 * n0z!1) + (y!1 * n0z!1 + (n0z!1 * -y!1)) = (n0z!1 * -y!1)")
       (("1" (assert))
        ("2"
         (hide 2 -2)
         (lemma "associative_add"
          ("x" "-(y!1 * n0z!1)" "y" "y!1 * n0z!1" "z" "n0z!1 * -y!1"))
         (lemma "commutative_add"
          ("x" "y!1 * n0z!1" "y" "-(y!1 * n0z!1)"))
         (replace -1 -2 :dir rl)
         (replace -2 1)
         (replace -3 1)
         (rewrite "commutative_add" 1))))))
    ("2" (flatten) (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "commutative_mult")
   (lemma "commutative_mult" ("x" "n0z!1" "y" "y!1"))
   (replace -1)
   (lemma "both_sides_times1" ("x" "x!1" "y" "y!1" "n0z" "n0z!1"))
   (propax))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "inverse_mult" ("n0x" "n0x!1"))
   (typepred "n0x!1")
   (replace -4)
   (lemma "zero_times2" ("x" "n0x!1"))
   (replace -1 -4)
   (hide-all-but -4)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "div_def" ("y" "x!1" "n0x" "n0z!1"))
   (lemma "div_def" ("y" "y!1" "n0x" "n0z!1"))
   (replace -1)
   (replace -2)
   (lemma "both_sides_times1" ("x" "x!1" "y" "y!1" "n0z" "1/n0z!1"))
   (("1" (propax)) ("2" (rewrite "inv_ne_0" 1))))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "div_def")
   (lemma "div_def" ("y" "n0z!1" "n0x" "n0y!1"))
   (replace -1 1)
   (lemma "both_sides_times2"
    ("n0z" "n0z!1" "x" "1/n0x!1" "y" "1/n0y!1"))
   (replace -1 1)
   (hide -1 -2)
   (split)
   (("1"
     (flatten)
     (lemma "both_sides_times2"
      ("n0z" "n0x!1" "x" "1 / n0x!1" "y" "1 / n0y!1"))
     (rewrite "inverse_mult" -1)
     (assert)
     (hide -2)
     (lemma "both_sides_times1"
      ("n0z" "n0y!1" "x" "1" "y" "n0x!1 * (1 / n0y!1)"))
     (rewrite "identity_mult" -1)
     (assert)
     (replace -1 1)
     (hide -1 -2)
     (lemma "identity_mult" ("x" "n0x!1"))
     (lemma "inverse_mult" ("n0x" "n0y!1"))
     (lemma "commutative_mult")
     (inst-cp - "1 / n0y!1" "n0x!1")
     (replace -2 1)
     (lemma "associative_mult" ("x" "n0x!1" "y" "1/n0y!1" "z" "n0y!1"))
     (replace -1 1 rl)
     (hide -1 -3)
     (inst-cp - "1 / n0y!1" "n0y!1")
     (replace -3 -2)
     (replace -2)
     (inst - "1" "n0x!1")
     (assert))
    ("2" (flatten) (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "distributive" ("x" "x!1+y!1" "y" "z!1" "z" "w!1"))
   (replace -1 1)
   (rewrite "commutative_mult" 1)
   (lemma "commutative_mult" ("x" "x!1+y!1" "y" "w!1"))
   (replace -1 1)
   (assert)
   (rewrite "commutative_mult" 1)
   (assert)
   (rewrite "commutative_mult" 1))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "div_def")
   (lemma "div_def" ("y" "x!1*y!1" "n0x" "n0z!1"))
   (replace -1)
   (rewrite "associative_mult" 1))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "commutative_mult")
   (rewrite "times_div1")
   (rewrite "commutative_mult"))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "div_def")
   (lemma "inv_ne_0" ("n0x" "n0z!1"))
   (lemma "zero_times3" ("x" "x!1" "y" "1/n0z!1"))
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "div_def")
   (lemma "inverse_mult" ("n0x" "n0z!1"))
   (case-replace "x!1=0")
   (("1" (rewrite "zero_times1") (rewrite "zero_times2"))
    ("2"
     (lemma "both_sides_times1"
      ("n0z" "x!1" "x" "n0z!1 * (1 / n0z!1)" "y" "1"))
     (("1"
       (rewrite "identity_mult" -1)
       (lemma "associative_mult" ("x" "n0z!1" "y" "1/n0z!1" "z" "x!1"))
       (lemma "commutative_mult" ("x" "1/n0z!1" "y" "x!1"))
       (replace -1 -2)
       (replace -2 2)
       (replace -3 2)
       (propax))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "div_cancel1" ("n0z" "n0z!1" "x" "x!1"))
   (lemma "both_sides_times2"
    ("n0z" "n0z!1" "x" "x!1 / n0z!1" "y" "y!1"))
   (replace -2 -1)
   (rewrite "commutative_mult" -1)
   (replace -1)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "div_cancel3" ("x" "x!1" "y" "y!1" "n0z" "n0z!1"))
   (split)
   (("1" (flatten) (assert)) ("2" (flatten) (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "div_cancel3" ("x" "x!1" "n0z" "n0x!1" "y" "y!1/n0y!1"))
   (rewrite "times_div2" -1)
   (lemma "div_cancel4" ("y" "x!1" "x" "y!1*n0x!1" "n0z" "n0y!1"))
   (replace -2 1)
   (propax))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "times_div1" ("x" "x!1/n0x!1" "y" "y!1" "n0z" "n0y!1"))
   (replace -1 1)
   (hide -1)
   (lemma "cross_mult"
    ("x"
     "x!1 / n0x!1 * y!1"
     "n0x"
     "n0y!1"
     "y"
     "x!1 * y!1"
     "n0y"
     "n0x!1 * n0y!1"))
   (replace -1 1)
   (hide -1)
   (rewrite "associative_mult")
   (rewrite "div_cancel2" 1)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "div_cancel4"
    ("y"
     "(x!1 / n0x!1) + (y!1 / n0y!1)"
     "x"
     "x!1 * n0y!1 + y!1 * n0x!1"
     "n0z"
     "n0x!1 * n0y!1"))
   (replace -1 1)
   (hide -1)
   (lemma "commutative_mult")
   (inst-cp - "(x!1 / n0x!1) + (y!1 / n0y!1)" "n0x!1 * n0y!1")
   (replace -2 1)
   (lemma "distributive"
    ("x" "n0x!1*n0y!1" "y" "x!1 / n0x!1" "z" "y!1 / n0y!1"))
   (replace -1 1)
   (hide -1 -3)
   (inst-cp - "n0x!1" "n0y!1")
   (lemma "associative_mult")
   (inst-cp - "n0y!1" "n0x!1" "x!1 / n0x!1")
   (replace -4 -2 rl)
   (lemma "div_cancel1")
   (inst-cp - "n0x!1" "x!1")
   (replace -2 -4)
   (replace -4 1 rl)
   (hide -2 -4 -6)
   (inst - "n0y!1" "y!1")
   (inst - "n0x!1" "n0y!1" "y!1/n0y!1")
   (replace -1 -2)
   (replace -2 1 rl)
   (hide -1 -2)
   (inst-cp - "n0y!1" "x!1")
   (inst - "n0x!1" "y!1")
   (replace -1 1)
   (replace -2 1)
   (propax))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "add_div" ("x" "x!1" "y" "-y!1" "n0x" "n0x!1" "n0y" "n0y!1"))
   (case "FORALL (x,y:numfield): (-x*y) = -(x*y)")
   (("1"
     (inst-cp - "y!1" "n0x!1")
     (replace -2 -3)
     (lemma "minus_add" ("x" "x!1*n0y!1" "y" "y!1*n0x!1"))
     (replace -1 -4 rl)
     (replace -4 1 rl)
     (hide -4 -1 -3)
     (rewrite "minus_add" 1)
     (assert)
     (rewrite "div_def")
     (lemma "div_def" ("y" "-y!1" "n0x" "n0y!1"))
     (replace -1 1)
     (inst - "y!1" "1/n0y!1")
     (assert))
    ("2"
     (hide-all-but 1)
     (skosimp*)
     (lemma "both_sides_plus2"
      ("z" "x!2*y!2" "x" "(-x!2 * y!2)" "y" "-(x!2 * y!2)"))
     (replace -1 1 rl)
     (rewrite "inverse_add" 1)
     (hide -1)
     (lemma "inverse_add" ("x" "x!2"))
     (lemma "distributive" ("x" "y!2" "y" "x!2" "z" "-x!2"))
     (replace -2)
     (rewrite "zero_times2" -1)
     (hide -2)
     (lemma "commutative_mult")
     (inst-cp - "y!2" "x!2")
     (replace -2)
     (inst - "y!2" "-x!2")
     (replace -1)
     (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "div_def" ("n0x" "n0x!1"))
   (inst-cp - "x!1")
   (inst-cp - "y!1")
   (inst - "x!1-y!1")
   (replace -1)
   (replace -2)
   (replace -3)
   (hide-all-but 1)
   (lemma "commutative_mult" ("y" "1/n0x!1"))
   (inst-cp - "x!1")
   (inst-cp - "y!1")
   (inst - "x!1-y!1")
   (replace -1)
   (replace -2)
   (replace -3)
   (hide-all-but 1)
   (lemma "distributive" ("x" "1/n0x!1" "y" "x!1" "z" "-y!1"))
   (lemma "minus_add")
   (inst-cp - "x!1" "y!1")
   (replace -2)
   (replace -3)
   (inst - "1 / n0x!1 * x!1" "1 / n0x!1 * y!1")
   (replace -1)
   (hide-all-but 1)
   (assert)
   (lemma "both_sides_plus2"
    ("z"
     "1 / n0x!1 * y!1"
     "x"
     "-(1 / n0x!1 * y!1)"
     "y"
     "1 / n0x!1 * -y!1"))
   (replace -1 1 rl)
   (hide -1)
   (rewrite "inverse_add")
   (lemma "distributive" ("x" "1/n0x!1" "y" "y!1" "z" "-y!1"))
   (replace -1 1 rl)
   (rewrite "inverse_add" 1)
   (rewrite "zero_times2" 1))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "div_def" ("n0x" "n0z!1"))
   (inst-cp - "x!1")
   (inst-cp - "y!1")
   (inst - "x!1+y!1")
   (replace -1)
   (replace -2)
   (replace -3)
   (hide-all-but 1)
   (lemma "commutative_mult" ("y" "1/n0z!1"))
   (inst-cp - "x!1")
   (inst-cp - "y!1")
   (inst - "x!1+y!1")
   (replace -1)
   (replace -2)
   (replace -3)
   (hide-all-but 1)
   (lemma "distributive" ("x" "1/n0z!1" "y" "x!1" "z" "y!1"))
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "nznum_div_nznum_is_nznum" ("nzx" "n0y!1" "nzy" "n0z!1"))
   (lemma "cross_mult"
    ("x" "x!1" "n0x" "n0y!1 / n0z!1" "y" "x!1 * n0z!1" "n0y" "n0y!1"))
   (replace -1 1)
   (hide -1)
   (lemma "div_cancel1" ("x" "n0y!1" "n0z" "n0z!1"))
   (lemma "associative_mult" ("x" "x!1" "y" "n0z!1" "z" "n0y!1/n0z!1"))
   (replace -2 -1)
   (propax))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "nznum_times_nznum_is_nznum" ("nzx" "n0y!1" "nzy" "n0z!1"))
   (lemma "cross_mult"
    ("x" "x!1 / n0y!1" "n0x" "n0z!1" "y" "x!1" "n0y" "n0y!1 * n0z!1"))
   (replace -1 1)
   (hide -1)
   (rewrite "associative_mult")
   (lemma "div_cancel2" ("x" "x!1" "n0z" "n0y!1"))
   (replace -1)
   (propax))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (grind)
   (case "x!1/=0")
   (("1"
     (lemma "both_sides_times1" ("n0z" "x!1" "x" "2" "y" "1"))
     (assert)
     (rewrite "identity_mult" 1))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (split)
   (("1"
     (flatten)
     (lemma "both_sides_minus1" ("z" "x!1" "x" "x!1*x!1" "y" "x!1"))
     (replace -1 -2 rl)
     (hide -1)
     (lemma "inverse_add" ("x" "x!1"))
     (lemma "minus_add" ("x" "x!1" "y" "x!1"))
     (replace -2)
     (replace -1)
     (hide -1 -2)
     (lemma "distributive" ("x" "x!1" "y" "x!1" "z" "-1"))
     (case-replace "(x!1 * x!1) + (x!1 * -1) = x!1 * x!1 - x!1")
     (("1"
       (replace -3)
       (hide -3 -1)
       (lemma "zero_times3" ("x" "x!1" "y" "x!1 + -1"))
       (assert)
       (hide -2 1)
       (lemma "both_sides_minus1" ("z" "1" "x" "x!1" "y" "1"))
       (replace -1 1 rl)
       (hide -1)
       (replace -1 1)
       (hide -1)
       (grind))
      ("2"
       (hide-all-but 1)
       (assert)
       (rewrite "commutative_mult")
       (grind))))
    ("2" (grind))))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "number_fields_negate_is_right_inverse" ("x" "x!1*y!1"))
   (lemma "number_fields_negate_is_right_inverse" ("x" "x!1"))
   (lemma "distributive" ("x" "y!1" "y" "x!1" "z" "-x!1"))
   (replace -2 -1)
   (lemma "commutative_mult" ("x" "y!1" "y" "x!1"))
   (lemma "commutative_mult" ("x" "y!1" "y" "-x!1"))
   (replace -1 -3)
   (replace -2 -3)
   (rewrite "zero_times2")
   (replace -3 -5)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "number_fields_negate_is_right_inverse" ("x" "x!1 * y!1"))
   (lemma "number_fields_negate_is_right_inverse" ("x" "y!1"))
   (lemma "distributive" ("x" "x!1" "y" "y!1" "z" "-y!1"))
   (replace -2 -1)
   (rewrite "zero_times2")
   (replace -1 -3)
   (hide -1 -2)
   (assert))


proof_type: j_proof
decl_type: tcc
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "nzx!1")
   (typepred "nzy!1")
   (hide -1 -3)
   (case "FORALL (x:nznum, y:numfield): x*y = 0 => y = 0")
   (("1" (inst - "nzx!1" "nzy!1") (assert))
    ("2"
     (hide-all-but 1)
     (skosimp*)
     (typepred "x!1")
     (hide -1)
     (lemma "inverse_mult" ("n0x" "x!1"))
     (case "FORALL (x,y,z:numfield): x=y => x*z = y*z")
     (("1"
       (inst - "x!1 * (1 / x!1)" "1" "y!1")
       (split -1)
       (("1"
         (rewrite "identity_mult" -1)
         (hide -2)
         (lemma "associative_mult")
         (inst-cp - "x!1" "1/x!1" "y!1")
         (lemma "commutative_mult" ("x" "1/x!1" "y" "y!1"))
         (replace -1 -3)
         (inst - "x!1" "y!1" "1/x!1")
         (replace -4)
         (replace -3 -2)
         (replace -6 -2)
         (rewrite "zero_times1" -2))
        ("2" (propax))))
      ("2" (hide-all-but 1) (grind))))))


proof_type: j_proof
decl_type: tcc
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "nzx!1")
   (lemma "inverse_add" ("x" "nzx!1"))
   (replace -4)
   (rewrite "identity_add" -1)
   (replace -1)
   (assert))


proof_type: j_proof
decl_type: tcc
library: complex
theory: number_fields_bis
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "div_def")
   (lemma "inv_ne_0" ("n0x" "nzy!1"))
   (lemma "nznum_times_nznum_is_nznum" ("nzx" "nzx!1" "nzy" "1/nzy!1"))
   (("1" (assert)) ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: complex
theory: number_fields_sq
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "sq")
   (split)
   (("1" (flatten) (lemma "zero_times3" ("x" "a!1" "y" "a!1")) (assert))
    ("2" (flatten) (assert) (replace -1) (rewrite "zero_times1"))))


proof_type: j_proof
decl_type: tcc
library: complex
theory: number_fields_sq
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "sq")
   (skosimp*)
   (lemma "nznum_times_nznum_is_nznum" ("nzx" "nz!1" "nzy" "nz!1"))
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "x!1")
   (lemma "complex_characterization" ("nf" "x!1"))
   (replace -1 1)
   (inst + "x!1" "0")
   (rewrite "zero_times1")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case "FORALL (x:real): x*x >= 0")
   (("1" (inst - "r!1") (lemma "i_axiom") (replace -3) (assert))
    ("2"
     (hide -1)
     (skosimp)
     (lemma "trichotomy" ("x" "x!1"))
     (split)
     (("1"
       (lemma "posreal_times_posreal_is_posreal" ("px" "x!1" "py" "x!1"))
       (("1" (assert)) ("2" (assert))))
      ("2" (assert))
      ("3"
       (lemma "negreal_times_negreal_is_posreal" ("nx" "x!1" "ny" "x!1"))
       (("1" (assert)) ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (split)
   (("1"
     (flatten)
     (lemma "both_sides_minus1"
      ("x" "x0!1 + y0!1 * i" "y" "x1!1 + y1!1 * i" "z" "x1!1+y0!1*i"))
     (replace -1 -2 rl)
     (hide -1)
     (case-replace "x0!1 + y0!1 * i - (x1!1 + y0!1 * i) = x0!1-x1!1")
     (("1"
       (case-replace
        "x1!1 + y1!1 * i - (x1!1 + y0!1 * i) = (y1!1-y0!1)*i")
       (("1"
         (hide -1 -2)
         (case "FORALL (x, y: nzreal): x /= y * i")
         (("1"
           (case-replace "y0!1 =y1!1")
           (("1" (rewrite "zero_times1" -3) (assert))
            ("2"
             (lemma "div_cancel3"
              ("x" "x0!1-x1!1" "y" "i" "n0z" "y1!1-y0!1"))
             (("1"
               (rewrite "commutative_mult" -3)
               (lemma "i_not_real" ("r" "(x0!1 - x1!1) / (y1!1 - y0!1)"))
               (assert))
              ("2" (assert))))))
          ("2"
           (hide-all-but 1)
           (skosimp*)
           (lemma "div_cancel3" ("x" "x!1" "y" "i" "n0z" "y!1"))
           (rewrite "commutative_mult" -2)
           (replace -2 -1 rl)
           (lemma "i_not_real" ("r" "x!1/y!1"))
           (assert))))
        ("2"
         (hide-all-but 1)
         (grind)
         (rewrite "commutative_mult")
         (assert)
         (rewrite "commutative_mult"))))
      ("2" (hide-all-but 1) (grind))))
    ("2" (grind))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (split)
   (("1"
     (skosimp*)
     (typepred "Re(z!1)")
     (skosimp*)
     (lemma "unique_characterization"
      ("x1" "Re(z!1)" "x0" "x!1" "y1" "y!2" "y0" "y!1"))
     (assert))
    ("2"
     (flatten)
     (typepred "Re(z!1)")
     (skosimp*)
     (inst + "y!1")
     (replace -2)
     (propax))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "Im(z!1)")
   (skosimp*)
   (split 1)
   (("1"
     (skosimp*)
     (lemma "unique_characterization"
      ("x0" "x!1" "x1" "x!2" "y0" "Im(z!1)" "y1" "y!1"))
     (assert))
    ("2" (flatten) (replace -1) (inst + "x!1"))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "z1!1")
   (typepred "z2!1")
   (rewrite "complex_characterization")
   (rewrite "complex_characterization")
   (rewrite "complex_characterization")
   (skosimp*)
   (inst + "x!1+x!2" "y!1+y!2")
   (grind)
   (rewrite "commutative_mult" 1)
   (assert)
   (rewrite "commutative_mult" 1))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "z!1")
   (rewrite "complex_characterization")
   (rewrite "complex_characterization")
   (skosimp*)
   (replace -2 1)
   (inst + "-x!1" "-y!1")
   (case-replace "-(x!1 + y!1 * i) = -x!1 + -(y!1*i)")
   (("1"
     (assert)
     (hide-all-but 1)
     (lemma "both_sides_plus2"
      ("z" "y!1*i" "x" "-(y!1 * i)" "y" "-y!1 * i"))
     (replace -1 1 rl)
     (hide -1)
     (rewrite "inverse_add" 1)
     (lemma "distributive" ("x" "i" "y" "y!1" "z" "-y!1"))
     (rewrite "inverse_add" -1)
     (rewrite "zero_times2" -1)
     (rewrite "commutative_mult" 1)
     (replace -1 1)
     (hide -1)
     (assert)
     (rewrite "commutative_mult" 1))
    ("2"
     (hide-all-but 1)
     (lemma "both_sides_plus2"
      ("z"
       "x!1 + y!1 * i"
       "x"
       "-(x!1 + y!1 * i)"
       "y"
       "-x!1 + -(y!1 * i)"))
     (replace -1 1 rl)
     (hide -1)
     (rewrite "inverse_add" 1)
     (lemma "inverse_add" ("x" "x!1"))
     (lemma "inverse_add" ("x" "y!1*i"))
     (assert)
     (replace -1)
     (propax))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "minus_add")
   (lemma "closed_neg" ("z" "z2!1"))
   (lemma "closed_plus" ("z1" "-z2!1" "z2" "z1!1"))
   (("1" (propax)) ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "z1!1")
   (typepred "z2!1")
   (rewrite "complex_characterization")
   (rewrite "complex_characterization")
   (rewrite "complex_characterization")
   (skosimp*)
   (inst + "x!1*x!2-y!1*y!2" "x!2*y!1+x!1*y!2")
   (replace -2)
   (rewrite "distributive" 1)
   (replace -4)
   (hide-all-but 1)
   (lemma "commutative_mult")
   (inst-cp - "x!2 + y!2 * i" "y!1 * i")
   (rewrite "distributive" -2)
   (replace -2)
   (hide -2)
   (inst-cp - "x!2 + y!2 * i" "x!1")
   (rewrite "distributive" -2)
   (replace -2)
   (hide -2)
   (inst-cp - "x!2 * y!1 + x!1 * y!2" "i")
   (rewrite "distributive" -2)
   (replace -2)
   (hide -2)
   (assert)
   (lemma "i_axiom")
   (expand "sq")
   (replace -1)
   (inst - "x!1*y!2" "i")
   (lemma "associative_mult")
   (inst-cp - "x!1" "y!2" "i")
   (replace -2)
   (replace -4)
   (hide -2 -4 -3)
   (assert)
   (inst - "i" "x!2" "y!1")
   (assert)
   (replace -1 1)
   (propax))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case "complex_pred(1/n0z!1)")
   (("1"
     (rewrite "div_def" 1)
     (lemma "closed_times" ("z1" "z!1" "z2" "1/n0z!1"))
     (("1" (propax)) ("2" (propax))))
    ("2"
     (hide 2)
     (typepred "n0z!1")
     (rewrite "complex_characterization")
     (rewrite "complex_characterization")
     (skosimp)
     (case "FORALL (x:real): x*x >= 0")
     (("1"
       (case "FORALL (nzx:nzreal): nzx*nzx > 0")
       (("1"
         (name "D" "x!1*x!1+y!1*y!1")
         (case "D>0")
         (("1"
           (inst + "x!1/D" "-y!1/D")
           (("1"
             (lemma "div_distributes" ("x" "x!1" "y" "-y!1*i" "n0z" "D"))
             (("1"
               (rewrite "times_div2" 2)
               (replace -1 2)
               (rewrite "cross_mult" 2)
               (replace -7 2)
               (expand "D" 2)
               (lemma "i_axiom")
               (assert)
               (hide-all-but (-1 2))
               (rewrite "associative_mult" :dir rl)
               (replace -1)
               (hide -1)
               (assert)
               (lemma "commutative_mult")
               (inst-cp - "-y!1" "i")
               (replace -2)
               (lemma "distributive"
                ("x" "i" "y" "-y!1*x!1" "z" "x!1*y!1"))
               (rewrite "associative_mult" 1 :dir rl)
               (rewrite "associative_mult" 1 :dir rl)
               (replace -1 1 :dir rl)
               (hide -1 -3)
               (inst-cp - "-y!1" "x!1")
               (replace -2)
               (lemma "distributive" ("x" "x!1" "y" "-y!1" "z" "y!1"))
               (replace -1 1 rl)
               (lemma "inverse_add" ("x" "y!1"))
               (rewrite "commutative_add" -1)
               (replace -1 1)
               (rewrite "zero_times2")
               (rewrite "minus_add" 1))
              ("2" (assert))))
            ("2" (assert))))
          ("2"
           (case-replace "x!1=0")
           (("1"
             (case-replace "y!1=0")
             (("1" (rewrite "zero_times1" -7))
              ("2" (inst -3 "y!1") (("1" (assert)) ("2" (assert))))))
            ("2"
             (inst -2 "x!1")
             (("1" (inst -3 "y!1") (assert)) ("2" (assert))))))))
        ("2"
         (hide-all-but 1)
         (skosimp)
         (lemma "trichotomy" ("x" "nzx!1"))
         (split)
         (("1"
           (lemma "posreal_times_posreal_is_posreal"
            ("px" "nzx!1" "py" "nzx!1"))
           (("1" (propax)) ("2" (assert))))
          ("2" (assert))
          ("3"
           (lemma "negreal_times_negreal_is_posreal"
            ("nx" "nzx!1" "ny" "nzx!1"))
           (("1" (propax)) ("2" (assert))))))))
      ("2"
       (hide-all-but 1)
       (skosimp)
       (lemma "trichotomy" ("x" "x!2"))
       (split)
       (("1"
         (lemma "posreal_times_posreal_is_posreal"
          ("px" "x!2" "py" "x!2"))
         (("1" (assert)) ("2" (assert))))
        ("2" (assert))
        ("3"
         (lemma "negreal_times_negreal_is_posreal"
          ("nx" "x!2" "ny" "x!2"))
         (("1" (assert)) ("2" (assert))))))))))


proof_type: t_proof
decl_type: tcc
library: complex
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst + "lambda z: choose({x | EXISTS (y:real): z = x + y*i})")
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (skosimp*)
   (typepred "z!1")
   (lemma "complex_characterization" ("nf" "z!1"))
   (assert)
   (skosimp*)
   (inst - "x!1")
   (inst + "y!1"))


proof_type: t_proof
decl_type: tcc
library: complex
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst + "lambda z: choose({y | EXISTS (x:real): z = x + y*i})")
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (skosimp*)
   (typepred "z!1")
   (lemma "complex_characterization" ("nf" "z!1"))
   (assert)
   (skosimp*)
   (inst - "y!1")
   (inst + "x!1"))


proof_type: j_proof
decl_type: tcc
library: complex
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "nzx!1")
   (typepred "nzy!1")
   (lemma "zero_times3" ("x" "nzx!1" "y" "nzy!1"))
   (assert))


proof_type: j_proof
decl_type: tcc
library: complex
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "div_def")
   (lemma "inv_ne_0" ("n0x" "nzy!1"))
   (lemma "nzcomplex_times_nzcomplex_is_nzcomplex"
    ("nzx" "nzx!1" "nzy" "1/nzy!1"))
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "Re(z!1)")
   (typepred "Im(z!1)")
   (skosimp*)
   (lemma "unique_characterization")
   (inst-cp - "x!1" "Re(z!1)" "Im(z!1)" "y!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "complex_is_Re_Im" ("z" "z!1"))
   (prop)
   (("1"
     (replace -1)
     (lemma "unique_characterization"
      ("x0" "0" "y0" "0" "x1" "Re(0)" "y1" "Im(0)"))
     (assert)
     (rewrite "zero_times1"))
    ("2"
     (lemma "unique_characterization"
      ("x0" "0" "y0" "0" "x1" "Re(0)" "y1" "Im(0)"))
     (assert)
     (rewrite "zero_times1")
     (replace -1)
     (propax))
    ("3" (replace -1) (replace -2) (rewrite "zero_times1"))))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (ground)
   (("1" (replaces -1) (assert))
    ("2"
     (case "z2 + (z1-z2) = z1")
     (("1" (replaces -2) (assert)) ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "complex_is_Re_Im" ("z" "z!1"))
   (name-replace "C" "conjugate(z!1)")
   (name-replace "RHS" "Re(z!1) * Re(z!1) + Im(z!1) * Im(z!1)")
   (replace -1)
   (hide -1)
   (expand "C")
   (expand "conjugate")
   (rewrite "associative_mult" 1 :dir rl)
   (rewrite "associative_mult" 1 :dir rl)
   (rewrite "associative_mult" 1 :dir rl)
   (lemma "i_axiom")
   (replace -1)
   (expand "RHS")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "conjugate")
   (lemma "complex_is_ne_0_Re_Im" ("z" "n0z!1"))
   (assert)
   (case-replace
    "Re(n0z!1) - Im(n0z!1) * i = Re(n0z!1) + -Im(n0z!1) * i")
   (("1"
     (hide -1)
     (lemma "unique_characterization"
      ("x0" "Re(n0z!1)" "y0" "-Im(n0z!1)" "x1" "0" "y1" "0"))
     (rewrite "zero_times1")
     (replace -3 -1)
     (simplify -1)
     (flatten)
     (split)
     (("1" (assert)) ("2" (assert))))
    ("2"
     (hide -1 -2)
     (assert)
     (lemma "both_sides_plus2"
      ("z"
       "Im(n0z!1) * i"
       "x"
       "-1*( Im(n0z!1) * i)"
       "y"
       " -Im(n0z!1) * i"))
     (replace -1 1 rl)
     (hide -1)
     (lemma "both_sides_times1"
      ("n0z"
       "i"
       "x"
       "Im(n0z!1) + (-1 * Im(n0z!1))"
       "y"
       "Im(n0z!1) + -Im(n0z!1)"))
     (("1" (assert) (rewrite "zero_times1"))
      ("2" (lemma "i_not_real" ("r" "0")) (assert))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "complex_is_Re_Im")
   (name-replace "Cz" "conjugate(z!1)")
   (inst?)
   (replace -1)
   (hide -1)
   (reveal -3)
   (replace -1 * rl)
   (hide -1)
   (expand "conjugate")
   (assert)
   (lemma "i_axiom")
   (case-replace
    "Im(z!1) * Im(z!1) * i * i = (Im(z!1) * Im(z!1)) * (i * i)")
   (("1" (hide -1) (replace -1) (assert)) ("2" (hide 2) (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "conjugate")
   (skosimp)
   (lemma "complex_is_Re_Im" ("z" "n0z!1"))
   (lemma "complex_is_ne_0_Re_Im" ("z" "n0z!1"))
   (name-replace "X" "Re(n0z!1)")
   (name-replace "Y" "Im(n0z!1)")
   (assert)
   (replace -2)
   (hide -2)
   (lemma "commutative_mult")
   (inst-cp - "Y * i + X" "X")
   (replace -2 1)
   (rewrite "distributive" 1)
   (rewrite "distributive" 1)
   (name "X2" "X*X")
   (name "Y2" "Y*Y")
   (replace -1)
   (replace -2)
   (rewrite "associative_mult" 1 :dir rl)
   (lemma "i_axiom")
   (replace -1)
   (rewrite "associative_mult" 1 :dir rl)
   (assert)
   (expand "X2")
   (expand "Y2")
   (hide-all-but (-6 1))
   (case "FORALL (x:nzreal): x*x>0")
   (("1"
     (case-replace "X=0")
     (("1" (rewrite "zero_times1") (assert) (inst - "Y"))
      ("2"
       (inst-cp - "X")
       (("1"
         (case-replace "Y=0")
         (("1" (rewrite "zero_times1") (assert))
          ("2" (inst - "Y") (("1" (assert)) ("2" (assert))))))
        ("2" (assert))))))
    ("2"
     (hide-all-but 1)
     (skosimp)
     (lemma "trichotomy" ("x" "x!1"))
     (split)
     (("1"
       (lemma "posreal_times_posreal_is_posreal" ("px" "x!1" "py" "x!1"))
       (("1" (propax)) ("2" (assert))))
      ("2" (assert))
      ("3"
       (lemma "negreal_times_negreal_is_posreal" ("nx" "x!1" "ny" "x!1"))
       (("1" (propax)) ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case-replace "z!1=0")
   (("1" (rewrite "zero_times1") (assert))
    ("2"
     (lemma "nz_sq_abs_pos" ("n0z" "z!1"))
     (("1" (assert)) ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "Re(x!1)")
   (skosimp)
   (lemma "unique_characterization"
    ("x0" "x!1" "y0" "0" "x1" "Re(x!1)" "y1" "y!1"))
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "Im(x!1)")
   (skosimp)
   (lemma "unique_characterization"
    ("x0" "x!1" "y0" "0" "x1" "x!2" "y1" "Im(x!1)"))
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "Re(x!1*i)")
   (skosimp)
   (lemma "unique_characterization"
    ("x0" "0" "y0" "x!1" "x1" "Re(x!1*i)" "y1" "y!1"))
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "Im(x!1*i)")
   (skosimp)
   (lemma "unique_characterization"
    ("x0" "0" "y0" "x!1" "x1" "x!2" "y1" "Im(x!1*i)"))
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "complex_is_Re_Im" ("z" "z!1"))
   (lemma "complex_is_Re_Im" ("z" "-z!1"))
   (lemma "inverse_add" ("x" "z!1"))
   (lemma "unique_characterization"
    ("x0" "Re(z!1)+Re(-z!1)" "y0" "Im(z!1)+Im(-z!1)" "x1" "0" "y1" "0"))
   (name-replace "K100" "Re(z!1) + Im(z!1) * i")
   (name-replace "K101" "Re(-z!1) + Im(-z!1) * i")
   (replace -3 -2)
   (replace -4 -2)
   (hide -3 -4)
   (expand "K100")
   (expand "K101")
   (rewrite "zero_times1" -1)
   (flatten)
   (hide -2)
   (split -1)
   (("1" (flatten) (assert)) ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "unique_characterization"
    ("x0" "Re(z!1)+Re(-z!1)" "y0" "Im(z!1)+Im(-z!1)" "x1" "0" "y1" "0"))
   (lemma "complex_is_Re_Im" ("z" "z!1"))
   (lemma "complex_is_Re_Im" ("z" "-z!1"))
   (name-replace "K100" "Re(z!1) + Im(z!1) * i")
   (name-replace "K101" "Re(-z!1) + Im(-z!1) * i")
   (lemma "inverse_add" ("x" "z!1"))
   (replace -2 -1)
   (replace -3 -1)
   (hide -3 -2)
   (expand "K101")
   (expand "K100")
   (rewrite "zero_times1" -2)
   (flatten)
   (hide -3)
   (split -2)
   (("1" (flatten) (assert)) ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "Re(z1!1 + z2!1)")
   (typepred "Re(z2!1)")
   (typepred "Re(z1!1)")
   (skosimp*)
   (lemma "unique_characterization"
    ("x0"
     "Re(z1!1)+Re(z2!1)"
     "y0"
     "y!1+y!2"
     "x1"
     "Re(z1!1 + z2!1)"
     "y1"
     "y!3"))
   (assert)
   (assert)
   (replace -5 1 rl)
   (hide 2 -5 -2 -4 -6)
   (lemma "commutative_add")
   (lemma "associative_add")
   (inst-cp - "Re(z1!1) + Re(z2!1)" "i * y!1" "i * y!2")
   (replace -2 1)
   (inst-cp - "Re(z1!1)" "Re(z2!1)" "i * y!1")
   (inst-cp - "Re(z1!1)" "Re(z2!1)")
   (replace -5 -2)
   (inst-cp - "Re(z2!1)" "Re(z1!1)" "i * y!1")
   (lemma "commutative_mult" ("y" "i"))
   (inst-cp - "y!1")
   (inst - "y!2")
   (replace -1)
   (replace -2)
   (replace -9 -4 rl)
   (replace -5 -4 rl)
   (replace -4 1 rl)
   (inst-cp - "Re(z2!1)" "z1!1")
   (replace -8 1)
   (inst - "z1!1" "Re(z2!1)" "i * y!2")
   (replace -11 -3 rl)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "complex_is_Re_Im" ("z" "z1!1+z2!1"))
   (lemma "Re_plus" ("z1" "z1!1" "z2" "z2!1"))
   (lemma "complex_is_Re_Im" ("z" "z1!1"))
   (lemma "complex_is_Re_Im" ("z" "z2!1"))
   (replace -3 -4)
   (lemma "both_sides_times1"
    ("n0z" "i" "x" "Im(z1!1 + z2!1)" "y" "Im(z1!1) + Im(z2!1)"))
   (("1"
     (replace -1 1 rl)
     (hide -1)
     (name-replace "I1" "Im(z1!1)")
     (name-replace "I2" "Im(z2!1)")
     (name-replace "I12" "Im(z1!1+z2!1)")
     (name-replace "R1" "Re(z1!1)")
     (name-replace "R2" "Re(z2!1)")
     (replace -1 -4)
     (replace -2 -4)
     (rewrite "associative_add" -4 :dir rl)
     (assert)
     (assert)
     (replace -4 1 rl)
     (propax))
    ("2" (lemma "i_not_real" ("r" "0")) (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (grind)
   (lemma "Re_plus")
   (inst-cp - "z1" "-z2")
   (assert)
   (rewrite "Re_neg")
   (assert)
   (case "z1-z2 = z1+ - z2")
   (("1" (replace -1) (assert))
    ("2"
     (assert)
     (lemma "number_fields_negative_times")
     (inst - "1" "z2")
     (replaces -1)
     (lemma "identity_mult")
     (inst - "z2")
     (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (grind)
   (lemma "Im_plus")
   (inst-cp - "z1" "-z2")
   (assert)
   (rewrite "Im_neg")
   (assert)
   (case "z1-z2 = z1+ - z2")
   (("1" (replace -1) (assert))
    ("2"
     (assert)
     (lemma "number_fields_negative_times")
     (inst - "1" "z2")
     (replaces -1)
     (lemma "identity_mult")
     (inst - "z2")
     (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "complex_is_Re_Im")
   (inst-cp - "z1!1")
   (inst-cp - "z2!1")
   (inst - "z1!1*z2!1")
   (name-replace "RHS" "Re(z1!1 * z2!1) + Im(z1!1 * z2!1) * i")
   (replace -2 -1)
   (replace -3 -1)
   (expand "RHS")
   (hide -2 -3)
   (rewrite "associative_mult" -1 :dir rl)
   (rewrite "associative_mult" -1 :dir rl)
   (rewrite "associative_mult" -1 :dir rl)
   (lemma "i_axiom")
   (expand "sq")
   (replace -1)
   (lemma "unique_characterization"
    ("x0"
     "Re(z1!1 * z2!1)"
     "y0"
     "Im(z1!1 * z2!1)"
     "x1"
     "Re(z1!1) * Re(z2!1)+Im(z1!1) * (Im(z2!1) * -1)"
     "y1"
     "Im(z1!1) * Re(z2!1)+
            Im(z2!1) * Re(z1!1)"))
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "complex_is_Re_Im" ("z" "z1!1"))
   (lemma "complex_is_Re_Im" ("z" "z2!1"))
   (lemma "complex_is_Re_Im" ("z" "z1!1*z2!1"))
   (name-replace "RHS" "Re(z1!1 * z2!1) + Im(z1!1 * z2!1) * i")
   (replace -2 -1)
   (replace -3 -1)
   (expand "RHS")
   (hide -2 -3)
   (lemma "unique_characterization"
    ("x0"
     "Re(z1!1 * z2!1)"
     "y0"
     "Im(z1!1 * z2!1)"
     "x1"
     "Re(z1!1) * Re(z2!1)+Im(z1!1) * (Im(z2!1) * -1)"
     "y1"
     "Im(z1!1) * Re(z2!1)+
            Im(z2!1) * Re(z1!1)"))
   (rewrite "associative_mult" -2 :dir rl)
   (rewrite "associative_mult" -2 :dir rl)
   (rewrite "associative_mult" -2 :dir rl)
   (lemma "i_axiom")
   (expand "sq")
   (replace -1)
   (hide -1)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("b" "a"))
   (typepred "b")
   (hide -1 -2)
   (lemma "complex_is_Re_Im" ("z" "a"))
   (lemma "complex_is_Re_Im" ("z" "a/b"))
   (name-replace "RHS" "Re(a / b) + Im(a / b) * i")
   (replace -2 -1)
   (expand "RHS")
   (lemma "conjugate_nz" ("n0z" "b"))
   (lemma "div_cancel1"
    ("n0z" "conjugate(b)" "x" "(Re(a) + Im(a) * i) / b"))
   (("1"
     (rewrite "div_div2" -1)
     (replace -1 -3 rl)
     (hide -1)
     (name "D" "b * conjugate(b)")
     (lemma "nz_sq_abs_pos" ("n0z" "b"))
     (replace -2)
     (hide -3)
     (expand "conjugate" -3)
     (assert)
     (rewrite "div_distributes" -3 :dir rl)
     (simplify -3)
     (rewrite "times_div1" -3)
     (case-replace "Im(b) * (Im(a) * i / D) * i = -(Im(a)*Im(b)/D)")
     (("1"
       (lemma "unique_characterization"
        ("x0"
         "(Re(b) * Re(a)) / D + Im(a) * Im(b) / D"
         "y0"
         "Re(b) * Im(a) / D - Im(b) * (Re(a) / D)"
         "x1"
         "Re(a / b)"
         "y1"
         "Im(a / b)"))
       (("1"
         (replace -5 -1 rl)
         (assert)
         (case-replace
          "Re(b) * Im(a) / D * i + Im(a) * Im(b) / D =
                         Re(b) * (Im(a) * i / D) - -(Im(a) * Im(b) / D)")
         (("1"
           (flatten -2)
           (hide -1)
           (replace -1 1 rl)
           (hide-all-but (-4 1))
           (rewrite "div_distributes")
           (assert))
          ("2"
           (hide -1 2 -5)
           (rewrite "times_div1" 1)
           (rewrite "times_div2" 1)
           (rewrite "minus_add" 1)
           (rewrite "number_fields_negate_negate")
           (assert)
           (lemma "commutative_mult" ("x" "Im(a)" "y" "Re(b)"))
           (replace -1 1)
           (rewrite "associative_mult" 1)
           (assert))))
        ("2"
         (hide 2)
         (typepred "Re(b)")
         (typepred "Re(a)")
         (typepred "Im(a)")
         (typepred "Im(b)")
         (hide -1 -3 -5 -7)
         (rewrite "times_div1" 1)
         (case-replace
          "Re(b) * Im(a) / D - (Im(b) * Re(a)) / D = (Re(b) * Im(a) - Im(b) * Re(a)) / D")
         (("1"
           (lemma "reals.closed_divides"
            ("x" "Re(b) * Im(a) - Im(b) * Re(a)" "n0z" "D"))
           (("1" (propax))
            ("2" (assert) (expand "D") (hide 2) (assert))))
          ("2" (hide -8 2 -5) (rewrite "div_distributes_minus" 1))))
        ("3"
         (assert)
         (hide 2)
         (case "real_pred(D)")
         (("1"
           (assert)
           (case "real_pred(Im(a) )")
           (("1"
             (case "real_pred(Im(b) )")
             (("1"
               (flatten)
               (case "real_pred(Re(b) )")
               (("1"
                 (case "real_pred(Re(a) )")
                 (("1"
                   (hide -6 -8 -9 -10)
                   (lemma "reals.closed_plus")
                   (inst - "Im(a) * Im(b) / D" "(Re(b) * Re(a)) / D")
                   (("1" (lemma "reals.closed_divides") (inst?))
                    ("2" (lemma "reals.closed_divides") (inst?))))
                  ("2" (assert))))
                ("2" (assert))))
              ("2" (assert))))
            ("2" (assert))))
          ("2" (assert) (replace -3 * rl) (assert))))))
      ("2"
       (hide 2)
       (rewrite "number_fields_bis.times_div1")
       (rewrite "number_fields_bis.times_div1")
       (rewrite "number_fields_bis.times_div2" 1)
       (rewrite "associative_mult" 1 :dir rl)
       (rewrite "associative_mult" 1 :dir rl)
       (rewrite "associative_mult" 1 :dir rl)
       (lemma "i_axiom")
       (replace -1 1)
       (assert)
       (lemma "both_sides_div1"
        ("n0z" "D" "x" "Im(a) * (Im(b) * -1)" "y" "-(Im(a) * Im(b))"))
       (flatten)
       (hide -1)
       (split -1)
       (("1"
         (replace -1 1)
         (hide-all-but (-3 1))
         (rewrite "div_cancel3" 1)
         (name-replace "K100" "Im(a) * Im(b)")
         (lemma "both_sides_plus2"
          ("z" "K100" "x" "-K100" "y" "-(K100 / D) * D"))
         (replace -1 1 rl)
         (rewrite "inverse_add" 1)
         (hide -1)
         (rewrite "div_def")
         (rewrite "number_fields_negative_times")
         (rewrite "div_cancel2")
         (assert))
        ("2" (hide 2 -4) (assert))))))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("b" "a"))
   (typepred "b")
   (hide -1 -2)
   (lemma "conjugate_nz" ("n0z" "b"))
   (lemma "nz_sq_abs_pos" ("n0z" "b"))
   (lemma "complex_is_Re_Im" ("z" "a"))
   (lemma "complex_is_Re_Im" ("z" "a/b"))
   (name-replace "RHS" "Re(a / b) + Im(a / b) * i")
   (replace -2 -1)
   (expand "RHS")
   (lemma "div_cancel1"
    ("x" "(Re(a) + Im(a) * i) / b" "n0z" "conjugate(b)"))
   (("1"
     (rewrite "div_div2" -1)
     (name-replace "D" "b * conjugate(b)")
     (replace -1 -2 rl)
     (hide -1 -5)
     (rewrite "times_div1" -1)
     (expand "conjugate")
     (rewrite "associative_mult" -1 :dir rl)
     (rewrite "associative_mult" -1 :dir rl)
     (rewrite "associative_mult" -1 :dir rl)
     (rewrite "associative_mult" -1 :dir rl)
     (lemma "i_axiom")
     (replace -1 -2)
     (rewrite "associative_mult" -2)
     (rewrite "associative_mult" -2)
     (rewrite "div_cancel3" -2)
     (rewrite "div_cancel4" 1)
     (lemma "unique_characterization"
      ("x0"
       "Im(a) * Im(b) + Re(a) * Re(b)"
       "y0"
       "Im(a) * Re(b)-Im(b) * Re(a)"
       "x1"
       "Re(a / b) * D"
       "y1"
       "Im(a / b) * D"))
     (("1" (assert) (hide 2) (rewrite "associative_mult" -2))
      ("2"
       (lemma "reals.closed_times" ("x" "Im(a / b)" "y" "D"))
       (("1" (propax)) ("2" (expand "D") (assert))))
      ("3"
       (lemma "reals.closed_times" ("x" "Re(a / b)" "y" "D"))
       (("1" (propax)) ("2" (expand "D") (assert))))))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "complex_is_Re_Im" ("z" "z!1"))
   (name-replace "DRL1" "conjugate(z!1)")
   (name-replace "DRL2" "Re(z!1)")
   (replace -1)
   (hide -1)
   (expand "DRL2")
   (expand "DRL1")
   (expand "conjugate")
   (propax))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (name-replace "DRL1" "conjugate(z!1)")
   (name-replace "DRL2" "Im(z!1)")
   (lemma "complex_is_Re_Im" ("z" "z!1"))
   (replace -1 1)
   (expand "DRL1")
   (expand "conjugate")
   (expand "DRL2")
   (propax))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "conjugate")
   (skosimp)
   (rewrite "Re_neg")
   (rewrite "Im_neg")
   (lemma "complex_is_Re_Im" ("z" "-(Re(z!1) - Im(z!1) * i)"))
   (rewrite "Re_neg" -1)
   (rewrite "Im_neg" -1)
   (lemma "unique_characterization"
    ("x0"
     "Re((Re(z!1) - Im(z!1) * i))"
     "x1"
     "Re(z!1)"
     "y0"
     "Im((Re(z!1) - Im(z!1) * i))"
     "y1"
     "-Im(z!1)"))
   (flatten)
   (hide -2)
   (split -1)
   (("1"
     (flatten)
     (replace -1)
     (replace -2)
     (replace -3 1)
     (assert)
     (rewrite "number_fields_negate_negate")
     (assert)
     (lemma "neg_times_neg" ("x" "1" "y" "Im(z!1)*i"))
     (rewrite "number_fields_negative_times" -1 :dir rl)
     (replace -1 1)
     (rewrite "number_fields_left_identity_mult"))
    ("2"
     (hide 2)
     (assert)
     (lemma "minus_add" ("x" "Re(z!1)" "y" "Im(z!1)*i"))
     (rewrite "number_fields_negative_times" -1 :dir rl)
     (replace -1 1 rl)
     (name-replace "DRL1" "Re(z!1) - Im(z!1) * i")
     (lemma "complex_is_Re_Im" ("z" "DRL1"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "minus_add")
   (inst-cp - "z1!1" "z2!1")
   (inst - "conjugate(z1!1)" "conjugate(z2!1)")
   (lemma "conjugate_plus" ("z1" "z1!1" "z2" "-z2!1"))
   (lemma "conjugate_neg" ("z" "z2!1"))
   (replace -4 1)
   (replace -3 1)
   (replace -1 1 rl)
   (propax))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "conjugate")
   (skosimp)
   (rewrite "Re_times")
   (rewrite "Im_times")
   (assert)
   (rewrite "associative_mult" :dir rl)
   (rewrite "associative_mult" :dir rl)
   (rewrite "associative_mult" :dir rl)
   (lemma "i_axiom")
   (expand "sq")
   (replace -1)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "conjugate")
   (rewrite "Im_div")
   (rewrite "Re_div")
   (rewrite "Im_real")
   (rewrite "Re_real")
   (assert)
   (lemma "nz_sq_abs_pos" ("n0z" "n0z!1"))
   (lemma "complex_is_Re_Im" ("z" "n0z!1"))
   (lemma "conjugate_nz" ("n0z" "n0z!1"))
   (name "DRL" "conjugate(n0z!1)")
   (replace -1)
   (expand "conjugate" -1)
   (replace -1)
   (name-replace "D" "n0z!1 * DRL")
   (case-replace "1 * Re(n0z!1) / D - -1 * Im(n0z!1) / D * i = n0z!1/D")
   (("1"
     (rewrite "cross_mult" 1)
     (expand "D" 1)
     (rewrite "number_fields_left_identity_mult" 1))
    ("2"
     (hide 2)
     (rewrite "number_fields_left_identity_mult" 1)
     (rewrite "minus_add" 1)
     (case-replace "-(-1 * Im(n0z!1) / D * i) = (Im(n0z!1)*i)/D")
     (("1"
       (rewrite "div_distributes" 1)
       (rewrite "both_sides_div1" 1)
       (assert))
      ("2"
       (hide 2)
       (prop)
       (rewrite "times_div2" 1)
       (lemma "div_def")
       (inst-cp - "D" "-1 * (Im(n0z!1) * i)")
       (("1"
         (replace -2 1)
         (rewrite "number_fields_negative_times" 1 :dir rl)
         (rewrite "number_fields_negative_times" 1 :dir rl)
         (rewrite "number_fields_negate_negate")
         (rewrite "number_fields_left_identity_mult" 1)
         (inst - "D" "Im(n0z!1) * i")
         (("1" (assert)) ("2" (assert))))
        ("2" (assert))))
      ("3" (assert))))
    ("3" (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: arithmetic
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "conjugate_inv" ("n0z" "n0z!1"))
   (lemma "div_def")
   (inst-cp - "n0z!1" "x!1")
   (inst - "conjugate(n0z!1)" "conjugate(x!1)")
   (("1"
     (replace -1 1)
     (replace -2 1)
     (replace -3 1 rl)
     (lemma "conjugate_times" ("z1" "x!1" "z2" "1/n0z!1"))
     (propax))
    ("2" (lemma "conjugate_nz" ("n0z" "n0z!1")) (propax))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "abs")
   (lemma "complex_is_Re_Im" ("z" "z!1"))
   (name-replace "DRL100" "conjugate(z!1)")
   (name-replace "DRL101" "sqrt(sq.sq(Im(z!1)) + sq.sq(Re(z!1)))")
   (replace -1)
   (hide -1)
   (expand "DRL100")
   (expand "conjugate")
   (rewrite "associative_mult" 1 :dir rl)
   (rewrite "associative_mult" 1 :dir rl)
   (rewrite "associative_mult" 1 :dir rl)
   (rewrite "i_axiom")
   (expand "DRL101")
   (expand "sq")
   (rewrite "associative_mult")
   (rewrite "minus_add"))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "abs_def")
   (rewrite "Im_real")
   (rewrite "Re_real")
   (expand "sq" 1 1)
   (rewrite "sqrt_sq_abs"))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "abs_def")
   (rewrite "Re_imag")
   (rewrite "Im_imag")
   (case "sq.sq(0) = 0")
   (("1"
     (replaces -1)
     (assert)
     (lemma "sqrt_sq")
     (inst - "real_defs.abs(r)")
     (assert))
    ("2" (hide 2) (grind))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "abs")
   (lemma "nz_sq_abs_pos" ("n0z" "n0z!1"))
   (lemma "sqrt_pos" ("px" "n0z!1 * conjugate(n0z!1)"))
   (("1" (propax)) ("2" (expand "conjugate") (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1" (replace -2) (grind))
    ("2"
     (lemma "abs_nzcomplex" ("n0z" "z!1"))
     (("1" (propax)) ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (typepred "abs(z!1)")
     (expand ">=")
     (expand "<=")
     (split)
     (("1" (lemma "abs_nz_iff_nz" ("z" "z!1")) (assert))
      ("2"
       (hide -1)
       (expand "abs")
       (rewrite "sq_abs_def")
       (rewrite "sq.sq_rew")
       (rewrite "sq.sq_rew")
       (rewrite "complex_is_0_Re_Im" 1)
       (typepred "sq.sq(Im(z!1))")
       (typepred "sq.sq(Re(z!1))")
       (lemma "sqrt_eq"
        ("nny" "sq.sq(Im(z!1)) + sq.sq(Re(z!1))" "nnz" "0"))
       (rewrite "sqrt_0")
       (replace -1 -4)
       (hide -1)
       (lemma "sq.sq_nz_pos")
       (case-replace "Re(z!1) = 0")
       (("1" (inst - "Im(z!1)") (("1" (assert)) ("2" (assert))))
        ("2" (inst - "Re(z!1)") (("1" (assert)) ("2" (assert))))))))
    ("2"
     (replace -1)
     (expand "abs")
     (rewrite "zero_times1")
     (rewrite "sqrt_0"))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "abs")
   (skolem 1 ("a" "b"))
   (lemma "sq_abs_nonneg" ("z" "a"))
   (lemma "sq_abs_nonneg" ("z" "b"))
   (lemma "sq_abs_nonneg" ("z" "a*b"))
   (rewrite "sqrt_times" :dir rl)
   (("1" (assert) (rewrite "conjugate_times"))
    ("2" (assert) (expand "conjugate") (propax))
    ("3" (expand "conjugate") (propax))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "abs")
   (rewrite "conjugate_inv")
   (lemma "conjugate_nz" ("n0z" "n0z!1"))
   (rewrite "div_times")
   (lemma "nz_sq_abs_pos" ("n0z" "n0z!1"))
   (rewrite "sqrt_div")
   (expand "conjugate")
   (propax))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "div_def" ("y" "z!1" "n0x" "n0z!1"))
   (lemma "abs_mult" ("z1" "z!1" "z2" "1/n0z!1"))
   (("1" (rewrite "abs_inv" -1) (assert))
    ("2" (lemma "real_is_complex" ("x" "1")) (rewrite "closed_divides"))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "b"))
   (expand "abs")
   (lemma "sq_abs_nonneg" ("z" "a"))
   (lemma "sq_abs_nonneg" ("z" "b"))
   (lemma "sq_abs_nonneg" ("z" "a+b"))
   (case "real_pred(a * conjugate(a))")
   (("1"
     (case "real_pred(b * conjugate(b))")
     (("1"
       (case "real_pred((a+b) * conjugate(a+b))")
       (("1"
         (name "A2" "a * conjugate(a)")
         (replace -1)
         (name "B2" "b * conjugate(b)")
         (replace -1)
         (name "AB2" "(a+b) * conjugate(a+b)")
         (replace -1)
         (case-replace
          "conjugate(a + b) * a + conjugate(a + b) * b = AB2")
         (("1"
           (rewrite "sq_le" 1 :dir rl)
           (rewrite "sqrt.sq_sqrt")
           (rewrite "sq.sq_plus")
           (rewrite "sqrt.sq_sqrt")
           (rewrite "sqrt.sq_sqrt")
           (rewrite "sqrt.sqrt_times" 1 :dir rl)
           (rewrite "conjugate_plus")
           (rewrite "distributive" -2)
           (lemma "commutative_mult")
           (inst-cp - "a" "conjugate(a)")
           (inst-cp - "b" "conjugate(b)")
           (replace -2 * rl)
           (replace -3 * rl)
           (replace -6)
           (replace -7)
           (hide -4)
           (name "DRL" "conjugate(a) * b + conjugate(b) * a")
           (case-replace
            "A2 + conjugate(a) * b + conjugate(b) * a + B2 = A2+B2+DRL")
           (("1"
             (case "real_pred(DRL)")
             (("1"
               (hide -2)
               (replace -6 1 rl)
               (assert)
               (case "A2*B2>=0")
               (("1"
                 (lemma "both_sides_plus_le2"
                  ("z" "A2+B2" "x" "DRL" "y" "2*sqrt(A2 * B2)"))
                 (("1"
                   (case "DRL<=2 * sqrt(A2 * B2)")
                   (("1" (assert))
                    ("2"
                     (hide -1 2)
                     (name-replace "CA" "conjugate(a)")
                     (name-replace "CB" "conjugate(b)")
                     (lemma "complex_is_Re_Im" ("z" "a"))
                     (lemma "complex_is_Re_Im" ("z" "b"))
                     (replace -1 -5)
                     (replace -2 -5)
                     (expand "CA")
                     (expand "CB")
                     (expand "conjugate")
                     (case-replace "DRL = 2*(Re(a)*Re(b)+Im(a)*Im(b))")
                     (("1"
                       (lemma "both_sides_times_pos_le1"
                        ("pz"
                         "2"
                         "x"
                         "Re(a) * Re(b) + Im(a) * Im(b)"
                         "y"
                         "sqrt(A2 * B2)"))
                       (replace -1 1)
                       (hide -1)
                       (lemma "reals.closed_divides"
                        ("x"
                         "2 * (Re(a) * Re(b) + Im(a) * Im(b))"
                         "n0z"
                         "2"))
                       (rewrite "times_div1" -1 :dir rl)
                       (rewrite "div_cancel1" 1)
                       (case "Im(a) * Im(b) + Re(a) * Re(b) < 0")
                       (("1" (assert))
                        ("2"
                         (rewrite "sq_le" 2 :dir rl)
                         (rewrite "sq_sqrt")
                         (expand "B2" 2)
                         (rewrite "sq_abs_def" 2)
                         (name-replace "DRL_B"
                          "(Im(b) * Im(b) + Re(b) * Re(b))")
                         (expand "A2")
                         (lemma "sq_abs_def" ("z" "a"))
                         (inst-cp -9 "conjugate(a)" "DRL_B")
                         (replace -10 2)
                         (rewrite "associative_mult" 2 :dir rl)
                         (inst-cp -9 "conjugate(a)" "a")
                         (replace -10 2)
                         (replace -1 2)
                         (expand "DRL_B")
                         (expand "sq")
                         (assert)
                         (name "IA" "Im(a)")
                         (replace -1)
                         (name "IB" "Im(b)")
                         (replace -1)
                         (name "RB" "Re(b)")
                         (replace -1)
                         (name "RA" "Re(a)")
                         (replace -1)
                         (name-replace "DRL10" "IA * IA * IB * IB ")
                         (name-replace "DRL11" "RA * RA * RB * RB ")
                         (assert)
                         (lemma "both_sides_plus_le2"
                          ("z"
                           "DRL10 + DRL11"
                           "x"
                           "2 * (IA * IB * RA * RB)"
                           "y"
                           "IA * IA * RB * RB + IB * IB * RA * RA"))
                         (replace -1 2)
                         (hide-all-but (1 2))
                         (case "IA*IB >= -(RA*RB)")
                         (("1"
                           (hide 1)
                           (lemma "trichotomy" ("x" "IA*RB-RA*IB"))
                           (split)
                           (("1"
                             (lemma "sq_lt"
                              ("nna" "0" "nnb" "IA * RB - RA * IB"))
                             (("1" (assert) (expand "sq") (assert))
                              ("2" (assert))))
                            ("2"
                             (lemma "sq_eq"
                              ("nna" "IA * RB - RA * IB" "nnb" "0"))
                             (("1" (assert) (expand "sq") (assert))
                              ("2" (assert))))
                            ("3"
                             (lemma "sq_lt"
                              ("nna" "0" "nnb" "-(IA * RB - RA * IB)"))
                             (("1"
                               (assert)
                               (rewrite "sq.sq_neg")
                               (expand "sq")
                               (assert))
                              ("2" (assert))))))
                          ("2" (assert))))))
                      ("2"
                       (replace -5 1 rl)
                       (hide-all-but 1)
                       (rewrite "associative_mult" :dir rl)
                       (rewrite "associative_mult" :dir rl)
                       (rewrite "associative_mult" :dir rl)
                       (lemma "i_axiom")
                       (replace -1)
                       (assert))))))
                  ("2"
                   (assert)
                   (lemma "reals.closed_plus" ("x" "A2" "y" "B2"))
                   (propax))
                  ("3"
                   (lemma "reals.closed_times" ("x" "A2" "y" "B2"))
                   (assert))))
                ("2"
                 (hide-all-but (1 -13 -14 -10 -11))
                 (expand ">=")
                 (expand "<=" -3)
                 (split)
                 (("1"
                   (lemma "both_sides_times_pos_le1"
                    ("pz" "B2" "x" "0" "y" "A2"))
                   (("1" (assert) (rewrite "zero_times1"))
                    ("2" (assert))))
                  ("2" (replace -1 * rl) (assert))))
                ("3"
                 (lemma "reals.closed_times" ("x" "A2" "y" "B2"))
                 (propax))))
              ("2"
               (expand "DRL")
               (case-replace
                "conjugate(a) * b + conjugate(b) * a = AB2 - A2 - B2")
               (("1"
                 (assert)
                 (hide-all-but (-8 -9 -10 1))
                 (lemma "reals.closed_minus")
                 (inst?)
                 (lemma "reals.closed_minus")
                 (inst?))
                ("2"
                 (assert)
                 (hide-all-but (-6 1))
                 (lemma "both_sides_minus1")
                 (inst - "A2 + conjugate(a) * b + conjugate(b) * a + B2"
                  "AB2" "A2+B2")
                 (assert))))))
            ("2" (expand "DRL") (propax))))
          ("2" (expand "AB2") (propax))))
        ("2" (name-replace "APB" "a + b") (assert))))
      ("2" (assert))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "abs(z!1)")
   (expand "abs")
   (expand "conjugate")
   (lemma "complex_is_Re_Im" ("z" "z!1"))
   (name-replace "X" "Re(z!1)")
   (name-replace "Y" "Im(z!1)")
   (replace -1)
   (hide -1)
   (name "DRL1" "X * (X + Y * i) - Y * i * (X + Y * i)")
   (replace -1)
   (rewrite "Re_real" 1)
   (("1"
     (rewrite "Im_real" 1)
     (rewrite "zero_times1" 1)
     (rewrite "zero_times1" 1)
     (rewrite "sq.sq_rew" 1)
     (rewrite "sqrt.sq_sqrt"))
    ("2"
     (hide -2 2)
     (rewrite "sq.sq_rew")
     (rewrite "sq.sq_rew")
     (rewrite "associative_mult" -1 :dir rl)
     (rewrite "i_axiom")
     (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "abs")
   (expand "conjugate")
   (lemma "Re_imag" ("x" "1"))
   (lemma "Im_imag" ("x" "1"))
   (rewrite "identity_mult")
   (replace -1)
   (replace -2)
   (rewrite "zero_times1")
   (rewrite "identity_mult")
   (rewrite "i_axiom")
   (rewrite "sqrt_1"))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "arg(n0z!1)")
   (lemma "complex_is_ne_0_Re_Im" ("z" "n0z!1"))
   (assert)
   (lemma "atan2_is_0" ("x" "Re(n0z!1)" "y" "Im(n0z!1)"))
   (("1"
     (case-replace "Re(n0z!1) > 0 AND Im(n0z!1) = 0")
     (("1" (flatten) (replace -2) (expand "arg") (assert))
      ("2"
       (replace 1)
       (flatten)
       (split 3)
       (("1"
         (expand "arg")
         (case-replace "Im(n0z!1) < 0")
         (("1"
           (lemma "atan2_ge_0_lt_2pi" ("x" "Re(n0z!1)" "y" "Im(n0z!1)"))
           (assert))
          ("2" (assert))))
        ("2" (propax))))))
    ("2" (split -1) (("1" (assert)) ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case-replace "z!1=0")
   (("1" (expand "arg") (rewrite "Re_real") (rewrite "Im_real") (assert))
    ("2"
     (lemma "arg_is_0_nz" ("n0z" "z!1"))
     (("1"
       (case-replace "arg(z!1) = 0")
       (("1" (flatten) (assert))
        ("2"
         (replace 1)
         (flatten)
         (assert)
         (flatten)
         (expand ">=")
         (expand "<=")
         (split -1)
         (("1" (assert))
          ("2"
           (replace -1 * rl)
           (lemma "complex_is_Re_Im" ("z" "z!1"))
           (replace -2 * rl)
           (replace -3)
           (assert)
           (rewrite "zero_times1"))))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "arg(z!1)")
   (expand "arg")
   (case-replace "z!1=0")
   (("1" (rewrite "Im_real") (assert))
    ("2"
     (assert)
     (case-replace "Im(z!1) < 0")
     (("1"
       (lemma "atan2_ge_0_lt_2pi" ("x" "Re(z!1)" "y" "Im(z!1)"))
       (assert))
      ("2"
       (assert)
       (lemma "atan2_is_pi2" ("x" "Re(z!1)" "y" "Im(z!1)"))
       (("1" (propax))
        ("2"
         (lemma "complex_is_ne_0_Re_Im" ("z" "z!1"))
         (assert)
         (split -1)
         (("1" (assert)) ("2" (assert))))))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case-replace "z!1=0")
   (("1" (expand "arg") (rewrite "Re_real") (assert))
    ("2"
     (lemma "complex_is_ne_0_Re_Im" ("z" "z!1"))
     (assert)
     (typepred "arg(z!1)")
     (lemma "atan2_is_pi" ("x" "Re(z!1)" "y" "Im(z!1)"))
     (("1"
       (lemma "atan2_ge_0_lt_2pi" ("x" "Re(z!1)" "y" "Im(z!1)"))
       (replace -5 -1)
       (flatten -1)
       (expand "arg")
       (case-replace "Im(z!1) < 0")
       (("1" (assert)) ("2" (assert))))
      ("2" (split -3) (("1" (assert)) ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case-replace "z!1=0")
   (("1" (expand "arg") (rewrite "Im_real") (assert))
    ("2"
     (typepred "arg(z!1)")
     (lemma "complex_is_ne_0_Re_Im" ("z" "z!1"))
     (assert)
     (lemma "atan2_ge_0_lt_2pi" ("x" "Re(z!1)" "y" "Im(z!1)"))
     (replace -2 -1)
     (flatten -1)
     (expand "arg")
     (lemma "atan2_is_3pi2" ("x" "Re(z!1)" "y" "Im(z!1)"))
     (("1"
       (case-replace "Im(z!1) < 0")
       (("1" (case-replace "Re(z!1)=0") (("1" (assert)) ("2" (assert))))
        ("2" (assert))))
      ("2" (split -3) (("1" (assert)) ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "arg(z!1)")
   (expand "arg")
   (case-replace "z!1=0")
   (("1" (rewrite "Im_real") (assert))
    ("2"
     (assert)
     (lemma "atan2_is_3pi2" ("x" "Re(z!1)" "y" "Im(z!1)"))
     (("1"
       (lemma "atan2_quad3" ("x" "Re(z!1)" "y" "Im(z!1)"))
       (lemma "atan2_quad4" ("x" "Re(z!1)" "y" "Im(z!1)"))
       (case-replace "Im(z!1) < 0")
       (("1"
         (lemma "trichotomy" ("x" "Re(z!1)"))
         (split -1)
         (("1" (assert) (flatten) (assert)) ("2" (replace -1) (assert))
          ("3" (assert))))
        ("2"
         (assert)
         (hide 2 3 4)
         (lemma "complex_is_ne_0_Re_Im" ("z" "z!1"))
         (assert)
         (lemma "atan2_ge_0_lt_2pi" ("x" "Re(z!1)" "y" "Im(z!1)"))
         (replace -2 -1)
         (flatten)
         (assert))))
      ("2"
       (lemma "complex_is_ne_0_Re_Im" ("z" "z!1"))
       (assert)
       (split -1)
       (("1" (assert)) ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case-replace "z!1=0")
   (("1" (expand "arg") (rewrite "Im_real") (assert))
    ("2"
     (typepred "arg(z!1)")
     (expand "<=")
     (split -2)
     (("1"
       (replace -1)
       (lemma "trichotomy" ("x" "arg(z!1)"))
       (split -1)
       (("1"
         (hide -3)
         (lemma "complex_is_ne_0_Re_Im" ("z" "z!1"))
         (assert)
         (expand "arg")
         (lemma "atan2_ge_0_lt_2pi" ("x" "Re(z!1)" "y" "Im(z!1)"))
         (replace -2)
         (flatten)
         (lemma "trichotomy" ("x" "Im(z!1)"))
         (split -1)
         (("1" (propax))
          ("2"
           (assert)
           (replace -1)
           (expand "atan2")
           (rewrite "atan_0")
           (case "Re(z!1)>0")
           (("1" (assert)) ("2" (assert))))
          ("3" (assert))))
        ("2"
         (lemma "arg_is_0_nz" ("n0z" "z!1"))
         (("1" (assert) (flatten) (assert)) ("2" (assert))))
        ("3" (lemma "arg_lt_0" ("z" "z!1")) (assert))))
      ("2"
       (replace -1)
       (lemma "arg_is_pi" ("z" "z!1"))
       (assert)
       (flatten)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "arg(z!1)")
   (expand "<=")
   (lemma "arg_p_lt_pi" ("z" "z!1"))
   (lemma "arg_is_pi" ("z" "z!1"))
   (split 1)
   (("1"
     (flatten 1)
     (split -5)
     (("1" (assert)) ("2" (assert) (flatten) (assert))))
    ("2"
     (flatten 1)
     (split -1)
     (("1" (assert)) ("2" (flatten -1) (assert))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "abs_nz_iff_nz" ("z" "n0x!1"))
   (assert)
   (expand "arg")
   (lemma "Im_div" ("z" "n0x!1" "n0z" "abs(n0x!1)"))
   (("1"
     (typepred "abs(n0x!1)")
     (lemma "Re_real" ("x" "abs(n0x!1)"))
     (lemma "Im_real" ("x" "abs(n0x!1)"))
     (replace -1)
     (expand "conjugate")
     (replace -1)
     (replace -2)
     (rewrite "zero_times1" -4)
     (rewrite "zero_times1" -4)
     (lemma "div_times"
      ("x"
       "Im(n0x!1)"
       "y"
       "abs(n0x!1)"
       "n0x"
       "abs(n0x!1)"
       "n0y"
       "abs(n0x!1)"))
     (rewrite "div_simp" -1)
     (replace -1 -5 rl)
     (hide -1)
     (rewrite "number_fields_right_identity_mult")
     (replace -4)
     (lemma "Re_div" ("z" "n0x!1" "n0z" "abs(n0x!1)"))
     (expand "conjugate")
     (replace -2)
     (replace -3)
     (assert)
     (lemma "div_times"
      ("x"
       "Re(n0x!1)"
       "y"
       "abs(n0x!1)"
       "n0x"
       "abs(n0x!1)"
       "n0y"
       "abs(n0x!1)"))
     (rewrite "div_simp")
     (rewrite "number_fields_right_identity_mult")
     (replace -1)
     (lemma "complex_is_ne_0_Re_Im" ("z" "n0x!1"))
     (lemma "atan2_cancel_pos"
      ("x" "Re(n0x!1)" "y" "Im(n0x!1)" "pz" "1/abs(n0x!1)"))
     (("1"
       (simplify -2)
       (replace -2 -1)
       (replace -1 1)
       (rewrite "div_mult_pos_lt1" 1)
       (case-replace "Im(n0x!1) < 0")
       (assert))
      ("2"
       (lemma "posreal_div_posreal_is_posreal"
        ("px" "1" "py" "abs(n0x!1)"))
       (assert))))
    ("2" (lemma "real_is_complex" ("x" "abs(n0x!1)")) (propax))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "arg")
   (expand "abs")
   (expand "conjugate")
   (lemma "complex_is_Re_Im" ("z" "n0x!1"))
   (lemma "complex_is_ne_0_Re_Im" ("z" "n0x!1"))
   (simplify -1)
   (name-replace "X" "Re(n0x!1)")
   (name-replace "Y" "Im(n0x!1)")
   (replace -2)
   (simplify -3)
   (rewrite "sq.sq_rew")
   (rewrite "sq.sq_rew")
   (rewrite "associative_mult" -3 :dir rl)
   (rewrite "i_axiom")
   (simplify -3)
   (lemma "cos_period" ("a" "atan2(X,Y)" "j" "-1"))
   (("1"
     (replace -1 1 rl)
     (lemma "cos_atan2" ("x" "X" "y" "Y"))
     (replace -3 -1)
     (case-replace "X=0")
     (("1" (replace -2) (case-replace "Y<0") (assert))
      ("2"
       (assert)
       (replace -1 2)
       (case-replace "1 + sq.sq(Y / X) = 1/sq.sq(X)")
       (("1"
         (hide -1)
         (hide -1)
         (case "sq.sq(X)>0")
         (("1"
           (rewrite "sqrt_div")
           (case-replace "X>0")
           (("1" (rewrite "sqrt.sqrt_sq")) ("2" (assert))))
          ("2" (lemma "sq.sq_nz_pos" ("nz" "X")) (propax))))
        ("2"
         (rewrite "sq.sq_div" 1)
         (lemma "add_div"
          ("x" "1" "n0x" "1" "y" "sq.sq(Y)" "n0y" "sq.sq(X)"))
         (replace -1 1)
         (assert))
        ("3" (lemma "sq.sq_eq_0" ("a" "X")) (assert))))))
    ("2" (flatten) (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "arg")
   (expand "abs")
   (expand "conjugate")
   (lemma "complex_is_Re_Im" ("z" "n0x!1"))
   (lemma "complex_is_ne_0_Re_Im" ("z" "n0x!1"))
   (simplify -1)
   (name-replace "X" "Re(n0x!1)")
   (name-replace "Y" "Im(n0x!1)")
   (replace -2)
   (simplify -3)
   (rewrite "sq.sq_rew")
   (rewrite "sq.sq_rew")
   (rewrite "associative_mult" -3 :dir rl)
   (rewrite "i_axiom")
   (simplify -3)
   (lemma "sin_period" ("a" "atan2(X,Y)" "j" "-1"))
   (("1"
     (replace -1 1 rl)
     (lemma "sin_atan2" ("x" "X" "y" "Y"))
     (replace -3 -1)
     (case-replace "X=0")
     (("1"
       (replace -2)
       (case-replace "Y<0")
       (("1"
         (assert)
         (lemma "sq.sq_neg")
         (inst - "Y")
         (replace -1 -8 rl)
         (rewrite "sqrt.sqrt_sq" -8)
         (assert))
        ("2"
         (assert)
         (lemma "sqrt.sqrt_sq")
         (inst - "Y")
         (split -1)
         (("1" (replace -1 -7) (propax)) ("2" (assert))))))
      ("2"
       (assert)
       (replace -1 2)
       (hide -1)
       (lemma "sq.sq_eq" ("nna" "sqrt(sq.sq(X)+sq.sq(Y))" "nnb" "1"))
       (rewrite "sq.sq_1")
       (rewrite "sqrt.sq_sqrt")
       (replace -4 -1)
       (flatten -1)
       (lemma "sq.sq_nz_pos" ("nz" "X"))
       (case-replace "1 + sq.sq(Y / X) = 1/sq.sq(X)")
       (("1"
         (case-replace "X>0")
         (("1"
           (rewrite "sqrt.sqrt_div" 2)
           (rewrite "sqrt.sqrt_sq")
           (rewrite "div_div2"))
          ("2"
           (assert)
           (lemma "sq.sq_neg")
           (inst - "X")
           (replace -1 3 rl)
           (rewrite "sqrt.sqrt_div" 3)
           (rewrite "div_div1" 3)
           (assert))))
        ("2"
         (lemma "add_div"
          ("x" "1" "n0x" "1" "y" "sq.sq(X)" "n0y" "sq.sq(Y)"))
         (("1" (replace -3) (rewrite "sq.sq_div" 1) (assert))
          ("2" (expand "/=" 1) (lemma "sq.sq_eq_0" ("a" "Y")) (assert))))
        ("3" (assert))))))
    ("2" (flatten) (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "nnx!1")
   (expand "arg")
   (expand ">=")
   (expand "<=")
   (split -1)
   (("1"
     (assert)
     (rewrite "Im_real")
     (rewrite "Re_real")
     (assert)
     (expand "atan2")
     (rewrite "atan_0"))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "nx!1")
   (hide -1)
   (expand "arg")
   (rewrite "Im_real")
   (rewrite "Re_real")
   (assert)
   (expand "atan2")
   (rewrite "atan_0"))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "arg_is_pi2" ("z" "i"))
   (lemma "Re_imag" ("x" "1"))
   (lemma "Im_imag" ("x" "1"))
   (rewrite "identity_mult")
   (replace -1)
   (replace -2)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a"))
   (name "AA" "arg(a)")
   (replace -1)
   (case-replace "a=0")
   (("1" (assert))
    ("2"
     (lemma "complex_is_ne_0_Re_Im" ("z" "a"))
     (assert)
     (typepred "arg(a)")
     (lemma "arg_gt_0" ("z" "a"))
     (lemma "arg_lt_0" ("z" "a"))
     (lemma "arg_is_0_nz" ("n0z" "a"))
     (replace -7)
     (case-replace "0<AA")
     (("1"
       (assert)
       (expand "arg")
       (rewrite "Im_neg")
       (rewrite "Re_neg")
       (lemma "atan2_cancel_neg" ("x" "-Re(a)" "y" "-Im(a)" "nz" "-1"))
       (split -1)
       (("1"
         (assert)
         (split -3)
         (("1" (assert)) ("2" (assert) (flatten) (assert))))
        ("2"
         (assert)
         (split -2)
         (("1" (assert)) ("2" (flatten) (assert))))))
      ("2"
       (assert)
       (expand "arg")
       (case-replace "AA=0")
       (("1"
         (assert)
         (rewrite "Re_neg")
         (rewrite "Im_neg")
         (lemma "atan2_cancel_neg" ("x" "-Re(a)" "y" "-Im(a)" "nz" "-1"))
         (assert)
         (split -1)
         (("1" (flatten) (assert))
          ("2" (split -5) (("1" (assert)) ("2" (assert))))))
        ("2"
         (assert)
         (lemma "atan2_cancel_neg" ("x" "-Re(a)" "y" "-Im(a)" "nz" "-1"))
         (rewrite "Im_neg")
         (rewrite "Re_neg")
         (split -1)
         (("1" (assert)) ("2" (assert))))))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "arg_div_abs")
   (lemma "arg_div_abs" ("n0x" "n0x!1"))
   (lemma "arg_div_abs" ("n0x" "n0y!1"))
   (replace -1)
   (replace -2)
   (hide -1 -2)
   (rewrite "abs_mult")
   (rewrite "div_times" 1 :dir rl)
   (name "X" "n0x!1 / abs(n0x!1)")
   (replace -1)
   (name "Y" "n0y!1 / abs(n0y!1)")
   (replace -1)
   (lemma "Re_cos_abs1" ("n0x" "X"))
   (("1"
     (lemma "Re_cos_abs1" ("n0x" "Y"))
     (("1"
       (lemma "Im_sin_abs1" ("n0x" "X"))
       (lemma "Im_sin_abs1" ("n0x" "Y"))
       (case-replace "abs(X)=1")
       (("1"
         (case-replace "abs(Y)=1")
         (("1"
           (lemma "abs_mult" ("z1" "X" "z2" "Y"))
           (replace -2)
           (replace -3)
           (lemma "Re_cos_abs1" ("n0x" "X*Y"))
           (("1"
             (lemma "Im_sin_abs1" ("n0x" "X*Y"))
             (replace -3)
             (case "X/=0")
             (("1"
               (case "Y/=0")
               (("1"
                 (case "X*Y/=0")
                 (("1"
                   (name "TH1" "arg(X)")
                   (name "TH2" "arg(Y)")
                   (typepred "arg(X)")
                   (typepred "arg(Y)")
                   (replace -5)
                   (replace -6)
                   (lemma "Re_times" ("z1" "X" "z2" "Y"))
                   (lemma "Im_times" ("z1" "X" "z2" "Y"))
                   (replace -17 (-1 -2))
                   (replace -18 (-1 -2))
                   (replace -19 (-1 -2))
                   (replace -20 (-1 -2))
                   (lemma "sin_plus" ("a" "TH1" "b" "TH2"))
                   (replace -1 -2 rl)
                   (lemma "cos_plus" ("a" "TH1" "b" "TH2"))
                   (replace -1 -4 rl)
                   (hide -1 -2)
                   (expand "arg" 1)
                   (replace -1 1)
                   (replace -2 1)
                   (case-replace "TH1 + TH2 > pi")
                   (("1"
                     (case-replace "TH1+TH2=2*pi")
                     (("1"
                       (rewrite "sin_2pi")
                       (rewrite "cos_2pi")
                       (expand "atan2")
                       (rewrite "atan_0")
                       (assert))
                      ("2"
                       (lemma "sin_lt_0" ("a" "TH1+TH2"))
                       (assert)
                       (rewrite "atan2_cos_sin"))))
                    ("2"
                     (case-replace "TH1 + TH2 <= -pi")
                     (("1"
                       (assert)
                       (case-replace "TH1 + TH2 = -pi")
                       (("1"
                         (rewrite "sin_neg" 2)
                         (rewrite "cos_neg" 2)
                         (rewrite "sin_pi")
                         (rewrite "cos_pi")
                         (expand "atan2")
                         (rewrite "atan_0")
                         (assert))
                        ("2"
                         (lemma "sin_gt_0" ("a" "TH1+TH2+2*pi"))
                         (assert)
                         (lemma "sin_period" ("a" "TH1+TH2" "j" "1"))
                         (lemma "cos_period" ("a" "TH1+TH2" "j" "1"))
                         (assert)
                         (lemma "atan2_cos_sin"
                          ("a" "TH1 + TH2 + 2 * pi"))
                         (assert))))
                      ("2"
                       (assert)
                       (lemma "trichotomy" ("x" "TH1+TH2"))
                       (split -1)
                       (("1"
                         (lemma "sin_gt_0" ("a" "TH1+TH2"))
                         (assert)
                         (case-replace "TH1+TH2=pi")
                         (("1"
                           (rewrite "sin_pi")
                           (rewrite "cos_pi")
                           (expand "atan2")
                           (rewrite "atan_0"))
                          ("2" (assert) (rewrite "atan2_cos_sin"))))
                        ("2"
                         (replace -1)
                         (rewrite "sin_0")
                         (rewrite "cos_0")
                         (expand "atan2")
                         (rewrite "atan_0"))
                        ("3"
                         (lemma "sin_lt_0" ("a" "TH1+TH2+2*pi"))
                         (assert)
                         (lemma "sin_period" ("a" "TH1+TH2" "j" "1"))
                         (lemma "cos_period" ("a" "TH1+TH2" "j" "1"))
                         (assert)
                         (lemma "atan2_cos_sin"
                          ("a" "TH1 + TH2 + 2 * pi"))
                         (assert))))))))
                  ("2" (lemma "abs_nz_iff_nz" ("z" "X*Y")) (assert))))
                ("2" (lemma "abs_nz_iff_nz" ("z" "Y")) (assert))))
              ("2" (lemma "abs_nz_iff_nz" ("z" "X")) (assert))))
            ("2" (lemma "abs_nz_iff_nz" ("z" "X*Y")) (assert))))
          ("2"
           (hide-all-but (-6 1))
           (replace -1 1 rl)
           (rewrite "abs_div")
           (("1" (rewrite "abs_abs") (rewrite "div_simp"))
            ("2" (rewrite "real_is_complex" 1))))))
        ("2"
         (replace -6 1 rl)
         (hide-all-but 1)
         (rewrite "abs_div")
         (("1" (rewrite "abs_abs") (rewrite "div_simp"))
          ("2" (rewrite "real_is_complex" 1))))))
      ("2"
       (lemma "abs_nzcomplex" ("n0z" "n0y!1"))
       (lemma "real_is_complex" ("x" "abs(n0y!1)"))
       (lemma "nznum_div_nznum_is_nznum"
        ("nzx" "n0y!1" "nzy" "abs(n0y!1)"))
       (assert))))
    ("2"
     (lemma "abs_nzcomplex" ("n0z" "n0x!1"))
     (lemma "nznum_div_nznum_is_nznum"
      ("nzx" "n0x!1" "nzy" "abs(n0x!1)"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a"))
   (typepred "a")
   (hide -1 -2)
   (lemma "arg_mult" ("n0x" "a" "n0y" "1/a"))
   (("1"
     (rewrite "times_div1" -1)
     (rewrite "div_simp" -1)
     (lemma "arg_is_0_nz" ("n0z" "1"))
     (rewrite "Re_real")
     (rewrite "Im_real")
     (assert)
     (replace -1)
     (typepred "arg(a)")
     (typepred "arg(1/a)")
     (case-replace "arg(1 / a) + arg(a) > pi")
     (("1" (assert))
      ("2"
       (case-replace "arg(1 / a) + arg(a) <= -pi")
       (("1" (assert))
        ("2"
         (assert)
         (case-replace "arg(a)=0")
         (("1" (assert)) ("2" (assert))))))))
    ("2" (lemma "inv_ne_0" ("n0x" "a")) (propax))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "b"))
   (rewrite "div_def")
   (lemma "arg_mult" ("n0x" "a" "n0y" "1/b"))
   (("1"
     (lemma "arg_inv" ("n0z" "b"))
     (typepred "arg(a)")
     (case-replace "arg(b)=0")
     (("1" (assert))
      ("2"
       (replace 1)
       (case-replace "arg(b)=pi")
       (("1"
         (assert)
         (replace -4)
         (case-replace "arg(a) > 0")
         (("1" (assert)) ("2" (assert))))
        ("2"
         (assert)
         (replace -3)
         (case-replace "arg(a) - arg(b) > pi")
         (("1" (assert))
          ("2"
           (case-replace "arg(a) - arg(b) <= -pi")
           (("1" (assert)) ("2" (assert))))))))))
    ("2"
     (lemma "real_is_complex" ("x" "1"))
     (lemma "closed_divides" ("z" "1" "n0z" "b"))
     (("1" (propax)) ("2" (propax))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "from_polar")
   (case "NOT (Re(sin(theta) * i * r + r * cos(theta)) = r*cos(theta) AND Im(sin(theta) * i * r + r * cos(theta)) = r*sin(theta))")
   (("1"
     (hide 2)
     (split)
     (("1"
       (rewrite "Re_plus")
       (lemma "Re_imag")
       (inst - "sin(theta)*r")
       (assert)
       (replace -1)
       (assert)
       (hide -1)
       (rewrite "Re_real"))
      ("2"
       (rewrite "Im_plus")
       (assert)
       (lemma "Im_real")
       (inst - "r*cos(theta)")
       (replaces -1)
       (assert)
       (lemma "Im_imag")
       (inst - "sin(theta)*r")
       (assert))))
    ("2"
     (flatten)
     (expand "arg")
     (replace -1)
     (replace -2)
     (lift-if)
     (ground)
     (("1"
       (rewrite "complex_is_0_Re_Im" -1)
       (flatten)
       (replace -3)
       (replace -4)
       (assert)
       (lemma "sin_eq_0")
       (inst - "theta")
       (ground)
       (("1"
         (skosimp*)
         (case "i!1 >=2")
         (("1" (mult-by -1 "pi") (assert))
          ("2"
           (case "i!1 <= -1")
           (("1" (mult-by -1 "pi") (assert))
            ("2"
             (case "i!1 = 1")
             (("1"
               (replaces -1)
               (assert)
               (replace -2)
               (lemma "cos_pi")
               (replaces -1)
               (assert))
              ("2"
               (case "i!1 = 0")
               (("1" (replaces -1) (replaces -2) (assert))
                ("2" (assert))))))))))
        ("2" (mult-by 2 "r") (assert))))
      ("2"
       (expand "atan2")
       (lift-if)
       (ground)
       (("1"
         (lemma "atan_tan")
         (inst - "theta")
         (("1"
           (expand "tan")
           (assert)
           (case "r*sin(theta)/(r*cos(theta)) = atan(theta)")
           (("1" (assert) (replace -1) (propax))
            ("2" (assert) (replace -1) (propax))))
          ("2"
           (assert)
           (hide (2 3))
           (case "NOT (cos(theta)>0 AND sin(theta)<0)")
           (("1"
             (split)
             (("1" (mult-by 1 "r") (assert))
              ("2" (mult-by 1 "r") (assert))))
            ("2"
             (hide (-2 -3))
             (flatten)
             (lemma "cos_le_0")
             (inst - "theta")
             (lemma "sin_ge_0")
             (inst - "theta")
             (assert)
             (lemma "cos_neg")
             (inst - "theta")
             (ground)
             (lemma "cos_le_0")
             (inst - "-theta")
             (ground))))))
        ("2"
         (lemma "cos_eq_0")
         (inst - "theta")
         (assert)
         (ground)
         (("1"
           (skosimp*)
           (lemma "sin_ge_0")
           (inst - "theta")
           (assert)
           (split -)
           (("1" (mult-by -1 "r") (assert))
            ("2"
             (case "NOT sin(theta)<0")
             (("1" (mult-by 1 "r") (assert))
              ("2"
               (case "i!1>=0")
               (("1" (mult-by -1 "pi") (assert))
                ("2"
                 (case "i!1 <= -2")
                 (("1" (mult-by -1 "pi") (assert))
                  ("2"
                   (case "i!1 = -1")
                   (("1" (assert)) ("2" (assert))))))))))))
          ("2" (mult-by 2 "r") (assert))))
        ("3"
         (case "NOT (cos(theta) < 0 AND sin(theta) < 0)")
         (("1"
           (split)
           (("1" (mult-by 1 "r") (assert))
            ("2" (mult-by 1 "r") (assert))))
          ("2"
           (flatten)
           (hide (-3 1 3))
           (lemma "atan_tan")
           (inst - "theta+pi")
           (("1"
             (case "tan(theta+pi) = tan(theta)")
             (("1" (replaces -1) (expand "tan") (replaces -1) (assert))
              ("2"
               (expand "tan" 1)
               (rewrite "sin_plus" 1)
               (rewrite "cos_plus" 1)
               (rewrite "cos_pi")
               (rewrite "sin_pi")
               (assert))
              ("3" (expand "Tan?") (assert))))
            ("2"
             (lemma "cos_ge_0")
             (inst - "theta")
             (assert)
             (lemma "sin_ge_0")
             (inst - "theta")
             (assert))))))))
      ("3"
       (case "NOT sin(theta)>=0")
       (("1" (mult-by 1 "r") (assert))
        ("2"
         (hide 1)
         (case "theta < 0")
         (("1"
           (lemma "sin_lt_0")
           (inst - "theta + 2*pi")
           (assert)
           (rewrite "sin_plus")
           (rewrite "cos_2pi")
           (rewrite "sin_2pi")
           (assert))
          ("2"
           (assert)
           (case "NOT theta>=0")
           (("1" (assert))
            ("2"
             (hide 1)
             (expand "atan2")
             (lift-if)
             (assert)
             (ground)
             (("1"
               (case "NOT cos(theta)>0")
               (("1" (mult-by 1 "r") (assert))
                ("2"
                 (hide -2)
                 (lemma "atan_tan")
                 (inst - "theta")
                 (("1" (expand "tan") (assert) (replaces -1))
                  ("2"
                   (assert)
                   (lemma "cos_le_0")
                   (inst - "theta")
                   (assert))))))
              ("2"
               (lemma "cos_eq_0")
               (inst - "theta")
               (ground)
               (("1"
                 (skosimp*)
                 (case "i!1 = 0")
                 (("1" (assert))
                  ("2"
                   (case "i!1>=1")
                   (("1" (mult-by -1 "pi") (assert))
                    ("2"
                     (assert)
                     (case "i!1<=-1")
                     (("1" (mult-by -1 "pi") (assert))
                      ("2" (assert))))))))
                ("2" (mult-by 2 "r") (assert))))
              ("3"
               (lemma "cos_eq_0")
               (inst?)
               (assert)
               (ground)
               (("1"
                 (skosimp*)
                 (case "i!1 = 0")
                 (("1"
                   (assert)
                   (replaces -1)
                   (assert)
                   (replaces -2)
                   (rewrite "sin_pi2")
                   (assert))
                  ("2"
                   (case "i!1>=1")
                   (("1" (mult-by -1 "pi") (assert))
                    ("2"
                     (case "i!1<=-1")
                     (("1" (mult-by -1 "pi") (assert))
                      ("2" (assert))))))))
                ("2" (mult-by 2 "r") (assert))))
              ("4"
               (case "NOT cos(theta)<0")
               (("1" (mult-by 1 "r") (assert))
                ("2"
                 (hide (1 3))
                 (case "NOT theta > pi/2")
                 (("1" (lemma "cos_ge_0") (inst - "theta") (assert))
                  ("2"
                   (assert)
                   (lemma "atan_tan")
                   (inst - "theta-pi")
                   (expand "tan" -1)
                   (rewrite "sin_minus")
                   (rewrite "cos_minus")
                   (rewrite "sin_pi")
                   (rewrite "cos_pi")
                   (assert)
                   (replace -1)
                   (assert))))))))))))))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "rectangular")
   (expand "from_rectangular")
   (lemma "complex_is_Re_Im" ("z" "z!1"))
   (propax))


proof_type: f_proof
decl_type: formula
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "polar")
   (expand "from_polar")
   (skosimp)
   (lemma "complex_is_ne_0_Re_Im" ("z" "n0z!1"))
   (assert)
   (lemma "unique_characterization"
    ("x0"
     "Re(n0z!1)"
     "y0"
     "Im(n0z!1)"
     "y1"
     "abs(n0z!1) * sin(arg(n0z!1))"
     "x1"
     "abs(n0z!1) * cos(arg(n0z!1))"))
   (lemma "complex_is_Re_Im" ("z" "n0z!1"))
   (replace -1 -2 rl)
   (replace -2 1)
   (hide -2)
   (expand "arg")
   (case-replace
    "IF Im(n0z!1) < 0 THEN cos(atan2(Re(n0z!1), Im(n0z!1)) - 2 * pi)
              ELSE cos(atan2(Re(n0z!1), Im(n0z!1)))
              ENDIF = cos(atan2(Re(n0z!1), Im(n0z!1)))")
   (("1"
     (case-replace
      "IF Im(n0z!1) < 0 THEN sin(atan2(Re(n0z!1), Im(n0z!1)) - 2 * pi)
                  ELSE sin(atan2(Re(n0z!1), Im(n0z!1)))
                  ENDIF = sin(atan2(Re(n0z!1), Im(n0z!1)))")
     (("1"
       (hide -1 -2)
       (lemma "sin_atan2" ("x" "Re(n0z!1)" "y" "Im(n0z!1)"))
       (lemma "cos_atan2" ("x" "Re(n0z!1)" "y" "Im(n0z!1)"))
       (replace -4)
       (case-replace "Re(n0z!1)=0")
       (("1"
         (replace -2)
         (assert)
         (expand "atan2")
         (rewrite "sin_pi2")
         (rewrite "sin_3pi2")
         (expand "abs")
         (expand "conjugate")
         (rewrite -1)
         (assert)
         (name-replace "DRL1" "Im(n0z!1)")
         (replace -2 1)
         (assert)
         (rewrite "sq.sq_rew")
         (rewrite "associative_mult" 1)
         (rewrite "associative_mult" 1)
         (rewrite "associative_mult" 1)
         (rewrite "associative_mult" 1 :dir rl)
         (rewrite "i_axiom")
         (rewrite "commutative_mult" 1)
         (rewrite "associative_mult" 1)
         (case-replace "DRL1>0")
         (("1" (rewrite "sqrt.sqrt_sq"))
          ("2"
           (lemma "sq.sq_neg")
           (inst - "DRL1")
           (replace -1 2 rl)
           (rewrite "sqrt.sqrt_sq")
           (assert))))
        ("2"
         (replace 1)
         (name "DRL1" "Im(n0z!1) / Re(n0z!1)")
         (replace -1)
         (assert)
         (name "X" "Re(n0z!1)")
         (replace -1)
         (name "Y" "Im(n0z!1)")
         (replace -1)
         (case-replace "abs(n0z!1) = sqrt(sq.sq(X)+sq.sq(Y))")
         (("1"
           (case-replace
            "sqrt(1 + sq.sq(DRL1)) = sqrt(sq.sq(X) + sq.sq(Y))/IF X>0 THEN X ELSE -X ENDIF")
           (("1"
             (case-replace "X>0")
             (("1"
               (rewrite "div_div1")
               (rewrite "div_div1")
               (replace -7)
               (replace -8)
               (name-replace "DRL3" "sqrt(sq.sq(X) + sq.sq(Y))")
               (lemma "div_cancel1" ("n0z" "DRL3" "x" "1*X"))
               (lemma "div_cancel1" ("n0z" "DRL3" "x" "DRL1*X"))
               (replace -2)
               (replace -1)
               (replace -8 2 rl)
               (rewrite "div_cancel2"))
              ("2" (assert))))
            ("2"
             (assert)
             (hide -5 -6 3)
             (replace -4 1 rl)
             (rewrite "sq.sq_div")
             (case-replace "X>0")
             (("1"
               (lemma "sqrt.sqrt_sq")
               (inst - "X")
               (split -1)
               (("1"
                 (lemma "sqrt.sqrt_div")
                 (inst - "sq.sq(X) + sq.sq(Y)" "sq.sq(X)")
                 (split -1)
                 (("1" (assert))
                  ("2"
                   (expand "sq")
                   (lemma "posreal_times_posreal_is_posreal"
                    ("px" "X" "py" "X"))
                   (("1" (assert)) ("2" (assert))))))
                ("2" (assert))))
              ("2"
               (assert)
               (lemma "sq.sq_neg")
               (inst - "X")
               (lemma "sqrt.sqrt_sq" ("x" "-X"))
               (split -1)
               (("1"
                 (lemma "sqrt.sqrt_div")
                 (inst - "sq.sq(X)+sq.sq(Y)" "sq.sq(-X)")
                 (split -1)
                 (("1" (assert) (assert))
                  ("2"
                   (expand "sq")
                   (assert)
                   (lemma "posreal_times_posreal_is_posreal"
                    ("px" "-X" "py" "-X"))
                   (assert))))
                ("2" (assert))))))
            ("3" (assert))))
          ("2"
           (hide -4 -5 3)
           (expand "abs")
           (expand "conjugate")
           (replace -1)
           (replace -2)
           (replace -4 1)
           (assert)
           (rewrite "sq.sq_rew")
           (rewrite "sq.sq_rew")
           (rewrite "associative_mult" 1 :dir rl)
           (lemma "i_axiom")
           (replace -1)
           (assert))))))
      ("2"
       (hide-all-but (1 -3))
       (case-replace "Im(n0z!1) < 0")
       (("1"
         (lemma "sin_minus"
          ("a" "atan2(Re(n0z!1), Im(n0z!1))" "b" "2 * pi"))
         (rewrite "sin_2pi")
         (rewrite "cos_2pi")
         (assert))
        ("2" (assert))))))
    ("2"
     (hide 2)
     (case-replace "Im(n0z!1) < 0")
     (("1"
       (lemma "cos_minus"
        ("a" "atan2(Re(n0z!1), Im(n0z!1))" "b" "2 * pi"))
       (rewrite "sin_2pi")
       (rewrite "cos_2pi")
       (assert))
      ("2" (assert))))
    ("3" (split -2) (("1" (assert)) ("2" (assert))))
    ("4" (split -2) (("1" (assert)) ("2" (assert))))
    ("5" (flatten) (assert))))


proof_type: t_proof
decl_type: tcc
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "complex_is_Re_Im" ("z" "z!1"))
   (expand "conjugate")
   (name-replace "R" "Re(z!1)")
   (name-replace "II" "Im(z!1)")
   (replace -1)
   (hide -1)
   (assert)
   (rewrite "sq.sq_rew")
   (rewrite "sq.sq_rew")
   (lemma "i_axiom")
   (rewrite "associative_mult" :dir rl)
   (expand "sq" -1)
   (replace -1)
   (assert))


proof_type: t_proof
decl_type: tcc
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "atan2_ge_0_lt_2pi" ("x" "Re(z!1)" "y" "Im(z!1)"))
   (split -1)
   (("1"
     (flatten)
     (assert)
     (lemma "trichotomy" ("x" "Re(z!1)"))
     (split -1)
     (("1" (lemma "atan2_quad4" ("x" "Re(z!1)" "y" "Im(z!1)")) (assert))
      ("2"
       (lemma "atan2_is_3pi2" ("x" "Re(z!1)" "y" "Im(z!1)"))
       (assert))
      ("3"
       (lemma "atan2_quad3" ("x" "Re(z!1)" "y" "Im(z!1)"))
       (assert))))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "atan2_ge_0_lt_2pi" ("x" "Re(z!1)" "y" "Im(z!1)"))
   (lemma "complex_is_ne_0_Re_Im" ("z" "z!1"))
   (assert)
   (replace -1)
   (propax))


proof_type: t_proof
decl_type: tcc
library: complex
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "atan2_is_0" ("x" "Re(z!1)" "y" "Im(z!1)"))
   (("1"
     (lemma "atan2_is_pi2" ("x" "Re(z!1)" "y" "Im(z!1)"))
     (lemma "atan2_is_pi" ("x" "Re(z!1)" "y" "Im(z!1)"))
     (lemma "atan2_quad1" ("x" "Re(z!1)" "y" "Im(z!1)"))
     (lemma "atan2_quad2" ("x" "Re(z!1)" "y" "Im(z!1)"))
     (assert)
     (case-replace "Im(z!1)=0")
     (("1"
       (assert)
       (lemma "trichotomy" ("x" "Re(z!1)"))
       (split -1)
       (("1" (assert))
        ("2"
         (assert)
         (replace -1)
         (assert)
         (lemma "complex_is_ne_0_Re_Im" ("z" "z!1"))
         (assert))
        ("3" (assert))))
      ("2"
       (assert)
       (lemma "trichotomy" ("x" "Re(z!1)"))
       (split -1)
       (("1" (assert) (flatten) (assert)) ("2" (assert))
        ("3" (assert) (flatten) (assert))))))
    ("2"
     (assert)
     (lemma "complex_is_ne_0_Re_Im" ("z" "z!1"))
     (assert)
     (split -1)
     (("1" (assert)) ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "exp" 1 1)
   (rewrite "Re_real" 1)
   (rewrite "Im_real" 1)
   (rewrite "sin_0")
   (rewrite "cos_0")
   (rewrite "zero_times2")
   (rewrite "zero_times1")
   (rewrite "identity_mult" 1))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "exp")
   (lemma "Re_imag" ("x" "r!1"))
   (lemma "Im_imag" ("x" "r!1"))
   (replace -1)
   (replace -2)
   (rewrite "exp_0")
   (rewrite "identity_mult")
   (lemma "commutative_mult" ("x" "sin(r!1)" "y" "i"))
   (replace -1)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "exp_imag")
   (expand "abs")
   (expand "conjugate")
   (rewrite "Im_plus")
   (("1"
     (rewrite "Re_plus")
     (assert)
     (lemma "Re_imag" ("x" "sin(r!1)"))
     (rewrite "commutative_mult" -1)
     (replace -1)
     (rewrite "Im_real" 1)
     (rewrite "zero_times1")
     (rewrite "zero_times1")
     (rewrite "zero_times1")
     (rewrite "zero_times2")
     (assert)
     (lemma "Im_imag" ("x" "sin(r!1)"))
     (rewrite "commutative_mult" -1)
     (replace -1)
     (rewrite "sq.sq_rew")
     (rewrite "Re_real" 1)
     (rewrite "sq.sq_rew")
     (assert)
     (rewrite "associative_mult" 1 :dir rl)
     (rewrite "i_axiom")
     (assert)
     (rewrite "minus_add")
     (rewrite "number_fields_times_negative" 1)
     (rewrite "number_fields_negate_negate")
     (lemma "sin2_cos2" ("a" "r!1"))
     (assert)
     (replace -1 1)
     (rewrite "sqrt_1"))
    ("2" (rewrite "closed_times") (rewrite "real_is_complex"))
    ("3" (rewrite "real_is_complex"))))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "exp_real")
   (typepred "ln_exp.exp(r!1)")
   (rewrite "arg_is_0" 1)
   (rewrite "Re_real")
   (rewrite "Im_real"))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "exp_imag")
   (typepred "theta!1")
   (expand "arg")
   (rewrite "Im_plus")
   (("1"
     (rewrite "Im_real")
     (rewrite "Re_plus")
     (("1"
       (lemma "Re_imag" ("x" "sin(theta!1)"))
       (assert)
       (lemma "Im_imag" ("x" "sin(theta!1)"))
       (rewrite "commutative_mult")
       (replace -1)
       (replace -2)
       (hide -1 -2)
       (assert)
       (rewrite "Re_real")
       (lift-if)
       (prop)
       (("1"
         (lemma "unique_characterization"
          ("x0" "cos(theta!1)" "x1" "0" "y0" "sin(theta!1)" "y1" "0"))
         (rewrite "zero_times1" -1)
         (rewrite "commutative_mult" -1)
         (replace -2)
         (flatten -1)
         (hide -3)
         (lemma "sin_cos_eq_0" ("a" "theta!1"))
         (assert))
        ("2"
         (case "0<=theta!1")
         (("1" (hide -3 1 2) (lemma "sin_ge_0" ("a" "theta!1")) (assert))
          ("2"
           (lemma "atan2_cos_sin" ("a" "-theta!1"))
           (("1"
             (rewrite "cos_neg")
             (rewrite "sin_neg")
             (expand "atan2")
             (case-replace "cos(theta!1) > 0")
             (("1"
               (assert)
               (lemma "atan_neg")
               (inst - "sin(theta!1) / cos(theta!1)")
               (replace -1 -3)
               (assert))
              ("2"
               (assert)
               (case-replace "cos(theta!1)=0")
               (("1" (assert))
                ("2"
                 (assert)
                 (lemma "atan_neg" ("x" "sin(theta!1) / cos(theta!1)"))
                 (replace -1)
                 (assert))))))
            ("2" (assert))))))
        ("3"
         (case-replace "0<=theta!1")
         (("1" (rewrite "atan2_cos_sin"))
          ("2"
           (hide 3 4)
           (lemma "sin_gt_0" ("a" "-theta!1"))
           (rewrite "sin_neg")
           (assert))))))
      ("2" (rewrite "closed_times") (rewrite "real_is_complex"))
      ("3" (rewrite "real_is_complex"))))
    ("2" (rewrite "closed_times") (rewrite "real_is_complex"))
    ("3" (rewrite "real_is_complex"))))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "exp")
   (rewrite "Re_real")
   (rewrite "Im_real")
   (rewrite "exp_0")
   (rewrite "sin_0")
   (rewrite "cos_0")
   (rewrite "zero_times1")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "exp")
   (expand "e")
   (rewrite "Re_real")
   (rewrite "Im_real")
   (rewrite "sin_0")
   (rewrite "cos_0")
   (rewrite "zero_times2")
   (rewrite "zero_times1")
   (rewrite "identity_mult"))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "exp_imag" ("r" "pi"))
   (rewrite "cos_pi")
   (rewrite "sin_pi")
   (rewrite "zero_times2")
   (assert)
   (rewrite "commutative_mult")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "exp")
   (rewrite "Re_plus")
   (rewrite "Im_plus")
   (rewrite "sin_plus")
   (rewrite "cos_plus")
   (rewrite "exp_sum" 1)
   (assert)
   (name-replace "DRL101"
    "ln_exp.exp(Re(x!1)) * ln_exp.exp(Re(y!1)) * sin(Im(x!1)) * sin(Im(y!1))")
   (rewrite "associative_mult" 1 :dir rl)
   (rewrite "i_axiom")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "exp")
   (rewrite "Re_neg")
   (rewrite "Im_neg")
   (rewrite "sin_neg")
   (rewrite "cos_neg")
   (rewrite "exp_neg")
   (assert)
   (typepred "ln_exp.exp(Re(x!1))")
   (hide -1 -3)
   (name-replace "R" "ln_exp.exp(Re(x!1))")
   (rewrite "div_cancel4" 1)
   (assert)
   (lemma "number_fields_negative_times" ("x" "1" "y" "sin(Im(x!1))"))
   (rewrite "identity_mult")
   (replace -1 * rl)
   (hide -1)
   (assert)
   (assert)
   (rewrite "commutative_mult" 1 :dir rl)
   (rewrite "commutative_mult" 1 :dir rl)
   (assert)
   (rewrite "sq.sq_rew")
   (rewrite "sq.sq_rew")
   (rewrite "associative_mult" 1 :dir rl)
   (rewrite "i_axiom")
   (assert)
   (rewrite "minus_add" 1)
   (rewrite "number_fields_times_negative" 1 :dir rl)
   (assert)
   (rewrite "number_fields_negate_negate" 1)
   (rewrite "commutative_mult" 1 :dir rl)
   (rewrite "identity_mult")
   (lemma "sin2_cos2" ("a" "Im(x!1)"))
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "minus_add")
   (rewrite "exp_plus")
   (rewrite "exp_negate")
   (rewrite "commutative_mult")
   (rewrite "div_def" 1 :dir rl))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "exp")
   (lemma "Re_imag" ("x" "2 * j!1 * pi"))
   (assert)
   (lemma "Im_imag" ("x" "2 * j!1 * pi"))
   (assert)
   (rewrite "Re_plus")
   (rewrite "Im_plus")
   (replace -1)
   (replace -2)
   (assert)
   (lemma "sin_period" ("a" "Im(x!1)" "j" "j!1"))
   (replace -1 1 rl)
   (lemma "cos_period" ("a" "Im(x!1)" "j" "j!1"))
   (replace -1 1 rl)
   (propax))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "exp")
   (lemma "abs_mult"
    ("z1" "ln_exp.exp(Re(z!1))" "z2" "sin(Im(z!1)) * i + cos(Im(z!1))"))
   (("1"
     (typepred "ln_exp.exp(Re(z!1))")
     (expand "abs" -4 2)
     (expand "conjugate")
     (lemma "Im_real" ("x" "ln_exp.exp(Re(z!1))"))
     (replace -1)
     (rewrite "zero_times1")
     (rewrite "zero_times1")
     (lemma "Re_real" ("x" "ln_exp.exp(Re(z!1))"))
     (replace -1)
     (lemma "sq.sq_rew" ("a" "ln_exp.exp(Re(z!1))"))
     (replace -1)
     (rewrite "sqrt_sq")
     (replace -7 1)
     (hide -7 -1)
     (lemma "abs_exp_imag" ("r" "Im(z!1)"))
     (rewrite "exp_imag" -1)
     (rewrite "commutative_mult" -1)
     (replace -1)
     (rewrite "commutative_mult" 1))
    ("2"
     (rewrite "closed_plus")
     (("1" (rewrite "closed_times") (rewrite "real_is_complex"))
      ("2" (rewrite "real_is_complex"))))
    ("3" (rewrite "real_is_complex"))))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "ln")
   (expand "abs")
   (expand "conjugate")
   (expand "arg")
   (rewrite "Re_real")
   (rewrite "Im_real")
   (rewrite "zero_times1")
   (assert)
   (expand "atan2")
   (rewrite "atan_0")
   (rewrite "zero_times1"))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "ln")
   (expand "abs")
   (expand "conjugate")
   (expand "arg")
   (typepred "e")
   (rewrite "Re_real")
   (rewrite "Im_real")
   (assert)
   (expand "atan2")
   (rewrite "atan_0")
   (rewrite "zero_times1"))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "ln" 1)
   (rewrite "abs_exp" 1)
   (rewrite "ln_exp" 1)
   (lemma "exp_plus" ("x" "Re(z!1)" "y" "Im(z!1)*i"))
   (("1"
     (lemma "complex_is_Re_Im" ("z" "z!1"))
     (replace -1 -2 rl)
     (typepred "exp(Re(z!1))")
     (typepred "exp(Im(z!1) * i)")
     (hide -1 -2 -4 -5)
     (lemma "arg_mult"
      ("n0x" "exp(Re(z!1))" "n0y" "exp((Im(z!1)-2*j!1*pi)*i)"))
     (("1"
       (lemma "arg_exp_imag" ("theta" "Im(z!1)-2*j!1*pi"))
       (("1"
         (replace -1)
         (lemma "arg_exp_real" ("r" "Re(z!1)"))
         (replace -1)
         (lemma "exp_periodicity" ("x" "Im(z!1)*i" "j" "(-1)*j!1"))
         (assert)
         (replace -1 * LR)
         (assert)
         (replace -8 -4 rl)
         (replace -4 1)
         (assert))
        ("2" (assert))))
      ("2"
       (assert)
       (rewrite "closed_minus")
       (rewrite "closed_times")
       (("1"
         (rewrite "closed_times")
         (("1" (rewrite "real_is_complex"))
          ("2" (rewrite "closed_times") (rewrite "real_is_complex"))))
        ("2" (rewrite "real_is_complex"))))))
    ("2" (rewrite "closed_times") (rewrite "real_is_complex"))
    ("3" (rewrite "real_is_complex"))))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "n0z!1")
   (expand "ln")
   (rewrite "exp_plus")
   (("1"
     (rewrite "exp_real")
     (lemma "abs_nzcomplex" ("n0z" "n0z!1"))
     (rewrite "exp_ln" 1)
     (rewrite "exp_imag")
     (lemma "idempotent_polar" ("n0z" "n0z!1"))
     (expand "polar")
     (expand "from_polar")
     (assert))
    ("2" (rewrite "closed_times") (rewrite "real_is_complex"))
    ("3" (rewrite "real_is_complex"))))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "ln")
   (rewrite "abs_mult")
   (rewrite "arg_mult")
   (lemma "abs_nz_iff_nz" ("z" "n0x!1"))
   (lemma "abs_nz_iff_nz" ("z" "n0y!1"))
   (assert)
   (rewrite "ln_mult")
   (case-replace "arg(n0x!1) + arg(n0y!1) > pi")
   (("1" (assert))
    ("2"
     (case-replace "arg(n0x!1) + arg(n0y!1) <= -pi")
     (("1" (assert)) ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "ln")
   (rewrite "abs_inv")
   (rewrite "arg_inv")
   (lemma "ln_div")
   (lemma "abs_nz_iff_nz" ("z" "n0x!1"))
   (assert)
   (inst - "1" "abs(n0x!1)")
   (rewrite "ln_exp_ax.ln_1")
   (replace -2)
   (case-replace "arg(n0x!1) = 0")
   (("1" (assert) (rewrite "zero_times1"))
    ("2"
     (assert)
     (case-replace "arg(n0x!1) = pi")
     (("1"
       (case-replace "2 * pi * i - pi * i = i*(2*pi-pi)")
       (("1" (assert) (rewrite "commutative_mult" 2))
        ("2"
         (hide 3)
         (lemma "minus_add" ("x" "2*pi" "y" "pi"))
         (name "DRL1" "2 * pi * i - pi * i")
         (replace -1)
         (replace -2 1)
         (rewrite "distributive" 1)
         (rewrite "minus_add" -1)
         (replace -1 1 rl)
         (rewrite "commutative_mult" 1)
         (assert)
         (rewrite "number_fields_times_negative"))))
      ("2"
       (assert)
       (assert)
       (rewrite "associative_mult" 3)
       (lemma "associative_mult" ("x" "-1" "y" "arg(n0x!1)" "z" "i"))
       (replace -1 3)
       (lemma "both_sides_times1"
        ("x" "-arg(n0x!1)" "n0z" "i" "y" "-1 * arg(n0x!1)"))
       (("1" (assert))
        ("2" (assert) (lemma "i_not_real" ("r" "0")) (assert))))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "div_def" ("y" "n0x!1" "n0x" "n0y!1"))
   (replace -1)
   (lemma "inv_ne_0" ("n0x" "n0y!1"))
   (lemma "ln_inv" ("n0x" "n0y!1"))
   (lemma "ln_mult" ("n0x" "n0x!1" "n0y" "1/n0y!1"))
   (replace -1)
   (replace -2)
   (hide-all-but (1 -3))
   (assert)
   (rewrite "arg_inv")
   (assert)
   (case-replace "arg(n0y!1) = pi")
   (("1"
     (assert)
     (case "arg(n0x!1)>0")
     (("1" (assert))
      ("2"
       (assert)
       (lemma "number_fields_negative_times" ("x" "1" "y" "-2*i*pi"))
       (rewrite "identity_mult" -1)
       (rewrite "number_fields_negative_times" -1 :dir rl)
       (rewrite "number_fields_negate_negate")
       (replace -1 2 rl)
       (assert))))
    ("2"
     (assert)
     (case-replace "arg(n0y!1) = 0")
     (("1" (assert)) ("2" (assert) (assert) (rewrite "minus_add" 3))))))


proof_type: t_proof
decl_type: tcc
library: complex
theory: exp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "exp(Re(z!1))")
   (lemma "both_sides_times1"
    ("n0z" "exp(Re(z!1))" "x" "cos(Im(z!1)) + i * sin(Im(z!1))" "y" "0"))
   (assert)
   (hide-all-but -1)
   (lemma "unique_characterization"
    ("x0" "cos(Im(z!1))" "x1" "0" "y0" "sin(Im(z!1))" "y1" "0"))
   (rewrite "zero_times1" -1)
   (assert)
   (lemma "sin_cos_eq_0" ("a" "Im(z!1)"))
   (flatten -1)
   (hide -2)
   (split -1)
   (("1" (flatten) (assert))
    ("2" (assert) (hide 2) (rewrite "commutative_mult"))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "Arg")
   (apply-extensionality 1 :hide? t)
   (case-replace "abs(n0z!1) * exp(x!1 * i) = n0z!1")
   (("1"
     (rewrite "exp_imag")
     (lemma "idempotent_polar" ("n0z" "n0z!1"))
     (expand "polar")
     (expand "from_polar")
     (assert)
     (name-replace "DRL100" "arg(n0z!1)")
     (lemma "eq_iff_periodic" ("a" "x!1" "b" "DRL100"))
     (replace -1 1 rl)
     (hide -1)
     (lemma "both_sides_times2"
      ("n0z"
       "abs(n0z!1)"
       "x"
       "sin(x!1)*i+cos(x!1)"
       "y"
       "sin(DRL100)*i+cos(DRL100)"))
     (("1"
       (assert)
       (hide -2 -3)
       (lemma "unique_characterization"
        ("x0"
         "cos(x!1)"
         "x1"
         "cos(DRL100)"
         "y0"
         "sin(x!1)"
         "y1"
         "sin(DRL100)"))
       (assert)
       (flatten)
       (assert))
      ("2" (assert) (lemma "abs_nzcomplex" ("n0z" "n0z!1")) (assert))))
    ("2"
     (replace 1 2)
     (assert)
     (skosimp)
     (replace -1)
     (hide -1)
     (lemma "exp_periodicity" ("x" "arg(n0z!1)*i" "j" "j!1"))
     (assert)
     (replace -1 1)
     (hide -1)
     (rewrite "exp_imag")
     (lemma "idempotent_polar" ("n0z" "n0z!1"))
     (expand "polar")
     (expand "from_polar")
     (assert))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "b"))
   (apply-extensionality :hide? t)
   (expand "Arg")
   (rewrite "arg_mult")
   (case-replace "(EXISTS (x: (Arg(a)), y: (Arg(b))): x!1 = x + y)")
   (("1"
     (skosimp*)
     (typepred "x!2")
     (typepred "y!1")
     (expand "Arg")
     (skosimp*)
     (replace -1)
     (replace -2)
     (case-replace "arg(a)+arg(b)>pi")
     (("1" (inst + "j!1+j!2+1") (assert))
      ("2"
       (case-replace "arg(a) + arg(b) <= -pi")
       (("1" (inst + "j!1+j!2-1") (assert))
        ("2" (inst + "j!1+j!2") (assert))))))
    ("2"
     (replace 1 2)
     (assert)
     (skosimp*)
     (case-replace "arg(a) + arg(b) > pi")
     (("1"
       (inst + "arg(a)" "arg(b)+2*(j!1-1)*pi")
       (("1" (assert)) ("2" (expand "Arg") (inst + "j!1-1") (assert))
        ("3" (expand "Arg") (inst + "0") (assert))))
      ("2"
       (case-replace "arg(a) + arg(b) <= -pi")
       (("1"
         (assert)
         (inst + "arg(a)" "arg(b)+2*(j!1+1)*pi")
         (("1" (assert)) ("2" (expand "Arg") (inst + "j!1+1") (assert))
          ("3" (expand "Arg") (inst + "0") (assert))))
        ("2"
         (assert)
         (inst + "arg(a)" "arg(b)+2*j!1*pi")
         (("1" (assert)) ("2" (expand "Arg") (inst + "j!1"))
          ("3" (expand "Arg") (inst + "0") (assert))))))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a"))
   (apply-extensionality :hide? t)
   (expand "Arg")
   (rewrite "arg_inv")
   (case-replace "(EXISTS j: -x!1 = arg(a) + 2 * (j * pi))")
   (("1"
     (skosimp*)
     (case-replace "arg(a)=0")
     (("1" (inst + "-j!1") (assert))
      ("2"
       (case-replace "arg(a) = pi")
       (("1" (inst + "-j!1-1") (assert))
        ("2" (assert) (inst + "-j!1") (assert))))))
    ("2"
     (replace 1 2)
     (assert)
     (skosimp*)
     (case-replace "arg(a) = pi")
     (("1" (assert) (inst + "-j!1-1") (assert))
      ("2"
       (inst + "-j!1")
       (case-replace "arg(a)=0")
       (("1" (assert)) ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("a" "b"))
   (rewrite "div_def")
   (rewrite "Arg_mult")
   (("1"
     (apply-extensionality :hide? t)
     (case-replace "(EXISTS (x: (Arg(a)), y: (Arg(b))): x!1 = x - y)")
     (("1"
       (skosimp*)
       (typepred "x!2")
       (typepred "y!1")
       (inst + "x!2" "-y!1")
       (("1" (rewrite "minus_add")) ("2" (rewrite "Arg_inv") (assert))))
      ("2"
       (replace 1 2)
       (assert)
       (skosimp*)
       (typepred "x!2")
       (typepred "y!1")
       (rewrite "Arg_inv")
       (assert)
       (inst + "x!2" "-y!1")
       (rewrite "minus_add"))))
    ("2" (lemma "real_is_complex" ("x" "1")) (rewrite "closed_divides"))))


proof_type: t_proof
decl_type: tcc
library: complex
theory: complex_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "X!1")
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (skosimp)
   (inst - "-x!1")
   (rewrite "number_fields_negate_negate"))


proof_type: t_proof
decl_type: tcc
library: complex
theory: complex_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "X!1")
   (typepred "Y!1")
   (expand "nonempty?")
   (expand "empty?")
   (skosimp*)
   (expand "member")
   (inst - "x!2+x!1")
   (inst + "x!2" "x!1"))


proof_type: t_proof
decl_type: tcc
library: complex
theory: complex_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "X!1")
   (typepred "Y!1")
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (skosimp*)
   (inst - "x!2-x!1")
   (inst + "x!2" "x!1"))


proof_type: t_proof
decl_type: tcc
library: complex
theory: complex_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "nonempty?")
   (expand "empty?")
   (inst - "arg(n0z!1)")
   (expand "member")
   (inst + "0")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_field
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "fullset")
   (expand "field?")
   (expand "division_ring?")
   (expand "ring_with_one?")
   (expand "ring?")
   (expand "restrict")
   (expand "left_distributive?")
   (expand "right_distributive?")
   (expand "abelian_group?")
   (expand "group?")
   (expand "monoid?")
   (expand "monad?")
   (expand "restrict")
   (expand "groupoid?")
   (expand "commutative?")
   (expand "associative?")
   (expand "semigroup?")
   (expand "restrict")
   (expand "associative?")
   (expand "groupoid?")
   (expand "remove")
   (expand "identity?")
   (expand "member")
   (expand "star_closed?")
   (expand "member")
   (split)
   (("1"
     (expand "inv_exists?")
     (skosimp)
     (inst + "-x!1")
     (assert)
     (assert)
     (lemma "number_fields_negate_is_right_inverse" ("x" "x!1"))
     (assert))
    ("2" (skosimp*) (rewrite "associative_mult"))
    ("3" (skosimp) (rewrite "number_fields_left_identity_mult"))
    ("4" (skosimp) (rewrite "associative_mult"))
    ("5"
     (skosimp)
     (typepred "x!1")
     (typepred "y!1")
     (lemma "nznum_times_nznum_is_nznum" ("nzx" "x!1" "nzy" "y!1"))
     (assert))
    ("6" (skosimp) (rewrite "number_fields_left_identity_mult"))
    ("7" (skosimp) (rewrite "associative_mult"))
    ("8"
     (expand "inv_exists?")
     (skosimp)
     (typepred "x!1")
     (lemma "inv_ne_0" ("n0x" "x!1"))
     (lemma "closed_divides" ("z" "1" "n0z" "x!1"))
     (inst + "1/x!1")
     (("1" (rewrite "div_cancel1") (rewrite "div_cancel2"))
      ("2" (assert))))
    ("9" (skosimp) (rewrite "commutative_mult"))))


proof_type: t_proof
decl_type: tcc
library: complex
theory: complex_field
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "fullset")
   (expand "field?")
   (expand "division_ring?")
   (expand "ring_with_one?")
   (expand "ring?")
   (expand "abelian_group?")
   (expand "left_distributive?")
   (expand "right_distributive?")
   (expand "restrict")
   (expand "commutative?")
   (assert)
   (expand "group?")
   (expand "remove")
   (expand "monoid?")
   (expand "restrict")
   (expand "associative?")
   (expand "monad?")
   (expand "groupoid?")
   (expand "member")
   (expand "restrict")
   (expand "identity?")
   (expand "semigroup?")
   (expand "groupoid?")
   (expand "restrict")
   (expand "associative?")
   (expand "star_closed?")
   (expand "member")
   (split)
   (("1"
     (expand "inv_exists?")
     (skosimp)
     (inst + "-x!1")
     (rewrite "number_fields_negate_is_right_inverse"))
    ("2" (skosimp) (rewrite "associative_mult"))
    ("3" (skosimp) (rewrite "number_fields_left_identity_mult"))
    ("4" (skosimp) (rewrite "associative_mult"))
    ("5"
     (skosimp)
     (typepred "x!1")
     (typepred "y!1")
     (lemma "nznum_times_nznum_is_nznum" ("nzx" "x!1" "nzy" "y!1"))
     (assert))
    ("6" (skosimp) (rewrite "number_fields_left_identity_mult"))
    ("7" (skosimp) (rewrite "associative_mult"))
    ("8"
     (expand "inv_exists?")
     (skosimp)
     (typepred "x!1")
     (lemma "inv_ne_0" ("n0x" "x!1"))
     (inst + "1/x!1")
     (("1" (assert) (rewrite "div_cancel1") (rewrite "div_cancel2"))
      ("2" (assert))))
    ("9" (skosimp) (rewrite "commutative_mult"))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sqrt")
   (expand "abs")
   (expand "conjugate")
   (expand "arg")
   (rewrite "Re_real")
   (rewrite "Im_real")
   (rewrite "zero_times1")
   (rewrite "zero_times1")
   (expand "atan2")
   (assert)
   (rewrite "atan_0")
   (lift-if)
   (expand "from_polar")
   (rewrite "sin_0")
   (rewrite "cos_0")
   (rewrite "zero_times1")
   (rewrite "zero_times1")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sqrt")
   (expand "abs")
   (expand "conjugate")
   (expand "arg")
   (rewrite "Re_real")
   (rewrite "Im_real")
   (rewrite "zero_times1")
   (rewrite "zero_times1")
   (assert)
   (lift-if)
   (assert)
   (expand "from_polar")
   (prop)
   (("1"
     (assert)
     (rewrite "sin_0")
     (rewrite "cos_0")
     (rewrite "zero_times1")
     (rewrite "zero_times1")
     (replace -1)
     (rewrite "sqrt.sqrt_0")
     (rewrite "zero_times2"))
    ("2"
     (assert)
     (expand "atan2")
     (rewrite "atan_0")
     (rewrite "sin_pi2")
     (rewrite "cos_pi2")
     (rewrite "identity_mult")
     (rewrite "zero_times2")
     (lemma "sqrt_sq_neg" ("x" "npx!1"))
     (split -1)
     (("1"
       (expand "sq")
       (replace -1)
       (assert)
       (rewrite "commutative_mult" 2))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "sqrt")
   (expand "abs")
   (expand "arg")
   (expand "conjugate")
   (rewrite "sqrt_0")
   (rewrite "sqrt_0")
   (expand "from_polar")
   (propax))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "sqrt")
   (expand "abs")
   (expand "conjugate")
   (expand "arg")
   (rewrite "Re_real")
   (rewrite "Im_real")
   (rewrite "zero_times1")
   (assert)
   (expand "atan2")
   (rewrite "atan_0")
   (expand "from_polar")
   (rewrite "cos_0")
   (rewrite "sin_0")
   (rewrite "zero_times1")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1"
     (flatten)
     (lemma "sqrt_nz_is_nz" ("n0z" "z!1"))
     (("1" (assert)) ("2" (assert))))
    ("2" (skosimp*) (replace -1) (rewrite "sqrt_0"))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lift-if)
   (expand "sqrt")
   (expand "sq")
   (rewrite "abs_mult")
   (rewrite "sq.sq_rew")
   (rewrite "sqrt_sq")
   (case-replace "z!1=0")
   (("1"
     (expand "arg")
     (assert)
     (expand "abs")
     (expand "conjugate")
     (rewrite "sqrt.sqrt_0")
     (expand "from_polar")
     (propax))
    ("2"
     (lemma "arg_mult" ("n0x" "z!1" "n0y" "z!1"))
     (("1"
       (assert)
       (prop)
       (("1"
         (assert)
         (replace -3)
         (lemma "div_cancel1" ("x" "arg(z!1)" "n0z" "2"))
         (assert)
         (replace -1 1)
         (lemma "idempotent_polar" ("n0z" "z!1"))
         (expand "polar")
         (assert))
        ("2"
         (assert)
         (replace -1)
         (lemma "div_cancel1" ("x" "arg(z!1)+pi" "n0z" "2"))
         (replace -1 2)
         (lemma "minus_nznum_is_nznum" ("nzx" "z!1"))
         (lemma "idempotent_polar" ("n0z" "-z!1"))
         (("1"
           (expand "polar")
           (rewrite "arg_neg")
           (rewrite "abs_neg")
           (assert))
          ("2" (propax))))
        ("3"
         (lemma "minus_nznum_is_nznum" ("nzx" "z!1"))
         (lemma "idempotent_polar" ("n0z" "-z!1"))
         (("1"
           (expand "polar")
           (rewrite "abs_neg")
           (rewrite "arg_neg")
           (assert))
          ("2" (propax))))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sqrt")
   (case-replace "z!1=0")
   (("1"
     (expand "sq")
     (expand "abs")
     (expand "conjugate")
     (expand "arg")
     (rewrite "sqrt.sqrt_0")
     (rewrite "sqrt.sqrt_0")
     (expand "from_polar")
     (propax))
    ("2"
     (assert)
     (lemma "abs_nzcomplex" ("n0z" "z!1"))
     (expand "arg")
     (expand "from_polar")
     (expand "sq")
     (case-replace "Im(z!1) < 0")
     (("1"
       (rewrite "sq.sq_rew" 2)
       (assert)
       (assert)
       (case-replace
        "cos((atan2(Re(z!1), Im(z!1)) - 2 * pi) / 2) *
                       sin((atan2(Re(z!1), Im(z!1)) - 2 * pi) / 2) = sin(atan2(Re(z!1), Im(z!1)) - 2 * pi)/2")
       (("1"
         (hide -1)
         (case-replace
          "sin((atan2(Re(z!1), Im(z!1)) - 2 * pi) / 2) *
                          sin((atan2(Re(z!1), Im(z!1)) - 2 * pi) / 2)= (1-cos(atan2(Re(z!1), Im(z!1)) - 2 * pi))/2")
         (("1"
           (hide -1)
           (lemma "idempotent_polar" ("n0z" "z!1"))
           (expand "polar")
           (expand "from_polar")
           (expand "arg")
           (name-replace "TH" "atan2(Re(z!1), Im(z!1)) - 2 * pi")
           (assert)
           (expand "sq" 2)
           (case-replace "cos(TH / 2) * cos(TH / 2)=(cos(TH)+1)/2")
           (("1"
             (assert)
             (rewrite "sq.sq_rew" 2)
             (rewrite "times_div1" 2)
             (rewrite "times_div2" 2)
             (rewrite "div_cancel1" 2)
             (name-replace "DRL1" "abs(z!1) * sin(TH) * i")
             (rewrite "minus_div2" 2 :dir rl)
             (rewrite "div_distributes" 2 :dir rl)
             (hide -1)
             (lemma "both_sides_times2"
              ("n0z"
               "abs(z!1)"
               "x"
               "cos(TH)"
               "y"
               "(1 / 2 - cos(TH) / 2) * i * i+((1 / 2) + (cos(TH) / 2))"))
             (flatten)
             (hide -1)
             (split -1)
             (("1" (replace -1 -2) (assert))
              ("2"
               (hide 3 -1)
               (assert)
               (lemma "associative_mult" ("y" "i" "z" "i"))
               (inst-cp - "1/2")
               (inst - "cos(TH)/2")
               (lemma "i_axiom")
               (replace -1)
               (replace -2 1 rl)
               (assert))))
            ("2"
             (hide-all-but 1)
             (lemma "cos_2a_cos" ("a" "TH/2"))
             (assert))))
          ("2"
           (hide-all-but 1)
           (name-replace "TH" "atan2(Re(z!1), Im(z!1)) - 2 * pi")
           (lemma "cos_2a_sin" ("a" "TH/2"))
           (assert))))
        ("2"
         (hide-all-but 1)
         (name-replace "TH" "atan2(Re(z!1), Im(z!1)) - 2 * pi")
         (lemma "sin_2a" ("a" "TH/2"))
         (assert))))
      ("2"
       (assert)
       (case-replace
        "cos(atan2(Re(z!1), Im(z!1)) / 2) * sin(atan2(Re(z!1), Im(z!1)) / 2) = sin(atan2(Re(z!1), Im(z!1)))/2")
       (("1"
         (hide -1)
         (case-replace
          "sin(atan2(Re(z!1), Im(z!1)) / 2) * sin(atan2(Re(z!1), Im(z!1)) / 2) = (1-cos(atan2(Re(z!1), Im(z!1))))/2")
         (("1"
           (hide -1)
           (case-replace
            "cos(atan2(Re(z!1), Im(z!1)) / 2) * cos(atan2(Re(z!1), Im(z!1)) / 2) = (cos(atan2(Re(z!1), Im(z!1)))+1)/2")
           (("1"
             (hide -1)
             (assert)
             (rewrite "sq.sq_rew")
             (lemma "complex_is_ne_0_Re_Im" ("z" "z!1"))
             (assert)
             (lemma "sin_atan2" ("x" "Re(z!1)" "y" "Im(z!1)"))
             (lemma "cos_atan2" ("x" "Re(z!1)" "y" "Im(z!1)"))
             (assert)
             (replace -3)
             (case-replace
              "2 * (abs(z!1) * (sin(atan2(Re(z!1), Im(z!1))) / 2) * i) +
                                 abs(z!1) * ((1 - cos(atan2(Re(z!1), Im(z!1)))) / 2) * i * i
                                 + abs(z!1) * ((1 + cos(atan2(Re(z!1), Im(z!1)))) / 2) = abs(z!1)*(sin(atan2(Re(z!1), Im(z!1)))*i + cos(atan2(Re(z!1), Im(z!1))))")
             (("1"
               (hide -1)
               (case-replace "Re(z!1)=0")
               (("1"
                 (replace -2)
                 (assert)
                 (lemma "complex_is_Re_Im" ("z" "z!1"))
                 (replace -2)
                 (assert)
                 (replace -4)
                 (assert)
                 (case-replace "abs(z!1)=Im(z!1)")
                 (("1" (assert))
                  ("2"
                   (expand "abs")
                   (expand "conjugate")
                   (replace -2)
                   (rewrite "zero_times1")
                   (case-replace "0 - Im(z!1) * i * z!1 = sq(Im(z!1))")
                   (("1"
                     (lemma "sqrt.sqrt_sq")
                     (inst - "Im(z!1)")
                     (split -1)
                     (("1" (expand "sq") (propax)) ("2" (assert))))
                    ("2"
                     (expand "sq")
                     (name-replace "IMMM" "Im(z!1)")
                     (replace -1 1)
                     (hide-all-but 1)
                     (rewrite "sq_rew")
                     (rewrite "sq_times")
                     (rewrite "sq_rew")
                     (case-replace "sq(i)=-1")
                     (("1" (assert) (expand "sq") (propax))
                      ("2"
                       (expand "sq")
                       (lemma "i_axiom")
                       (propax))))))))
                ("2"
                 (assert)
                 (lemma "idempotent_polar" ("n0z" "z!1"))
                 (expand "from_polar")
                 (expand "polar")
                 (expand "arg")
                 (assert))))
              ("2"
               (hide-all-but (-4 1))
               (name-replace "ATT" "atan2(Re(z!1), Im(z!1))")
               (name-replace "ABS" "abs(z!1)")
               (name-replace "S" "sin(ATT)")
               (name-replace "COSATT" "cos(ATT)")
               (assert)
               (rewrite "times_div1")
               (rewrite "times_div2")
               (rewrite "div_cancel1")
               (rewrite "minus_div2" 1 :dir rl)
               (rewrite "div_distributes" 1 :dir rl)
               (rewrite "distributive")
               (rewrite "associative_mult" 1 :dir rl)
               (assert)
               (lemma "i_axiom")
               (lemma "associative_mult")
               (inst-cp - "ABS" "i" "i")
               (replace -3)
               (replace -2 1 rl)
               (inst - "(ABS*(COSATT/2))" "i" "i")
               (replace -3)
               (replace -1 * rl)
               (assert))))
            ("2"
             (hide-all-but 1)
             (name-replace "TH" "atan2(Re(z!1), Im(z!1))")
             (lemma "cos_2a_cos" ("a" "TH/2"))
             (assert))))
          ("2"
           (hide-all-but 1)
           (name-replace "TH" "atan2(Re(z!1), Im(z!1))")
           (lemma "cos_2a_sin" ("a" "TH/2"))
           (assert))))
        ("2"
         (hide-all-but 1)
         (name-replace "TH" "atan2(Re(z!1), Im(z!1))")
         (lemma "sin_2a" ("a" "TH/2"))
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case-replace "x!1=0")
   (("1"
     (rewrite "zero_times1")
     (rewrite "sqrt_0")
     (rewrite "zero_times1")
     (lift-if)
     (propax))
    ("2"
     (case-replace "y!1=0")
     (("1"
       (rewrite "zero_times2")
       (rewrite "sqrt_0")
       (rewrite "zero_times2")
       (rewrite "zero_times2")
       (lift-if)
       (propax))
      ("2"
       (lemma "arg_mult" ("n0x" "x!1" "n0y" "y!1"))
       (("1"
         (assert)
         (expand "sqrt")
         (rewrite "abs_mult")
         (rewrite "sqrt_times")
         (name-replace "RX" "sqrt.sqrt(abs(x!1))")
         (name-replace "RY" "sqrt.sqrt(abs(y!1))")
         (name-replace "TX" "arg(x!1)")
         (name-replace "TY" "arg(y!1)")
         (case-replace "TX + TY > pi")
         (("1"
           (assert)
           (replace -2)
           (assert)
           (hide -2)
           (case-replace "(TX - 2 * pi + TY) / 2 = TX/2+TY/2-pi")
           (("1"
             (hide -1)
             (expand "from_polar")
             (rewrite "sin_minus")
             (rewrite "cos_minus")
             (rewrite "cos_pi")
             (rewrite "sin_pi")
             (rewrite "zero_times1")
             (assert)
             (rewrite "cos_plus")
             (rewrite "sin_plus")
             (lemma "number_fields_negative_times"
              ("x" "1" "y" "sin(TX / 2) * RX * i + RX * cos(TX / 2)"))
             (rewrite "identity_mult" -1)
             (replace -1 3 rl)
             (hide -1)
             (assert)
             (name-replace "DRL1" "sin(TX / 2) * sin(TY / 2) * RX * RY")
             (rewrite "associative_mult" 3 :dir rl)
             (rewrite "i_axiom")
             (assert))
            ("2" (assert))))
          ("2"
           (case-replace "TX + TY <= -pi")
           (("1"
             (assert)
             (replace -2)
             (hide -2)
             (case-replace "(TX + TY + 2 * pi) / 2 = TX/2+TY/2+pi")
             (("1"
               (hide -1)
               (expand "from_polar")
               (rewrite "sin_plus")
               (rewrite "sin_plus")
               (rewrite "cos_plus")
               (rewrite "cos_plus")
               (rewrite "cos_pi")
               (rewrite "sin_pi")
               (rewrite "zero_times2")
               (assert)
               (rewrite "cos_plus")
               (lemma "number_fields_negative_times"
                ("x" "1" "y" "sin(TX / 2) * RX * i + RX * cos(TX / 2)"))
               (rewrite "identity_mult" -1)
               (replace -1 4 rl)
               (assert)
               (name-replace "DRL1"
                "sin(TX / 2) * sin(TY / 2) * RX * RY")
               (rewrite "associative_mult" 4 :dir rl)
               (rewrite "i_axiom")
               (assert))
              ("2" (assert))))
            ("2"
             (assert)
             (replace -1)
             (hide -1)
             (assert)
             (rewrite "div_distributes" 5 :dir rl)
             (expand "from_polar")
             (rewrite "sin_plus")
             (rewrite "cos_plus")
             (assert)
             (name-replace "DRL101"
              "sin((TX / 2)) * sin((TY / 2)) * RX * RY")
             (rewrite "associative_mult" 5 :dir rl)
             (rewrite "i_axiom")
             (assert))))))
        ("2" (assert)) ("3" (assert))))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "sqrt_times" ("x" "-1" "y" "z!1"))
   (("1"
     (rewrite "sqrt_neg1")
     (rewrite "number_fields_negative_times" -1)
     (rewrite "identity_mult" -1)
     (expand "arg" -1 1)
     (expand "arg" -1 2)
     (rewrite "Re_real")
     (rewrite "Im_real")
     (assert)
     (expand "atan2")
     (rewrite "atan_0")
     (assert)
     (assert)
     (case-replace "arg(z!1) <= 0")
     (("1" (assert)) ("2" (assert))))
    ("2" (rewrite "real_is_complex"))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sqrt")
   (rewrite "abs_inv")
   (lemma "sqrt_div" ("nny" "1" "nnz" "abs(n0z!1)"))
   (lemma "abs_nzcomplex" ("n0z" "n0z!1"))
   (assert)
   (replace -2)
   (lemma "sqrt_pos" ("px" "abs(n0z!1)"))
   (name-replace "R" "sqrt.sqrt(abs(n0z!1))")
   (hide -2 -3)
   (lemma "arg_inv" ("n0z" "n0z!1"))
   (expand "from_polar")
   (replace -1 1)
   (hide -1)
   (case-replace "arg(n0z!1) = 0")
   (("1"
     (rewrite "sin_0")
     (rewrite "cos_0")
     (rewrite "zero_times1")
     (rewrite "zero_times1")
     (assert))
    ("2"
     (case-replace "arg(n0z!1) = pi")
     (("1"
       (assert)
       (rewrite "sin_pi2")
       (rewrite "cos_pi2")
       (rewrite "identity_mult")
       (rewrite "identity_mult")
       (rewrite "zero_times2")
       (assert)
       (rewrite "div_cancel4" 2)
       (rewrite "associative_mult" 2 :dir rl)
       (rewrite "associative_mult" 2 :dir rl)
       (rewrite "associative_mult" 2 :dir rl)
       (rewrite "i_axiom")
       (rewrite "associative_mult")
       (rewrite "div_cancel2")
       (postpone))
      ("2"
       (assert)
       (lemma "sin_neg" ("a" "arg(n0z!1) / 2"))
       (replace -1)
       (lemma "cos_neg" ("a" "arg(n0z!1) / 2"))
       (replace -1)
       (hide -1 -2)
       (name-replace "TH" "arg(n0z!1) / 2")
       (rewrite "div_cancel4" 3)
       (lemma "number_fields_negative_times" ("x" "1" "y" "sin(TH)"))
       (rewrite "identity_mult")
       (replace -1 * rl)
       (hide -1)
       (assert)
       (rewrite "sq.sq_rew")
       (rewrite "sq.sq_rew")
       (rewrite "associative_mult" 3 :dir rl)
       (rewrite "i_axiom")
       (assert)
       (lemma "sin2_cos2" ("a" "TH"))
       (assert))))))


proof_type: f_proof
decl_type: formula
library: complex
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "div_def" 1)
   (rewrite "sqrt_times")
   (("1"
     (rewrite "sqrt_inv")
     (rewrite "arg_inv")
     (case-replace "arg(n0y!1)=pi")
     (("1"
       (assert)
       (case-replace "arg(x!1)>0")
       (("1" (assert) (rewrite "times_div1" 1) (rewrite "neg_times_neg"))
        ("2"
         (assert)
         (rewrite "times_div1" 2)
         (assert)
         (rewrite "commutative_mult" 2)
         (rewrite "number_fields_negative_times" 2)
         (rewrite "identity_mult"))))
      ("2"
       (assert)
       (case-replace "arg(n0y!1)=0")
       (("1" (assert) (rewrite "div_def" 2 :dir rl))
        ("2"
         (assert)
         (case-replace "arg(x!1) - arg(n0y!1) <= -pi")
         (("1" (assert) (rewrite "times_div1" 3))
          ("2"
           (assert)
           (assert)
           (rewrite "minus_add" 4 :dir rl)
           (assert)
           (lift-if 4)
           (rewrite "times_div1" 4)
           (rewrite "times_div1" 4)
           (prop))))))))
    ("2" (lemma "real_is_complex" ("x" "1")) (rewrite "closed_divides"))))


proof_type: j_proof
decl_type: tcc
library: complex
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sqrt")
   (expand "from_polar")
   (lemma "unique_characterization"
    ("y0"
     "sin(arg(n0z!1) / 2) * sqrt.sqrt(abs(n0z!1))"
     "x0"
     "sqrt.sqrt(abs(n0z!1)) * cos(arg(n0z!1) / 2)"
     "x1"
     "0"
     "y1"
     "0"))
   (rewrite "zero_times1")
   (replace -1 -2)
   (flatten)
   (hide -1 -2)
   (lemma "abs_nzcomplex" ("n0z" "n0z!1"))
   (lemma "sqrt_pos" ("px" "abs(n0z!1)"))
   (("1"
     (name-replace "R" "sqrt.sqrt(abs(n0z!1))")
     (rewrite "zero_times3" -3)
     (assert)
     (rewrite "cos_eq_0" -3)
     (skosimp)
     (replace -3)
     (hide -3)
     (rewrite "sin_k_pi2")
     (assert))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1" (flatten) (grind))
    ("2" (flatten) (decompose-equality) (("1" (grind)) ("2" (grind))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "complex_div_def" + :dir rl)
   (assert)
   (lemma "nz_sq_abs_pos" ("n0z" "n0z!1"))
   (assert)
   (lemma "div_cancel3"
    ("x"
     " -1 * (Im(n0z!1) * Im(z!1) * ((1 * Re(n0z!1)))) -
            Im(n0z!1) * Re(z!1) * (((-1) * Im(n0z!1)))
            - Im(z!1) * Re(n0z!1) * (((-1) * Im(n0z!1)))
            + Re(n0z!1) * Re(z!1) * ((1 * Re(n0z!1)))"
     "n0z"
     "sq_abs(n0z!1)"
     "y"
     "Re(z!1)"))
   (replace -1 1)
   (lemma "div_cancel3"
    ("x"
     "Im(n0z!1) * Re(z!1) * ((1 * Re(n0z!1))) -
             Im(n0z!1) * Im(z!1) * (((-1) * Im(n0z!1)))
             + Im(z!1) * Re(n0z!1) * ((1 * Re(n0z!1)))
             + Re(n0z!1) * Re(z!1) * (((-1) * Im(n0z!1)))"
     "n0z"
     "sq_abs(n0z!1)"
     "y"
     "Im(z!1)"))
   (replace -1)
   (hide -1 -2 -3)
   (expand "sq_abs")
   (expand "sq")
   (propax))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "complex_commutative_mult" ("z1" "z!1 / n0z!1" "z2" "n0z!1"))
   (use "complex_div_cancel1")
   (assert)
   (flatten)
   (assert)
   (name-replace "DRL1"
    "(Im(z!1) * Im(n0z!1) + Re(z!1) * Re(n0z!1)) / sq_abs(n0z!1) *
           Re(n0z!1)")
   (name-replace "DRL2"
    "Im(n0z!1) *
            ((Im(z!1) * Re(n0z!1) - Re(z!1) * Im(n0z!1)) / sq_abs(n0z!1))")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1"
     (flatten)
     (assert)
     (flatten)
     (replace -1 1 rl)
     (replace -2 1 rl)
     (hide -1 -2)
     (assert)
     (lemma "div_cancel3"
      ("y"
       "Re(z1!1)"
       "n0z"
       "sq_abs(n0z!1)"
       "x"
       "(Im(z1!1) * Im(n0z!1) + Re(z1!1) * Re(n0z!1))*Re(n0z!1)-(Im(z1!1) * Re(n0z!1) - Re(z1!1) * Im(n0z!1))*Im(n0z!1)"))
     (name-replace "DRL4"
      "((Im(z1!1) * Im(n0z!1) + Re(z1!1) * Re(n0z!1)) * Re(n0z!1) -
              (Im(z1!1) * Re(n0z!1) - Re(z1!1) * Im(n0z!1)) * Im(n0z!1))
             / sq_abs(n0z!1)")
     (lemma "div_cancel3"
      ("y"
       "Im(z1!1)"
       "n0z"
       "sq_abs(n0z!1)"
       "x"
       "(Im(z1!1) * Re(n0z!1) - Re(z1!1) * Im(n0z!1))*Re(n0z!1)+(Im(z1!1) * Im(n0z!1) + Re(z1!1) * Re(n0z!1))*Im(n0z!1)"))
     (name-replace "DRL5"
      "((Im(z1!1) * Re(n0z!1) - Re(z1!1) * Im(n0z!1)) * Re(n0z!1) +
              (Im(z1!1) * Im(n0z!1) + Re(z1!1) * Re(n0z!1)) * Im(n0z!1))
             / sq_abs(n0z!1)")
     (expand "sq_abs")
     (expand "sq")
     (assert))
    ("2"
     (flatten)
     (assert)
     (flatten)
     (replace -1)
     (replace -2)
     (hide -1 -2)
     (assert)
     (lemma "div_cancel1" ("n0z" "sq_abs(n0z!1)" "x" "Re(z2!1)"))
     (lemma "div_cancel1" ("n0z" "sq_abs(n0z!1)" "x" "Im(z2!1)"))
     (expand "sq_abs" -1 1)
     (expand "sq_abs" -2 1)
     (expand "sq")
     (replace -1)
     (replace -2)
     (propax))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "complex_div_cancel3" ("z1" "z1!1" "z2" "z2!1" "n0z" "n0z!1"))
   (split)
   (("1"
     (flatten)
     (hide -3)
     (split -2)
     (("1" (assert) (flatten) (assert))
      ("2" (hide 2) (assert) (flatten) (assert))))
    ("2"
     (flatten)
     (hide -2)
     (split)
     (("1" (assert) (flatten) (assert))
      ("2" (hide 2) (assert) (flatten) (assert))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (case-replace "Re(z1!1)=0")
   (("1"
     (assert)
     (case-replace "Im(z1!1) = 0")
     (("1" (assert))
      ("2"
       (assert)
       (split)
       (("1"
         (flatten)
         (rewrite "zero_times3")
         (rewrite "zero_times3")
         (assert)
         (rewrite "zero_times3"))
        ("2" (flatten) (assert))))))
    ("2"
     (assert)
     (case-replace "Re(z2!1) = 0")
     (("1"
       (assert)
       (split)
       (("1"
         (flatten)
         (rewrite "zero_times3")
         (rewrite "zero_times3")
         (assert))
        ("2" (flatten) (assert))))
      ("2"
       (assert)
       (flatten)
       (case-replace "Im(z2!1) = 0")
       (("1" (assert))
        ("2"
         (assert)
         (case-replace "Im(z1!1)=0")
         (("1" (assert))
          ("2"
           (case "Re(z1!1)=(Im(z1!1) * Im(z2!1))/Re(z2!1)")
           (("1"
             (hide -2)
             (case "Im(z1!1)= -(Re(z1!1) * Im(z2!1))/Re(z2!1)")
             (("1"
               (hide -3)
               (lemma "trichotomy" ("x" "Re(z2!1)"))
               (lemma "trichotomy" ("x" "Im(z2!1)"))
               (lemma "trichotomy" ("x" "Im(z1!1)"))
               (split)
               (("1"
                 (split)
                 (("1"
                   (split)
                   (("1"
                     (assert)
                     (lemma "both_sides_times_pos_lt1"
                      ("pz" "Im(z2!1)" "x" "0" "y" "Im(z1!1)"))
                     (assert)
                     (lemma "both_sides_div_pos_lt1"
                      ("pz" "Re(z2!1)" "x" "0" "y" "Im(z2!1)*Im(z1!1)"))
                     (assert)
                     (lemma "both_sides_times_pos_lt1"
                      ("pz" "Im(z2!1)" "x" "0" "y" "Re(z1!1)"))
                     (assert)
                     (lemma "both_sides_div_pos_lt1"
                      ("pz" "Re(z2!1)" "y" "0" "x" "-Im(z2!1)*Re(z1!1)"))
                     (assert)
                     (replace -9 -3 rl)
                     (replace -8 -1 rl)
                     (assert))
                    ("2" (propax))
                    ("3"
                     (lemma "both_sides_times_pos_lt1"
                      ("pz" "Im(z2!1)" "x" "0" "y" "Im(z1!1)"))
                     (("1"
                       (assert)
                       (rewrite "zero_times1")
                       (lemma "both_sides_div_neg_lt1"
                        ("nz"
                         "Re(z2!1)"
                         "y"
                         "0"
                         "x"
                         "Im(z1!1) * Im(z2!1)"))
                       (assert)
                       (replace -7 -1 rl)
                       (lemma "both_sides_div_neg_lt1"
                        ("nz"
                         "Re(z2!1)"
                         "x"
                         "-(Re(z1!1) * Im(z2!1))"
                         "y"
                         "0"))
                       (lemma "both_sides_times_pos_lt1"
                        ("pz" "Im(z2!1)" "x" "0" "y" "-Re(z1!1)"))
                       (assert)
                       (replace -8 -2 rl)
                       (assert))
                      ("2" (assert))))))
                  ("2" (propax))
                  ("3"
                   (lemma "both_sides_times_pos_lt1"
                    ("pz" "Im(z1!1)" "y" "0" "x" "Im(z2!1)"))
                   (("1"
                     (assert)
                     (rewrite "zero_times1")
                     (split)
                     (("1"
                       (lemma "both_sides_div_pos_lt1"
                        ("pz"
                         "Re(z2!1)"
                         "x"
                         "Im(z2!1) * Im(z1!1)"
                         "y"
                         "0"))
                       (("1"
                         (assert)
                         (replace -7 -1 rl)
                         (lemma "negreal_times_negreal_is_posreal"
                          ("nx" "Re(z1!1)" "ny" "Im(z2!1)"))
                         (lemma "both_sides_div_pos_lt1"
                          ("pz"
                           "Re(z2!1)"
                           "x"
                           "-(Re(z1!1) * Im(z2!1))"
                           "y"
                           "0"))
                         (assert)
                         (replace -8 -1 rl)
                         (assert))
                        ("2" (assert))))
                      ("2"
                       (lemma "both_sides_div_neg_lt1"
                        ("nz"
                         "Re(z2!1)"
                         "x"
                         "0"
                         "y"
                         "Im(z2!1) * Im(z1!1)"))
                       (("1"
                         (assert)
                         (replace -7 -1 rl)
                         (lemma "negreal_times_negreal_is_posreal"
                          ("nx" "-Re(z1!1)" "ny" "Im(z2!1)"))
                         (lemma "both_sides_div_neg_lt1"
                          ("nz"
                           "Re(z2!1)"
                           "x"
                           "-Re(z1!1) * Im(z2!1)"
                           "y"
                           "0"))
                         (assert)
                         (replace -8 -1 rl)
                         (assert))
                        ("2" (assert))))))
                    ("2" (assert))))))
                ("2" (propax))
                ("3"
                 (split)
                 (("1"
                   (lemma "both_sides_times_pos_lt1"
                    ("pz" "Im(z2!1)" "x" "Im(z1!1)" "y" "0"))
                   (("1"
                     (assert)
                     (split)
                     (("1"
                       (lemma "both_sides_div_pos_lt1"
                        ("pz"
                         "Re(z2!1)"
                         "x"
                         "Im(z1!1) * Im(z2!1)"
                         "y"
                         "0"))
                       (("1"
                         (assert)
                         (replace -7 -1 rl)
                         (lemma "both_sides_times_pos_lt1"
                          ("pz" "Im(z2!1)" "x" "0" "y" "-Re(z1!1)"))
                         (assert)
                         (lemma "posreal_div_posreal_is_posreal"
                          ("px" "-Re(z1!1)*Im(z2!1)" "py" "Re(z2!1)"))
                         (replace -8 -1 rl)
                         (assert))
                        ("2" (assert))))
                      ("2"
                       (lemma "negreal_div_negreal_is_posreal"
                        ("nx" "Im(z1!1)*Im(z2!1)" "ny" "Re(z2!1)"))
                       (("1"
                         (replace -7 -1 rl)
                         (lemma "both_sides_times_pos_lt1"
                          ("pz" "Re(z1!1)" "x" "-Im(z2!1)" "y" "0"))
                         (("1"
                           (assert)
                           (lemma "negreal_div_negreal_is_posreal"
                            ("nx" "-Im(z2!1)*Re(z1!1)" "ny" "Re(z2!1)"))
                           (replace -8 -1 rl)
                           (assert))
                          ("2" (assert))))
                        ("2" (assert))))))
                    ("2" (assert))))
                  ("2" (propax))
                  ("3"
                   (lemma "negreal_times_negreal_is_posreal"
                    ("nx" "Im(z1!1)" "ny" "Im(z2!1)"))
                   (("1"
                     (split)
                     (("1"
                       (lemma "both_sides_div_pos_lt1"
                        ("pz"
                         "Re(z2!1)"
                         "x"
                         "0"
                         "y"
                         "Im(z1!1) * Im(z2!1)"))
                       (("1"
                         (assert)
                         (replace -7 -1 rl)
                         (lemma "negreal_times_negreal_is_posreal"
                          ("nx" "-Re(z1!1)" "ny" "Im(z2!1)"))
                         (lemma "posreal_div_posreal_is_posreal"
                          ("px" "-Re(z1!1)*Im(z2!1)" "py" "Re(z2!1)"))
                         (("1" (replace -8 -1 rl) (assert))
                          ("2" (assert))))
                        ("2" (assert))))
                      ("2" (propax))
                      ("3"
                       (lemma "both_sides_div_neg_lt1"
                        ("nz"
                         "Re(z2!1)"
                         "x"
                         "Im(z1!1) * Im(z2!1)"
                         "y"
                         "0"))
                       (("1"
                         (assert)
                         (replace -7 -1 rl)
                         (lemma "negreal_times_negreal_is_posreal"
                          ("nx" "Re(z1!1)" "ny" "Im(z2!1)"))
                         (lemma "negreal_div_negreal_is_posreal"
                          ("nx" "-Re(z1!1)*Im(z2!1)" "ny" "Re(z2!1)"))
                         (("1" (replace -8 -1 rl) (assert))
                          ("2" (assert))))
                        ("2" (assert))))))
                    ("2" (assert)) ("3" (assert))))))))
              ("2" (assert))))
            ("2" (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "complex_div_cancel4"
    ("z2" "sq(z!1 / n0z!1)" "z1" "sq(z!1)" "n0z" "sq(n0z!1)"))
   (replace -1)
   (hide -1)
   (lemma "complex_sq_times" ("z1" "z!1 / n0z!1" "z2" "n0z!1"))
   (lemma "complex_div_cancel2" ("z" "z!1" "n0z" "n0z!1"))
   (name-replace "DRL1" "sq(z!1 / n0z!1) * sq(n0z!1)")
   (name-replace "DRL2" "(z!1 / n0z!1) * n0z!1")
   (expand "sq")
   (assert)
   (flatten)
   (assert))


proof_type: j_proof
decl_type: tcc
library: complex_alt
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sq_abs")
   (lemma "sq_plus_eq_0" ("a" "Im(n0z!1)" "b" "Re(n0z!1)"))
   (typepred "n0z!1")
   (split)
   (("1" (assert)) ("2" (assert))))


proof_type: j_proof
decl_type: tcc
library: complex_alt
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "n0z1!1")
   (typepred "n0z2!1")
   (assert)
   (lemma "zero_times" ("z1" "n0z1!1" "z2" "n0z2!1"))
   (assert)
   (split)
   (("1" (flatten) (assert)) ("2" (flatten) (assert))))


proof_type: j_proof
decl_type: tcc
library: complex_alt
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "n0z1!1")
   (typepred "n0z2!1")
   (assert)
   (lemma "mul_nzcomplex1" ("n0z1" "n0z1!1" "n0z2" "conjugate(n0z2!1)"))
   (("1" (assert)) ("2" (assert) (flatten) (assert))))


proof_type: j_proof
decl_type: tcc
library: complex_alt
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "n0x!1")
   (typepred "n0z!1")
   (assert)
   (split)
   (("1"
     (assert)
     (lemma "nzreal_times_nzreal_is_nzreal"
      ("nzx" "n0x!1" "nzy" "Re(n0z!1)"))
     (typepred "sq_abs(n0z!1)")
     (lemma "trichotomy" ("x" "n0x!1 * Re(n0z!1)"))
     (split)
     (("1" (assert)) ("2" (assert)) ("3" (assert))))
    ("2"
     (lemma "nzreal_times_nzreal_is_nzreal"
      ("nzx" "n0x!1" "nzy" "Im(n0z!1)"))
     (("1" (assert)) ("2" (propax))))))


proof_type: t_proof
decl_type: tcc
library: complex_alt
theory: complex_types
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sq")
   (lemma "mul_nzcomplex1" ("n0z1" "n0z!1" "n0z2" "n0z!1"))
   (split)
   (("1" (assert)) ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1"
     (flatten)
     (rewrite "abs_def")
     (expand "Re" -2 2)
     (expand "Im" -3 2)
     (replace -2)
     (replace -3)
     (hide -2 -3)
     (grind))
    ("2"
     (flatten)
     (typepred "abs(z!1)")
     (expand ">=")
     (expand "<=")
     (split)
     (("1" (assert))
      ("2"
       (rewrite "abs_def")
       (hide 2)
       (lemma "sqrt_eq_0" ("nnx" "sq(Im(z!1)) + sq(Re(z!1))"))
       (split)
       (("1"
         (expand "Re" 1 2)
         (expand "Im" 1 2)
         (hide -2)
         (rewrite "sq_plus_eq_0")
         (flatten)
         (assert))
        ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "abs_def")
   (rewrite "abs_def")
   (rewrite "abs_def")
   (rewrite "sqrt_times" 1 :dir rl)
   (rewrite "sqrt_eq")
   (grind))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "abs_def")
   (rewrite "abs_def")
   (rewrite "sqrt_lem")
   (("1"
     (rewrite "sq_rew")
     (rewrite "sq_div")
     (("1"
       (rewrite "div_cancel3")
       (expand "c_div")
       (expand "c_div")
       (expand "Im")
       (expand "Re")
       (expand "sq_abs")
       (typepred "n0z!1")
       (expand "Im")
       (expand "Re")
       (rewrite "sq_rew")
       (rewrite "sq_rew")
       (rewrite "sq_div")
       (("1"
         (rewrite "sq_div")
         (("1"
           (rewrite "sq_times")
           (rewrite "sq_times")
           (assert)
           (rewrite "sq_neg")
           (assert)
           (name "DRL" "sq(sq(x(n0z!1)) + sq(y(n0z!1)))")
           (replace -1)
           (assert)
           (name-replace "XX" "sq(x(n0z!1))")
           (name-replace "YY" "sq(y(n0z!1))")
           (hide -2)
           (expand "sq")
           (assert))
          ("2"
           (expand "/=")
           (rewrite "sq_plus_eq_0")
           (flatten)
           (assert))))
        ("2"
         (expand "/=")
         (hide 1)
         (rewrite "sq_plus_eq_0")
         (flatten)
         (assert))))
      ("2"
       (expand "/=")
       (hide 1)
       (lemma "sqrt_eq_0" ("nnx" "sq(Im(n0z!1)) + sq(Re(n0z!1))"))
       (split)
       (("1"
         (hide -2)
         (rewrite "sq_plus_eq_0")
         (flatten)
         (typepred "n0z!1")
         (split)
         (("1" (assert)) ("2" (assert))))
        ("2" (propax))))))
    ("2"
     (hide 2)
     (lemma "posreal_div_posreal_is_posreal"
      ("px" "1" "py" "sqrt(sq(Im(n0z!1)) + sq(Re(n0z!1)))"))
     (("1" (assert))
      ("2"
       (hide 2)
       (rewrite "sqrt_pos")
       (hide 2)
       (typepred "n0z!1")
       (split)
       (("1" (assert) (lemma "sq_nz_pos" ("nz" "Re(n0z!1)")) (assert))
        ("2"
         (lemma "sq_nz_pos" ("nz" "Im(n0z!1)"))
         (("1" (assert)) ("2" (propax))))))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "abs_inv" ("n0z" "n0z!1"))
   (lemma "abs_mult" ("z1" "z!1" "z2" "1/n0z!1"))
   (replace -2)
   (hide -2)
   (replace -1 1 rl)
   (hide -1)
   (expand "abs")
   (rewrite "sqrt_eq")
   (expand "sq_abs")
   (expand "sq")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "abs")
   (rewrite "sq_le" 1 :dir rl)
   (assert)
   (rewrite "sq_plus")
   (rewrite "sqrt_times" 1 :dir rl)
   (expand "sq_abs")
   (assert)
   (rewrite "sq_plus")
   (rewrite "sq_plus")
   (assert)
   (case "Im(z1!1) * Im(z2!1)+Re(z1!1) * Re(z2!1) <=sqrt(sq(Im(z1!1)) * sq(Im(z2!1)) + sq(Im(z1!1)) * sq(Re(z2!1)) +
                        (sq(Im(z2!1)) * sq(Re(z1!1)) + sq(Re(z1!1)) * sq(Re(z2!1))))")
   (("1" (assert))
    ("2"
     (hide 2)
     (rewrite "sq_times" 1 :dir rl)
     (rewrite "sq_times" 1 :dir rl)
     (rewrite "sq_times" 1 :dir rl)
     (rewrite "sq_times" 1 :dir rl)
     (rewrite "sq_le" 1 :dir rl)
     (rewrite "sq_plus")
     (assert)
     (case "2*(Im(z1!1) * Im(z2!1) * Re(z1!1) * Re(z2!1)) <= sq(Im(z1!1) * Re(z2!1)) +
                   sq(Im(z2!1) * Re(z1!1))")
     (("1" (assert))
      ("2"
       (hide 2)
       (lemma "sq_minus"
        ("a" "Im(z1!1) * Re(z2!1)" "b" "Im(z2!1) * Re(z1!1)"))
       (assert))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "abs_def")
   (rewrite "abs_def")
   (rewrite "sq_eq" 1 :dir rl)
   (assert)
   (rewrite "sq_div")
   (rewrite "sq_div")
   (rewrite "sq_div")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "abs_def")
   (rewrite "abs_def")
   (rewrite "sq_eq" 1 :dir rl)
   (("1"
     (assert)
     (rewrite "sq_div")
     (rewrite "sq_div")
     (typepred "sq_abs(n0z!1)")
     (name "SQ" "sq_abs(n0z!1)")
     (expand "sq_abs")
     (replace -1)
     (rewrite "sq_times")
     (rewrite "sq_times")
     (rewrite "sq_neg")
     (lemma "sqrt_pos" ("px" "SQ"))
     (rewrite "sq_div" 1)
     (assert)
     (case-replace "(sq(x!1) * SQ)/sq(SQ) = sq(x!1) / SQ")
     (("1" (expand "SQ" -1 1) (assert) (expand "sq_abs") (assert))
      ("2" (assert) (hide 2) (expand "sq") (assert))))
    ("2"
     (hide 2)
     (typepred "sq_abs(n0z!1)")
     (assert)
     (expand "sq_abs")
     (lemma "sqrt_pos" ("px" "sq(Im(n0z!1)) + sq(Re(n0z!1))"))
     (("1"
       (lemma "both_sides_div_pos_le1"
        ("pz"
         "sqrt(sq(Im(n0z!1)) + sq(Re(n0z!1)))"
         "x"
         "0"
         "y"
         "abs(x!1)"))
       (("1" (assert)) ("2" (propax))))
      ("2" (propax))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "arg")
   (expand "Re" 1 2)
   (expand "Im" 1 2)
   (lemma "atan2_0_2pi" ("x" "Re(n0z!1)" "y" "Im(n0z!1)"))
   (case-replace "Im(n0z!1) =0")
   (("1"
     (assert)
     (typepred "n0z!1")
     (assert)
     (flatten)
     (case-replace "Re(n0z!1) >= 0")
     (("1"
       (flatten)
       (assert)
       (expand "atan2")
       (rewrite "atan_0")
       (expand "Re")
       (expand "Im")
       (assert))
      ("2"
       (assert)
       (flatten)
       (hide -2)
       (expand "atan2")
       (rewrite "atan_0")
       (assert)
       (expand "Im")
       (expand "Re")
       (assert))))
    ("2"
     (assert)
     (case-replace "Im(n0z!1) < 0")
     (("1"
       (flatten)
       (case-replace "Re(n0z!1) >= 0")
       (("1" (flatten) (assert) (expand "Im") (expand "Re") (assert))
        ("2"
         (assert)
         (expand "Re")
         (expand "Im")
         (assert)
         (flatten)
         (assert))))
      ("2"
       (assert)
       (flatten)
       (case-replace "Re(n0z!1) >= 0")
       (("1"
         (flatten)
         (assert)
         (expand "atan2")
         (expand ">=" -1)
         (expand "<=" -1)
         (split)
         (("1"
           (assert)
           (lemma "atan_strict_increasing")
           (expand "strict_increasing?")
           (inst - "0" "Im(n0z!1) / Re(n0z!1)")
           (lemma "posreal_div_posreal_is_posreal"
            ("px" "Im(n0z!1)" "py" "Re(n0z!1)"))
           (assert)
           (rewrite "atan_0")
           (assert)
           (expand "Im")
           (expand "Re")
           (assert))
          ("2" (assert) (expand "Re") (expand "Im") (assert))))
        ("2"
         (assert)
         (expand "Re")
         (expand "Im")
         (assert)
         (flatten)
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case-replace "z!1=0")
   (("1"
     (expand "arg")
     (replace -1 1)
     (expand "Re")
     (expand "Im")
     (assert)
     (flatten)
     (assert)
     (expand "Re")
     (expand "Im")
     (assert))
    ("2"
     (lemma "arg_is_0_nz" ("n0z" "z!1"))
     (("1" (replace -1) (hide -1) (grind)) ("2" (hide 3) (grind))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "arg(z!1)")
   (expand "arg")
   (case-replace "Re(z!1)=0")
   (("1"
     (case-replace "Im(z!1)>0")
     (("1" (assert) (expand "atan2") (propax))
      ("2"
       (assert)
       (case-replace "Im(z!1)=0")
       (("1" (assert)) ("2" (assert) (expand "atan2") (assert))))))
    ("2"
     (assert)
     (case-replace "Im(z!1) < 0")
     (("1"
       (assert)
       (expand "atan2")
       (assert)
       (case-replace "Re(z!1)>0")
       (("1"
         (assert)
         (typepred "atan(Im(z!1) / Re(z!1))")
         (expand "abs")
         (assert))
        ("2"
         (assert)
         (typepred "atan(Im(z!1) / Re(z!1))")
         (expand "abs")
         (assert))))
      ("2"
       (assert)
       (expand "atan2")
       (typepred "atan(Im(z!1) / Re(z!1))")
       (expand "abs")
       (assert)
       (case-replace "Re(z!1) > 0")
       (("1" (assert))
        ("2"
         (assert)
         (case-replace "atan(Im(z!1) / Re(z!1)) < 0")
         (("1" (assert)) ("2" (assert))))))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "arg")
   (case-replace "Im(z!1)=0")
   (("1"
     (assert)
     (case-replace "Re(z!1)=0")
     (("1" (assert))
      ("2"
       (assert)
       (expand "atan2")
       (rewrite "atan_0")
       (assert)
       (case-replace "Re(z!1) > 0")
       (("1" (assert)) ("2" (assert))))))
    ("2"
     (assert)
     (expand "atan2")
     (case-replace "Re(z!1)=0")
     (("1" (assert) (lift-if -2) (assert))
      ("2"
       (assert)
       (typepred "atan(Im(z!1) / Re(z!1))")
       (lift-if -3)
       (assert)
       (prop)
       (lemma "atan_strict_increasing")
       (expand "strict_increasing?")
       (inst - "Im(z!1) / Re(z!1)" "0")
       (rewrite "atan_0")
       (lemma "both_sides_div_neg_lt1"
        ("nz" "Re(z!1)" "y" "0" "x" "Im(z!1)"))
       (("1" (assert)) ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "arg")
   (case-replace "Re(z!1)=0")
   (("1"
     (case-replace "Im(z!1)<0")
     (("1" (assert) (expand "atan2") (assert))
      ("2" (assert) (expand "atan2") (lift-if) (assert))))
    ("2"
     (assert)
     (expand "atan2")
     (lift-if)
     (assert)
     (typepred "atan(Im(z!1) / Re(z!1))")
     (expand "abs")
     (name-replace "DRL" "atan(Im(z!1) / Re(z!1))")
     (case-replace "DRL<0")
     (("1" (assert)) ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "arg")
   (case-replace "Im(z!1) < 0")
   (("1"
     (assert)
     (lemma "atan2_ge_0_lt_2pi" ("x" "Re(z!1)" "y" "Im(z!1)"))
     (assert))
    ("2"
     (assert)
     (lift-if)
     (assert)
     (case-replace "Im(z!1)=0")
     (("1"
       (expand "atan2")
       (case-replace "Re(z!1) = 0")
       (assert)
       (rewrite "atan_0")
       (assert)
       (lift-if)
       (assert)
       (prop)
       (assert))
      ("2"
       (replace 1 -1)
       (expand "atan2")
       (lift-if)
       (assert)
       (case-replace "Re(z!1)>0")
       (("1"
         (lemma "atan_strict_increasing")
         (expand "strict_increasing?")
         (inst - "0" "Im(z!1) / Re(z!1)")
         (rewrite "atan_0")
         (lemma "posreal_div_posreal_is_posreal"
          ("px" "Im(z!1)" "py" "Re(z!1)"))
         (("1" (assert)) ("2" (assert))))
        ("2"
         (case-replace "Re(z!1)=0")
         (("1" (assert))
          ("2"
           (assert)
           (lemma "both_sides_div_neg_lt1"
            ("nz" "Re(z!1)" "y" "0" "x" "Im(z!1)"))
           (assert)
           (lemma "atan_strict_increasing")
           (expand "strict_increasing?")
           (inst - "Im(z!1) / Re(z!1)" "0")
           (rewrite "atan_0")
           (split)
           (("1"
             (typepred "atan(Im(z!1) / Re(z!1))")
             (expand "abs")
             (assert))
            ("2" (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "arg_lt_0" ("z" "z!1"))
   (lemma "arg_is_0" ("z" "z!1"))
   (lemma "arg_is_pi" ("z" "z!1"))
   (lemma "trichotomy" ("x" "arg(z!1)"))
   (split)
   (("1"
     (assert)
     (typepred "arg(z!1)")
     (expand "<=" -2)
     (split)
     (("1" (assert) (assert)) ("2" (assert) (flatten) (assert))))
    ("2" (assert) (flatten) (assert)) ("3" (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "arg_lt_0" ("z" "z!1"))
   (lemma "arg_is_0" ("z" "z!1"))
   (lemma "trichotomy" ("x" "arg(z!1)"))
   (split)
   (("1" (assert) (flatten) (assert)) ("2" (assert) (flatten) (assert))
    ("3" (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "arg")
   (rewrite "abs_def")
   (case-replace "Re(n0x!1)=0")
   (("1"
     (rewrite "sq_0")
     (assert)
     (typepred "n0x!1")
     (assert)
     (rewrite "sqrt_sq_abs")
     (grind))
    ("2"
     (assert)
     (lemma "sq_nz_pos" ("nz" "Re(n0x!1)"))
     (lemma "sqrt_pos" ("px" "sq(Im(n0x!1)) + sq(Re(n0x!1))"))
     (("1"
       (name "DIV" "sqrt(sq(Im(n0x!1)) + sq(Re(n0x!1)))")
       (replace -1)
       (assert)
       (case-replace "Im(n0x!1) < 0")
       (("1"
         (lemma "both_sides_div_pos_lt1"
          ("pz" "DIV" "x" "Im(n0x!1)" "y" "0"))
         (assert)
         (lemma "atan2_cancel_pos"
          ("x" "Re(n0x!1)" "y" "Im(n0x!1)" "pz" "1/DIV"))
         (("1" (assert))
          ("2"
           (assert)
           (lemma "posreal_div_posreal_is_posreal" ("px" "1" "py" "DIV"))
           (assert))))
        ("2"
         (assert)
         (case-replace "Im(n0x!1)=0")
         (("1"
           (assert)
           (lemma "atan2_cancel_pos"
            ("x" "Re(n0x!1)" "y" "0" "pz" "1/DIV"))
           (("1" (assert))
            ("2"
             (assert)
             (lemma "posreal_div_posreal_is_posreal"
              ("px" "1" "py" "DIV"))
             (assert))))
          ("2"
           (lemma "posreal_div_posreal_is_posreal" ("px" "1" "py" "DIV"))
           (lemma "both_sides_div_pos_lt1"
            ("pz" "DIV" "y" "Im(n0x!1)" "x" "0"))
           (assert)
           (lemma "atan2_cancel_pos"
            ("x" "Re(n0x!1)" "y" "Im(n0x!1)" "pz" "1/DIV"))
           (assert))))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "arg")
   (rewrite "abs_def")
   (case-replace "Re(n0x!1) = 0")
   (("1"
     (rewrite "sq_0")
     (assert)
     (lemma "trichotomy" ("x" "Im(n0x!1)"))
     (split)
     (("1" (expand "atan2") (assert) (rewrite "cos_pi2"))
      ("2" (replace -1) (rewrite "sq_0") (rewrite "sqrt_0") (assert))
      ("3"
       (rewrite "sqrt_sq_neg")
       (case-replace "Im(n0x!1) = -1")
       (("1"
         (assert)
         (expand "atan2")
         (assert)
         (lemma "cos_neg" ("a" "pi/2"))
         (rewrite "cos_pi2")
         (replace -1)
         (propax))
        ("2" (assert))))))
    ("2"
     (assert)
     (lemma "sq_eq"
      ("nna" "sqrt(sq(Im(n0x!1)) + sq(Re(n0x!1)))" "nnb" "1"))
     (flatten)
     (split -2)
     (("1"
       (rewrite "sq_sqrt" -1)
       (hide -2 -3)
       (rewrite "sq_1")
       (lemma "cos_atan2" ("x" "Re(n0x!1)" "y" "Im(n0x!1)"))
       (assert)
       (lemma "cos_period" ("a" "atan2(Re(n0x!1), Im(n0x!1))" "j" "-1"))
       (replace -1 2 rl)
       (hide -1)
       (case-replace "1 + sq(Im(n0x!1) / Re(n0x!1)) = 1/sq(Re(n0x!1))")
       (("1"
         (hide -1)
         (case-replace "Re(n0x!1) > 0")
         (("1"
           (rewrite "sqrt_div" -2)
           (("1" (assert)) ("2" (expand "/=") (rewrite "sq_eq_0"))))
          ("2"
           (assert)
           (rewrite "sqrt_div" -1)
           (("1" (rewrite "div_div1") (assert))
            ("2" (expand "/=") (rewrite "sq_eq_0"))))))
        ("2"
         (hide -1 3)
         (rewrite "sq_div" 1)
         (lemma "add_div"
          ("x" "1" "n0x" "1" "y" "sq(Im(n0x!1))" "n0y" "sq(Re(n0x!1))"))
         (replace -1)
         (hide -1)
         (rewrite "cross_mult"))
        ("3" (assert) (expand "/=") (rewrite "sq_eq_0"))))
      ("2" (propax))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "arg")
   (typepred "n0x!1")
   (rewrite "sin_0")
   (case-replace "Im(n0x!1) = 0")
   (("1"
     (assert)
     (expand "atan2")
     (rewrite "atan_0")
     (assert)
     (rewrite "sin_0")
     (rewrite "sin_pi")
     (lift-if)
     (propax))
    ("2"
     (assert)
     (lemma "sin_atan2" ("x" "Re(n0x!1)" "y" "Im(n0x!1)"))
     (assert)
     (rewrite "abs_def" -3)
     (lemma "sq_eq"
      ("nna" "sqrt(sq(Im(n0x!1)) + sq(Re(n0x!1)))" "nnb" "1"))
     (flatten -1)
     (split -2)
     (("1"
       (hide -2 -4)
       (rewrite "sq_sqrt")
       (rewrite "sq_1")
       (lemma "sin_period" ("a" "atan2(Re(n0x!1), Im(n0x!1))" "j" "-1"))
       (replace -1 2 rl)
       (hide -1)
       (case-replace "Re(n0x!1)=0")
       (("1"
         (replace -3)
         (assert)
         (hide -1 -3)
         (case "Im(n0x!1)<0")
         (("1"
           (lemma "sq_neg" ("a" "Im(n0x!1)"))
           (lemma "sq_eq" ("nna" "-Im(n0x!1)" "nnb" "1"))
           (("1" (expand "sq" -1 2) (assert)) ("2" (assert))))
          ("2"
           (assert)
           (lemma "sq_eq" ("nna" "Im(n0x!1)" "nnb" "1"))
           (expand "sq" -1 2)
           (propax))))
        ("2"
         (assert)
         (case-replace "1 + sq(Im(n0x!1) / Re(n0x!1)) = sq(1/Re(n0x!1))")
         (("1"
           (rewrite "sqrt_sq_abs")
           (hide -1)
           (replace -2)
           (hide -1 -2)
           (lemma "real_props.abs_div" ("x" "1" "n0y" "Re(n0x!1)"))
           (replace -1)
           (hide -1)
           (expand "abs")
           (rewrite "div_div1")
           (rewrite "div_cancel3")
           (assert))
          ("2"
           (hide 4 -2)
           (lemma "add_div"
            ("x"
             "1"
             "n0x"
             "1"
             "y"
             "sq(Im(n0x!1))"
             "n0y"
             "sq(Re(n0x!1))"))
           (("1"
             (rewrite "sq_div" 1)
             (replace -1)
             (assert)
             (replace -2)
             (rewrite "sq_div" 1)
             (assert))
            ("2" (expand "/=") (rewrite "sq_eq_0"))))))))
      ("2" (propax))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case "z!1=0")
   (("1"
     (assert)
     (flatten)
     (expand "abs")
     (expand "arg")
     (expand "sq_abs")
     (expand "sq")
     (replace -1)
     (replace -2)
     (assert))
    ("2"
     (lemma "arg_div_abs" ("n0x" "z!1"))
     (("1"
       (lemma "Re_cos_abs1" ("n0x" "z!1 / abs(z!1)"))
       (("1" (replace -2 * rl) (assert))
        ("2" (assert) (flatten) (assert))))
      ("2" (assert) (flatten) (assert))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case "z!1=0")
   (("1"
     (assert)
     (flatten)
     (expand "arg")
     (expand "abs")
     (expand "sq_abs")
     (assert)
     (rewrite "sin_0")
     (assert))
    ("2"
     (lemma "arg_div_abs" ("n0x" "z!1"))
     (("1"
       (lemma "Im_sin_abs1" ("n0x" "z!1/abs(z!1)"))
       (("1" (replace -2 -1 rl) (assert)) ("2" (flatten) (assert))))
      ("2" (assert) (flatten) (assert))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "arg")
   (assert)
   (lemma "trichotomy" ("x" "Re(n0x!1)"))
   (split)
   (("1"
     (lemma "trichotomy" ("x" "Im(n0x!1)"))
     (split)
     (("1"
       (assert)
       (lemma "atan2_cancel_neg"
        ("x" "Re(n0x!1)" "y" "Im(n0x!1)" "nz" "-1"))
       (assert)
       (replace -1 1)
       (assert)
       (lift-if)
       (assert)
       (prop)
       (lemma "atan_strict_increasing")
       (expand "strict_increasing?")
       (expand "atan2")
       (lemma "both_sides_div_pos_lt1"
        ("pz" "Re(n0x!1)" "y" "Im(n0x!1)" "x" "0"))
       (assert)
       (inst - "0" "Im(n0x!1) / Re(n0x!1)")
       (rewrite "atan_0")
       (assert))
      ("2"
       (assert)
       (replace -1)
       (expand "atan2")
       (rewrite "atan_0")
       (assert))
      ("3"
       (assert)
       (expand "atan2")
       (assert)
       (lift-if)
       (assert)
       (prop)
       (lemma "atan_strict_increasing")
       (expand "strict_increasing?")
       (lemma "both_sides_div_pos_lt1"
        ("pz" "Re(n0x!1)" "x" "Im(n0x!1)" "y" "0"))
       (inst - "Im(n0x!1) / Re(n0x!1)" "0")
       (rewrite "atan_0")
       (assert))))
    ("2"
     (replace -1)
     (assert)
     (typepred "n0x!1")
     (assert)
     (assert)
     (expand "atan2")
     (assert)
     (grind))
    ("3"
     (assert)
     (lemma "trichotomy" ("x" "Im(n0x!1)"))
     (split)
     (("1"
       (assert)
       (expand "atan2")
       (lift-if)
       (assert)
       (typepred "atan(Im(n0x!1) / Re(n0x!1))")
       (expand "abs")
       (case-replace "atan(Im(n0x!1) / Re(n0x!1)) < 0")
       (("1" (assert)) ("2" (assert))))
      ("2"
       (replace -1)
       (expand "atan2")
       (rewrite "atan_0")
       (assert)
       (lift-if)
       (assert))
      ("3"
       (assert)
       (expand "atan2")
       (lift-if)
       (assert)
       (typepred "atan(Im(n0x!1) / Re(n0x!1))")
       (expand "abs")
       (case-replace "atan(Im(n0x!1) / Re(n0x!1)) < 0")
       (("1" (assert)) ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case-replace "arg(z!1) = 0")
   (("1" (rewrite "arg_is_0") (rewrite "arg_is_0") (flatten) (assert))
    ("2"
     (case-replace "arg(z!1) = pi")
     (("1"
       (rewrite "arg_is_pi")
       (flatten)
       (rewrite "arg_is_pi")
       (assert))
      ("2"
       (assert)
       (typepred "arg(z!1)")
       (case "arg(z!1)<0")
       (("1"
         (lemma "arg_lt_0" ("z" "z!1"))
         (assert)
         (hide-all-but (-1 3))
         (expand "arg")
         (expand "atan2")
         (assert)
         (lemma "trichotomy" ("x" "Re(z!1)"))
         (split)
         (("1"
           (assert)
           (lemma "atan_neg" ("x" "Im(z!1) / Re(z!1)"))
           (assert))
          ("2" (assert))
          ("3"
           (assert)
           (lemma "atan_neg" ("x" "Im(z!1) / Re(z!1)"))
           (assert))))
        ("2"
         (lemma "arg_p_lt_pi" ("z" "z!1"))
         (assert)
         (hide-all-but (-1 4))
         (expand "arg")
         (expand "atan2")
         (assert)
         (lemma "trichotomy" ("x" "Re(z!1)"))
         (split)
         (("1"
           (assert)
           (lemma "atan_neg" ("x" "Im(z!1) / Re(z!1)"))
           (assert))
          ("2" (assert))
          ("3"
           (lemma "atan_neg" ("x" "Im(z!1) / Re(z!1)"))
           (("1" (assert)) ("2" (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (n0x, n0y: nzcomplex):
                 arg(n0x * n0y) =arg(n0y * n0x)")
   (("1"
     (case "FORALL (n0x, n0y: nzcomplex):arg(n0x)=0 =>
                   arg(n0x * n0y) =
                    LET r = arg(n0x) + arg(n0y) IN
                      IF r > pi THEN r - 2 * pi
                      ELSIF r <= -pi THEN r + 2 * pi
                      ELSE r
                      ENDIF")
     (("1"
       (case "FORALL (n0x, n0y: nzcomplex):
                     arg(n0x) = pi =>
                      arg(n0x * n0y) =
                       LET r = arg(n0x) + arg(n0y) IN
                         IF r > pi THEN r - 2 * pi
                         ELSIF r <= -pi THEN r + 2 * pi
                         ELSE r
                         ENDIF")
       (("1"
         (case "FORALL (n0x, n0y: nzcomplex):
                       0<arg(n0x) & arg(n0x)< pi =>
                        arg(n0x * n0y) =
                         LET r = arg(n0x) + arg(n0y) IN
                           IF r > pi THEN r - 2 * pi
                           ELSIF r <= -pi THEN r + 2 * pi
                           ELSE r
                           ENDIF")
         (("1"
           (skosimp)
           (lemma "trichotomy" ("x" "arg(n0x!1)"))
           (split)
           (("1"
             (typepred "arg(n0x!1)")
             (expand "<=" -2)
             (split)
             (("1" (inst -4 "n0x!1" "n0y!1") (assert) (assert))
              ("2" (inst -5 "n0x!1" "n0y!1") (assert) (assert))))
            ("2" (inst -4 "n0x!1" "n0y!1") (assert) (assert))
            ("3"
             (typepred "arg(n0x!1)")
             (hide -2)
             (lemma "arg_neg" ("n0x" "n0x!1"))
             (assert)
             (inst -4 "-n0x!1" "n0y!1")
             (assert)
             (replace -1)
             (assert)
             (lemma "arg_neg" ("n0x" "n0x!1*n0y!1"))
             (expand "*" -1 1)
             (expand "*" -5 1)
             (expand "-" -1 1)
             (assert)
             (replace -1 -5)
             (hide -1)
             (lift-if -4)
             (lift-if -4)
             (assert)
             (lift-if 1)
             (case "arg(n0x!1) + arg(n0y!1) <= -pi")
             (("1" (assert) (prop) (assert))
              ("2"
               (assert)
               (replace 2 -4)
               (assert)
               (ground)
               (lift-if)
               (ground))))))
          ("2"
           (hide 2)
           (case "FORALL (n0x, n0y: nzcomplex):
                         0 < arg(n0x) & arg(n0x) < pi & -pi < arg(n0y) & arg(n0y)<0=>
                          arg(n0x * n0y) =
                           LET r = arg(n0x) + arg(n0y) IN
                             IF r > pi THEN r - 2 * pi
                             ELSIF r <= -pi THEN r + 2 * pi
                             ELSE r
                             ENDIF")
           (("1"
             (skosimp)
             (lemma "trichotomy" ("x" "arg(n0y!1)"))
             (split)
             (("1"
               (typepred "arg(n0y!1)")
               (expand "<=" -2)
               (split)
               (("1"
                 (hide -2)
                 (lemma "arg_neg" ("n0x" "n0y!1"))
                 (assert)
                 (inst -4 "n0x!1" "-n0y!1")
                 (assert)
                 (lemma "arg_neg" ("n0x" "n0x!1 * n0y!1"))
                 (expand "-" -1 1)
                 (expand "-" -5 1)
                 (expand "*" -5 1)
                 (expand "*" -1 1)
                 (assert)
                 (assert)
                 (replace -1 -5)
                 (replace -2 -5)
                 (assert)
                 (lift-if -5)
                 (assert)
                 (lift-if 1)
                 (case-replace "0 < arg(n0x!1 * n0y!1)")
                 (("1" (assert)) ("2" (assert))))
                ("2"
                 (inst -9 "n0x!1" "n0y!1")
                 (inst -7 "n0y!1" "n0x!1")
                 (assert))))
              ("2"
               (inst -7 "n0x!1" "n0y!1")
               (inst -6 "n0y!1" "n0x!1")
               (assert))
              ("3" (inst -2 "n0x!1" "n0y!1") (assert))))
            ("2"
             (hide-all-but 1)
             (skosimp)
             (assert)
             (lemma "arg_lt_0" ("z" "n0y!1"))
             (assert)
             (lemma "arg_p_lt_pi" ("z" "n0x!1"))
             (assert)
             (hide -3 -4 -5 -6)
             (expand "arg")
             (expand "atan2")
             (assert)
             (lemma "both_sides_times_pos_lt1"
              ("pz" "Im(n0x!1)" "x" "Im(n0y!1)" "y" "0"))
             (assert)
             (case-replace "Re(n0x!1)=0")
             (("1"
               (assert)
               (case-replace
                "(Im(n0x!1) * Re(n0y!1) / (-1 * (Im(n0x!1) * Im(n0y!1))))=-(Re(n0y!1)/Im(n0y!1))")
               (("1"
                 (rewrite "atan_neg")
                 (hide -1)
                 (lemma "trichotomy" ("x" "Re(n0y!1)"))
                 (split)
                 (("1"
                   (lemma "both_sides_div_neg_lt1"
                    ("nz" "Im(n0y!1)" "x" "Re(n0y!1)" "y" "0"))
                   (assert)
                   (lemma "atan_inv_neg" ("nx" "Re(n0y!1) / Im(n0y!1)"))
                   (rewrite "div_div1")
                   (assert))
                  ("2"
                   (assert)
                   (assert)
                   (replace -1)
                   (rewrite "atan_0")
                   (assert))
                  ("3"
                   (lemma "negreal_div_negreal_is_posreal"
                    ("nx" "Re(n0y!1)" "ny" "Im(n0y!1)"))
                   (("1"
                     (lemma "atan_inv" ("px" "Re(n0y!1) / Im(n0y!1)"))
                     (("1" (rewrite "div_div1") (assert))
                      ("2" (assert))))
                    ("2" (assert))))))
                ("2" (assert))))
              ("2"
               (assert)
               (case-replace "Re(n0y!1)=0")
               (("1"
                 (assert)
                 (case-replace
                  "(Re(n0x!1) * Im(n0y!1) / (-1 * (Im(n0x!1) * Im(n0y!1))))=-(Re(n0x!1)/Im(n0x!1))")
                 (("1"
                   (hide -1)
                   (rewrite "atan_neg")
                   (lemma "trichotomy" ("x" "Re(n0x!1)"))
                   (split)
                   (("1"
                     (lemma "posreal_div_posreal_is_posreal"
                      ("px" "Re(n0x!1)" "py" "Im(n0x!1)"))
                     (("1"
                       (lemma "atan_inv" ("px" "Re(n0x!1) / Im(n0x!1)"))
                       (("1" (rewrite "div_div1") (assert))
                        ("2" (assert))))
                      ("2" (assert))))
                    ("2" (propax))
                    ("3"
                     (lemma "both_sides_div_pos_lt1"
                      ("pz" "Im(n0x!1)" "x" "Re(n0x!1)" "y" "0"))
                     (assert)
                     (lemma "atan_inv_neg"
                      ("nx" "Re(n0x!1) / Im(n0x!1)"))
                     (rewrite "div_div1")
                     (assert))))
                  ("2" (assert))))
                ("2"
                 (assert)
                 (lemma "trichotomy" ("x" "Re(n0x!1)"))
                 (split)
                 (("1"
                   (lemma "both_sides_times_pos_lt1"
                    ("pz" "Re(n0x!1)" "x" "Im(n0y!1)" "y" "0"))
                   (("1"
                     (rewrite "zero_times1")
                     (assert)
                     (lemma "posreal_div_posreal_is_posreal"
                      ("px" "Im(n0x!1)" "py" "Re(n0x!1)"))
                     (lemma "trichotomy" ("x" "Re(n0y!1)"))
                     (split)
                     (("1"
                       (hide 1 2)
                       (lemma "both_sides_div_pos_lt1"
                        ("pz" "Re(n0y!1)" "x" "Im(n0y!1)" "y" "0"))
                       (("1"
                         (lemma "both_sides_times_pos_lt1"
                          ("pz" "Re(n0y!1)" "y" "Im(n0x!1)" "x" "0"))
                         (assert)
                         (rewrite "zero_times1")
                         (lemma "posreal_times_posreal_is_posreal"
                          ("px" "Re(n0x!1)" "py" "Re(n0y!1)"))
                         (assert)
                         (lemma "atan_plus"
                          ("x"
                           "Im(n0x!1) / Re(n0x!1)"
                           "y"
                           "Im(n0y!1) / Re(n0y!1)"))
                         (flatten)
                         (lemma "both_sides_times_pos_lt1"
                          ("pz"
                           "Im(n0x!1) / Re(n0x!1)"
                           "x"
                           "Im(n0y!1) / Re(n0y!1)"
                           "y"
                           "0"))
                         (assert)
                         (replace -2)
                         (rewrite "add_div")
                         (rewrite "div_times")
                         (lemma "div_distributes_minus"
                          ("x"
                           "Re(n0y!1) * Re(n0x!1)"
                           "n0z"
                           "Re(n0y!1) * Re(n0x!1)"
                           "y"
                           "Im(n0y!1) * Im(n0x!1)"))
                         (rewrite "div_simp")
                         (replace -1)
                         (rewrite "div_div1")
                         (rewrite "div_cancel2")
                         (assert))
                        ("2" (assert))))
                      ("2" (propax))
                      ("3"
                       (lemma "both_sides_div_neg_lt1"
                        ("nz" "Re(n0y!1)" "y" "Im(n0y!1)" "x" "0"))
                       (("1"
                         (assert)
                         (lemma "both_sides_times_neg_lt1"
                          ("nz" "Re(n0y!1)" "x" "Im(n0x!1)" "y" "0"))
                         (assert)
                         (lemma "both_sides_times_neg_lt1"
                          ("nz" "Re(n0y!1)" "x" "Re(n0x!1)" "y" "0"))
                         (assert)
                         (hide 1 2)
                         (rewrite "zero_times1")
                         (lemma "atan_plus"
                          ("x"
                           "Im(n0x!1) / Re(n0x!1)"
                           "y"
                           "Im(n0y!1) / Re(n0y!1)"))
                         (flatten)
                         (assert)
                         (hide -3)
                         (lemma "trich_lt"
                          ("x"
                           "Re(n0x!1) * Re(n0y!1)"
                           "y"
                           "Im(n0x!1) * Im(n0y!1)"))
                         (rewrite "div_times" -2)
                         (split)
                         (("1"
                           (rewrite "div_mult_neg_lt1" -2)
                           (hide -3)
                           (assert)
                           (replace -2)
                           (hide -2)
                           (lemma "div_distributes_minus"
                            ("x"
                             "Re(n0x!1) * Re(n0y!1)"
                             "n0z"
                             "Re(n0x!1) * Re(n0y!1)"
                             "y"
                             "Im(n0x!1) * Im(n0y!1)"))
                           (rewrite "div_simp")
                           (replace -1)
                           (rewrite "add_div")
                           (rewrite "div_div1")
                           (rewrite "div_cancel2"))
                          ("2"
                           (assert)
                           (hide -2 -3)
                           (lemma "cross_mult"
                            ("x"
                             "Re(n0x!1)"
                             "n0x"
                             "Im(n0x!1)"
                             "y"
                             "Im(n0y!1)"
                             "n0y"
                             "Re(n0y!1)"))
                           (assert)
                           (lemma "atan_inv"
                            ("px" "Re(n0x!1) / Im(n0x!1)"))
                           (("1"
                             (rewrite "div_div1")
                             (replace -2)
                             (assert))
                            ("2" (assert) (replace -1) (assert))))
                          ("3"
                           (rewrite "div_mult_neg_lt2" -3)
                           (assert)
                           (hide -2)
                           (replace -2 1)
                           (lemma "div_distributes_minus"
                            ("x"
                             "Re(n0x!1) * Re(n0y!1)"
                             "n0z"
                             "Re(n0x!1) * Re(n0y!1)"
                             "y"
                             "Im(n0x!1) * Im(n0y!1)"))
                           (rewrite "div_simp")
                           (replace -1)
                           (rewrite "add_div")
                           (rewrite "div_div1")
                           (rewrite "div_cancel2"))))
                        ("2" (assert))))))
                    ("2" (assert))))
                  ("2" (propax))
                  ("3"
                   (lemma "both_sides_div_neg_lt1"
                    ("x" "Im(n0x!1)" "y" "0" "nz" "Re(n0x!1)"))
                   (("1"
                     (assert)
                     (lemma "both_sides_times_neg_lt1"
                      ("y" "Im(n0y!1)" "x" "0" "nz" "Re(n0x!1)"))
                     (assert)
                     (rewrite "zero_times1")
                     (lemma "trichotomy" ("x" "Re(n0y!1)"))
                     (split)
                     (("1"
                       (lemma "both_sides_div_pos_lt1"
                        ("pz" "Re(n0y!1)" "x" "Im(n0y!1)" "y" "0"))
                       (("1"
                         (assert)
                         (lemma "both_sides_times_pos_lt1"
                          ("pz" "Re(n0y!1)" "y" "Im(n0x!1)" "x" "0"))
                         (rewrite "zero_times1")
                         (assert)
                         (hide 1 2)
                         (lemma "atan_plus"
                          ("x"
                           "Im(n0x!1) / Re(n0x!1)"
                           "y"
                           "Im(n0y!1) / Re(n0y!1)"))
                         (flatten)
                         (assert)
                         (hide -2)
                         (lemma "trich_lt"
                          ("x"
                           "Re(n0x!1) * Re(n0y!1)"
                           "y"
                           "Im(n0x!1) * Im(n0y!1)"))
                         (rewrite "div_times" -2)
                         (split)
                         (("1"
                           (rewrite "div_mult_neg_lt1" -2)
                           (assert)
                           (hide 1)
                           (replace -2)
                           (lemma "div_distributes_minus"
                            ("x"
                             "Re(n0x!1) * Re(n0y!1)"
                             "n0z"
                             "Re(n0x!1) * Re(n0y!1)"
                             "y"
                             "Im(n0x!1) * Im(n0y!1)"))
                           (rewrite "div_simp")
                           (replace -1)
                           (rewrite "add_div")
                           (rewrite "div_div1")
                           (rewrite "div_cancel2"))
                          ("2"
                           (assert)
                           (hide -2 -3)
                           (lemma "cross_mult"
                            ("x"
                             "Re(n0x!1)"
                             "n0x"
                             "Im(n0x!1)"
                             "y"
                             "Im(n0y!1)"
                             "n0y"
                             "Re(n0y!1)"))
                           (assert)
                           (lemma "atan_inv_neg"
                            ("nx" "Im(n0x!1) / Re(n0x!1)"))
                           (rewrite "div_div1")
                           (replace -2)
                           (assert))
                          ("3"
                           (lemma "both_sides_times_pos_lt1"
                            ("pz" "Re(n0y!1)" "x" "Re(n0x!1)" "y" "0"))
                           (assert)
                           (rewrite "div_mult_neg_lt2" -4)
                           (assert)
                           (hide 1)
                           (replace -3)
                           (lemma "div_distributes_minus"
                            ("x"
                             "Re(n0x!1) * Re(n0y!1)"
                             "n0z"
                             "Re(n0x!1) * Re(n0y!1)"
                             "y"
                             "Im(n0x!1) * Im(n0y!1)"))
                           (rewrite "div_simp")
                           (replace -1)
                           (rewrite "add_div")
                           (rewrite "div_div1")
                           (rewrite "div_cancel2"))))
                        ("2" (assert))))
                      ("2" (propax))
                      ("3"
                       (lemma "both_sides_div_neg_lt1"
                        ("nz" "Re(n0y!1)" "y" "Im(n0y!1)" "x" "0"))
                       (("1"
                         (assert)
                         (lemma "both_sides_times_neg_lt1"
                          ("nz" "Re(n0y!1)" "x" "Im(n0x!1)" "y" "0"))
                         (assert)
                         (lemma "negreal_times_negreal_is_posreal"
                          ("nx" "Re(n0x!1)" "ny" "Re(n0y!1)"))
                         (assert)
                         (lemma "atan_plus"
                          ("x"
                           "Im(n0x!1) / Re(n0x!1)"
                           "y"
                           "Im(n0y!1) / Re(n0y!1)"))
                         (flatten)
                         (lemma "both_sides_times_pos_lt1"
                          ("pz"
                           "Im(n0y!1) / Re(n0y!1)"
                           "x"
                           "Im(n0x!1) / Re(n0x!1)"
                           "y"
                           "0"))
                         (assert)
                         (replace -2)
                         (rewrite "div_times")
                         (lemma "div_distributes_minus"
                          ("x"
                           "Re(n0x!1) * Re(n0y!1)"
                           "n0z"
                           "Re(n0x!1) * Re(n0y!1)"
                           "y"
                           "Im(n0x!1) * Im(n0y!1)"))
                         (rewrite "div_simp")
                         (replace -1)
                         (lemma "add_div"
                          ("x"
                           "Im(n0x!1)"
                           "n0x"
                           "Re(n0x!1)"
                           "y"
                           "Im(n0y!1)"
                           "n0y"
                           "Re(n0y!1)"))
                         (replace -1)
                         (rewrite "div_div1")
                         (rewrite "div_cancel2"))
                        ("2" (assert))))))
                    ("2" (assert))))))))))))))
        ("2"
         (hide 2)
         (skosimp)
         (replace -1)
         (assert)
         (typepred "arg(n0y!1)")
         (assert)
         (hide -1 -2)
         (rewrite "arg_is_pi")
         (flatten)
         (hide -3)
         (hide -3)
         (expand "arg")
         (expand "atan2")
         (assert)
         (replace -2)
         (assert)
         (lemma "trichotomy" ("x" "Re(n0y!1)"))
         (split -1)
         (("1"
           (assert)
           (lemma "trichotomy" ("x" "Im(n0y!1)"))
           (split)
           (("1"
             (assert)
             (lemma "both_sides_times_pos_lt1"
              ("pz" "Re(n0y!1)" "x" "Re(n0x!1)" "y" "0"))
             (assert)
             (lemma "both_sides_times_pos_lt1"
              ("pz" "Im(n0y!1)" "x" "Re(n0x!1)" "y" "0"))
             (assert)
             (lift-if)
             (assert)
             (lemma "atan_strict_increasing")
             (expand "strict_increasing?")
             (inst - "0" "Im(n0y!1) / Re(n0y!1)")
             (lemma "posreal_div_posreal_is_posreal"
              ("px" "Im(n0y!1)" "py" "Re(n0y!1)"))
             (assert))
            ("2"
             (replace -1)
             (assert)
             (assert)
             (lemma "both_sides_times_pos_lt1"
              ("pz" "Re(n0y!1)" "x" "Re(n0x!1)" "y" "0"))
             (assert))
            ("3"
             (lemma "both_sides_times_pos_lt1"
              ("pz" "Re(n0y!1)" "x" "Re(n0x!1)" "y" "0"))
             (assert)
             (lemma "negreal_times_negreal_is_posreal"
              ("nx" "Im(n0y!1)" "ny" "Re(n0x!1)"))
             (assert)
             (lift-if)
             (assert)
             (lemma "both_sides_div_pos_lt1"
              ("pz" "Re(n0y!1)" "x" "Im(n0y!1)" "y" "0"))
             (lemma "atan_strict_increasing")
             (expand "strict_increasing?")
             (inst - "Im(n0y!1) / Re(n0y!1)" "0")
             (rewrite "atan_0")
             (assert)
             (split)
             (("1" (assert)) ("2" (assert))))))
          ("2"
           (replace -1)
           (assert)
           (lemma "trichotomy" ("x" "Im(n0y!1)"))
           (split)
           (("1"
             (assert)
             (lemma "both_sides_times_pos_lt1"
              ("pz" "Im(n0y!1)" "x" "Re(n0x!1)" "y" "0"))
             (assert))
            ("2" (assert) (typepred "n0y!1") (assert))
            ("3"
             (assert)
             (lemma "negreal_times_negreal_is_posreal"
              ("nx" "Im(n0y!1)" "ny" "Re(n0x!1)"))
             (assert))))
          ("3"
           (lemma "negreal_times_negreal_is_posreal"
            ("nx" "Re(n0y!1)" "ny" "Re(n0x!1)"))
           (("1"
             (assert)
             (lift-if)
             (assert)
             (lift-if)
             (assert)
             (lemma "trichotomy" ("x" "Im(n0y!1)"))
             (split)
             (("1"
               (assert)
               (typepred "atan(Im(n0y!1) / Re(n0y!1))")
               (lemma "atan_strict_increasing")
               (expand "strict_increasing?")
               (lemma "both_sides_div_neg_lt1"
                ("nz" "Re(n0y!1)" "x" "Im(n0y!1)" "y" "0"))
               (assert))
              ("2" (replace -1) (assert))
              ("3"
               (assert)
               (lemma "negreal_div_negreal_is_posreal"
                ("nx" "Im(n0y!1)" "ny" "Re(n0y!1)"))
               (assert))))
            ("2" (assert))))))))
      ("2"
       (hide 2 -1)
       (skosimp)
       (replace -1)
       (rewrite "arg_is_0_nz")
       (flatten)
       (assert)
       (typepred "arg(n0y!1)")
       (assert)
       (hide -1 -2)
       (expand "arg")
       (assert)
       (expand "atan2")
       (replace -2)
       (assert)
       (typepred "n0y!1")
       (lemma "trichotomy" ("x" "Re(n0y!1)"))
       (split)
       (("1"
         (lemma "both_sides_times_pos_lt1"
          ("pz" "Re(n0x!1)" "x" "0" "y" "Re(n0y!1)"))
         (assert))
        ("2"
         (assert)
         (lemma "trichotomy" ("x" "Im(n0y!1)"))
         (split)
         (("1"
           (lemma "both_sides_times_pos_lt1"
            ("pz" "Re(n0x!1)" "x" "0" "y" "Im(n0y!1)"))
           (assert))
          ("2" (assert))
          ("3"
           (lemma "both_sides_times_pos_lt1"
            ("pz" "Re(n0x!1)" "y" "0" "x" "Im(n0y!1)"))
           (assert))))
        ("3"
         (lemma "both_sides_times_pos_lt1"
          ("pz" "Re(n0x!1)" "y" "0" "x" "Re(n0y!1)"))
         (assert)
         (lemma "trichotomy" ("x" "Im(n0y!1)"))
         (split)
         (("1"
           (lemma "both_sides_times_pos_lt1"
            ("pz" "Re(n0x!1)" "x" "0" "y" "Im(n0y!1)"))
           (assert))
          ("2" (assert))
          ("3"
           (lemma "both_sides_times_pos_lt1"
            ("pz" "Re(n0x!1)" "y" "0" "x" "Im(n0y!1)"))
           (assert))))))))
    ("2" (hide 2) (skosimp) (expand "*") (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case-replace "arg(n0z!1)=0")
   (("1"
     (rewrite "arg_is_0")
     (flatten)
     (assert)
     (expand "arg")
     (assert)
     (expand "atan2")
     (typepred "n0z!1")
     (assert)
     (lemma "nz_sq_abs_pos" ("n0z" "n0z!1"))
     (lemma "posreal_div_posreal_is_posreal"
      ("px" "Re(n0z!1)" "py" "sq_abs(n0z!1)"))
     (assert)
     (rewrite "div_div1")
     (rewrite "div_cancel2")
     (replace -5)
     (assert)
     (rewrite "atan_0"))
    ("2"
     (case-replace "arg(n0z!1) = pi")
     (("1"
       (rewrite "arg_is_pi")
       (flatten)
       (assert)
       (lemma "nz_sq_abs_pos" ("n0z" "n0z!1"))
       (expand "arg")
       (assert)
       (expand "atan2")
       (lemma "both_sides_div_pos_lt1"
        ("pz" "sq_abs(n0z!1)" "x" "Re(n0z!1)" "y" "0"))
       (assert)
       (expand "sq_abs")
       (replace -4)
       (rewrite "sq_0")
       (hide -1)
       (rewrite "atan_0"))
      ("2"
       (assert)
       (typepred "n0z!1")
       (assert)
       (expand "arg")
       (assert)
       (case-replace "Re(n0z!1) = 0")
       (("1"
         (assert)
         (case-replace "Im(n0z!1) < 0")
         (("1"
           (expand "atan2")
           (assert)
           (assert)
           (lift-if 3)
           (assert)
           (prop)
           (lemma "nz_sq_abs_pos" ("n0z" "n0z!1"))
           (lemma "posreal_div_posreal_is_posreal"
            ("px" "-1*Im(n0z!1)" "py" "sq_abs(n0z!1)"))
           (assert))
          ("2"
           (assert)
           (expand "atan2")
           (lift-if 4)
           (assert)
           (prop)
           (lemma "posreal_div_posreal_is_posreal"
            ("px" "Im(n0z!1)" "py" "sq_abs(n0z!1)"))
           (assert))))
        ("2"
         (assert)
         (case-replace "Im(n0z!1) < 0")
         (("1"
           (expand "atan2")
           (assert)
           (lemma "posreal_div_posreal_is_posreal"
            ("px" "-1*Im(n0z!1)" "py" "sq_abs(n0z!1)"))
           (assert)
           (case-replace "Re(n0z!1) > 0")
           (("1"
             (lemma "posreal_div_posreal_is_posreal"
              ("px" "Re(n0z!1)" "py" "sq_abs(n0z!1)"))
             (("1"
               (assert)
               (rewrite "div_div1")
               (rewrite "div_cancel2" 4)
               (rewrite "atan_neg" 4 :dir rl)
               (assert))
              ("2" (assert))))
            ("2"
             (assert)
             (lemma "both_sides_div_pos_lt1"
              ("pz" "sq_abs(n0z!1)" "x" "Re(n0z!1)" "y" "0"))
             (assert)
             (rewrite "div_div1")
             (rewrite "div_cancel2" 5)
             (assert)
             (rewrite "one_times")
             (case-replace
              "((-1 * Im(n0z!1) / Re(n0z!1)))=-(Im(n0z!1) / Re(n0z!1))")
             (("1" (rewrite "atan_neg" 5) (assert)) ("2" (assert))))))
          ("2"
           (assert)
           (lift-if 5)
           (expand "atan2")
           (assert)
           (lemma "posreal_div_posreal_is_posreal"
            ("px" "Im(n0z!1)" "py" "sq_abs(n0z!1)"))
           (("1"
             (assert)
             (case-replace "Re(n0z!1)>0")
             (("1"
               (lemma "posreal_div_posreal_is_posreal"
                ("px" "Re(n0z!1)" "py" "sq_abs(n0z!1)"))
               (("1"
                 (assert)
                 (rewrite "div_div1")
                 (rewrite "div_cancel2")
                 (rewrite "atan_neg" 5 :dir rl)
                 (assert))
                ("2" (assert))))
              ("2"
               (assert)
               (lemma "both_sides_div_pos_lt1"
                ("pz" "sq_abs(n0z!1)" "x" "Re(n0z!1)" "y" "0"))
               (assert)
               (rewrite "div_div1")
               (rewrite "div_cancel2")
               (case-replace
                "(-1 * Im(n0z!1) / (1 * Re(n0z!1)))=-(Im(n0z!1) / Re(n0z!1))")
               (("1" (rewrite "atan_neg") (assert)) ("2" (assert))))))
            ("2"
             (assert)
             (case-replace "Im(n0z!1) =0")
             (("1" (assert) (rewrite "atan_0") (lift-if) (grind))
              ("2" (assert))))))))))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "arg_inv" ("n0z" "n0y!1"))
   (lemma "arg_mult" ("n0x" "n0x!1" "n0y" "1/n0y!1"))
   (replace -2 -1)
   (hide -2)
   (expand "/")
   (expand "*")
   (assert)
   (case-replace
    "Re(n0x!1) * ((1 * Re(n0y!1)) / sq_abs(n0y!1)) -
                        Im(n0x!1) * (((-1) * Im(n0y!1)) / sq_abs(n0y!1))=(Im(n0x!1) * Im(n0y!1) + Re(n0x!1) * Re(n0y!1)) /
                        sq_abs(n0y!1)")
   (("1"
     (hide -1)
     (case-replace
      "Im(n0x!1) * ((1 * Re(n0y!1)) / sq_abs(n0y!1)) +
                          Re(n0x!1) * (((-1) * Im(n0y!1)) / sq_abs(n0y!1))=(Im(n0x!1) * Re(n0y!1) - Re(n0x!1) * Im(n0y!1)) /
                          sq_abs(n0y!1)")
     (("1"
       (assert)
       (hide -1)
       (replace -1 1)
       (hide -1)
       (case-replace "arg(n0y!1) = 0")
       (("1" (lift-if 1) (assert))
        ("2"
         (case-replace "arg(n0y!1) = 0")
         (case-replace "arg(n0y!1) = pi")
         (("1"
           (assert)
           (lemma "trichotomy" ("x" "arg(n0x!1)"))
           (split)
           (("1" (assert)) ("2" (assert)) ("3" (assert))))
          ("2" (assert) (lift-if 4) (assert))))))
      ("2" (assert))))
    ("2" (hide-all-but 1) (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "from_rectangular")
   (expand "rectangular")
   (assert)
   (assert)
   (expand "complex_i")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "polar")
   (expand "from_polar")
   (expand "complex_i")
   (assert)
   (lemma "arg_div_abs" ("n0x" "n0z!1"))
   (lemma "Re_cos_abs1" ("n0x" "n0z!1/abs(n0z!1)"))
   (lemma "Im_sin_abs1" ("n0x" "n0z!1/abs(n0z!1)"))
   (assert)
   (postpone))


proof_type: t_proof
decl_type: tcc
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "Re" 1 2)
   (expand "Im" 1 2)
   (assert)
   (lemma "atan2_0_2pi" ("x" "Re(z!1)" "y" "Im(z!1)"))
   (assert)
   (case-replace "Re(z!1) < 0")
   (("1" (flatten) (assert)) ("2" (assert) (flatten) (assert))))


proof_type: t_proof
decl_type: tcc
library: complex_alt
theory: polar
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "Re" 2 2)
   (expand "Im" 2 2)
   (lemma "atan2_0_2pi" ("x" "Re(z!1)" "y" "Im(z!1)"))
   (assert)
   (case-replace "Im(z!1)=0")
   (("1"
     (assert)
     (flatten)
     (case-replace "Re(z!1) >= 0")
     (("1" (flatten) (assert)) ("2" (assert) (flatten) (assert))))
    ("2"
     (assert)
     (flatten)
     (case-replace "Re(z!1) >= 0")
     (("1" (flatten) (assert)) ("2" (assert) (flatten) (assert))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_fun_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (apply-extensionality :hide? t)
   (expand "-")
   (assert)
   (expand "-")
   (assert)
   (decompose-equality)
   (("1" (expand "Re") (assert)) ("2" (expand "Im") (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_fun_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (apply-extensionality :hide? t)
   (expand "conjugate")
   (expand "conjugate")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_fun_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (apply-extensionality :hide? t)
   (expand "-")
   (assert)
   (expand "conjugate")
   (expand "conjugate")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_fun_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (apply-extensionality :hide? t)
   (("1" (expand "*") (expand "abs") (assert))
    ("2" (skosimp) (expand "*") (expand "abs") (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_fun_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (apply-extensionality :hide? t)
   (expand "/")
   (expand "+ ")
   (expand "*")
   (assert)
   (assert)
   (expand "sq_abs")
   (expand "sq" 1 3)
   (expand "sq" 1 4)
   (expand "+" 1 4)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_fun_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (apply-extensionality :hide? t)
   (expand "/")
   (expand "sq_abs")
   (expand "sq")
   (expand "+ ")
   (expand "*")
   (assert)
   (expand "sq_abs")
   (propax))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_fun_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (apply-extensionality :hide? t)
   (expand "+")
   (expand "*")
   (assert)
   (assert)
   (expand "/")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_fun_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (apply-extensionality :hide? t)
   (expand "/")
   (expand "-")
   (expand "*")
   (assert)
   (expand "sq_abs")
   (assert)
   (expand "+" 1 2)
   (expand "sq" 1 3)
   (expand "sq" 1 3)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_fun_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (apply-extensionality :hide? t)
   (expand "/")
   (expand "sq_abs")
   (expand "+ ")
   (expand "sq")
   (expand "-")
   (expand "*")
   (assert)
   (expand "sq_abs")
   (propax))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_fun_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (apply-extensionality :hide? t)
   (expand "/")
   (expand "-")
   (expand "*")
   (assert))


proof_type: j_proof
decl_type: tcc
library: complex_alt
theory: complex_fun_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + ("f!1" "x!1"))
   (expand "sq_abs")
   (expand "+ ")
   (expand "sq")
   (assert)
   (typepred "f!1(x!1)")
   (expand "/=")
   (split)
   (("1"
     (lemma "sq_nz_pos" ("nz" "Re(f!1(x!1))"))
     (("1" (assert)) ("2" (assert))))
    ("2"
     (lemma "sq_nz_pos" ("nz" "Im(f!1(x!1))"))
     (("1" (assert)) ("2" (assert))))))


proof_type: j_proof
decl_type: tcc
library: complex_alt
theory: complex_fun_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + ("f!1" "x!1"))
   (expand "abs")
   (expand "abs")
   (lemma "nz_fun_sq_abs_pos")
   (inst - "f!1" "x!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1"
     (flatten)
     (lemma "sqrt_nz_is_nz" ("n0z" "z!1"))
     (("1" (assert) (split) (("1" (flatten)) ("2" (flatten))))
      ("2" (flatten) (assert))))
    ("2"
     (flatten)
     (expand "sqrt")
     (assert)
     (flatten)
     (expand "abs")
     (expand "arg")
     (expand "sq_abs")
     (assert)
     (expand "sq")
     (replace -1)
     (replace -2)
     (assert)
     (expand "from_polar")
     (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sqrt")
   (expand "from_polar")
   (assert)
   (assert)
   (case "z!1=0")
   (("1"
     (assert)
     (flatten)
     (expand "*")
     (expand "arg")
     (assert)
     (rewrite "cos_0")
     (rewrite "sin_0")
     (expand "abs")
     (expand "sq_abs")
     (expand "sq")
     (assert)
     (replace -2)
     (replace -1)
     (assert))
    ("2"
     (lemma "arg_mult" ("n0x" "z!1" "n0y" "z!1"))
     (("1"
       (assert)
       (replace -1)
       (assert)
       (hide -1)
       (case "-pi / 2 < arg(z!1)")
       (("1"
         (assert)
         (lemma "div_mult_pos_lt1" ("py" "2" "z" "-pi" "x" "arg(z!1)"))
         (copy -2)
         (replace -2 -1)
         (replace -1)
         (assert)
         (case "arg(z!1) <= pi / 2")
         (("1"
           (assert)
           (rewrite "abs_cos_arg")
           (use "abs_sin_arg")
           (assert))
          ("2"
           (assert)
           (lemma "cos_minus" ("a" "arg(z!1)" "b" "pi"))
           (lemma "sin_minus" ("a" "arg(z!1)" "b" "pi"))
           (rewrite "cos_pi")
           (rewrite "sin_pi")
           (assert)
           (replace -1)
           (replace -2)
           (hide -1 -2)
           (assert)
           (use "abs_cos_arg")
           (assert)
           (lemma "abs_sin_arg" ("z" "z!1"))
           (assert))))
        ("2"
         (assert)
         (lemma "cos_plus" ("a" "arg(z!1)" "b" "pi"))
         (lemma "sin_plus" ("a" "arg(z!1)" "b" "pi"))
         (rewrite "sin_pi")
         (rewrite "cos_pi")
         (replace -1)
         (replace -2)
         (hide -1 -2)
         (assert)
         (use "abs_cos_arg")
         (assert)
         (assert)
         (lemma "abs_sin_arg" ("z" "z!1"))
         (assert))))
      ("2" (flatten) (assert))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sqrt")
   (expand "sq")
   (expand "from_polar")
   (assert)
   (rewrite "sq_rew")
   (rewrite "sq_rew")
   (rewrite "cos2")
   (lemma "sin_2a" ("a" "arg(z!1) / 2"))
   (lemma "abs_sin_arg" ("z" "z!1"))
   (replace -2 -1)
   (assert)
   (hide -1 -2)
   (lemma "cos_2a_sin" ("a" "arg(z!1) / 2"))
   (lemma "abs_cos_arg" ("z" "z!1"))
   (replace -2 -1)
   (assert)
   (expand "sq")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case-replace "x!1=0")
   (("1"
     (lift-if)
     (lemma "abs_is_0" ("z" "x!1"))
     (lemma "arg_is_0" ("z" "x!1"))
     (flatten)
     (hide -1 -3)
     (split)
     (("1"
       (split)
       (("1"
         (replace -2)
         (typepred "arg(y!1)")
         (assert)
         (flatten)
         (expand "sqrt")
         (expand "from_polar")
         (rewrite "abs_mult")
         (replace -3)
         (assert))
        ("2" (propax))))
      ("2" (assert)) ("3" (assert))))
    ("2"
     (case-replace "y!1=0")
     (("1"
       (lift-if)
       (lemma "abs_is_0" ("z" "y!1"))
       (flatten -1)
       (hide -1)
       (split)
       (("1"
         (lemma "arg_is_0" ("z" "y!1"))
         (flatten -1)
         (hide -1)
         (split)
         (("1"
           (replace -1)
           (typepred "arg(x!1)")
           (assert)
           (expand "sqrt")
           (expand "from_polar")
           (rewrite "abs_mult")
           (replace -4)
           (assert))
          ("2" (assert)) ("3" (assert))))
        ("2" (propax))))
      ("2"
       (lemma "arg_mult" ("n0x" "x!1" "n0y" "y!1"))
       (("1"
         (assert)
         (expand "sqrt")
         (rewrite "abs_mult")
         (rewrite "sqrt_times")
         (name-replace "RX" "sqrt.sqrt(abs(x!1))")
         (name-replace "RY" "sqrt.sqrt(abs(y!1))")
         (name-replace "TX" "arg(x!1)")
         (name-replace "TY" "arg(y!1)")
         (case-replace "TX + TY > pi")
         (("1"
           (assert)
           (replace -2)
           (assert)
           (hide -2)
           (case-replace "(TX - 2 * pi + TY) / 2 = TX/2+TY/2-pi")
           (("1"
             (hide -1)
             (expand "from_polar")
             (rewrite "sin_minus")
             (rewrite "cos_minus")
             (rewrite "cos_pi")
             (rewrite "sin_pi")
             (rewrite "zero_times1")
             (assert)
             (rewrite "cos_plus")
             (rewrite "sin_plus")
             (assert))
            ("2" (assert))))
          ("2"
           (case-replace "TX + TY <= -pi")
           (("1"
             (assert)
             (replace -2)
             (hide -2)
             (case-replace "(TX + TY + 2 * pi) / 2 = TX/2+TY/2+pi")
             (("1"
               (hide -1)
               (expand "from_polar")
               (rewrite "sin_plus")
               (rewrite "sin_plus")
               (rewrite "cos_plus")
               (rewrite "cos_plus")
               (rewrite "cos_pi")
               (rewrite "sin_pi")
               (rewrite "zero_times2")
               (assert))
              ("2" (assert))))
            ("2"
             (assert)
             (replace -1)
             (hide -1)
             (assert)
             (rewrite "div_distributes" 5 :dir rl)
             (expand "from_polar")
             (rewrite "sin_plus")
             (rewrite "cos_plus")
             (assert))))))
        ("2" (assert) (flatten) (assert))
        ("3" (assert) (flatten) (assert))))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (expand "sqrt")
   (rewrite "abs_neg")
   (case "z!1=0")
   (("1"
     (assert)
     (flatten)
     (expand "arg")
     (assert)
     (expand "abs")
     (expand "sq_abs")
     (expand "sq")
     (assert)
     (replace -1)
     (replace -2)
     (assert)
     (expand "from_polar")
     (assert))
    ("2"
     (lemma "arg_neg" ("n0x" "z!1"))
     (("1"
       (replace -1)
       (hide -1)
       (expand "from_polar")
       (assert)
       (lemma "trichotomy" ("x" "arg(z!1)"))
       (split)
       (("1"
         (assert)
         (lemma "sin_minus" ("a" "arg(z!1)/2" "b" "pi/2"))
         (lemma "cos_minus" ("a" "arg(z!1)/2" "b" "pi/2"))
         (rewrite "sin_pi2")
         (rewrite "cos_pi2")
         (assert))
        ("2"
         (replace -1)
         (assert)
         (rewrite "sin_0")
         (rewrite "cos_0")
         (rewrite "cos_pi2")
         (rewrite "sin_pi2")
         (assert))
        ("3"
         (assert)
         (lemma "cos_sin" ("a" "arg(z!1)/2"))
         (replace -1 2 rl)
         (assert)
         (hide -1)
         (rewrite "sin_cos")
         (assert))))
      ("2" (assert) (flatten) (assert))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case "arg(n0z!1) = pi")
   (("1"
     (replace -1)
     (lemma "arg_is_pi" ("z" "n0z!1"))
     (replace -2 -1)
     (flatten -1)
     (expand "sqrt")
     (replace -3)
     (lemma "arg_inv" ("n0z" "n0z!1"))
     (replace -4)
     (simplify -1)
     (case-replace "arg(1 / n0z!1) = pi")
     (("1"
       (hide -1 -2 -5)
       (typepred "abs(n0z!1)")
       (hide -1)
       (case-replace "sqrt(abs(1 / n0z!1))=1/sqrt(abs(n0z!1))")
       (("1"
         (hide -1 -3 -4)
         (name-replace "X" "abs(n0z!1)")
         (expand "from_polar")
         (rewrite "cos_pi2")
         (rewrite "sin_pi2")
         (rewrite "zero_times2")
         (lemma "sqrt_pos" ("px" "X"))
         (name-replace "Y" "sqrt(X)")
         (assert)
         (rewrite "neg_neg")
         (rewrite "one_times")
         (case-replace "sq_abs(0 + Y * complex_i)=sq(Y)")
         (("1" (hide -1) (expand "sq") (rewrite "cross_mult"))
          ("2" (hide 2) (expand "sq_abs") (expand "sq") (assert))))
        ("2" (hide 2) (rewrite "abs_inv") (rewrite "sqrt_div" 1))))
      ("2" (assert))))
    ("2"
     (typepred "arg(n0z!1)")
     (expand "<=" -2)
     (replace 1)
     (hide 1)
     (lemma "complex_div_cancel4"
      ("z2" "sqrt(1 / n0z!1)" "z1" "complex_(1,0)" "n0z" "sqrt(n0z!1)"))
     (flatten)
     (split -2)
     (("1" (hide -2) (assert) (flatten) (assert))
      ("2"
       (hide 2 -1)
       (lemma "sqrt_times" ("x" "1/n0z!1" "y" "n0z!1"))
       (lemma "arg_inv" ("n0z" "n0z!1"))
       (case-replace "arg(n0z!1) = 0")
       (("1"
         (replace -2)
         (simplify -3)
         (assert)
         (flatten)
         (replace -3 1 rl)
         (replace -4 1 rl)
         (hide -3 -4)
         (expand "sqrt")
         (lemma "arg_mult" ("n0x" "1 / n0z!1" "n0y" "n0z!1"))
         (replace -2)
         (replace -3)
         (assert)
         (replace -1)
         (expand "from_polar")
         (rewrite "cos_0")
         (rewrite "sin_0")
         (assert))
        ("2"
         (replace 1)
         (case-replace "arg(n0z!1) = pi")
         (("1" (assert))
          ("2"
           (replace 1)
           (replace -1)
           (case-replace
            "-pi < -arg(n0z!1) + arg(n0z!1) AND -arg(n0z!1) + arg(n0z!1) <= pi")
           (("1"
             (flatten)
             (name-replace "LHS" "sqrt(1 / n0z!1) * sqrt(n0z!1)")
             (lemma "complex_div_cancel2"
              ("z" "complex_(1,0)" "n0z" "n0z!1"))
             (name-replace "DRL1" "1 / n0z!1 * n0z!1")
             (name-replace "DRL2" "(complex_(1, 0) / n0z!1) * n0z!1")
             (expand "sqrt")
             (case-replace "arg(DRL1)=0")
             (("1"
               (case-replace "abs(DRL1)=1")
               (("1"
                 (rewrite "sqrt_1")
                 (expand "from_polar")
                 (assert)
                 (flatten)
                 (rewrite "cos_0")
                 (rewrite "sin_0")
                 (assert))
                ("2" (expand "DRL1") (rewrite "abs_mult" 1) (assert))))
              ("2"
               (case "DRL1=DRL2")
               (("1"
                 (assert)
                 (flatten)
                 (expand "arg" 1)
                 (assert)
                 (replace -1)
                 (replace -2)
                 (replace -3)
                 (replace -4)
                 (assert)
                 (expand "atan2")
                 (rewrite "atan_0"))
                ("2"
                 (assert)
                 (expand "DRL1")
                 (expand "DRL2")
                 (assert))))))
            ("2" (hide -1 -2 4) (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "sqrt_inv" ("n0z" "n0y!1"))
   (lemma "sqrt_times" ("x" "x!1" "y" "1/n0y!1"))
   (rewrite "complex_div_def")
   (assert)
   (flatten)
   (replace -1)
   (replace -2)
   (replace -3)
   (replace -4)
   (hide -1 -2 -3 -4)
   (rewrite "neg_neg")
   (rewrite "one_times")
   (lemma "arg_inv" ("n0z" "n0y!1"))
   (replace -1)
   (hide -1)
   (case-replace "arg(n0y!1) = 0")
   (("1" (assert))
    ("2"
     (case-replace "arg(n0y!1) = pi")
     (("1"
       (assert)
       (expand "sqrt")
       (expand "from_polar")
       (replace -1)
       (rewrite "sin_pi2")
       (rewrite "cos_pi2")
       (assert)
       (assert)
       (expand "sq_abs")
       (assert)
       (rewrite "sqrt.sq_sqrt")
       (assert)
       (rewrite "zero_times2")
       (assert)
       (lift-if 2)
       (assert))
      ("2"
       (lift-if)
       (assert)
       (lift-if)
       (assert)
       (lift-if)
       (assert)
       (ground))))))


proof_type: j_proof
decl_type: tcc
library: complex_alt
theory: complex_sqrt
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sqrt")
   (expand "abs")
   (expand "arg")
   (expand "from_polar")
   (assert)
   (lift-if)
   (rewrite "cos_0")
   (rewrite "sin_0")
   (assert)
   (typepred "n0z!1")
   (lemma "sin_minus" ("a" "atan2(Re(n0z!1), Im(n0z!1)) / 2" "b" "pi"))
   (("1"
     (replace -1)
     (lemma "cos_minus" ("a" "atan2(Re(n0z!1), Im(n0z!1)) / 2" "b" "pi"))
     (replace -1)
     (hide -1 -2)
     (rewrite "cos_pi")
     (rewrite "sin_pi")
     (assert)
     (rewrite "real_props.zero_times3")
     (rewrite "real_props.zero_times3")
     (rewrite "real_props.zero_times3")
     (rewrite "real_props.zero_times3")
     (rewrite "real_props.zero_times3")
     (lemma "sin_cos_eq_0" ("a" "atan2(Re(n0z!1), Im(n0z!1)) / 2"))
     (case-replace "Re(n0z!1) = 0 AND Im(n0z!1) = 0")
     (replace 1)
     (case-replace "Im(n0z!1) < 0")
     (("1" (assert)) ("2" (assert) (assert))))
    ("2" (flatten) (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (rewrite "exp_sum")
   (rewrite "cos_plus")
   (rewrite "sin_plus")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (rewrite "exp_neg")
   (typepred "exp(x!1)")
   (lemma "nz_sq_abs_pos" ("n0z" "exp(x!1)"))
   (rewrite "div_cancel4" 1)
   (rewrite "div_cancel4" 1)
   (rewrite "cos_neg")
   (rewrite "sin_neg")
   (lemma "div_cancel3"
    ("n0z"
     "exp(Re(x!1))"
     "x"
     "cos(Im(x!1)) * sq_abs(exp(x!1))"
     "y"
     "exp(Re(x!1)) * cos(Im(x!1))"))
   (replace -1)
   (hide -1)
   (lemma "div_cancel3"
    ("n0z"
     "exp(Re(x!1))"
     "x"
     "(-1)*sin(Im(x!1)) * sq_abs(exp(x!1))"
     "y"
     "(-1)*exp(Re(x!1)) * sin(Im(x!1))"))
   (replace -1)
   (hide -1)
   (expand "sq_abs")
   (assert)
   (rewrite "sq_times")
   (rewrite "sq_times")
   (lemma "sin2_cos2" ("a" "Im(x!1)"))
   (lemma "sq_nz_pos" ("nz" "exp(Re(x!1))"))
   (lemma "both_sides_times1"
    ("n0z"
     "sq(exp(Re(x!1)))"
     "x"
     "sq(sin(Im(x!1))) + sq(cos(Im(x!1)))"
     "y"
     "1"))
   (replace -1 -3 rl)
   (expand "sq" -3 4)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "exp_negate" ("x" "y!1"))
   (lemma "exp_plus" ("x" "x!1" "y" "-y!1"))
   (assert)
   (flatten)
   (rewrite "cos_neg")
   (rewrite "sin_neg")
   (rewrite "exp_neg")
   (replace -1)
   (replace -2)
   (hide -1 -2)
   (split)
   (("1"
     (cross-mult)
     (lemma "div_distributes_minus"
      ("x"
       "sq_abs(exp(y!1)) * cos(Im(x!1)) * cos(Im(y!1)) * exp(Re(x!1))"
       "y"
       "sq_abs(exp(y!1)) * exp(Re(x!1)) * sin(Im(x!1)) * -sin(Im(y!1))"
       "n0z"
       "exp(Re(y!1))"))
     (replace -1)
     (hide -1)
     (cross-mult)
     (assert))
    ("2"
     (cross-mult)
     (lemma "div_distributes"
      ("x"
       "sq_abs(exp(y!1)) * cos(Im(x!1)) * -sin(Im(y!1)) * exp(Re(x!1))"
       "y"
       "sq_abs(exp(y!1)) * exp(Re(x!1)) * sin(Im(x!1)) * cos(Im(y!1))"
       "n0z"
       "exp(Re(y!1))"))
     (replace -1)
     (hide -1)
     (cross-mult)
     (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (expand "abs")
   (expand "sq_abs")
   (assert)
   (rewrite "sq_eq" 1 :dir rl)
   (assert)
   (lemma "sin2_cos2" ("a" "Im(z!1)"))
   (assert)
   (rewrite "sq_times")
   (rewrite "sq_times")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (expand "exp")
   (expand "arg")
   (assert)
   (rewrite "zero_times3")
   (rewrite "zero_times3")
   (case-replace "cos(Im(z!1)) = 0 AND sin(Im(z!1)) = 0")
   (("1" (lemma "sin_cos_eq_0" ("a" "Im(z!1)")) (flatten) (assert))
    ("2"
     (replace 1 2)
     (hide 1)
     (lemma "both_sides_times_pos_lt1"
      ("pz" "exp(Re(z!1))" "x" "sin(Im(z!1))" "y" "0"))
     (replace -1)
     (hide -1)
     (lemma "atan2_cancel_pos"
      ("x" "cos(Im(z!1))" "y" "sin(Im(z!1))" "pz" "exp(Re(z!1))"))
     (split)
     (("1"
       (replace -1)
       (hide -1)
       (case "0<=Im(z!1)")
       (("1"
         (lemma "sin_ge_0" ("a" "Im(z!1)"))
         (assert)
         (hide -3)
         (rewrite "atan2_cos_sin"))
        ("2"
         (case "Im(z!1)<0")
         (("1"
           (hide 1)
           (lemma "sin_period" ("a" "Im(z!1)" "j" "1"))
           (lemma "cos_period" ("a" "Im(z!1)" "j" "1"))
           (replace -1)
           (replace -2)
           (hide -1 -2)
           (lemma "sin_lt_0" ("a" "Im(z!1) + 2 * 1 * pi"))
           (assert)
           (rewrite "atan2_cos_sin")
           (assert))
          ("2" (assert))))))
      ("2" (flatten) (lemma "sin_cos_eq_0" ("a" "Im(z!1)")) (assert))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (z: complex):
                 -pi < Im(z) AND Im(z) <= pi =>
                  ln(exp(z))=z")
   (("1"
     (skosimp)
     (inst - "z!1+(2 * -j!1 * pi) * complex_i")
     (split)
     (("1"
       (lemma "exp_periodicity" ("x" "z!1" "j" "-j!1"))
       (assert)
       (flatten)
       (expand "arg")
       (assert)
       (replace -1)
       (replace -2)
       (assert)
       (case-replace
        "exp(Re(z!1)) * cos(Im(z!1)) = 0 AND
                  exp(Re(z!1)) * sin(Im(z!1)) = 0")
       (("1" (assert))
        ("2"
         (replace 1)
         (case-replace "exp(Re(z!1)) * sin(Im(z!1)) < 0")
         (("1" (assert)) ("2" (assert))))))
      ("2" (assert)) ("3" (assert))))
    ("2" (hide 2) (skosimp) (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (rewrite "exp_ln")
   (lemma "Re_cos_abs1" ("n0x" "n0z!1/abs(n0z!1)"))
   (lemma "Im_sin_abs1" ("n0x" "n0z!1/abs(n0z!1)"))
   (lemma "arg_div_abs" ("n0x" "n0z!1"))
   (replace -1 * rl)
   (hide -1)
   (rewrite "abs_div2")
   (rewrite "div_simp")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (rewrite "arg_inv")
   (split)
   (("1" (rewrite "ln_div")) ("2" (lift-if) (lift-if) (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (expand "cosh")
   (assert)
   (expand "sinh")
   (rewrite "sin_neg")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1"
     (flatten)
     (assert)
     (flatten)
     (typepred "cosh(Re(z!1))")
     (rewrite "zero_times3" -3)
     (lemma "sin_cos_eq_0" ("a" "Im(z!1)"))
     (replace -3)
     (rewrite "zero_times3" -2)
     (replace 1)
     (lemma "sin_eq_0" ("a" "Im(z!1)"))
     (assert)
     (skosimp)
     (inst + "i!1")
     (assert)
     (rewrite "zero_times1")
     (hide-all-but (-3 2))
     (expand "sinh")
     (name-replace "ZZ" "Re(z!1)")
     (rewrite "div_cancel3" -1)
     (lemma "exp_strict_increasing")
     (expand "strict_increasing?")
     (lemma "trichotomy" ("x" "ZZ"))
     (split)
     (("1" (inst - "-ZZ" "ZZ") (assert)) ("2" (propax))
      ("3" (inst - "ZZ" "-ZZ") (assert))))
    ("2"
     (skosimp*)
     (assert)
     (flatten)
     (rewrite "zero_times1")
     (rewrite "one_times")
     (replace -1)
     (replace -2)
     (hide -1 -2)
     (rewrite "sinh_0")
     (rewrite "cosh_0")
     (rewrite "sin_k_pi")
     (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1"
     (flatten)
     (assert)
     (flatten)
     (rewrite "zero_times3" -1)
     (lemma "sin_cos_eq_0" ("a" "Im(z!1)"))
     (replace -1)
     (rewrite "zero_times3" -2)
     (replace 1)
     (hide 1)
     (rewrite "cos_eq_0")
     (skosimp)
     (inst + "i!1")
     (assert)
     (hide -1)
     (name-replace "ZZ" "Re(z!1)")
     (expand "sinh")
     (lemma "exp_strict_increasing")
     (expand "strict_increasing?")
     (lemma "trichotomy" ("x" "ZZ"))
     (split)
     (("1" (inst - "-ZZ" "ZZ") (assert)) ("2" (propax))
      ("3" (inst - "ZZ" "-ZZ") (assert))))
    ("2"
     (skosimp*)
     (assert)
     (flatten)
     (replace -1)
     (replace -2)
     (hide -1 -2)
     (rewrite "sinh_0")
     (rewrite "cosh_0")
     (assert)
     (lemma "cos_eq_0" ("a" "1 / 2 * pi + j!1 * pi"))
     (replace -1)
     (inst + "j!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "tanh")
   (assert)
   (lemma "c_sinh_0")
   (lemma "c_cosh_0")
   (assert)
   (flatten)
   (replace -1)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "sech")
   (assert)
   (lemma "c_cosh_0")
   (assert)
   (flatten)
   (assert)
   (replace -1)
   (expand "sq_abs")
   (assert)
   (replace -1)
   (replace -2)
   (hide-all-but 1)
   (grind))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (lemma "sin2_cos2" ("a" "Im(z!1)"))
   (lemma "cosh_sinh_one" ("x" "Re(z!1)"))
   (lemma "both_sides_times1"
    ("x"
     "sq(cosh(Re(z!1))) - sq(sinh(Re(z!1)))"
     "y"
     "1"
     "n0z"
     "sq(sin(Im(z!1))) + sq(cos(Im(z!1)))"))
   (("1" (expand "sq") (assert)) ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "cz!1")
   (expand "Cosh?")
   (expand "tanh")
   (expand "sech")
   (lemma "c_cosh_sinh_one" ("z" "cz!1"))
   (lemma "complex_sq_div" ("z" "sinh(cz!1)" "n0z" "cosh(cz!1)"))
   (lemma "complex_sq_div" ("z" "complex_(1,0)" "n0z" "cosh(cz!1)"))
   (case "sq(cosh(cz!1)) /=0")
   (("1"
     (name-replace "SC" "sq(cosh(cz!1))")
     (name-replace "SS" "sq(sinh(cz!1))")
     (name-replace "DRL1" "sq(sinh(cz!1) / cosh(cz!1))")
     (name-replace "DRL2" "sq(1 / cosh(cz!1))")
     (name-replace "DRL3" "sq(complex_(1, 0) / cosh(cz!1))")
     (hide -5)
     (assert)
     (flatten)
     (case-replace "Re(DRL2)=Re(DRL3)")
     (("1"
       (hide -1)
       (case-replace "Im(DRL2)=Im(DRL3)")
       (("1"
         (hide -1)
         (replace -2)
         (replace -3)
         (replace -4)
         (replace -5)
         (hide -2 -3 -4 -5)
         (case "sq_abs(SC)>0")
         (("1"
           (lemma "div_cancel3"
            ("y"
             "1"
             "x"
             "Im(SS) * Im(SC) + Re(SS) * Re(SC)+Re(SC)"
             "n0z"
             "sq_abs(SC)"))
           (("1"
             (replace -1)
             (hide -1)
             (lemma "div_cancel3"
              ("y"
               "0"
               "x"
               "Im(SS) * Re(SC) - Re(SS) * Im(SC)-Im(SC)"
               "n0z"
               "sq_abs(SC)"))
             (replace -1)
             (hide -1)
             (expand "sq_abs")
             (expand "sq")
             (assert))
            ("2" (assert))))
          ("2"
           (hide-all-but (-1 1))
           (expand "sq_abs")
           (split)
           (("1"
             (lemma "sq_nz_pos" ("nz" "Re(SC)"))
             (("1" (assert)) ("2" (propax))))
            ("2"
             (lemma "sq_nz_pos" ("nz" "Im(SC)"))
             (("1" (assert)) ("2" (propax))))))))
        ("2"
         (expand "DRL2")
         (expand "DRL3")
         (hide 2)
         (expand "sq")
         (assert))))
      ("2"
       (expand "DRL2")
       (expand "DRL3")
       (expand "sq")
       (hide-all-but 1)
       (assert))))
    ("2"
     (hide-all-but (1 -4))
     (name-replace "X" "cosh(cz!1)")
     (assert)
     (flatten)
     (lemma "zero_times3" ("x" "Im(X)" "y" "Re(X)"))
     (assert)
     (split)
     (("1"
       (assert)
       (replace -1)
       (lemma "sq_eq_0" ("a" "Re(X)"))
       (assert)
       (rewrite "sq_rew"))
      ("2"
       (replace -1)
       (assert)
       (rewrite "sq_rew")
       (lemma "sq_eq_0" ("a" "Im(X)"))
       (assert))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "sz!1")
   (expand "Sinh?")
   (expand "coth")
   (expand "csch")
   (lemma "complex_sq_div" ("z" "cosh(sz!1)" "n0z" "sinh(sz!1)"))
   (lemma "complex_sq_div" ("z" "complex_(1,0)" "n0z" "sinh(sz!1)"))
   (lemma "c_cosh_sinh_one" ("z" "sz!1"))
   (name-replace "SINH" "sinh(sz!1)")
   (name-replace "DRL1" "sq(cosh(sz!1) / SINH)")
   (case "sq(complex_(1, 0) / SINH)=sq(1 / SINH)")
   (("1"
     (name-replace "DRL2" "sq(complex_(1, 0) / SINH)")
     (name-replace "DRL3" "sq(1 / SINH)")
     (name-replace "SS" "sq(SINH)")
     (name-replace "SC" "sq(cosh(sz!1))")
     (assert)
     (flatten)
     (assert)
     (replace -1)
     (replace -2)
     (replace -5)
     (replace -7)
     (case-replace "Im(SC)=Im(SS)")
     (("1"
       (case-replace "Re(SC)=1+Re(SS)")
       (("1"
         (assert)
         (lemma "div_simp" ("n0x" "sq_abs(SS)"))
         (expand "sq_abs" -1 1)
         (expand "sq" -1)
         (assert))
        ("2" (assert))))
      ("2" (assert))))
    ("2" (hide 2 -2 -3 -1) (expand "sq") (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (lemma "cosh_minus_sinh" ("x" "Re(z!1)"))
   (assert)
   (rewrite "cos_neg")
   (rewrite "sin_neg")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (rewrite "sin_neg")
   (rewrite "cos_neg")
   (rewrite "cosh_neg")
   (rewrite "sinh_neg")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (rewrite "sinh_neg")
   (rewrite "cosh_neg")
   (rewrite "cos_neg")
   (rewrite "sin_neg")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "tanh")
   (lemma "c_sinh_neg" ("z" "cz!1"))
   (lemma "c_cosh_neg" ("z" "cz!1"))
   (typepred "cz!1")
   (expand "Cosh?")
   (name-replace "CNZ" "cosh(-cz!1)")
   (name-replace "SNZ" "sinh(-cz!1)")
   (name-replace "CZ" "cosh(cz!1)")
   (name-replace "SZ" "sinh(cz!1)")
   (assert)
   (flatten)
   (expand "sq_abs")
   (replace -2)
   (replace -3)
   (replace -4)
   (replace -5)
   (hide -2 -3 -4 -5)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "sz!1")
   (expand "Sinh?")
   (expand "csch")
   (lemma "c_sinh_neg" ("z" "sz!1"))
   (name-replace "SNZ" "sinh(-sz!1)")
   (name-replace "SZ" "sinh(sz!1)")
   (assert)
   (flatten)
   (expand "sq_abs")
   (replace -1)
   (replace -2)
   (hide -1 -2)
   (rewrite "sq_neg")
   (rewrite "sq_neg")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "cz!1")
   (expand "Cosh?")
   (expand "sech")
   (lemma "c_cosh_neg" ("z" "cz!1"))
   (name-replace "CNZ" "cosh(-cz!1)")
   (name-replace "CZ" "cosh(cz!1)")
   (assert)
   (flatten)
   (expand "sq_abs")
   (replace -1)
   (replace -2)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "coth")
   (typepred "sz!1")
   (expand "Sinh?")
   (lemma "c_sinh_neg" ("z" "sz!1"))
   (lemma "c_cosh_neg" ("z" "sz!1"))
   (name-replace "SZ" "sinh(sz!1)")
   (name-replace "SNZ" "sinh(-sz!1)")
   (name-replace "CZ" "cosh(sz!1)")
   (name-replace "CNZ" "cosh(-sz!1)")
   (assert)
   (flatten)
   (expand "sq_abs")
   (replace -1)
   (replace -2)
   (replace -3)
   (replace -4)
   (rewrite "sq_neg")
   (rewrite "sq_neg")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (assert)
   (rewrite "sinh_sum")
   (assert)
   (rewrite "cosh_sum")
   (rewrite "cos_plus")
   (rewrite "sin_plus")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "c_sinh_sum" ("x" "x!1" "y" "-y!1"))
   (assert)
   (flatten)
   (rewrite "sin_neg")
   (rewrite "cos_neg")
   (rewrite "cosh_neg")
   (rewrite "sinh_neg")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (rewrite "cosh_sum")
   (rewrite "cos_plus")
   (rewrite "sinh_sum")
   (rewrite "sin_plus")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "c_cosh_sum" ("x" "x!1" "y" "-y!1"))
   (assert)
   (rewrite "cosh_neg")
   (rewrite "cos_neg")
   (rewrite "sin_neg")
   (rewrite "sinh_neg")
   (assert)
   (flatten)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (rewrite "cos_2a")
   (rewrite "sin_2a")
   (rewrite "sinh2x")
   (rewrite "cosh2x")
   (split)
   (("1" (assert))
    ("2"
     (case-replace
      "2*sq(cosh(Re(x!1))) - 1=sq(cosh(Re(x!1)))+sq(sinh(Re(x!1)))")
     (("1" (expand "sq") (propax))
      ("2" (hide 2) (lemma "cosh_sinh_one" ("x" "Re(x!1)")) (assert))))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (rewrite "cosh2x")
   (rewrite "sinh2x")
   (rewrite "cos_2a")
   (rewrite "sin_2a")
   (assert)
   (expand "sq")
   (rewrite "sq_rew")
   (rewrite "sq_rew")
   (rewrite "sq_rew")
   (lemma "sin2_cos2" ("a" "Im(x!1)"))
   (expand "sq")
   (assert)
   (case-replace
    "cos(Im(x!1)) * cos(Im(x!1))=1-sin(Im(x!1)) * sin(Im(x!1))")
   (("1"
     (hide -1 -2)
     (assert)
     (lemma "cosh_sinh_one" ("x" "Re(x!1)"))
     (expand "sq")
     (assert))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "c_cosh2x" ("x" "x!1"))
   (lemma "c_cosh_sinh_one" ("z" "x!1"))
   (assert)
   (flatten)
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (rewrite "sinh4x")
   (rewrite "cosh4x")
   (rewrite "expt_x4")
   (rewrite "expt_x4")
   (assert)
   (lemma "cos_2a" ("a" "Im(x!1)"))
   (lemma "cos_2a" ("a" "2*Im(x!1)"))
   (replace -1)
   (replace -2)
   (lemma "sin_2a" ("a" "Im(x!1)"))
   (lemma "sin_2a" ("a" "2*Im(x!1)"))
   (replace -1)
   (replace -2)
   (assert)
   (replace -4)
   (split)
   (("1" (assert) (assert) (expand "sq") (propax))
    ("2" (assert) (hide-all-but 1) (expand "sq") (propax))))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (lemma "cosh_neg" ("x" "Im(z!1)"))
   (lemma "sinh_neg" ("x" "Im(z!1)"))
   (assert)
   (rewrite "zero_times1")
   (assert)
   (lemma "sin_neg" ("a" "Re(z!1)"))
   (lemma "cos_neg" ("a" "Re(z!1)"))
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (assert)
   (rewrite "Im_cos")
   (rewrite "Im_cosh")
   (lemma "cosh_neg" ("x" "Im(z!1)"))
   (lemma "sinh_neg" ("x" "Im(z!1)"))
   (assert))


proof_type: t_proof
decl_type: tcc
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (rewrite "zero_times3")
   (rewrite "zero_times3")
   (lemma "sin_cos_eq_0" ("a" "Im(z!1)"))
   (assert))


proof_type: t_proof
decl_type: tcc
library: complex_alt
theory: complex_lnexp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "Cosh?")
   (assert)
   (flatten)
   (hide -2)
   (rewrite "cos_0")
   (rewrite "cosh_0")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_integration
theory: young
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem + ("c!1" "_"))
   (name "F" "lambda r: (1 - c!1) + c!1 * r - r ^ c!1")
   (case "FORALL (p: {r | r > 1}): F(p)>0")
   (("1" (skosimp) (inst - "p!1") (expand "F") (assert))
    ("2"
     (hide 2)
     (case "F(1) = 0")
     (("1"
       (lemma "real_expt_derivable" ("x" "c!1"))
       (flatten)
       (lemma "deriv_scal_fun[posreal]" ("b" "c!1" "ff" "I[posreal]"))
       (lemma "deriv_id_fun[posreal]")
       (lemma "deriv_const_fun[posreal]" ("b" "1-c!1"))
       (lemma "deriv_sum_fun[posreal]"
        ("ff1" "const_fun[posreal](1 - c!1)" "ff2" "c!1 * I[posreal]"))
       (replace -4)
       (expand "I")
       (expand "const_fun")
       (expand "*")
       (expand "+")
       (lemma "deriv_diff_fun[posreal]"
        ("ff1"
         "LAMBDA (x_1: posreal): 1 - c!1 + c!1 * x_1"
         "ff2"
         "LAMBDA (y:posreal): y ^ c!1"))
       (("1"
         (replace -7)
         (replace -2)
         (expand "-")
         (case "derivable?[posreal](F)")
         (("1"
           (case "deriv[posreal](F)=(LAMBDA (x: posreal): c!1 - c!1 * x ^ (c!1 - 1))")
           (("1"
             (hide-all-but (-1 -2 -10 1))
             (lemma "minimum_derivative[posreal]" ("g" "F" "x" "1"))
             (replace -4)
             (skosimp)
             (typepred "p!1")
             (inst - "p!1")
             (replace -5 -4)
             (simplify -4)
             (rewrite "real_expt_1a")
             (assert)
             (hide 2 -4 -5 -6 -1 -2)
             (skosimp)
             (assert)
             (typepred "c!1")
             (typepred "y!1")
             (case-replace
              "y!1 ^ (c!1 - 1) * c!1 - y!1 ^ (c!1 - 1) * c!1 * y!1 - c!1 + y!1 * c!1= (y!1 ^ (c!1 - 1)-1)*(1-y!1)*c!1")
             (("1"
               (hide -1)
               (case "y!1>1")
               (("1"
                 (lemma "real_expt_lt1" ("x" "y!1" "a" "c!1-1"))
                 (flatten -1)
                 (hide -1)
                 (split -1)
                 (("1"
                   (hide 1)
                   (lemma "negreal_times_negreal_is_posreal"
                    ("nx" "y!1 ^ (c!1 - 1) - 1" "ny" "1-y!1"))
                   (("1"
                     (lemma "posreal_times_posreal_is_posreal"
                      ("px"
                       "(y!1 ^ (c!1 - 1) - 1) * (1 - y!1)"
                       "py"
                       "c!1"))
                     (("1" (propax)) ("2" (assert))))
                    ("2" (assert)) ("3" (assert))))
                  ("2" (assert))))
                ("2"
                 (case "y!1<1")
                 (("1"
                   (hide 1 2)
                   (lemma "real_expt_gt1" ("x" "y!1" "a" "c!1-1"))
                   (lemma "posreal_times_posreal_is_posreal"
                    ("px" "y!1 ^ (c!1 - 1) - 1" "py" "1-y!1"))
                   (("1"
                     (lemma "posreal_times_posreal_is_posreal"
                      ("px"
                       "(y!1 ^ (c!1 - 1) - 1) * (1 - y!1)"
                       "py"
                       "c!1"))
                     (("1" (propax)) ("2" (assert))))
                    ("2" (assert)) ("3" (assert) (hide 2) (assert))))
                  ("2" (assert))))))
              ("2" (assert))))
            ("2"
             (case-replace
              "(LAMBDA (x: posreal): 1 - x ^ c!1 - c!1 + c!1 * x)=F")
             (("1"
               (apply-extensionality 1 :hide? t)
               (replace -3)
               (assert))
              ("2" (expand "F") (propax))))
            ("3" (propax))))
          ("2"
           (case-replace
            "F=(LAMBDA (x: posreal): 1 - x ^ c!1 - c!1 + c!1 * x)")
           (("1"
             (hide 2)
             (lemma "derivable_diff[posreal]"
              ("ff1"
               "lambda (x:posreal): 1-c!1+c!1*x"
               "ff2"
               "(LAMBDA (y:posreal): y ^ c!1)"))
             (expand "-")
             (propax))
            ("2" (expand "F") (propax))))))
        ("2" (propax))
        ("3"
         (assert)
         (lemma "derivable_sum[posreal]"
          ("ff1" "const_fun[posreal](1-c!1)" "ff2" "c!1*I[posreal]"))
         (expand "*")
         (expand "+")
         (expand "const_fun")
         (expand "I")
         (propax))))
      ("2" (hide 2 -1) (expand "F") (rewrite "real_expt_1a") (assert))))))


proof_type: f_proof
decl_type: formula
library: complex_integration
theory: young
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (case-replace "a!1=0")
   (("1"
     (rewrite "real_expt_0x")
     (case-replace "b!1=0")
     (("1" (rewrite "real_expt_0x") (assert))
      ("2"
       (lemma "real_expt_pos" ("px" "b!1" "a" "q!1"))
       (("1"
         (lemma "posreal_div_posreal_is_posreal"
          ("px" "b!1 ^ q!1" "py" "q!1"))
         (("1" (assert)) ("2" (propax))))
        ("2" (assert))))))
    ("2"
     (case-replace "b!1=0")
     (("1"
       (rewrite "real_expt_0x")
       (lemma "real_expt_pos" ("px" "a!1" "a" "q!1"))
       (("1"
         (lemma "posreal_div_posreal_is_posreal"
          ("px" "a!1 ^ p!1" "py" "p!1"))
         (("1" (assert)) ("2" (assert))))
        ("2" (assert))))
      ("2"
       (case "a!1>0&b!1>0")
       (("1"
         (flatten)
         (hide 1 2)
         (name "F" "lambda (x:posreal): x^p!1/p!1+x^(-q!1)/q!1")
         (lemma "real_expt_derivable" ("x" "p!1"))
         (lemma "real_expt_derivable" ("x" "-q!1"))
         (flatten)
         (lemma "deriv_scal_fun[posreal]"
          ("b" "1/p!1" "ff" "LAMBDA (y:posreal): y ^ p!1"))
         (("1"
           (lemma "deriv_scal_fun[posreal]"
            ("b" "1/q!1" "ff" "LAMBDA (y:posreal): y ^ -q!1"))
           (("1"
             (case "derivable?[posreal](F)&deriv[posreal](F) = lambda (x:posreal): x^(p!1-1)-x^(-q!1-1)")
             (("1"
               (flatten)
               (case "deriv[posreal](F)(1)=0")
               (("1"
                 (case "forall (t:posreal): 1<=F(t)")
                 (("1"
                   (inst - "a!1^(1/q!1)*b!1^-(1/p!1)")
                   (("1"
                     (lemma "both_sides_times_pos_le1"
                      ("pz"
                       "a!1*b!1"
                       "x"
                       "1"
                       "y"
                       "F(a!1 ^ (1 / q!1) * b!1 ^ -(1 / p!1))"))
                     (("1"
                       (assert)
                       (replace -1 -2 rl)
                       (hide -1)
                       (hide-all-but (-1 -12 -13 -14 1))
                       (expand "F")
                       (rewrite "mult_real_expt" -1)
                       (("1"
                         (rewrite "real_expt_times" -1 :dir rl)
                         (case-replace
                          "a!1 ^ ((1 / q!1) * (-q!1))=1/a!1")
                         (("1"
                           (hide -1)
                           (rewrite "real_expt_times" -1 :dir rl)
                           (rewrite "mult_real_expt")
                           (rewrite "real_expt_times" -1 :dir rl)
                           (rewrite "real_expt_times" -1 :dir rl)
                           (case-replace
                            "b!1 ^ (-(1 / p!1) * p!1)=1/b!1")
                           (("1"
                             (hide -1)
                             (case-replace "(-(1 / p!1) * (-q!1))=q!1-1")
                             (("1"
                               (case-replace "((1 / q!1) * p!1)=p!1-1")
                               (("1"
                                 (hide -1 -2)
                                 (rewrite "real_expt_minus" -1)
                                 (rewrite "real_expt_minus" -1)
                                 (rewrite "real_expt_x1")
                                 (rewrite "real_expt_x1")
                                 (assert))
                                ("2"
                                 (hide-all-but (-5 1))
                                 (case-replace "1/q!1=1-1/p!1")
                                 (("1" (assert)) ("2" (assert))))))
                              ("2"
                               (hide -1 2)
                               (assert)
                               (case-replace "1/p!1=1-1/q!1")
                               (("1" (assert)) ("2" (assert))))))
                            ("2"
                             (hide-all-but (-3 1))
                             (expand "^")
                             (rewrite "nnreal_expt_x1")
                             (lemma "posreal_div_posreal_is_posreal"
                              ("px" "1" "py" "b!1"))
                             (assert))))
                          ("2"
                           (hide-all-but (-2 1))
                           (expand "^")
                           (rewrite "nnreal_expt_x1")
                           (lemma "posreal_div_posreal_is_posreal"
                            ("px" "1" "py" "a!1"))
                           (assert))))
                        ("2"
                         (rewrite "real_expt_pos")
                         (rewrite "real_expt_pos"))))
                      ("2"
                       (rewrite "posreal_times_posreal_is_posreal" 1))))
                    ("2"
                     (rewrite "posreal_times_posreal_is_posreal" 1)
                     (("1" (rewrite "real_expt_pos"))
                      ("2" (rewrite "real_expt_pos"))))
                    ("3" (assert)) ("4" (assert))))
                  ("2"
                   (hide 2)
                   (lemma "minimum_derivative[posreal]"
                    ("g" "F" "x" "1"))
                   (replace -2)
                   (skosimp)
                   (inst - "t!1")
                   (case-replace "F(1)=1")
                   (("1"
                     (case-replace "1/=t!1")
                     (("1"
                       (split -3)
                       (("1" (assert))
                        ("2"
                         (skosimp)
                         (hide 3 4)
                         (replace -4)
                         (assert)
                         (hide-all-but (-12 -13 -14 1 2))
                         (case "y!1>1")
                         (("1"
                           (lemma "real_expt_gt1"
                            ("x" "y!1" "a" "p!1-1"))
                           (assert)
                           (lemma "real_expt_lt1"
                            ("x" "y!1" "a" "-q!1-1"))
                           (assert)
                           (hide 1)
                           (lemma "posreal_times_posreal_is_posreal"
                            ("px"
                             "y!1 ^ (p!1 - 1)-y!1 ^ (-q!1 - 1)"
                             "py"
                             "y!1-1"))
                           (assert))
                          ("2"
                           (assert)
                           (case "y!1<1")
                           (("1"
                             (hide 1 2)
                             (lemma "real_expt_lt1"
                              ("x" "y!1" "a" "p!1-1"))
                             (assert)
                             (lemma "real_expt_gt1"
                              ("x" "y!1" "a" "-q!1-1"))
                             (assert)
                             (lemma "posreal_times_posreal_is_posreal"
                              ("px"
                               "y!1 ^ (-q!1 - 1)-y!1 ^ (p!1 - 1)"
                               "py"
                               "1-y!1"))
                             (assert))
                            ("2" (assert))))))))
                      ("2" (assert))))
                    ("2"
                     (hide-all-but (-12 -13 -14 1))
                     (expand "F")
                     (rewrite "real_expt_1a")
                     (rewrite "real_expt_1a")
                     (assert))))))
                ("2"
                 (replace -2)
                 (assert)
                 (rewrite "real_expt_1a")
                 (rewrite "real_expt_1a")
                 (assert))))
              ("2"
               (lemma "derivable_sum[posreal]"
                ("ff1"
                 "1 / p!1 * (LAMBDA (y: posreal): y ^ p!1)"
                 "ff2"
                 "1 / q!1 * (LAMBDA (y: posreal): y ^ -q!1)"))
               (lemma "deriv_sum_fun[posreal]"
                ("ff1"
                 "1 / p!1 * (LAMBDA (y: posreal): y ^ p!1)"
                 "ff2"
                 "1 / q!1 * (LAMBDA (y: posreal): y ^ -q!1)"))
               (replace -3)
               (replace -4)
               (replace -6)
               (replace -8)
               (expand "*")
               (expand "+")
               (expand "F" 1)
               (assert))))
            ("2" (propax))))
          ("2" (propax))))
        ("2" (assert))))))))


proof_type: t_proof
decl_type: tcc
library: complex_integration
theory: complex_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "metric?")
   (split)
   (("1"
     (expand "metric_zero?")
     (skosimp)
     (expand "-")
     (expand "abs")
     (expand "sq_abs")
     (assert)
     (lemma "sqrt_lem"
      ("nny" "sq(Im(x!1) - Im(y!1)) + sq(Re(x!1) - Re(y!1))" "nnz" "0"))
     (replace -1)
     (hide -1)
     (lemma "sq_plus_eq_0"
      ("a" "Im(x!1) - Im(y!1)" "b" "Re(x!1) - Re(y!1)"))
     (assert)
     (name-replace "SQS" "sq(Im(x!1) - Im(y!1)) + sq(Re(x!1) - Re(y!1))")
     (assert)
     (split)
     (("1" (flatten) (assert) (flatten) (assert))
      ("2" (flatten) (replace -1) (assert))))
    ("2"
     (expand "metric_symmetric?")
     (skosimp)
     (lemma "abs_neg" ("z" "y!1-x!1"))
     (replace -1 1 rl)
     (expand "-")
     (hide -1)
     (expand "abs")
     (expand "sq_abs")
     (assert))
    ("3"
     (expand "metric_triangle?")
     (skosimp)
     (lemma "abs_triangle" ("z1" "x!1-y!1" "z2" "y!1-z!1"))
     (name-replace "RHS" "abs(x!1 - y!1) + abs(y!1 - z!1)")
     (expand "+ ")
     (expand "-")
     (expand "abs")
     (expand "sq_abs")
     (assert))))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_topology
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "fullset[real]")
   (hide -1)
   (expand "fullset")
   (expand "complete_metric_space?")
   (flatten)
   (split)
   (("1"
     (hide -1 -2)
     (expand "metric_space?")
     (split)
     (("1"
       (expand "metric_zero?")
       (skosimp)
       (rewrite "abs_is_0")
       (assert)
       (split)
       (("1" (flatten) (assert)) ("2" (flatten) (assert))))
      ("2"
       (expand "metric_symmetric?")
       (skosimp)
       (expand "abs")
       (expand "sq_abs")
       (assert)
       (rewrite "sq_neg_minus")
       (assert)
       (name-replace "SQ1" "sq(Im(y!1) - Im(x!1))")
       (rewrite "sq_neg_minus"))
      ("3"
       (expand "metric_triangle?")
       (skosimp)
       (lemma "abs_triangle" ("z1" "x!1-y!1" "z2" "y!1-z!1"))
       (assert)
       (expand "+" -1 1)
       (assert)
       (expand "-" 1 1)
       (propax))))
    ("2"
     (hide -1)
     (expand "metric_complete?")
     (skosimp)
     (inst-cp - "lambda (n:nat): Im(u!1(n))")
     (inst - "lambda (n:nat): Re(u!1(n))")
     (split -2)
     (("1"
       (split -3)
       (("1"
         (hide -3)
         (expand "metric_convergent?")
         (skosimp*)
         (inst + "complex_(x!2,x!1)")
         (expand "metric_converges_to")
         (skosimp)
         (expand "ball")
         (expand "member")
         (expand "abs" 1)
         (expand "sq_abs")
         (assert)
         (inst - "r!1/2")
         (inst - "r!1/2")
         (skosimp*)
         (inst + "n!1+n!2")
         (skosimp)
         (inst - "i!1")
         (inst - "i!1")
         (assert)
         (rewrite "sq_lt" + :dir rl)
         (rewrite "sq_lt" -1 :dir rl)
         (rewrite "sq_lt" -2 :dir rl)
         (rewrite "sq_div")
         (expand "sq" -1 3)
         (expand "sq" -2 3)
         (assert))
        ("2"
         (hide -1 2)
         (expand "cauchy?")
         (skosimp)
         (expand "ball")
         (expand "member")
         (inst - "r!1")
         (skosimp)
         (inst + "n!1")
         (skosimp)
         (inst - "i!1" "j!1")
         (assert)
         (expand "abs" -)
         (expand "sq_abs")
         (rewrite "sq_lt" -3 :dir rl)
         (rewrite "sq_sqrt")
         (rewrite "sq_lt" 1 :dir rl)
         (assert))))
      ("2"
       (hide -2 2)
       (expand "cauchy?")
       (skosimp)
       (inst - "r!1")
       (skosimp)
       (inst + "n!1")
       (skosimp)
       (inst - "i!1" "j!1")
       (expand "member")
       (expand "ball")
       (assert)
       (expand "abs" -3)
       (expand "sq_abs")
       (rewrite "sq_lt" 1 :dir rl)
       (rewrite "sq_lt" -3 :dir rl)
       (rewrite "sq_sqrt")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: complex_integration
theory: complex_measurable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (expand "Re")
   (expand "Im")
   (rewrite "const_measurable")
   (rewrite "const_measurable"))


proof_type: f_proof
decl_type: formula
library: complex_integration
theory: complex_measurable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "abs_complex_measurable" ("g" "g!1"))
   (lemma "expt_measurable" ("a" "a!1" "g" "abs[T](g!1)"))
   (("1" (propax))
    ("2"
     (expand "nn_measurable?")
     (hide-all-but 1)
     (skosimp)
     (expand "abs")
     (assert))))


proof_type: f_proof
decl_type: formula
library: complex_integration
theory: complex_measurable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "pointwise_measurable"
    ("u" "lambda n: Re(u!1(n))" "f" "Re(f!1)"))
   (("1"
     (lemma "pointwise_measurable"
      ("u" "lambda n: Im(u!1(n))" "f" "Im(f!1)"))
     (("1"
       (assert)
       (split)
       (("1"
         (split)
         (("1" (assert))
          ("2"
           (hide -1 2)
           (expand "pointwise_convergence?")
           (skosimp)
           (inst - "x!1")
           (rewrite "metric_convergence_def")
           (rewrite "metric_convergence_def")
           (expand "metric_converges_to")
           (skosimp)
           (inst - "r!1")
           (skosimp)
           (inst + "n!1")
           (skosimp)
           (inst - "i!1")
           (assert)
           (hide -1)
           (expand "ball")
           (expand "abs" -1)
           (rewrite "sq_lt" -1 :dir rl)
           (rewrite "sq_lt" 1 :dir rl)
           (rewrite "sq_sqrt")
           (expand "sq_abs")
           (typepred "sq(Im(f!1(x!1) - u!1(i!1)(x!1)))")
           (assert))))
        ("2"
         (hide-all-but (-2 1))
         (expand "pointwise_convergence?")
         (skosimp)
         (inst - "x!1")
         (rewrite "metric_convergence_def")
         (rewrite "metric_convergence_def")
         (expand "metric_converges_to")
         (skosimp)
         (expand "ball")
         (expand "member")
         (inst - "r!1")
         (skosimp)
         (inst + "n!1")
         (skosimp)
         (inst - "i!1")
         (assert)
         (hide -1)
         (expand "abs" -1)
         (rewrite "sq_lt" -1 :dir rl)
         (rewrite "sq_sqrt")
         (expand "sq_abs")
         (rewrite "sq_lt" 1 :dir rl)
         (assert)
         (typepred "sq(Re(f!1(x!1)) - Re(u!1(i!1)(x!1)))")
         (assert))))
      ("2" (skosimp) (typepred "u!1(n!1)") (assert) (flatten))))
    ("2" (skosimp) (typepred "u!1(n!1)") (assert) (flatten))))


proof_type: t_proof
decl_type: tcc
library: complex_integration
theory: complex_measurable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "complex_measurable?")
   (expand "Re")
   (expand "Im")
   (assert)
   (lemma "const_measurable" ("c" "0"))
   (assert))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_measurable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + "f!1")
   (typepred "f!1")
   (expand "constant?")
   (skosimp)
   (replace -1)
   (hide -1)
   (assert)
   (expand "const_fun")
   (expand "Re")
   (expand "Im")
   (lemma "const_measurable" ("c" "Re(a!1)"))
   (lemma "const_measurable" ("c" "Im(a!1)"))
   (assert))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_measurable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (typepred "g!1")
   (assert)
   (flatten)
   (lemma "scal_measurable" ("c" "Re(c!1)" "g" "Re(g!1)"))
   (("1"
     (lemma "scal_measurable" ("c" "Im(c!1)" "g" "Re(g!1)"))
     (lemma "scal_measurable" ("c" "Re(c!1)" "g" "Im(g!1)"))
     (("1"
       (lemma "scal_measurable" ("c" "Im(c!1)" "g" "Im(g!1)"))
       (rewrite "sum_measurable")
       (rewrite "diff_measurable"))
      ("2" (propax))))
    ("2" (propax))))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_measurable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "g1!1")
   (typepred "g2!1")
   (assert)
   (flatten)
   (rewrite "sum_measurable")
   (rewrite "sum_measurable"))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_measurable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "g!1")
   (assert)
   (flatten)
   (rewrite "opp_measurable")
   (rewrite "opp_measurable"))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_measurable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "g1!1")
   (typepred "g2!1")
   (assert)
   (flatten)
   (rewrite "diff_measurable")
   (rewrite "diff_measurable"))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_measurable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "g!1")
   (assert)
   (flatten)
   (expand "abs")
   (expand "abs")
   (expand "sq_abs")
   (lemma "sq_measurable" ("g" "Re(g!1)"))
   (("1"
     (lemma "sq_measurable" ("g" "Im(g!1)"))
     (("1"
       (lemma "sum_measurable"
        ("g1" "sq[T](Im(g!1))" "g2" "sq[T](Re(g!1))"))
       (("1"
         (lemma "expt_measurable"
          ("g" "(+[T])(sq[T](Im(g!1)), sq[T](Re(g!1)))" "a" "1/2"))
         (("1"
           (hide-all-but (-1 1))
           (expand "^" -1)
           (expand "+" -1)
           (expand "sq" -1)
           (expand "Im" -1)
           (expand "Re" -1)
           (case-replace
            "(LAMBDA (x: T): (sq(Im(g!1(x))) + sq(Re(g!1(x)))) ^ (1 / 2))=(LAMBDA (x: T): sqrt(sq(Im(g!1(x))) + sq(Re(g!1(x)))))")
           (hide -1 2)
           (apply-extensionality :hide? t)
           (name-replace "DRL" "sq(Im(g!1(x!1))) + sq(Re(g!1(x!1)))")
           (lemma "sq_eq" ("nna" "DRL ^ (1 / 2)" "nnb" "sqrt(DRL)"))
           (replace -1 1 rl)
           (hide -1)
           (rewrite "sq_sqrt")
           (lemma "real_expt_times" ("x" "DRL" "a" "1/2" "b" "2"))
           (rewrite "real_expt_x1")
           (name-replace "DRL2" "DRL ^ (1 / 2)")
           (rewrite "real_expt_int_rew")
           (expand "^")
           (expand "sq")
           (expand "expt")
           (expand "expt")
           (expand "expt")
           (assert))
          ("2"
           (expand "nn_measurable?")
           (assert)
           (skosimp)
           (hide-all-but 1)
           (expand "+")
           (expand "sq")
           (expand "Im")
           (expand "Re")
           (lemma "sq_pos" ("a" "Im(g!1(x!1))"))
           (lemma "sq_pos" ("a" "Re(g!1(x!1))"))
           (assert))))
        ("2" (propax)) ("3" (propax))))
      ("2" (propax))))
    ("2" (propax))))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_measurable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "g!1")
   (assert)
   (flatten)
   (lemma "sq_measurable" ("g" "Re(g!1)"))
   (("1"
     (lemma "sq_measurable" ("g" "Im(g!1)"))
     (("1"
       (lemma "prod_measurable" ("g1" "Re(g!1)" "g2" "Im(g!1)"))
       (lemma "scal_measurable" ("c" "2" "g" "Re(g!1) * Im(g!1)"))
       (("1"
         (assert)
         (expand "*")
         (expand "Im")
         (expand "Re")
         (assert)
         (expand "sq")
         (assert)
         (expand "sq")
         (assert)
         (lemma "diff_measurable")
         (inst - "(LAMBDA (x_1: T): Re(g!1(x_1)) * Re(g!1(x_1)))"
          "(LAMBDA (x_1: T): Im(g!1(x_1)) * Im(g!1(x_1)))")
         (expand "-")
         (propax))
        ("2" (propax))))
      ("2" (propax))))
    ("2" (propax))))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_measurable
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "sum_complex_measurable" ("g1" "g1!1" "g2" "g2!1"))
   (lemma "diff_complex_measurable" ("g1" "g1!1" "g2" "g2!1"))
   (lemma "sq_complex_measurable" ("g" "(+[T])(g1!1, g2!1)"))
   (lemma "sq_complex_measurable" ("g" "(-[T])(g1!1, g2!1)"))
   (lemma "diff_complex_measurable"
    ("g1" "sq[T]((+[T])(g1!1, g2!1))" "g2" "sq[T]((-[T])(g1!1, g2!1))"))
   (rewrite "prod_def" 1)
   (lemma "scal_complex_measurable"
    ("c"
     "complex_(1/4,0)"
     "g"
     "(-[T])
                                   (sq[T]((+[T])(g1!1, g2!1)),
                                    sq[T]((-[T])(g1!1, g2!1)))"))
   (name-replace "FG" "sq(g1!1 + g2!1) - sq(g1!1 - g2!1)")
   (hide-all-but (-1 1))
   (assert)
   (flatten)
   (expand "Re" 1)
   (expand "Im" 1)
   (expand "*" 1)
   (case-replace
    "(LAMBDA (x: T): Re((1 / 4) * FG(x)))=1 / 4 * Re(FG) - 0 * Im(FG)")
   (("1"
     (case-replace
      "(LAMBDA (x: T): Im((1 / 4) * FG(x)))=0 * Re(FG) + 1 / 4 * Im(FG)")
     (("1" (assert))
      ("2"
       (apply-extensionality :hide? t)
       (hide-all-but 1)
       (expand "Im" 1 2)
       (expand "*")
       (expand "+")
       (propax))))
    ("2"
     (hide-all-but 1)
     (apply-extensionality :hide? t)
     (expand "-")
     (expand "Re" 1 2)
     (expand "*")
     (propax))))


proof_type: f_proof
decl_type: formula
library: complex_integration
theory: complex_measure_theory
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1"
     (flatten)
     (expand "cal_N?")
     (flatten)
     (expand "complex_measurable?")
     (flatten)
     (replace -2)
     (replace -3)
     (hide -2 -3)
     (expand "ae_0?")
     (expand "restrict")
     (expand "pointwise_ae?")
     (expand "ae?")
     (expand "fullset")
     (expand "ae_in?")
     (skosimp)
     (expand "member")
     (split)
     (("1"
       (inst + "E!1")
       (skosimp)
       (inst - "x!1")
       (expand "Re")
       (assert))
      ("2"
       (inst + "E!1")
       (skosimp)
       (inst - "x!1")
       (expand "Im")
       (assert))))
    ("2"
     (expand "cal_N?")
     (expand "complex_measurable?")
     (flatten)
     (assert)
     (hide -2 -4)
     (expand "ae_0?")
     (expand "restrict")
     (expand "pointwise_ae?")
     (expand "ae?")
     (expand "fullset")
     (expand "ae_in?")
     (skosimp*)
     (inst + "union(E!1,E!2)")
     (skosimp)
     (expand "union")
     (expand "member")
     (flatten)
     (inst - "x!1")
     (inst - "x!1")
     (assert)
     (assert)
     (expand "Re" -1)
     (expand "Im" -)
     (assert))))


proof_type: t_proof
decl_type: tcc
library: complex_integration
theory: complex_measure_theory
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "S")
   (expand "sigma_algebra?")
   (flatten)
   (expand "subset_algebra_empty?")
   (assert))


proof_type: t_proof
decl_type: tcc
library: complex_integration
theory: complex_measure_theory
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "cal_N?")
   (split)
   (("1"
     (expand "ae_0?")
     (expand "pointwise_ae?")
     (expand "ae?")
     (expand "fullset")
     (expand "ae_in?")
     (inst + "emptyset")
     (skosimp)
     (expand "member")
     (assert))
    ("2" (rewrite "const_measurable"))))


proof_type: f_proof
decl_type: formula
library: complex_integration
theory: complex_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "integral")
   (assert)
   (typepred "f1!1")
   (typepred "f2!1")
   (expand "integrable?")
   (flatten)
   (rewrite "integral_add")
   (rewrite "integral_add"))


proof_type: f_proof
decl_type: formula
library: complex_integration
theory: complex_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (typepred "f!1")
   (expand "integrable?")
   (flatten)
   (lemma "integral.integrable_scal" ("c" "Re(c!1)" "f" "Re(f!1)"))
   (("1"
     (lemma "integral.integrable_scal" ("c" "Im(c!1)" "f" "Re(f!1)"))
     (lemma "integral.integrable_scal" ("c" "Re(c!1)" "f" "Im(f!1)"))
     (("1"
       (lemma "integral.integrable_scal" ("c" "Im(c!1)" "f" "Im(f!1)"))
       (rewrite "integral_diff" 1)
       (rewrite "integral.integral_add" 1)
       (rewrite "integral_scal" 1)
       (rewrite "integral_scal" 1)
       (rewrite "integral_scal" 1)
       (rewrite "integral_scal" 1))
      ("2" (propax))))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: complex_integration
theory: complex_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "integral_scal" ("f" "f!1" "c" "complex_(-1,0)"))
   (assert)
   (flatten)
   (case-replace "-1 * Re(f!1) - 0 * Im(f!1)=-(Re(f!1))")
   (("1"
     (assert)
     (case-replace "0 * Re(f!1) + -1 * Im(f!1)=-(Im(f!1))")
     (("1" (assert))
      ("2" (apply-extensionality :hide? t) (hide-all-but 1) (grind))))
    ("2" (apply-extensionality :hide? t) (hide-all-but 1) (grind))))


proof_type: f_proof
decl_type: formula
library: complex_integration
theory: complex_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (lemma "integral_opp" ("f" "f2!1"))
   (lemma "integral_add" ("f1" "f1!1" "f2" "-f2!1"))
   (case-replace "f1!1 + -f2!1=f1!1 - f2!1")
   (("1" (assert) (flatten) (assert))
    ("2"
     (hide-all-but 1)
     (grind)
     (("1" (expand "-") (expand "+") (apply-extensionality :hide? t))
      ("2" (expand "+") (expand "-") (apply-extensionality :hide? t))))))


proof_type: f_proof
decl_type: formula
library: complex_integration
theory: complex_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (lemma "integrable_abs" ("f" "f!1"))
   (case "EXISTS c: abs(c) = 1 & abs(integral(f!1)) = c * integral(f!1)")
   (("1"
     (skosimp)
     (assert)
     (flatten)
     (typepred "abs(integral(f!1))")
     (replace -3)
     (hide -3)
     (name "A" "Re(c!1)")
     (replace -1)
     (name "B" "Im(c!1)")
     (replace -1)
     (name "G" "Re(f!1)")
     (replace -1)
     (name "H" "Im(f!1)")
     (replace -1)
     (case "A * integral.integral(G) - B *integral.integral(H) <= integral.integral(abs(A*G-B*H))")
     (("1"
       (lemma "integral_ae_le"
        ("f1" "abs(A * G - B * H)" "f2" "abs(f!1)"))
       (assert)
       (hide -1 -6 -8 -9 -10 -11 2)
       (expand "ae_le?")
       (expand "pointwise_ae?")
       (expand "ae?")
       (expand "fullset")
       (expand "ae_in?")
       (expand "member")
       (inst + "emptyset")
       (skosimp)
       (hide 1)
       (case-replace "abs(f!1)=abs(c!1*f!1)")
       (("1"
         (hide -1)
         (expand "abs" 1)
         (expand "*" 1)
         (expand "-" 1)
         (lemma "sq_le"
          ("nna"
           "abs(A * G(x!1) - B * H(x!1))"
           "nnb"
           "abs(c!1 * f!1(x!1))"))
         (replace -1 1 rl)
         (hide -1)
         (rewrite "sq_abs")
         (rewrite "sq_minus")
         (rewrite "sq_times")
         (rewrite "sq_times")
         (case "sq(A) * sq(G(x!1)) + sq(B) * sq(H(x!1)) -
                      2 * (G(x!1) * H(x!1) * A * B)
                      <= (sq(A)+sq(B))*(sq(G(x!1))+sq(H(x!1)))")
         (("1"
           (rewrite "abs_mult" 1)
           (replace -6)
           (rewrite "sq_times" 1)
           (rewrite "one_times")
           (case-replace "sq(abs(f!1(x!1)))=sq(G(x!1)) + sq(H(x!1))")
           (("1"
             (case-replace "sq(A) + sq(B)=1")
             (("1" (assert))
              ("2"
               (hide-all-but (1 -5 -6 -7))
               (expand "abs")
               (lemma "sq_eq_rew" ("a" "sqrt(sq_abs(c!1))" "b" "1"))
               (rewrite "sq_sqrt")
               (expand "sq_abs")
               (assert))))
            ("2"
             (hide-all-but (-2 -3 1))
             (expand "abs")
             (rewrite "sq_sqrt")
             (expand "sq_abs")
             (assert)
             (expand "G")
             (expand "H")
             (expand "Im" 1 2)
             (expand "Re" 1 2)
             (propax))))
          ("2"
           (hide 2)
           (assert)
           (case "0 <= sq(H(x!1)) * sq(A) +sq(G(x!1)) * sq(B)+2 * (G(x!1) * H(x!1) * A * B)")
           (("1" (assert))
            ("2"
             (hide 2)
             (typepred "sq(A*H(x!1)+B*G(x!1))")
             (rewrite "sq_plus")
             (rewrite "sq_times")
             (rewrite "sq_times")
             (assert))))))
        ("2"
         (hide-all-but (-5 1))
         (apply-extensionality :hide? t)
         (expand "abs" 1)
         (expand "*" 1)
         (rewrite "abs_mult")
         (replace -1)
         (assert))))
      ("2"
       (hide 2)
       (rewrite "integral.integral_scal" 1 :dir rl)
       (rewrite "integral.integral_scal" 1 :dir rl)
       (rewrite "integral.integral_diff" 1 :dir rl)
       (lemma "integral_abs" ("f" "A * G - B * H"))
       (expand "abs" -1 1)
       (assert))
      ("3"
       (hide -5 -7 -8 2)
       (rewrite "integral.integrable_abs")
       (rewrite "integral.integrable_diff")
       (("1" (rewrite "integral.integrable_scal"))
        ("2" (rewrite "integral.integrable_scal"))))))
    ("2"
     (hide 2)
     (case "integral(f!1)=0")
     (("1"
       (inst + "complex_(1,0)")
       (split)
       (("1" (hide-all-but 1) (grind))
        ("2"
         (assert)
         (flatten)
         (expand "integral" 1 1)
         (replace -1)
         (replace -2)
         (hide-all-but 1)
         (grind))))
      ("2"
       (inst + "abs(integral(f!1))/integral(f!1)")
       (("1"
         (name-replace "INT" "integral(f!1)")
         (hide -1 -2)
         (rewrite "abs_div3" 2)
         (("1"
           (rewrite "div_simp")
           (("1"
             (lemma "abs_is_0" ("z" "INT"))
             (name-replace "AI" "abs(INT)")
             (lemma "complex_div_cancel2"
              ("z" "complex_(AI,0)" "n0z" "INT"))
             (assert))
            ("2" (hide 3) (expand "/=") (rewrite "abs_is_0"))))
          ("2" (flatten) (assert))))
        ("2" (assert) (flatten) (assert))))))))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem + "f!1")
   (typepred "f!1")
   (assert)
   (flatten)
   (lemma "integrable_is_measurable")
   (inst-cp - "Re(f!1)")
   (inst - "Im(f!1)")
   (assert))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem + "f!1")
   (typepred "f!1")
   (rewrite "cal_N_def")
   (flatten)
   (assert)
   (split)
   (("1" (lemma "measurable_ae_0" ("h" "Re(f!1)")) (assert))
    ("2" (lemma "measurable_ae_0" ("h" "Im(f!1)")) (assert))))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f1!1")
   (typepred "f2!1")
   (expand "integrable?")
   (flatten)
   (case-replace "Re((+[T])(f1!1, f2!1)) = +[T](Re(f1!1),Re(f2!1))")
   (("1"
     (case-replace "Im((+[T])(f1!1, f2!1)) = +[T](Im(f1!1),Im(f2!1))")
     (("1"
       (assert)
       (rewrite "integrable_add")
       (rewrite "integrable_add"))
      ("2" (hide-all-but 1) (apply-extensionality :hide? t) (grind))))
    ("2" (hide-all-but 1) (grind) (apply-extensionality :hide? t))))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (expand "integrable?")
   (flatten)
   (assert)
   (lemma "integrable_scal" ("c" "Re(c!1)" "f" "Re(f!1)"))
   (lemma "integrable_scal" ("c" "Im(c!1)" "f" "Im(f!1)"))
   (lemma "integrable_scal" ("c" "Im(c!1)" "f" "Re(f!1)"))
   (lemma "integrable_scal" ("c" "Re(c!1)" "f" "Im(f!1)"))
   (rewrite "integrable_diff")
   (rewrite "integral.integrable_add"))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (typepred "f!1")
   (expand "integrable?" -)
   (flatten)
   (rewrite "integrable_opp")
   (rewrite "integrable_opp"))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f1!1")
   (typepred "f2!1")
   (assert)
   (flatten)
   (rewrite "integrable_diff")
   (rewrite "integrable_diff"))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: complex_integral
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (lemma "integrable_is_measurable")
   (inst - "f!1")
   (lemma "abs_complex_measurable" ("g" "f!1"))
   (expand "integrable?" -3)
   (flatten)
   (lemma "integrable_abs" ("f" "Re(f!1)"))
   (("1"
     (lemma "integrable_abs" ("f" "Im(f!1)"))
     (("1"
       (case "forall x: abs(f!1)(x) <= (abs(Re(f!1))+abs(Im(f!1)))(x)")
       (("1"
         (lemma "integral.integrable_add"
          ("f1" "abs[T](Re(f!1))" "f2" "abs[T](Im(f!1))"))
         (("1"
           (lemma "integral_ae_abs"
            ("h" "abs(f!1)" "f" "abs(Re(f!1)) + abs(Im(f!1))"))
           (("1"
             (assert)
             (hide-all-but (1 -2))
             (expand "ae_le?")
             (expand "pointwise_ae?")
             (expand "ae?")
             (expand "fullset")
             (expand "ae_in?")
             (inst + "emptyset")
             (skosimp)
             (expand "member")
             (hide 1)
             (inst - "x!1")
             (expand "abs" -1 1)
             (expand "abs" 1 1)
             (expand "abs" 1 2)
             (expand "abs" 1 1)
             (assert)
             (expand "abs" 1 2)
             (expand "abs" 1 2)
             (propax))
            ("2" (propax))))
          ("2" (propax)) ("3" (propax))))
        ("2"
         (hide-all-but 1)
         (skosimp)
         (expand "abs")
         (expand "+")
         (expand "Im")
         (expand "Re")
         (expand "abs" 1 1)
         (expand "sq_abs")
         (lemma "sq_le"
          ("nna"
           "sqrt(sq(Im(f!1(x!1))) + sq(Re(f!1(x!1))))"
           "nnb"
           "abs(Im(f!1(x!1))) + abs(Re(f!1(x!1)))"))
         (replace -1 1 rl)
         (hide -1)
         (rewrite "sq_sqrt")
         (rewrite "sq_plus" 1)
         (assert))))
      ("2" (propax))))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: complex_integration
theory: p_integrable_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "cal_N?")
   (typepred "f!1")
   (expand "p_integrable?")
   (flatten)
   (replace -1)
   (expand "norm")
   (lemma "abs_complex_measurable" ("g" "f!1"))
   (("1"
     (lemma "expt_measurable" ("g" "abs[T](f!1)" "a" "p"))
     (("1"
       (lemma "posreal_div_posreal_is_posreal" ("px" "1" "py" "p"))
       (lemma "integral_nonneg" ("f" "abs(f!1)^p"))
       (case-replace "FORALL (x: T): (abs(f!1) ^ p)(x) >= 0")
       (("1"
         (rewrite "real_expt_is_0" 1)
         (replace -3)
         (split 1)
         (("1"
           (flatten)
           (lemma "integral_ae_ge_0" ("f" "abs(f!1) ^ p"))
           (split -1)
           (("1"
             (hide-all-but (-1 1))
             (expand "ae_0?")
             (expand "restrict")
             (expand "pointwise_ae?")
             (expand "ae?")
             (expand "fullset")
             (expand "ae_in?")
             (skosimp)
             (inst + "E!1")
             (skosimp)
             (inst - "x!1")
             (expand "member")
             (replace 1)
             (hide 1)
             (expand "^")
             (expand "abs")
             (rewrite "real_expt_is_0")
             (rewrite "abs_is_0")
             (assert))
            ("2"
             (hide-all-but (-2 1))
             (expand "ae_nonneg?")
             (expand "pointwise_ae?")
             (expand "ae?")
             (expand "fullset")
             (expand "ae_in?")
             (inst + "emptyset")
             (skosimp)
             (expand "member")
             (inst - "x!1")
             (hide 1)
             (assert))
            ("3" (propax))))
          ("2"
           (flatten)
           (lemma "measurable_ae_0" ("h" "abs(f!1)^p"))
           (("1"
             (split -1)
             (("1" (flatten))
              ("2"
               (hide-all-but (-1 1))
               (expand "ae_0?")
               (expand "restrict")
               (expand "pointwise_ae?")
               (expand "ae?")
               (expand "fullset")
               (expand "ae_in?")
               (skosimp)
               (inst + "E!1")
               (skosimp)
               (inst - "x!1")
               (expand "member")
               (replace 1)
               (hide 1)
               (expand "^")
               (expand "abs")
               (rewrite "real_expt_is_0")
               (rewrite "abs_is_0")
               (assert))))
            ("2" (propax))))))
        ("2"
         (expand "^")
         (hide-all-but 1)
         (expand "abs")
         (skosimp)
         (assert))
        ("3" (skosimp) (assert))))
      ("2"
       (expand "nn_measurable?")
       (assert)
       (hide-all-but 1)
       (skosimp)
       (expand "abs")
       (assert))
      ("3" (assert))))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: complex_integration
theory: p_integrable_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "S")
   (expand "sigma_algebra?")
   (expand "subset_algebra_empty?")
   (flatten)
   (assert))


proof_type: t_proof
decl_type: tcc
library: complex_integration
theory: p_integrable_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "p_integrable?")
   (rewrite "const_measurable")
   (case-replace "(abs((LAMBDA x: complex_(0, 0))) ^ p)=lambda x:0")
   (("1" (rewrite "integrable_zero"))
    ("2"
     (apply-extensionality :hide? t)
     (hide 2)
     (expand "^")
     (expand "abs")
     (expand "abs")
     (expand "sq_abs")
     (assert)
     (rewrite "real_expt_0x"))
    ("3" (assert))))


proof_type: j_proof
decl_type: tcc
library: complex_integration
theory: p_integrable_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem + "f!1")
   (typepred "f!1")
   (expand "cal_N?")
   (expand "p_integrable?")
   (flatten)
   (replace -2)
   (lemma "measurable_ae_0" ("h" "abs(f!1)^p"))
   (("1"
     (assert)
     (hide -2 2)
     (expand "ae_0?")
     (expand "restrict")
     (expand "pointwise_ae?")
     (expand "ae?")
     (expand "fullset")
     (expand "ae_in?")
     (skosimp)
     (inst + "E!1")
     (skosimp)
     (inst - "x!1")
     (expand "member")
     (replace 1)
     (hide 1)
     (expand "^" 1)
     (expand "abs" 1)
     (rewrite "real_expt_is_0")
     (rewrite "abs_is_0")
     (assert))
    ("2"
     (hide 2 -1)
     (lemma "abs_complex_measurable" ("g" "f!1"))
     (lemma "expt_measurable" ("g" "abs(f!1)" "a" "p"))
     (("1" (propax))
      ("2"
       (expand "nn_measurable?")
       (hide-all-but 1)
       (skosimp)
       (expand "abs")
       (assert))
      ("3" (assert))))
    ("3" (typepred "p") (assert))))


proof_type: t_proof
decl_type: tcc
library: complex_integration
theory: p_integrable_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (rewrite "integral_nonneg")
   (hide 2)
   (skosimp)
   (expand "^")
   (expand "abs")
   (assert))


proof_type: f_proof
decl_type: formula
library: complex_integration
theory: holder_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (typepred "f!1")
   (typepred "g!1")
   (case "p>1")
   (("1"
     (case "q>1")
     (("1"
       (typepred "norm[T, S, mu, q](g!1)")
       (("1"
         (typepred "norm[T, S, mu, p](f!1)")
         (("1"
           (expand ">=")
           (expand "<=" -1)
           (split)
           (("1"
             (expand "<=" -2)
             (split)
             (("1"
               (expand "p_integrable?")
               (flatten)
               (rewrite "prod_complex_measurable[T,S]")
               (name "ALPHA" "norm[T, S, mu, p](f!1)")
               (replace -1)
               (name "BETA" "norm[T, S, mu, q](g!1)")
               (replace -1)
               (lemma "posreal_times_posreal_is_posreal"
                ("px" "ALPHA" "py" "BETA"))
               (("1"
                 (lemma "real_expt_pos" ("px" "ALPHA" "a" "p"))
                 (lemma "real_expt_pos" ("px" "BETA" "a" "q"))
                 (case "FORALL (x: T):
                               abs(f!1(x) * g!1(x)) / (ALPHA * BETA) <=
                                (1 / p) * (abs(f!1(x)) ^ p / (ALPHA ^ p)) +
                                 (1 / q) * (abs(g!1(x)) ^ q / (BETA ^ q))")
                 (("1"
                   (case-replace "abs(f!1 * g!1) ^ 1=abs(f!1 * g!1)")
                   (("1"
                     (hide -1)
                     (expand "norm")
                     (case-replace "abs(f!1 * g!1) ^ 1=abs(f!1 * g!1)")
                     (("1"
                       (hide -1)
                       (hide -11 -13)
                       (lemma "both_sides_real_expt"
                        ("x"
                         "integral.integral(abs(g!1) ^ q) ^ (1 / q)"
                         "y"
                         "BETA"
                         "pa"
                         "q"))
                       (("1"
                         (rewrite "real_expt_times" -1 :dir rl)
                         (assert)
                         (lemma "both_sides_real_expt"
                          ("x"
                           "integral.integral(abs(f!1)^p)^(1/p)"
                           "y"
                           "ALPHA"
                           "pa"
                           "p"))
                         (("1"
                           (rewrite "real_expt_times" -1 :dir rl)
                           (assert)
                           (rewrite "real_expt_x1" -1)
                           (rewrite "real_expt_x1" -2)
                           (lemma "integral.integrable_is_measurable")
                           (inst-cp - "abs(f!1) ^ p")
                           (inst - "abs(g!1) ^ q")
                           (lemma "expt_measurable"
                            ("g" "abs(f!1) ^ p" "a" "1/p"))
                           (("1"
                             (lemma "expt_measurable"
                              ("g" "abs(g!1) ^ q" "a" "1/q"))
                             (("1"
                               (case-replace
                                "(^[T](abs(g!1) ^ q, 1 / q))=abs(g!1)")
                               (("1"
                                 (case-replace
                                  "(^[T](abs(f!1)^p, 1 / p))=abs(f!1)")
                                 (("1"
                                   (hide -1 -2 -5 -6)
                                   (case
                                    "measurable_function?[T,S](abs(f!1*g!1))")
                                   (("1"
                                     (lemma
                                      "scal_measurable"
                                      ("c"
                                       "1/(ALPHA * BETA)"
                                       "g"
                                       "abs(f!1 * g!1)"))
                                     (("1"
                                       (hide -2 -3 -4)
                                       (lemma
                                        "integral.integrable_scal"
                                        ("c"
                                         "(1/p)*(1/ALPHA ^ p)"
                                         "f"
                                         "abs(f!1) ^ p"))
                                       (lemma
                                        "integral.integrable_scal"
                                        ("c"
                                         "(1/q)*(1/BETA ^ q)"
                                         "f"
                                         "abs(g!1) ^ q"))
                                       (lemma
                                        "integral.integrable_add"
                                        ("f1"
                                         "*[T]((1 / p) * (1 / ALPHA ^ p), abs(f!1) ^ p)"
                                         "f2"
                                         "*[T]((1 / q) * (1 / BETA ^ q), abs(g!1) ^ q)"))
                                       (("1"
                                         (hide -2 -3)
                                         (lemma
                                          "integral_ae_abs"
                                          ("h"
                                           "*[T](1 / (ALPHA * BETA), abs(f!1 * g!1))"
                                           "f"
                                           "(+[T])
                                                                 (*[T]((1 / p) * (1 / ALPHA ^ p), abs(f!1) ^ p),
                                                                  *[T]((1 / q) * (1 / BETA ^ q), abs(g!1) ^ q))"))
                                         (("1"
                                           (split -1)
                                           (("1"
                                             (flatten -1)
                                             (lemma
                                              "integral.integrable_scal"
                                              ("c"
                                               "ALPHA*BETA"
                                               "f"
                                               "*[T](1 / (ALPHA * BETA), abs(f!1 * g!1))"))
                                             (case-replace
                                              "(*[T]
                                                                    (ALPHA * BETA,
                                                                     *[T](1 / (ALPHA * BETA), abs(f!1 * g!1))))=abs(f!1 * g!1)")
                                             (("1"
                                               (rewrite "real_expt_x1")
                                               (("1"
                                                 (lemma
                                                  "integral.integral_scal"
                                                  ("c"
                                                   "1/(ALPHA*BETA)"
                                                   "f"
                                                   "abs(f!1*g!1)"))
                                                 (("1"
                                                   (replace -1)
                                                   (lemma
                                                    "integral_nonneg"
                                                    ("f" "abs(f!1*g!1)"))
                                                   (split -1)
                                                   (("1"
                                                     (rewrite
                                                      "real_props.abs_mult"
                                                      -6)
                                                     (lemma
                                                      "posreal_div_posreal_is_posreal"
                                                      ("px"
                                                       "1"
                                                       "py"
                                                       "ALPHA*BETA"))
                                                     (expand "abs" -7 1)
                                                     (assert)
                                                     (expand "abs" -7 1)
                                                     (case
                                                      "integral(abs((+[T])
                                                                              (*[T]((1 / p) * (1 / ALPHA ^ p), abs(f!1) ^ p),
                                                                               *[T]((1 / q) * (1 / BETA ^ q), abs(g!1) ^ q)))) <=1")
                                                     (("1"
                                                       (assert)
                                                       (lemma
                                                        "div_mult_pos_le1"
                                                        ("z"
                                                         "integral.integral(abs(f!1 * g!1))"
                                                         "py"
                                                         "ALPHA * BETA"
                                                         "x"
                                                         "1"))
                                                       (assert))
                                                      ("2"
                                                       (hide
                                                        2
                                                        -1
                                                        -2
                                                        -3
                                                        -4
                                                        -5
                                                        -6
                                                        -7)
                                                       (case-replace
                                                        "abs((+[T])
                                                                               (*[T]((1 / p) * (1 / ALPHA ^ p), abs(f!1) ^ p),
                                                                                *[T]((1 / q) * (1 / BETA ^ q), abs(g!1) ^ q)))= ((1/p)*1/(ALPHA^p))* abs(f!1)^p + ((1/q)*1/(BETA^q))* abs(g!1)^q")
                                                       (("1"
                                                         (hide -1)
                                                         (lemma
                                                          "posreal_times_posreal_is_posreal"
                                                          ("px"
                                                           "1/p"
                                                           "py"
                                                           "1/(ALPHA^p)"))
                                                         (("1"
                                                           (lemma
                                                            "posreal_times_posreal_is_posreal"
                                                            ("px"
                                                             "1/q"
                                                             "py"
                                                             "1/(BETA^q)"))
                                                           (("1"
                                                             (name-replace
                                                              "AA"
                                                              "1 / p * (1 / (ALPHA ^ p))")
                                                             (name-replace
                                                              "BB"
                                                              "1 / q * (1 / (BETA ^ q))")
                                                             (lemma
                                                              "integral.integral_scal"
                                                              ("c"
                                                               "AA"
                                                               "f"
                                                               "abs(f!1)^p"))
                                                             (lemma
                                                              "integral.integral_scal"
                                                              ("c"
                                                               "BB"
                                                               "f"
                                                               "abs(g!1)^q"))
                                                             (replace -7)
                                                             (replace -8)
                                                             (lemma
                                                              "integral.integral_add"
                                                              ("f1"
                                                               "AA * abs(f!1) ^ p"
                                                               "f2"
                                                               "BB * abs(g!1) ^ q"))
                                                             (replace -2)
                                                             (replace -3)
                                                             (replace -1)
                                                             (hide
                                                              -1
                                                              -2
                                                              -3
                                                              -20
                                                              -21
                                                              -8
                                                              -9
                                                              -6
                                                              -7
                                                              -14
                                                              -15
                                                              -10)
                                                             (expand
                                                              "AA")
                                                             (expand
                                                              "BB")
                                                             (name-replace
                                                              "AP"
                                                              "ALPHA ^ p")
                                                             (rewrite
                                                              "div_cancel1")
                                                             (typepred
                                                              "q")
                                                             (assert)
                                                             (assert)
                                                             (rewrite
                                                              "one_times")
                                                             (replace -3)
                                                             (assert))
                                                            ("2"
                                                             (assert)
                                                             (lemma
                                                              "posreal_div_posreal_is_posreal"
                                                              ("px"
                                                               "1"
                                                               "py"
                                                               "BETA^q"))
                                                             (assert))))
                                                          ("2"
                                                           (lemma
                                                            "posreal_div_posreal_is_posreal"
                                                            ("px"
                                                             "1"
                                                             "py"
                                                             "ALPHA^p"))
                                                           (assert))))
                                                        ("2"
                                                         (hide 2)
                                                         (apply-extensionality
                                                          :hide?
                                                          t)
                                                         (("1"
                                                           (expand
                                                            "abs"
                                                            +)
                                                           (expand "+" +)
                                                           (expand "*" +)
                                                           (expand
                                                            "^"
                                                            1
                                                            1)
                                                           (expand
                                                            "^"
                                                            1
                                                            1)
                                                           (expand
                                                            "^"
                                                            1
                                                            6)
                                                           (expand
                                                            "^"
                                                            1
                                                            8)
                                                           (rewrite
                                                            "div_div2")
                                                           (rewrite
                                                            "div_div2")
                                                           (case-replace
                                                            "abs(f!1(x!1)) ^ p * (1 / ALPHA ^ p) * (1 / p)=(1 / (p * (ALPHA ^ p))) * abs(f!1(x!1)) ^ p")
                                                           (("1"
                                                             (case-replace
                                                              "abs(g!1(x!1)) ^ q * (1 / BETA ^ q) * (1 / q)=(1 / (q * (BETA ^ q))) * abs(g!1(x!1)) ^ q")
                                                             (("1"
                                                               (hide
                                                                -1
                                                                -2)
                                                               (lemma
                                                                "posreal_times_posreal_is_posreal"
                                                                ("px"
                                                                 "p"
                                                                 "py"
                                                                 "ALPHA^p"))
                                                               (lemma
                                                                "posreal_times_posreal_is_posreal"
                                                                ("px"
                                                                 "q"
                                                                 "py"
                                                                 "BETA^q"))
                                                               (lemma
                                                                "posreal_div_posreal_is_posreal"
                                                                ("px"
                                                                 "1"
                                                                 "py"
                                                                 "q*BETA^q"))
                                                               (("1"
                                                                 (lemma
                                                                  "posreal_div_posreal_is_posreal"
                                                                  ("px"
                                                                   "1"
                                                                   "py"
                                                                   "p*ALPHA^p"))
                                                                 (("1"
                                                                   (name-replace
                                                                    "AA"
                                                                    "(1 / (p * (ALPHA ^ p)))")
                                                                   (name-replace
                                                                    "BB"
                                                                    "(1 / (q * (BETA ^ q)))")
                                                                   (lemma
                                                                    "both_sides_times_pos_le1"
                                                                    ("pz"
                                                                     "AA"
                                                                     "x"
                                                                     "0"
                                                                     "y"
                                                                     "abs(f!1(x!1))^p"))
                                                                   (("1"
                                                                     (assert)
                                                                     (lemma
                                                                      "both_sides_times_pos_le1"
                                                                      ("pz"
                                                                       "BB"
                                                                       "x"
                                                                       "0"
                                                                       "y"
                                                                       "abs(g!1(x!1))^q"))
                                                                     (assert)
                                                                     (expand
                                                                      "abs"
                                                                      1
                                                                      1)
                                                                     (propax))
                                                                    ("2"
                                                                     (assert))))
                                                                  ("2"
                                                                   (assert))))
                                                                ("2"
                                                                 (propax))))
                                                              ("2"
                                                               (assert))))
                                                            ("2"
                                                             (assert))))
                                                          ("2"
                                                           (skolem
                                                            +
                                                            "x!1")
                                                           (hide 2)
                                                           (expand "+" 1)
                                                           (expand "*" 1)
                                                           (expand
                                                            "^"
                                                            1
                                                            2)
                                                           (expand
                                                            "^"
                                                            1
                                                            4)
                                                           (expand
                                                            "abs"
                                                            1)
                                                           (lemma
                                                            "posreal_div_posreal_is_posreal"
                                                            ("px"
                                                             "1/p"
                                                             "py"
                                                             "ALPHA^p"))
                                                           (lemma
                                                            "posreal_div_posreal_is_posreal"
                                                            ("px"
                                                             "1/q"
                                                             "py"
                                                             "BETA^q"))
                                                           (name-replace
                                                            "AA"
                                                            "(1 / p) / (ALPHA ^ p)")
                                                           (name-replace
                                                            "BB"
                                                            "(1 / q) / (BETA ^ q)")
                                                           (lemma
                                                            "both_sides_times_pos_le1"
                                                            ("pz"
                                                             "AA"
                                                             "x"
                                                             "0"
                                                             "y"
                                                             "abs(f!1(x!1))^p"))
                                                           (("1"
                                                             (lemma
                                                              "both_sides_times_pos_le1"
                                                              ("pz"
                                                               "BB"
                                                               "x"
                                                               "0"
                                                               "y"
                                                               "abs(g!1(x!1))^q"))
                                                             (("1"
                                                               (assert))
                                                              ("2"
                                                               (assert))))
                                                            ("2"
                                                             (assert))))))))))
                                                    ("2"
                                                     (skosimp)
                                                     (expand "abs" +)
                                                     (assert))))
                                                  ("2"
                                                   (rewrite
                                                    "complex_abs_mul"
                                                    -2))))
                                                ("2"
                                                 (lemma
                                                  "integral_nonneg"
                                                  ("f" "abs(f!1*g!1)"))
                                                 (assert)
                                                 (skosimp)
                                                 (expand "abs")
                                                 (assert)
                                                 (hide 2 3 -6)
                                                 (expand "*")
                                                 (assert))))
                                              ("2"
                                               (apply-extensionality
                                                :hide?
                                                t)
                                               (expand "*" 1)
                                               (expand "abs" 1)
                                               (assert))))
                                            ("2"
                                             (hide-all-but
                                              (1
                                               -5
                                               -6
                                               -7
                                               -8
                                               -11
                                               -12
                                               -13
                                               -14))
                                             (expand "ae_le?")
                                             (expand "pointwise_ae?")
                                             (expand "ae?")
                                             (expand "fullset")
                                             (expand "ae_in?")
                                             (inst + "emptyset")
                                             (skosimp)
                                             (hide 1)
                                             (expand "member")
                                             (expand "*" +)
                                             (expand "abs" +)
                                             (expand "+" +)
                                             (expand "^" 1 1)
                                             (expand "^" 1 1)
                                             (inst - "x!1")
                                             (typepred
                                              "abs(f!1(x!1) * g!1(x!1))")
                                             (lemma
                                              "both_sides_div_pos_ge1"
                                              ("pz"
                                               "ALPHA*BETA"
                                               "x"
                                               "abs(f!1(x!1) * g!1(x!1))"
                                               "y"
                                               "0"))
                                             (assert)
                                             (case-replace
                                              "1 / (ALPHA * BETA) * (abs(f!1(x!1)) * abs(g!1(x!1)))=abs(f!1(x!1)) * abs(g!1(x!1)) / (ALPHA * BETA)")
                                             (("1"
                                               (hide -1)
                                               (expand "abs" 1 1)
                                               (name-replace
                                                "LHS"
                                                "abs(f!1(x!1)) * abs(g!1(x!1)) / (ALPHA * BETA)")
                                               (expand "abs" 1 1)
                                               (assert))
                                              ("2" (assert))))))
                                          ("2"
                                           (hide -1 2)
                                           (rewrite
                                            "complex_abs_mul"
                                            -1))
                                          ("3" (propax))))
                                        ("2" (propax))
                                        ("3" (propax))))
                                      ("2"
                                       (rewrite "complex_abs_mul" -1))))
                                    ("2"
                                     (hide 2)
                                     (lemma
                                      "prod_measurable[T,S]"
                                      ("g1" "abs(f!1)" "g2" "abs(g!1)"))
                                     (("1"
                                       (case-replace
                                        "(*[T](abs(f!1), abs(g!1)))=abs(f!1 * g!1)")
                                       (apply-extensionality :hide? t))
                                      ("2" (propax))
                                      ("3" (propax))))))
                                  ("2"
                                   (apply-extensionality 1 :hide? t)
                                   (("1"
                                     (hide-all-but (-17 1))
                                     (expand "^")
                                     (expand "abs")
                                     (rewrite
                                      "real_expt_times"
                                      +
                                      :dir
                                      rl)
                                     (rewrite "real_expt_x1"))
                                    ("2"
                                     (lemma
                                      "posreal_div_posreal_is_posreal"
                                      ("px" "1" "py" "p"))
                                     (assert))))
                                  ("3"
                                   (lemma
                                    "posreal_div_posreal_is_posreal"
                                    ("px" "1" "py" "p"))
                                   (assert))))
                                ("2"
                                 (hide-all-but (-15 1))
                                 (lemma
                                  "posreal_div_posreal_is_posreal"
                                  ("px" "1" "py" "q"))
                                 (apply-extensionality :hide? t)
                                 (expand "abs")
                                 (expand "^")
                                 (rewrite "real_expt_times" + :dir rl)
                                 (rewrite "real_expt_x1"))))
                              ("2"
                               (expand "nn_measurable?")
                               (assert)
                               (hide-all-but (1 -14))
                               (skosimp)
                               (expand "^")
                               (expand "abs")
                               (assert))))
                            ("2"
                             (expand "nn_measurable?")
                             (assert)
                             (hide-all-but (-14 1))
                             (skosimp)
                             (expand "^")
                             (expand "abs")
                             (assert))
                            ("3"
                             (lemma "posreal_div_posreal_is_posreal"
                              ("px" "1" "py" "p"))
                             (assert))))
                          ("2"
                           (lemma "integral_nonneg"
                            ("f" "^[T](abs[T](f!1), p)"))
                           (assert)
                           (skosimp)
                           (expand "^" 1)
                           (expand "abs" 1)
                           (assert))))
                        ("2"
                         (lemma "integral_nonneg"
                          ("f" "^[T](abs[T](g!1), q)"))
                         (assert)
                         (skosimp)
                         (hide-all-but 1)
                         (expand "^")
                         (expand "abs")
                         (assert))))
                      ("2"
                       (apply-extensionality :hide? t)
                       (expand "^" 1)
                       (rewrite "real_expt_x1" 1))))
                    ("2"
                     (hide-all-but 1)
                     (apply-extensionality :hide? t)
                     (expand "^")
                     (rewrite "real_expt_x1"))))
                  ("2"
                   (hide 2)
                   (skosimp)
                   (hide -4 -5 -10 -11 -12 -13)
                   (typepred "q")
                   (hide -1)
                   (lemma "youngs_inequality"
                    ("p"
                     "p"
                     "q"
                     "q"
                     "a"
                     "abs(f!1(x!1))/ALPHA"
                     "b"
                     "abs(g!1(x!1))/BETA"))
                   (("1"
                     (replace -3)
                     (rewrite "abs_mult" 1)
                     (typepred "abs(f!1(x!1))")
                     (typepred "abs(g!1(x!1))")
                     (name-replace "FX" "abs(f!1(x!1))")
                     (name-replace "GX" "abs(g!1(x!1))")
                     (rewrite "div_times")
                     (name-replace "LHS" "(FX * GX) / (ALPHA * BETA)")
                     (rewrite "div_real_expt" + :dir rl)
                     (rewrite "div_real_expt" + :dir rl)
                     (assert))
                    ("2" (propax)) ("3" (assert))
                    ("4" (rewrite "div_mult_pos_ge1" 1) (assert))
                    ("5" (assert))
                    ("6" (rewrite "div_mult_pos_ge1" 1) (assert))
                    ("7" (assert))))
                  ("3" (skosimp) (assert)) ("4" (skosimp) (assert))
                  ("5" (skosimp) (assert)) ("6" (skosimp) (assert))
                  ("7" (skosimp) (assert)) ("8" (skosimp) (assert))))
                ("2" (assert)) ("3" (assert))))
              ("2"
               (replace -1 * rl)
               (rewrite "zero_times2")
               (lemma "norm_eq_0[T, S, mu, q]" ("f" "g!1"))
               (flatten)
               (split -1)
               (("1"
                 (hide -2)
                 (case "cal_N?[T, S, mu](f!1*g!1)")
                 (("1"
                   (lemma "cal_N_is_p_integrable[T, S, mu, 1]")
                   (inst - "f!1 * g!1")
                   (replace -1)
                   (lemma "norm_eq_0[T,S,mu,1]" ("f" "f!1*g!1"))
                   (assert))
                  ("2"
                   (expand "p_integrable?")
                   (flatten)
                   (hide-all-but (-1 1 -8))
                   (expand "cal_N?")
                   (expand "ae_0?")
                   (expand "pointwise_ae?")
                   (expand "ae?")
                   (expand "fullset")
                   (expand "ae_in?")
                   (skosimp)
                   (skosimp)
                   (expand "member")
                   (rewrite "prod_complex_measurable[T,S]")
                   (hide -2 -3)
                   (inst + "E!1")
                   (skosimp)
                   (inst - "x!1")
                   (expand "*")
                   (assert)
                   (flatten)
                   (assert))))
                ("2" (assert))))))
            ("2"
             (replace -1 * rl)
             (rewrite "zero_times1")
             (lemma "norm_eq_0[T, S, mu, p]" ("f" "f!1"))
             (flatten)
             (hide -2)
             (split)
             (("1"
               (case "cal_N?[T,S,mu](f!1*g!1)")
               (("1"
                 (lemma "cal_N_is_p_integrable[T, S, mu, 1]")
                 (inst - "f!1 * g!1")
                 (replace -1)
                 (lemma "norm_eq_0[T,S,mu,1]" ("f" "f!1*g!1"))
                 (assert))
                ("2"
                 (hide-all-but (-1 -6 -7 1))
                 (expand "cal_N?")
                 (flatten)
                 (expand "p_integrable?")
                 (flatten)
                 (lemma "prod_complex_measurable[T,S]"
                  ("g1" "f!1" "g2" "g!1"))
                 (("1"
                   (replace -1)
                   (hide-all-but (-2 1))
                   (expand "ae_0?")
                   (expand "pointwise_ae?")
                   (expand "ae?")
                   (expand "fullset")
                   (expand "ae_in?")
                   (skosimp)
                   (inst + "E!1")
                   (skosimp)
                   (inst - "x!1")
                   (expand "member")
                   (assert)
                   (expand "*")
                   (assert)
                   (flatten)
                   (assert))
                  ("2" (propax)) ("3" (propax))))))
              ("2" (assert))))))
          ("2" (assert))))
        ("2" (assert))))
      ("2"
       (hide-all-but (-1 1))
       (typepred "q")
       (lemma "div_cancel3" ("x" "1" "n0z" "q" "y" "1-1/p"))
       (flatten)
       (hide -2)
       (split)
       (("1"
         (replace -1 1)
         (hide -1)
         (lemma "both_sides_times_pos_gt1"
          ("pz" "q" "x" "1" "y" "1-1/p"))
         (lemma "posreal_div_posreal_is_posreal" ("px" "1" "py" "p"))
         (("1" (assert)) ("2" (assert))))
        ("2" (assert))))))
    ("2" (assert))))


