# Proofs

proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "expt_mult")
   (inst - "a!1" "i!1" "-j!1")
   (rewrite "expt_neg")
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (case "FORALL (a:T,n:nat): (a ^ i!1) ^ n = a ^ (i!1 * n)")
   (("1"
     (case "j!1<0")
     (("1"
       (inst - "inv(a!1)" "-j!1")
       (("1"
         (rewrite "inv_expt" -2 :dir rl)
         (rewrite "expt_neg" -2 :dir rl)
         (lemma "expt_neg" ("a" "a!1" "i" "i!1*-j!1"))
         (assert))
        ("2" (assert))))
      ("2" (inst - "a!1" "j!1") (assert))))
    ("2"
     (hide 2)
     (induct "n")
     (("1" (skolem!) (rewrite "expt_0") (rewrite "expt_0"))
      ("2"
       (skosimp*)
       (lemma "expt_def1" ("a" "a!2^i!1" "i" "j!2"))
       (inst - "a!2")
       (lemma "expt_mult" ("a" "a!2" "i" "i!1*j!2" "j" "i!1"))
       (assert))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "^")
   (case "i!1<0")
   (("1"
     (assert)
     (typepred "G!1")
     (expand "group?")
     (expand "inv_exists?")
     (flatten)
     (inst - "a!1")
     (("1"
       (skosimp*)
       (typepred "y!1")
       (lemma "unique_inv" ("x" "a!1" "y" "y!1"))
       (assert)
       (replace -1 * rl)
       (lemma "power_member" ("M" "G!1" "a" "y!1" "n" "-i!1"))
       (expand "member")
       (propax))
      ("2" (expand "member") (propax))))
    ("2"
     (assert)
     (lemma "power_member" ("M" "G!1" "a" "a!1" "n" "i!1"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "generated_by(a!1)")
   (expand "subgroup?")
   (expand "subset?")
   (skosimp*)
   (assert)
   (expand "generated_by" -3)
   (expand "member")
   (skosimp)
   (lemma "expt_member" ("G" "G!1" "a" "a!1" "i" "i!1"))
   (expand "member")
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (rewrite "finite_group_surj")
   (hide 2)
   (expand "generated_by")
   (inst + "k!1" "(LAMBDA (n: below[k!1]): a!1^n)")
   (("1"
     (expand "surjective?")
     (skosimp*)
     (typepred "y!1")
     (replace -2)
     (assert)
     (skosimp*)
     (replace -1)
     (lemma "euclid_int")
     (inst - "k!1" "i!1")
     (skosimp*)
     (replace -1)
     (typepred "r!1")
     (inst + "r!1")
     (lemma "expt_mult")
     (inst - "a!1" "k!1*q!1" "r!1")
     (assert)
     (replace -1 + rl)
     (lemma "expt_expt")
     (inst?)
     (replace -1 + rl)
     (replace -7)
     (assert)
     (rewrite "one_expt")
     (rewrite "left_identity"))
    ("2" (skosimp*) (replace -1) (assert) (inst + "n!1"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "subgroup_def")
   (inst?)
   (assert)
   (hide 2)
   (prop)
   (("1"
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (inst - "one")
     (grind)
     (lemma "one_member")
     (inst?)
     (assert))
    ("2"
     (expand "center")
     (expand "extend")
     (expand "star_closed?")
     (expand "member")
     (skosimp*)
     (prop)
     (("1"
       (skosimp*)
       (typepred "x!2")
       (typepred "G!1")
       (expand "group?")
       (expand "monoid?")
       (flatten)
       (expand "restrict")
       (expand "associative?")
       (typepred "x!1")
       (inst-cp - "x!1" "y!1" "x!2")
       (inst-cp - "x!2" "x!1" "y!1")
       (assert)
       (replace -5 + rl)
       (inst - "x!2")
       (replace - +)
       (inst-cp - "x!1" "x!2" "y!1")
       (replace -5)
       (typepred "y!1")
       (assert)
       (inst - "x!2")
       (replace -1)
       (assert))
      ("2"
       (assert)
       (typepred "x!1")
       (typepred "y!1")
       (hide -1 -3)
       (typepred "G!1")
       (expand "group?")
       (expand "monoid?")
       (expand "monad?")
       (flatten)
       (expand "star_closed?")
       (assert)
       (inst - "x!1" "y!1"))))
    ("3"
     (expand "inv_closed?")
     (skosimp*)
     (assert)
     (expand "center")
     (expand "extend")
     (ground)
     (("1"
       (skolem 1 "q")
       (typepred "q")
       (lemma "inv_star")
       (inst?)
       (rewrite "inv_inv")
       (typepred "x!1")
       (lemma "center_def")
       (inst?)
       (assert)
       (flatten)
       (inst - "inv(q)")
       (("1"
         (assert)
         (replace -2 - rl)
         (case "inv(inv(q * inv(x!1))) = inv(inv(q) * x!1)")
         (("1" (rewrite "inv_inv") (rewrite "inv_star"))
          ("2" (replace -4) (propax))))
        ("2"
         (hide-all-but (-4 1))
         (lemma "inv_member")
         (inst?)
         (assert)
         (inst?)
         (assert))))
      ("2"
       (lemma "inv_member")
       (inst?)
       (inst?)
       (assert)
       (typepred "x!1")
       (lemma "center_def")
       (inst?)
       (assert))))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst + "singleton[T](one)")
   (grind)
   (("1" (rewrite "left_identity")) ("2" (rewrite "associative"))
    ("3" (rewrite "left_identity")) ("4" (rewrite "left_identity"))
    ("5" (rewrite "left_identity"))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "finite_group?")
   (expand "group?")
   (prop)
   (("1" (grind))
    ("2"
     (expand "inv_exists?")
     (skosimp*)
     (inst + "one")
     (("1"
       (typepred "x!1")
       (rewrite "left_identity")
       (rewrite "right_identity")
       (grind))
      ("2" (expand "singleton") (propax))))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst +
    "(lambda (x:T): choose({y: T | x * y = one AND y * x = one}))")
   (lemma "fullset_is_group")
   (expand "group?")
   (flatten)
   (expand "inv_exists?")
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (skosimp*)
   (inst -2 "x!1")
   (("1" (skolem!) (inst - "y!1")) ("2" (expand "fullset") (propax))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "group?")
   (split)
   (("1"
     (expand "monoid?")
     (split)
     (("1"
       (expand "monad?")
       (expand "groupoid?")
       (expand "star_closed?")
       (expand "identity?")
       (expand "member")
       (split)
       (("1"
         (skosimp*)
         (typepred "x!1")
         (typepred "y!1")
         (skosimp*)
         (inst + "i!2+i!1")
         (rewrite "expt_mult" :dir rl)
         (assert))
        ("2" (inst + "0") (rewrite "expt_0"))
        ("3"
         (skosimp)
         (expand "restrict")
         (rewrite "left_identity")
         (rewrite "right_identity"))))
      ("2"
       (assert)
       (lemma "fullset_is_group")
       (expand "group?")
       (expand "monoid?")
       (flatten)
       (expand "restrict")
       (expand "associative?")
       (skosimp*)
       (typepred "x!1")
       (typepred "y!1")
       (typepred "z!1")
       (skosimp*)
       (inst - "x!1" "y!1" "z!1")
       (("1" (expand "fullset") (propax))
        ("2" (expand "fullset") (propax))
        ("3" (expand "fullset") (propax))))))
    ("2"
     (expand "inv_exists?")
     (skosimp*)
     (typepred "x!1")
     (skolem!)
     (inst + "a!1^(-i!1)")
     (("1"
       (replace -1)
       (lemma "expt_mult" ("a" "a!1" "i" "i!1" "j" "-i!1"))
       (lemma "expt_mult" ("a" "a!1" "i" "-i!1" "j" "i!1"))
       (assert)
       (rewrite "expt_0")
       (assert))
      ("2" (inst + "-i!1"))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: abelian_group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (flatten)
   (typepred "A!1")
   (expand "abelian_group?")
   (flatten)
   (expand "subgroup?")
   (flatten)
   (assert)
   (hide -1 -4)
   (expand "commutative_over?")
   (skosimp*)
   (inst - "x!1" "y!1")
   (expand "subset?")
   (inst-cp - "x!1")
   (inst - "y!1")
   (grind))


proof_type: f_proof
decl_type: formula
library: algebra
theory: abelian_group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "abelian_subgroups" ("S" "S!1" "A" "G!1"))
   (expand "finite_abelian_group?")
   (expand "abelian_group?")
   (assert)
   (flatten)
   (assert)
   (expand "finite_group?")
   (lemma "finite_subgroups")
   (inst?)
   (assert))


proof_type: j_proof
decl_type: tcc
library: algebra
theory: abelian_group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "x!1")
   (expand "abelian_group?")
   (expand "group?")
   (expand "commutative_monoid?")
   (flatten)
   (assert))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: abelian_group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst + "singleton[T](one)")
   (expand "finite_abelian_group?")
   (assert)
   (expand "commutative?")
   (skosimp*)
   (grind)
   (typepred "y!1")
   (typepred "x!1")
   (expand "singleton")
   (replace -1)
   (hide -1)
   (replace -1)
   (propax))


proof_type: j_proof
decl_type: tcc
library: algebra
theory: abelian_group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "x!1")
   (expand "finite_abelian_group?")
   (flatten)
   (expand "abelian_group?")
   (expand "finite_group?")
   (flatten)
   (assert))


proof_type: j_proof
decl_type: tcc
library: algebra
theory: abelian_group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "x!1")
   (assert)
   (expand "finite_group?")
   (expand "finite_abelian_group?")
   (propax))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: ring_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "semigroup?")
   (skosimp*)
   (expand "groupoid?")
   (expand "star_closed?")
   (expand "member")
   (inst - "x1!1`1" "x1!1`2")
   (assert))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: ring_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "abelian_group?")
   (expand "group?")
   (expand "monoid?")
   (expand "monad?")
   (expand "groupoid?")
   (expand "star_closed?")
   (expand "member")
   (skosimp*))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: ring_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "ring?")
   (expand "semigroup?")
   (expand "groupoid?")
   (expand "star_closed?")
   (expand "member")
   (skosimp*))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: ring_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "finite_ring?")
   (expand "ring?")
   (expand "semigroup?")
   (expand "groupoid?")
   (expand "star_closed?")
   (expand "member")
   (skosimp*))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_ring")
   (expand "ring?")
   (expand "abelian_group?")
   (flatten)
   (hide-all-but (-2 1))
   (grind))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_ring")
   (expand "ring?")
   (flatten)
   (expand "semigroup?")
   (flatten)
   (expand "associative?")
   (expand "restrict")
   (skosimp)
   (inst - "x!1" "y!1" "z!1")
   (("1" (expand "fullset") (propax)) ("2" (expand "fullset") (propax))
    ("3" (expand "fullset") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_ring")
   (expand "ring?")
   (flatten)
   (expand "restrict")
   (expand "right_distributive?")
   (skosimp)
   (inst - "x!1" "y!1" "z!1")
   (("1" (expand "fullset") (propax)) ("2" (expand "fullset") (propax))
    ("3" (expand "fullset") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_ring")
   (expand "ring?")
   (expand "left_distributive?")
   (expand "restrict")
   (flatten)
   (skosimp)
   (inst - "x!1" "y!1" "z!1")
   (("1" (expand "fullset") (propax)) ("2" (expand "fullset") (propax))
    ("3" (expand "fullset") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "left_distributive")
   (rewrite "right_distributive")
   (rewrite "right_distributive")
   (assert)
   (rewrite "plus_associative")
   (rewrite "plus_associative")
   (rewrite "plus_associative")
   (rewrite "plus_associative"))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "cancel_right_minus" ("z" "x!1" "x" "x!1 + x!1" "y" "x!1"))
   (replace -1 -2 rl)
   (hide -1)
   (rewrite "plus_associative" -1)
   (rewrite "negate_is_right_inv")
   (rewrite "plus_zero"))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "left_distributive" ("x" "zero" "y" "zero" "z" "x!1"))
   (rewrite "zero_plus")
   (lemma "idempotent_add_is_zero" ("x" "zero*x!1"))
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "right_distributive" ("x" "x!1" "y" "zero" "z" "zero"))
   (rewrite "zero_plus")
   (lemma "idempotent_add_is_zero" ("x" "x!1*zero"))
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "cancel_right_plus"
    ("x" "inv(x!1) * y!1" "y" "inv((x!1 * y!1))" "z" "x!1*y!1"))
   (lemma "left_distributive" ("x" "inv(x!1)" "y" "x!1" "z" "y!1"))
   (replace -2 1 rl)
   (hide -2)
   (replace -1 1 rl)
   (hide -1)
   (rewrite "negate_is_left_inv")
   (rewrite "zero_times")
   (rewrite "negate_is_left_inv"))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "right_distributive" ("x" "x!1" "y" "y!1" "z" "inv(y!1)"))
   (rewrite "negate_is_right_inv")
   (rewrite "times_zero")
   (lemma "cancel_left_plus"
    ("z"
     "inv((x!1 * y!1))"
     "x"
     "zero"
     "y"
     "(x!1 * y!1) + (x!1 * inv(y!1))"))
   (replace -1 -2 rl)
   (hide -1)
   (rewrite "plus_zero")
   (rewrite "plus_associative" :dir rl)
   (rewrite "negate_is_left_inv")
   (rewrite "zero_plus")
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "negative_times" ("x" "x!1" "y" "inv(y!1)"))
   (lemma "times_negative" ("x" "x!1" "y" "y!1"))
   (replace -1 -2)
   (rewrite "inv_inv"))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "sq")
   (skosimp*)
   (rewrite "right_distributive")
   (rewrite "left_distributive")
   (rewrite "left_distributive")
   (assert)
   (rewrite "plus_associative")
   (rewrite "plus_associative")
   (rewrite "plus_associative")
   (rewrite "plus_associative")
   (lemma "plus_commutative")
   (lemma "plus_associative")
   (inst-cp - "y!1 * x!1" "x!1 * y!1" "y!1 * y!1")
   (replace -2 1 rl)
   (inst - "x!1 * y!1" "y!1 * x!1" "y!1 * y!1")
   (replace -1 1 rl)
   (inst - "x!1 * y!1" "y!1 * x!1")
   (replace -3)
   (propax))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "sq_plus" ("x" "x!1" "y" "inv[T, +, zero](y!1)"))
   (replace -1 1)
   (hide -1)
   (rewrite "sq_neg")
   (rewrite "times_negative")
   (rewrite "negative_times"))


proof_type: f_proof
decl_type: formula
library: algebra
theory: commutative_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_commutative_ring")
   (expand "commutative_ring?")
   (flatten)
   (expand "commutative?")
   (expand "restrict")
   (skosimp)
   (inst - "x!1" "y!1")
   (("1" (expand "fullset") (propax)) ("2" (expand "fullset") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: commutative_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "R!1")
   (expand "subring?")
   (expand "commutative_ring?")
   (flatten)
   (assert)
   (expand "commutative?")
   (expand "restrict")
   (expand "subset?")
   (expand "member")
   (skosimp)
   (inst-cp - "x!1")
   (inst - "y!1")
   (assert)
   (inst - "x!1" "y!1"))


proof_type: f_proof
decl_type: formula
library: algebra
theory: commutative_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sq")
   (lemma "times_associative")
   (rewrite "times_associative")
   (rewrite "times_associative")
   (inst-cp - "y!1" "x!1" "y!1")
   (inst - "x!1" "y!1" "y!1")
   (lemma "times_commutative" ("x" "x!1" "y" "y!1"))
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring_nz_closed
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (lemma "nz_T_times_nz_T_is_nz_T" ("nzx" "x!1" "nzy" "y!1"))
     (("1" (assert)) ("2" (assert)) ("3" (assert))))
    ("2" (replace -1) (rewrite "zero_times"))
    ("3" (replace -1) (rewrite "times_zero"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring_nz_closed
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "nzx!1")
   (skosimp)
   (lemma "times_is_zero" ("x" "nzx!1" "y" "y!1"))
   (grind))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring_nz_closed
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "sq")
   (prop)
   (("1" (lemma "times_is_zero" ("x" "x!1" "y" "x!1")) (assert))
    ("2" (replace -1) (rewrite "zero_times"))))


proof_type: j_proof
decl_type: tcc
library: algebra
theory: ring_nz_closed
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "nzx!1")
   (typepred "nzy!1")
   (skosimp*)
   (lemma "fullset_is_ring_nz_closed")
   (expand "ring_nz_closed?")
   (flatten)
   (expand "nz_closed?")
   (hide -1)
   (expand "star_closed?")
   (inst - "nzx!1" "nzy!1")
   (("1" (grind)) ("2" (grind)) ("3" (grind))))


proof_type: j_proof
decl_type: tcc
library: algebra
theory: ring_nz_closed
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp 1)
   (lemma "negate_negate" ("x" "nzx!1"))
   (replace -2)
   (rewrite "negate_zero")
   (typepred "nzx!1")
   (assert))


proof_type: j_proof
decl_type: tcc
library: algebra
theory: ring_nz_closed
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "sq")
   (skosimp)
   (lemma "nz_T_times_nz_T_is_not_zero" ("nzx" "nzx!1" "nzy" "nzx!1"))
   (assert))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: ring_with_one_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "ring_with_one?")
   (expand "ring?")
   (expand "semigroup?")
   (expand "groupoid?")
   (expand "star_closed?")
   (skosimp*)
   (inst - "x1!1`1" "x1!1`2")
   (expand "member")
   (assert))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: ring_with_one_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "finite_ring_with_one?")
   (expand "ring_with_one?")
   (expand "monoid?")
   (expand "monad?")
   (expand "groupoid?")
   (expand "star_closed?")
   (expand "member")
   (skosimp*))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring_with_one
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "unique_left_identity[T,*,one]" ("y" "y!1" "M" "fullset[T]"))
   (("1"
     (prop)
     (("1" (skosimp) (inst - "x!1") (grind))
      ("2" (skosimp) (inst - "x!1"))))
    ("2"
     (hide 2)
     (lemma "fullset_is_ring_with_one")
     (expand "ring_with_one?")
     (expand "monoid?")
     (flatten))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: ring_with_one
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "unique_right_identity[T,*,one]" ("M" "fullset[T]" "y" "y!1"))
   (("1"
     (prop)
     (("1" (skosimp) (inst - "x!1") (grind))
      ("2" (skosimp) (inst - "x!1"))))
    ("2"
     (lemma "fullset_is_ring_with_one")
     (expand "ring_with_one?")
     (flatten)
     (expand "monoid?")
     (flatten))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: ring_with_one
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_ring_with_one")
   (expand "ring_with_one?")
   (flatten)
   (expand "ring?")
   (postpone))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "R!1")
   (expand "division_ring?")
   (flatten)
   (hide -1)
   (expand "group?")
   (expand "monoid?")
   (expand "monad?")
   (expand "groupoid?")
   (flatten)
   (split)
   (("1" (hide-all-but (-1 1)) (grind))
    ("2" (hide-all-but (-2 1)) (grind))
    ("3"
     (hide-all-but (-3 1))
     (expand "identity?")
     (skosimp)
     (expand "restrict")
     (inst - "x!1")
     (expand "remove")
     (expand "member")
     (typepred "x!1")
     (expand "restrict")
     (expand "remove")
     (expand "member")
     (propax))
    ("4" (hide-all-but (-4 1)) (grind))
    ("5"
     (hide-all-but (-5 1))
     (expand "inv_exists?")
     (skosimp)
     (typepred "x!1")
     (expand "restrict")
     (expand "remove")
     (expand "member")
     (inst - "x!1")
     (("1"
       (skosimp)
       (typepred "y!1")
       (expand "remove")
       (flatten)
       (expand "member")
       (inst + "y!1")
       (("1" (assert)) ("2" (expand "restrict") (assert))))
      ("2" (expand "remove") (expand "member") (propax))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_division_ring")
   (expand "division_ring?")
   (expand "group?")
   (expand "monoid?")
   (expand "monad?")
   (flatten)
   (hide-all-but (-3 -7))
   (grind))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (case-replace "x!1=zero")
     (("1"
       (rewrite "zero_times")
       (lemma "times_is_zero" ("x" "y!1" "y" "n0z!1"))
       (typepred "n0z!1")
       (assert))
      ("2"
       (case-replace "y!1=zero")
       (("1"
         (rewrite "zero_times")
         (lemma "times_is_zero" ("x" "x!1" "y" "n0z!1"))
         (typepred "n0z!1")
         (assert))
        ("2"
         (lemma "cancel_right[nz_T,*,one]"
          ("x" "x!1" "y" "y!1" "z" "n0z!1"))
         (("1" (assert)) ("2" (assert)) ("3" (assert))))))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (case-replace "x!1=zero")
     (("1"
       (rewrite "times_zero")
       (lemma "times_is_zero" ("x" "n0z!1" "y" "y!1"))
       (typepred "n0z!1")
       (assert))
      ("2"
       (case-replace "y!1=zero")
       (("1"
         (rewrite "times_zero")
         (lemma "times_is_zero" ("x" "n0z!1" "y" "x!1"))
         (typepred "n0z!1")
         (assert))
        ("2"
         (lemma "cancel_left[nz_T,*,one]"
          ("x" "x!1" "y" "y!1" "z" "n0z!1"))
         (("1" (assert)) ("2" (assert)) ("3" (assert))))))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (lemma "cancel_times_right" ("n0z" "x!1" "x" "x!1" "y" "one"))
     (("1" (rewrite "one_times") (assert)) ("2" (assert))))
    ("2" (replace -1 * lr) (rewrite "zero_times"))
    ("3" (replace -1 * lr) (rewrite "one_times"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "n0x!1")
   (skosimp)
   (lemma "cancel_times_right"
    ("x"
     "inv[nz_T,
                   restrict[[T, T], [nz_T[T, +, *, zero], nz_T[T, +, *, zero]],
                            T]
                       (*),
                   one]
               (n0x!1)"
     "y"
     "zero"
     "n0z"
     "n0x!1"))
   (("1"
     (replace -1 -2 rl)
     (hide -1)
     (rewrite "zero_times")
     (rewrite "inv_left")
     (lemma "one_ne_zero")
     (assert))
    ("2" (lemma "one_ne_zero") (propax))
    ("3" (lemma "nz_T_times_nz_T_is_not_zero") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (lemma "cancel_times_right"
      ("x"
       "x!1 *
               inv[nz_T,
                       restrict[[T, T],
                                [nz_T[T, +, *, zero], nz_T[T, +, *, zero]], T]
                           (*),
                       one]
                   (n0z!1)"
       "y"
       "y!1 *
                inv[nz_T,
                        restrict[[T, T],
                                 [nz_T[T, +, *, zero], nz_T[T, +, *, zero]], T]
                            (*),
                        one]
                    (n0z!1)"
       "n0z"
       "n0z!1"))
     (("1"
       (replace -1 -2 rl)
       (hide -1)
       (rewrite "associative" -1)
       (rewrite "associative" -1)
       (rewrite "inv_left" -1)
       (rewrite "times_one")
       (rewrite "times_one"))
      ("2" (lemma "one_ne_zero") (propax))
      ("3"
       (hide -1 2)
       (skosimp)
       (lemma "times_is_zero" ("x" "x1!1`1" "y" "x1!1`2"))
       (typepred "x1!1`1")
       (typepred "x1!1`2")
       (assert))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (lemma "cancel_times_left"
      ("n0z"
       "recip(n0z!1)"
       "x"
       "n0z!1 *
               inv[nz_T,
                       restrict[[T, T],
                                [nz_T[T, +, *, zero], nz_T[T, +, *, zero]], T]
                           (*),
                       one]
                   (n0x!1)"
       "y"
       "n0z!1 *
                inv[nz_T,
                        restrict[[T, T],
                                 [nz_T[T, +, *, zero], nz_T[T, +, *, zero]], T]
                            (*),
                        one]
                    (n0y!1)"))
     (("1"
       (replace -1 -2 rl)
       (hide -1)
       (rewrite "associative" -1 :dir rl)
       (rewrite "associative" -1 :dir rl)
       (rewrite "inv_left")
       (rewrite "one_times")
       (rewrite "one_times")
       (lemma
        "cancel_left_inv[nz_T,restrict[[T, T],[nz_T[T, +, *, zero], nz_T[T, +, *, zero]], T](*),one]"
        ("z" "one" "x" "n0x!1" "y" "n0y!1"))
       (replace -1 1 rl)
       (rewrite "one_times" 1)
       (rewrite "one_times" 1))
      ("2" (lemma "one_ne_zero") (propax))
      ("3"
       (hide 2 -1)
       (skosimp)
       (typepred "x1!1`1")
       (typepred "x1!1`2")
       (lemma "nz_T_times_nz_T_is_not_zero"
        ("nzx" "x1!1`1" "nzy" "x1!1`2"))
       (assert))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "associative")
   (("1" (lemma "one_ne_zero") (propax))
    ("2" (lemma "nz_T_times_nz_T_is_not_zero") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (lemma "recip_ne_zero" ("n0x" "n0z!1"))
     (name-replace "Z"
      "inv[nz_T,
                    restrict[[T, T], [nz_T[T, +, *, zero], nz_T[T, +, *, zero]],
                             T]
                        (*),
                    one]
                (n0z!1)")
     (("1" (lemma "times_is_zero" ("x" "x!1" "y" "Z")) (assert))
      ("2" (rewrite "one_ne_zero"))
      ("3" (lemma "nz_T_times_nz_T_is_not_zero") (propax))))
    ("2"
     (replace -1)
     (rewrite "zero_times")
     (("1" (rewrite "one_ne_zero"))
      ("2" (lemma "nz_T_times_nz_T_is_not_zero") (propax))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "associative" 1)
   (("1" (lemma "one_ne_zero") (propax))
    ("2" (lemma "nz_T_times_nz_T_is_not_zero") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (replace -1 1 rl)
     (hide -1)
     (rewrite "associative")
     (("1" (lemma "one_ne_zero") (propax))
      ("2" (lemma "nz_T_times_nz_T_is_not_zero") (propax))))
    ("2"
     (replace -1)
     (hide -1)
     (rewrite "associative")
     (("1" (lemma "one_ne_zero") (propax))
      ("2" (lemma "nz_T_times_nz_T_is_not_zero") (propax))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "div_mult_left" ("x" "x!1" "n0z" "n0z!1" "y" "y!1"))
   (flatten)
   (prop)
   (("1" (assert)) ("2" (assert)) ("3" (assert)) ("4" (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "left_distributive"
    ("x"
     "x!1"
     "y"
     "y!1"
     "z"
     "inv[nz_T,
                     restrict[[T, T],
                              [nz_T[T, +, *, zero], nz_T[T, +, *, zero]], T]
                         (*),
                     one]
                 (n0z!1)"))
   (("1" (assert)) ("2" (hide-all-but 1) (lemma "one_ne_zero") (propax))
    ("3" (lemma "nz_T_times_nz_T_is_not_zero") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "negative_times" 1 :dir rl)
   (("1"
     (rewrite "left_distributive" 1)
     (("1" (lemma "one_ne_zero") (propax))
      ("2" (lemma "nz_T_times_nz_T_is_not_zero") (propax))))
    ("2" (lemma "one_ne_zero") (propax))
    ("3" (lemma "nz_T_times_nz_T_is_not_zero") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "one_ne_zero")
   (lemma "nz_T_times_nz_T_is_not_zero")
   (rewrite "inv_star")
   (rewrite "associative")
   (rewrite "inv_inv"))


proof_type: f_proof
decl_type: formula
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite
    "inv_star[nz_T,
                    restrict[[T, T],
                             [nz_T[T, +, *, zero], nz_T[T, +, *, zero]], T]
                        (*),
                    one]")
   (rewrite "associative")
   (("1" (lemma "one_ne_zero") (propax))
    ("2" (lemma "nz_T_times_nz_T_is_not_zero") (propax))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_division_ring")
   (expand "division_ring?")
   (expand "ring_nz_closed?")
   (expand "group?")
   (expand "monoid?")
   (expand "monad?")
   (expand "groupoid?")
   (expand "nz_closed?")
   (expand "ring_with_one?")
   (flatten)
   (assert))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "fullset_is_division_ring")
   (typepred "x1!1`1")
   (typepred "x1!1`2")
   (expand "division_ring?")
   (flatten)
   (hide -1)
   (expand "group?")
   (expand "monoid?")
   (expand "monad?")
   (expand "groupoid?")
   (expand "star_closed?")
   (flatten)
   (inst - "x1!1`1" "x1!1`2")
   (("1"
     (expand "member")
     (expand "remove")
     (expand "member")
     (expand "fullset")
     (assert))
    ("2" (expand "remove") (expand "member") (expand "fullset") (assert))
    ("3" (grind))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_division_ring")
   (expand "division_ring?")
   (flatten)
   (hide -1)
   (expand "group?")
   (flatten)
   (split)
   (("1"
     (hide -2)
     (expand "monoid?")
     (expand "semigroup?")
     (flatten)
     (split)
     (("1" (hide-all-but (-1 1)) (grind))
      ("2" (hide-all-but (-2 1)) (grind))
      ("3" (hide-all-but (-3 1)) (grind))
      ("4"
       (hide-all-but (-4 1))
       (expand "identity?")
       (skosimp)
       (expand "restrict")
       (inst - "x!1"))))
    ("2"
     (hide -1)
     (expand "inv_exists?")
     (skosimp)
     (typepred "x!1")
     (expand "fullset")
     (inst - "x!1")
     (("1"
       (skosimp)
       (typepred "y!1")
       (expand "remove")
       (flatten)
       (inst + "y!1")
       (("1" (assert))
        ("2" (expand "member") (expand "fullset") (assert))))
      ("2"
       (expand "remove")
       (expand "member")
       (expand "fullset")
       (propax))))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst + "one")
   (lemma "fullset_is_division_ring")
   (expand "division_ring?")
   (expand "group?")
   (expand "monoid?")
   (expand "monad?")
   (flatten)
   (hide-all-but (-3 -7))
   (grind))


proof_type: j_proof
decl_type: tcc
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "x!1")
   (expand "division_ring?")
   (expand "ring_nz_closed?")
   (expand "ring_with_one?")
   (expand "group?")
   (expand "monoid?")
   (expand "monad?")
   (expand "groupoid?")
   (flatten)
   (expand "star_closed?")
   (expand "nz_closed?")
   (split)
   (("1" (propax))
    ("2" (hide-all-but (-6 1)) (expand "star_closed?") (propax))))


proof_type: j_proof
decl_type: tcc
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "n0x!1")
   (lemma "recip_ne_zero" ("n0x" "n0y!1"))
   (lemma "nz_T_times_nz_T_is_not_zero"
    ("nzx"
     "n0x!1"
     "nzy"
     "inv[nz_T,
                   restrict[[T, T], [nz_T[T, +, *, zero], nz_T[T, +, *, zero]],
                            T]
                       (*),
                   one]
               (n0y!1)"))
   (("1" (assert)) ("2" (rewrite "one_ne_zero"))
    ("3"
     (hide-all-but 1)
     (skosimp)
     (typepred "x1!1`1")
     (typepred "x1!1`2")
     (lemma "times_is_zero" ("x" "x1!1`1" "y" "x1!1`2"))
     (assert))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: division_ring
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "n0z!1")
   (typepred "n0y!1")
   (lemma "nz_T_times_nz_T_is_not_zero" ("nzx" "n0z!1" "nzy" "n0y!1"))
   (assert))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: field_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "division_ring?")
   (skosimp*)
   (expand "ring_with_one?")
   (expand "monoid?")
   (expand "monad?")
   (expand "groupoid?")
   (expand "star_closed?")
   (flatten)
   (inst - "x1!1`1" "x1!1`2")
   (expand "member")
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: field
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "F!1")
   (expand "field?")
   (expand "division_ring?")
   (expand "abelian_group?")
   (flatten)
   (split)
   (("1"
     (hide -1 -3)
     (expand "group?")
     (expand "monoid?")
     (expand "monad?")
     (expand "groupoid?")
     (flatten)
     (expand "restrict")
     (split)
     (("1" (hide-all-but (-1 1)) (grind))
      ("2" (hide-all-but (-2 1)) (grind))
      ("3"
       (hide-all-but (-3 1))
       (grind)
       (("1" (rewrite "one_times")) ("2" (rewrite "times_one"))
        ("3" (rewrite "one_times")) ("4" (rewrite "times_one"))
        ("5"
         (typepred "F!1")
         (expand "field?")
         (expand "division_ring?")
         (expand "ring_with_one?")
         (expand "monoid?")
         (expand "monad?")
         (expand "member")
         (propax))
        ("6" (rewrite "times_one"))))
      ("4" (hide-all-but (-4 1)) (grind))
      ("5"
       (hide-all-but (-5 1))
       (expand "inv_exists?")
       (skosimp)
       (typepred "x!1")
       (expand "remove")
       (expand "member")
       (inst - "x!1")
       (skosimp)
       (typepred "y!1")
       (inst + "y!1")
       (("1" (grind)) ("2" (expand "remove") (flatten) (assert))))))
    ("2" (hide -1 -2) (grind))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: field
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (name "Z"
         "inv[nz_T[T, +, *, zero],
                                 restrict[[T, T],
                                          [nz_T[T, +, *, zero], nz_T[T, +, *, zero]], T]
                                     (*),
                                 one]
                             (n0z!1)")
   (("1"
     (lemma "div_mult" ("x" "x!1" "n0z" "n0z!1"))
     (replace -2)
     (lemma "times_commutative" ("x" "n0z!1" "y" "x!1*Z"))
     (assert))
    ("2"
     (lemma "one_ne_zero")
     (hide 2)
     (skosimp)
     (expand "restrict")
     (lemma "nz_T_times_nz_T_is_not_zero"
      ("nzx" "x1!1`1" "nzy" "x1!1`2"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: field
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (name "Z"
         "inv[nz_T[T, +, *, zero],
                        restrict[[T, T], [nz_T[T, +, *, zero], nz_T[T, +, *, zero]],
                                 T]
                            (*),
                        one]
                    (n0z!1)")
   (("1"
     (lemma "times_div_left" ("x" "x!1" "y" "y!1" "n0z" "n0z!1"))
     (replace -2)
     (lemma "times_commutative" ("x" "Z" "y" "y!1"))
     (replace -1 -2 rl)
     (replace -2 1 rl)
     (rewrite "times_associative" 1))
    ("2"
     (hide 2)
     (skosimp*)
     (expand "restrict")
     (lemma "nz_T_times_nz_T_is_not_zero"
      ("nzx" "x1!1`1" "nzy" "x1!1`2"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: field
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "inv_star")
   (lemma "times_associative")
   (lemma "times_commutative")
   (name "X"
         "inv[nz_T[T, +, *, zero],
                               restrict[[T, T], [nz_T[T, +, *, zero], nz_T[T, +, *, zero]],
                                        T]
                                   (*),
                               one]
                           (n0x!1)")
   (("1"
     (name "Y"
           "inv[nz_T[T, +, *, zero],
                                   restrict[[T, T], [nz_T[T, +, *, zero], nz_T[T, +, *, zero]],
                                            T]
                                       (*),
                                   one]
                               (n0y!1)")
     (replace -1)
     (replace -2)
     (hide -1 -2)
     (inst-cp -2 "x!1" "y!1" "Y*X")
     (inst-cp - "Y" "X")
     (replace -2)
     (replace -4)
     (inst-cp - "y!1" "X" "Y")
     (replace -4 1 rl)
     (inst - "y!1" "X")
     (replace -1)
     (rewrite "times_associative" 1)
     (rewrite "times_associative" 1))
    ("2"
     (lemma "one_ne_zero")
     (hide-all-but 1)
     (skosimp)
     (expand "restrict")
     (lemma "nz_T_times_nz_T_is_not_zero"
      ("nzx" "x1!1`1" "nzy" "x1!1`2"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: field
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "div_mult_left"
    ("x"
     "x!1"
     "n0z"
     "n0x!1"
     "y"
     "y!1 *
                 inv[nz_T[T, +, *, zero],
                         restrict[[T, T],
                                  [nz_T[T, +, *, zero], nz_T[T, +, *, zero]], T]
                             (*),
                         one]
                     (n0y!1)"))
   (("1"
     (replace -1 1)
     (hide -1)
     (rewrite "times_associative" 1)
     (lemma "times_commutative"
      ("x"
       "inv[nz_T[T, +, *, zero],
                             restrict[[T, T],
                                      [nz_T[T, +, *, zero], nz_T[T, +, *, zero]], T]
                                 (*),
                             one]
                         (n0y!1)"
       "y"
       "n0x!1"))
     (replace -1 1)
     (hide -1)
     (rewrite "times_associative" :dir rl)
     (lemma "div_mult_right" ("y" "x!1" "x" "y!1*n0x!1" "n0z" "n0y!1"))
     (propax))
    ("2"
     (lemma "one_ne_zero")
     (hide 2)
     (skosimp)
     (expand "restrict")
     (lemma "nz_T_times_nz_T_is_not_zero"
      ("nzx" "x1!1`1" "nzy" "x1!1`2"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: field
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "div_distributes" :dir rl)
   (rewrite "inv_star")
   (lemma "div_simplify" ("n0x" "n0x!1"))
   (lemma "div_simplify" ("n0x" "n0y!1"))
   (name-replace "X"
    "inv[nz_T[T, +, *, zero],
                           restrict[[T, T], [nz_T[T, +, *, zero], nz_T[T, +, *, zero]],
                                    T]
                               (*),
                           one]
                       (n0x!1)")
   (("1"
     (name-replace "Y"
      "inv[nz_T[T, +, *, zero],
                                     restrict[[T, T], [nz_T[T, +, *, zero], nz_T[T, +, *, zero]],
                                              T]
                                         (*),
                                     one]
                                 (n0y!1)")
     (("1"
       (lemma "times_commutative")
       (inst-cp - "Y" "X")
       (lemma "times_associative")
       (inst-cp - "x!1*n0y!1" "Y" "X")
       (inst-cp - "x!1" "n0y!1" "Y")
       (replace -6)
       (rewrite "times_one")
       (replace -2)
       (replace -3 1 rl)
       (replace -5)
       (inst-cp - "y!1*n0x!1" "X" "Y")
       (inst - "y!1" "n0x!1" "X")
       (replace -8)
       (rewrite "times_one")
       (replace -1)
       (replace -2 1 rl)
       (propax))
      ("2"
       (hide-all-but 1)
       (grind)
       (lemma "nz_T_times_nz_T_is_not_zero"
        ("nzx" "x1!1`1" "nzy" "x1!1`2"))
       (assert))))
    ("2"
     (hide-all-but 1)
     (grind)
     (lemma "nz_T_times_nz_T_is_not_zero"
      ("nzx" "x1!1`1" "nzy" "x1!1`2"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: field
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "add_div" ("x" "x!1" "n0x" "n0x!1" "y" "-y!1" "n0y" "n0y!1"))
   (rewrite "negative_times")
   (("1" (rewrite "negative_times"))
    ("2"
     (hide-all-but 1)
     (skosimp)
     (lemma "nz_T_times_nz_T_is_not_zero"
      ("nzx" "x1!1`1" "nzy" "x1!1`2"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: field
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "sq_times")
   (("1" (expand "sq") (assert) (rewrite "inv_star"))
    ("2"
     (lemma "one_ne_zero")
     (hide 2)
     (skosimp)
     (typepred "x1!1`1")
     (typepred "x1!1`2")
     (lemma "nz_T_times_nz_T_is_not_zero"
      ("nzx" "x1!1`1" "nzy" "x1!1`2"))
     (assert))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: field
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_field")
   (expand "field?")
   (expand "division_ring?")
   (expand "ring_with_one?")
   (expand "integral_domain?")
   (expand "commutative_ring?")
   (flatten)
   (assert)
   (hide-all-but (-3 1))
   (expand "group?")
   (expand "monoid?")
   (expand "monad?")
   (expand "groupoid?")
   (expand "star_closed?")
   (expand "nz_closed?")
   (expand "star_closed?")
   (flatten))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: field
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind)
   (typepred "x1!1`1")
   (typepred "x1!1`2")
   (lemma "nz_T_times_nz_T_is_nz_T" ("nzx" "x1!1`1" "nzy" "x1!1`2"))
   (assert))


proof_type: j_proof
decl_type: tcc
library: algebra
theory: field
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "x!1")
   (expand "field?")
   (expand "integral_domain?")
   (expand "commutative_ring?")
   (expand "nz_closed?")
   (expand "division_ring?")
   (expand "ring_with_one?")
   (flatten)
   (expand "group?")
   (hide -2)
   (assert)
   (hide -1 -3)
   (expand "monoid?")
   (expand "monad?")
   (expand "groupoid?")
   (propax))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: commutative_ring_with_one
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_commutative_ring_with_one")
   (expand "commutative_ring_with_one?")
   (flatten))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: commutative_ring_with_one
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_commutative_ring_with_one")
   (expand "commutative_ring_with_one?")
   (expand "commutative_ring?")
   (expand "ring_with_one?")
   (flatten)
   (assert))


proof_type: j_proof
decl_type: tcc
library: algebra
theory: commutative_ring_with_one
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "x!1")
   (expand "commutative_ring_with_one?")
   (expand "commutative_ring?")
   (expand "ring_with_one?")
   (flatten)
   (assert))


proof_type: j_proof
decl_type: tcc
library: algebra
theory: commutative_ring_with_one
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "x!1")
   (expand "commutative_ring_with_one?")
   (expand "commutative_monoid?")
   (expand "ring_with_one?")
   (flatten)
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "equivalence?")
   (auto-rewrite "member")
   (expand "congruent_mod")
   (split)
   (("1"
     (expand "reflexive?")
     (skosimp*)
     (typepred "H!1")
     (expand "group?")
     (expand "monoid?")
     (flatten)
     (assert)
     (expand "monad?")
     (skosimp*)
     (typepred "H!1")
     (assert))
    ("2"
     (expand "symmetric?")
     (skosimp*)
     (typepred "H!1")
     (assert)
     (rewrite "subgroup_def")
     (flatten)
     (expand "inv_closed?")
     (inst - "x!1 * inv(y!1)")
     (rewrite "inv_star")
     (assert))
    ("3"
     (expand "transitive?")
     (skosimp*)
     (typepred "H!1")
     (rewrite "subgroup_def")
     (flatten)
     (assert)
     (expand "star_closed?")
     (inst - "x!1 * inv(y!1)" "y!1 * inv(z!1)")
     (rewrite "associative")
     (lemma "associative")
     (inst - "inv(y!1)" "y!1" "inv(z!1)")
     (assert)
     (replace -1 -7 rl)
     (rewrite "inv_left")
     (rewrite "left_identity"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "subset?")
   (skosimp*)
   (assert)
   (expand "member")
   (expand "*")
   (skosimp*)
   (typepred "h!1")
   (typepred "H!1")
   (expand "subgroup?")
   (expand "subset?")
   (inst?)
   (assert)
   (expand "member")
   (replace -4)
   (hide -4)
   (rewrite "star_closed"))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (apply-extensionality 1 :hide? t)
   (expand "*")
   (iff 1)
   (prop)
   (("1"
     (skosimp*)
     (replace -1)
     (hide -1)
     (assert)
     (rewrite "left_identity[T,*,one]")
     (assert))
    ("2" (inst?) (rewrite "left_identity[T,*,one]"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (apply-extensionality 1 :hide? t)
   (iff 1)
   (expand "*")
   (prop)
   (("1"
     (skosimp*)
     (replace -1)
     (hide -1)
     (rewrite "right_identity")
     (assert))
    ("2" (inst?) (rewrite "right_identity"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "fullset_is_group")
   (expand "group?")
   (expand "monoid?")
   (flatten)
   (hide -1 -3)
   (expand "associative?")
   (expand "restrict")
   (apply-extensionality 1 :hide? t)
   (expand "*")
   (iff 1)
   (prop)
   (("1"
     (skosimp*)
     (replace -1)
     (typepred "h!1")
     (skosimp*)
     (replace -1)
     (inst + "h!2")
     (assert)
     (inst?)
     (("1" (assert)) ("2" (expand "fullset") (propax))
      ("3" (expand "fullset") (propax))
      ("4" (expand "fullset") (propax))))
    ("2"
     (skosimp*)
     (replace -1)
     (hide -1)
     (typepred "h!1")
     (inst + "b!1*h!1")
     (("1"
       (inst?)
       (("1" (expand "fullset") (propax))
        ("2" (expand "fullset") (propax))
        ("3" (expand "fullset") (propax))))
      ("2" (inst?))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "fullset_is_group")
   (expand "group?")
   (expand "monoid?")
   (flatten)
   (hide -1 -3)
   (expand "associative?")
   (expand "restrict")
   (apply-extensionality 1 :hide? t)
   (expand "*")
   (iff 1)
   (prop)
   (("1"
     (skosimp*)
     (replace -1)
     (typepred "h!1")
     (skosimp*)
     (replace -1)
     (inst + "h!2")
     (assert)
     (inst?)
     (("1" (assert) (expand "fullset") (propax))
      ("2" (expand "fullset") (propax))
      ("3" (expand "fullset") (propax))))
    ("2"
     (skosimp*)
     (replace -1)
     (hide -1)
     (typepred "h!1")
     (inst + "h!1*a!1")
     (("1"
       (inst?)
       (("1" (assert)) ("2" (expand "fullset") (propax))
        ("3" (expand "fullset") (propax))
        ("4" (expand "fullset") (propax))))
      ("2" (inst?))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "fullset_is_group")
   (expand "group?")
   (expand "monoid?")
   (flatten)
   (hide -1 -3)
   (expand "associative?")
   (expand "restrict")
   (apply-extensionality 1 :hide? t)
   (expand "*")
   (iff 1)
   (prop)
   (("1"
     (skosimp*)
     (replace -1)
     (hide -1)
     (inst + "inv(a!1)*h!1*b!1")
     (("1"
       (inst - "a!1" "inv(a!1) * h!1" "b!1")
       (("1"
         (replace -1 * rl)
         (reveal -1)
         (inst - "a!1" "inv(a!1)" "h!1")
         (("1"
           (replace -1 * rl)
           (rewrite "inv_right")
           (rewrite "left_identity"))
          ("2" (expand "fullset") (propax))
          ("3" (expand "fullset") (propax))
          ("4" (expand "fullset") (propax))))
        ("2" (expand "fullset") (propax))
        ("3" (expand "fullset") (propax))
        ("4" (expand "fullset") (propax))))
      ("2"
       (typepred "h!1")
       (skosimp*)
       (replace -1)
       (inst + "h!2")
       (inst -2 "inv[T, *, one](a!1)" "a!1" "h!2")
       (("1"
         (replace -2 * rl)
         (rewrite "inv_left")
         (rewrite "left_identity"))
        ("2" (expand "fullset") (propax))
        ("3" (expand "fullset") (propax))
        ("4" (expand "fullset") (propax))))))
    ("2"
     (skosimp*)
     (replace -1)
     (hide -1)
     (inst + "(a!1*h!1)*inv(b!1)")
     (("1"
       (inst - "a!1 * h!1" "inv(b!1)" "b!1")
       (("1"
         (replace -1)
         (rewrite "inv_left")
         (rewrite "right_identity"))
        ("2" (expand "fullset") (propax))
        ("3" (expand "fullset") (propax))
        ("4" (expand "fullset") (propax))))
      ("2"
       (typepred "h!1")
       (skosimp*)
       (replace -1)
       (inst + "h!2")
       (inst - "a!1" "(h!2 * b!1)" "inv[T, *, one](b!1)")
       (("1"
         (replace -2)
         (reveal -1)
         (hide -3)
         (inst?)
         (("1"
           (replace -1)
           (rewrite "inv_right")
           (rewrite "right_identity"))
          ("2" (expand "fullset") (propax))
          ("3" (expand "fullset") (propax))
          ("4" (expand "fullset") (propax))))
        ("2" (expand "fullset") (propax))
        ("3" (expand "fullset") (propax))
        ("4" (expand "fullset") (propax))))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "subset?")
   (skosimp*)
   (assert)
   (expand "member")
   (expand "*")
   (skosimp*)
   (inst + "h!1")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "subset?")
   (skosimp*)
   (expand "member")
   (expand "*")
   (skosimp*)
   (inst + "h!1")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "restrict")
   (expand "right_coset")
   (expand "restrict")
   (apply-extensionality 1 :hide? t)
   (expand "image")
   (expand "*")
   (propax))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "G!1")
   (typepred "H!1")
   (assert)
   (case "subset?(right_coset(G!1, H!1)(a!1),{x: T | congruent_mod(G!1, H!1)(a!1, x)})")
   (("1"
     (case "subset?({x: T | congruent_mod(G!1, H!1)(a!1, x)},right_coset(G!1, H!1)(a!1))")
     (("1"
       (lemma "subset_antisymmetric"
        ("a"
         "right_coset(G!1, H!1)(a!1)"
         "b"
         "{x: T | congruent_mod(G!1, H!1)(a!1, x)}"))
       (assert))
      ("2"
       (assert)
       (expand "member")
       (hide -1 2)
       (expand "subset?")
       (skosimp*)
       (assert)
       (expand "congruent_mod" -1 1)
       (assert)
       (rewrite "subgroup_def")
       (flatten)
       (expand "inv_closed?")
       (inst - "a!1 * inv(x!1)")
       (("1"
         (rewrite "inv_star")
         (assert)
         (rewrite "right_coset_image")
         (assert)
         (expand "restrict")
         (assert)
         (expand "image")
         (expand "member")
         (inst + "x!1*inv(a!1)")
         (rewrite "associative")
         (rewrite "inv_left")
         (rewrite "right_identity"))
        ("2" (expand "member") (propax))))))
    ("2"
     (hide 2)
     (expand "subset?")
     (skosimp*)
     (rewrite "right_coset_image")
     (expand "restrict")
     (expand "image")
     (assert)
     (expand "congruent_mod")
     (expand "member")
     (skosimp*)
     (typepred "x!2")
     (replace -2 1)
     (rewrite "inv_star")
     (rewrite "associative" 1 :dir rl)
     (rewrite "inv_right")
     (rewrite "left_identity")
     (lemma "inv_member" ("G" "H!1" "x" "x!2"))
     (expand "member")
     (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "right_coset")
   (expand "restrict")
   (expand "image")
   (expand "*")
   (propax))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "right_coset")
   (expand "member")
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (expand "*")
   (inst - "a!1")
   (inst + "one")
   (("1" (rewrite "one_left")) ("2" (assert) (rewrite "one_in"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "G!1")
   (expand "subgroup?")
   (assert)
   (inst + "LAMBDA (x:(A!1)): x*inv(a!1)*b!1")
   (("1"
     (expand "bijective?")
     (split)
     (("1"
       (expand "injective?")
       (skosimp*)
       (lemma "cancel_right"
        ("x" "x1!1" "z" "inv(a!1) * b!1" "y" "x2!1"))
       (expand "group?")
       (expand "monoid?")
       (flatten)
       (expand "associative?")
       (typepred "x1!1")
       (typepred "x2!1")
       (expand "inv_exists?")
       (assert)
       (rewrite "associative" 1 :dir rl)
       (rewrite "associative" 1 :dir rl))
      ("2"
       (expand "surjective?")
       (skosimp*)
       (typepred "y!1")
       (replace -7)
       (rewrite "right_coset_is" -1)
       (("1"
         (assert)
         (expand "congruent_mod")
         (assert)
         (lemma "right_coset_is" ("H" "H!1" "G" "G!1" "a" "a!1"))
         (expand "subgroup?")
         (assert)
         (case "A!1(y!1*inv(b!1)*a!1)")
         (("1"
           (inst + "y!1 * inv(b!1) * a!1")
           (expand "group?")
           (expand "monoid?")
           (expand "associative?")
           (flatten)
           (lemma "inv_member" ("x" "a!1" "G" "G!1"))
           (lemma "inv_member" ("x" "b!1" "G" "G!1"))
           (assert)
           (hide-all-but (-1 -2 -6 -7 -11 -12 1))
           (case "G!1(y!1)")
           (("1"
             (inst-cp - "y!1 * inv(b!1)" "a!1" "inv(a!1)")
             (("1"
               (expand "restrict")
               (assert)
               (inst - "y!1" "inv(b!1)" "b!1")
               (("1"
                 (assert)
                 (rewrite "associative" 1)
                 (rewrite "associative" 1)
                 (lemma "associative")
                 (inst-cp - "inv(b!1)" "a!1" "inv(a!1)")
                 (replace -2)
                 (rewrite "inv_right" -2)
                 (rewrite "right_identity")
                 (rewrite "associative" 1)
                 (rewrite "inv_left" +)
                 (assert)
                 (rewrite "one_right"))
                ("2" (assert) (expand "inv") (propax))))
              ("2"
               (hide 2)
               (assert)
               (typepred "G!1")
               (expand "group?")
               (expand "monoid?")
               (expand "monad?")
               (flatten)
               (expand "groupoid?")
               (expand "star_closed?")
               (expand "member")
               (inst - "y!1" "inv(b!1)")
               (("1" (expand "inv") (propax))
                ("2" (expand "inv") (propax))))
              ("3" (rewrite "star_closed"))))
            ("2"
             (hide 2)
             (typepred "y!1")
             (case "subset?(B!1, G!1)")
             (("1" (expand "subset?") (assert) (inst?) (assert))
              ("2"
               (case-replace "B!1 = right_coset(G!1, H!1)(b!1)")
               (("1"
                 (lemma "right_coset_subset")
                 (expand "right_coset")
                 (inst - "G!1" "H!1" "b!1")
                 (expand "subgroup?")
                 (propax))
                ("2" (assert))))))))
          ("2"
           (hide 2)
           (replace -7)
           (expand "right_coset")
           (replace -1)
           (expand "congruent_mod")
           (assert)
           (rewrite "inv_star" +)
           (rewrite "inv_star" +)
           (rewrite "assoc")
           (rewrite "assoc")
           (rewrite "assoc")
           (rewrite "inv_right")
           (rewrite "one_left"))))
        ("2" (hide 2) (expand "subgroup?") (propax))))))
    ("2"
     (skosimp*)
     (typepred "x!1")
     (replace -7)
     (rewrite "right_coset_is" 1)
     (("1"
       (expand "congruent_mod" 1)
       (rewrite "inv_star" 1)
       (rewrite "associative" 1 :dir rl)
       (rewrite "inv_star" 1)
       (replace -6)
       (rewrite "right_coset_is" -1)
       (("1"
         (assert)
         (expand "congruent_mod")
         (assert)
         (rewrite "inv_right")
         (rewrite "left_identity"))
        ("2" (expand "subgroup?") (propax))))
      ("2" (expand "subgroup?") (propax))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "restrict")
   (expand "left_coset")
   (expand "image")
   (expand "restrict")
   (apply-extensionality 1 :hide? t)
   (expand "*")
   (propax))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "left_coset")
   (expand "restrict")
   (expand "image")
   (expand "*")
   (propax))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "(a!1 * H!1)(a!1) = (b!1 * H!1)(a!1)")
   (("1"
     (expand "*")
     (case "(EXISTS (h: (H!1)): a!1 = a!1 * h)")
     (("1" (assert))
      ("2"
       (hide 2)
       (inst + "one")
       (("1" (rewrite "one_right")) ("2" (assert) (rewrite "one_in"))))))
    ("2" (hide 2) (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (replace -2)
   (apply-extensionality 1 :hide? t)
   (expand "*")
   (iff 1)
   (prop)
   (("1"
     (skosimp*)
     (inst + "h!1*h!2")
     (("1" (assert) (rewrite "assoc")) ("2" (rewrite "star_closed"))))
    ("2"
     (skosimp*)
     (replace -1)
     (inst + "inv(h!1)*h!2")
     (("1"
       (rewrite "assoc")
       (case-replace "b!1 * h!1 * inv(h!1) = b!1")
       (hide 2)
       (rewrite "associative")
       (rewrite "inv_right")
       (rewrite "one_right"))
      ("2" (rewrite "star_closed") (rewrite "inv_in"))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "(H!1 * a!1)(a!1) = (H!1 * b!1)(a!1)")
   (("1"
     (expand "*")
     (case "(EXISTS (h: (H!1)): a!1 = h * a!1)")
     (("1" (assert))
      ("2"
       (hide 2)
       (inst + "one")
       (("1" (assert) (rewrite "one_left")) ("2" (rewrite "one_in"))))))
    ("2" (hide 2) (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (replace -2)
   (apply-extensionality 1 :hide? t)
   (expand "*")
   (iff 1)
   (prop)
   (("1"
     (skosimp*)
     (inst + "h!2*h!1")
     (("1" (assert) (rewrite "assoc")) ("2" (rewrite "star_closed"))))
    ("2"
     (skosimp*)
     (replace -1)
     (inst + "h!2*inv(h!1)")
     (("1"
       (rewrite "assoc")
       (case-replace "b!1 * h!1 * inv(h!1) = b!1")
       (("1"
         (case-replace "h!2 * inv(h!1) * h!1 = h!2")
         (hide 2)
         (rewrite "associative")
         (rewrite "inv_left")
         (rewrite "one_right"))
        ("2"
         (rewrite "associative")
         (rewrite "inv_right")
         (rewrite "one_right"))))
      ("2" (rewrite "star_closed") (rewrite "inv_in"))))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (typepred "lc!1")
   (skosimp*)
   (inst - "a!1")
   (assert))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: cosets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (typepred "rc!1")
   (skosimp*)
   (inst - "a!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: normal_subgroups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "G!1")
   (case "N!1 = a!1 * (inv(a!1) *  N!1 * a!1) * inv(a!1)")
   (("1"
     (case "subset?(a!1 * (inv(a!1) * N!1 * a!1) * inv(a!1),a!1 * N!1 * inv(a!1))")
     (("1"
       (case "a!1 * N!1 * inv(a!1) = inv(inv(a!1)) * N!1 * inv(a!1)")
       (("1"
         (inst -5 "inv(a!1)")
         (("1"
           (assert)
           (replace -3 -2 rl)
           (hide -1 -3 -4 -6)
           (lemma "subset_antisymmetric[T]")
           (inst?)
           (assert))
          ("2" (rewrite "inv_in"))))
        ("2" (hide 2) (rewrite "inv_inv"))))
      ("2"
       (hide 2)
       (inst?)
       (name "ANA" "inv(a!1) * N!1 * a!1")
       (replace -1)
       (lemma "subset_left_coset")
       (inst - "N!1" "ANA" "a!1")
       (assert)
       (lemma "subset_right_coset")
       (inst - "a!1*N!1" "a!1*ANA" "inv(a!1)")
       (assert))))
    ("2"
     (hide 2)
     (case "a!1 * (inv(a!1) * N!1 * a!1) * inv(a!1) = (a!1 * inv(a!1)) * N!1 * (a!1 * inv(a!1))")
     (("1"
       (assert)
       (rewrite "inv_right")
       (rewrite "left_coset_one")
       (rewrite "right_coset_one")
       (assert))
      ("2"
       (hide 2)
       (hide -2 -3)
       (assert)
       (lemma "right_coset_assoc")
       (inst - "inv(a!1)*N!1" "a!1" "inv(a!1)")
       (case-replace
        "inv(a!1) * N!1 * a!1 * inv(a!1) = (inv(a!1) * N!1 * a!1) * inv(a!1)")
       (replace -2)
       (hide -1)
       (expand "group?")
       (flatten)
       (expand "monoid?")
       (flatten)
       (expand "associative?")
       (expand "restrict")
       (lemma "right_coset_assoc")
       (inst - "(inv(a!1)*N!1)" "a!1" "inv(a!1)")
       (hide -1)
       (lemma "lr_coset_assoc")
       (inst?)
       (replace -1)
       (hide -1)
       (lemma "left_coset_assoc")
       (inst?)
       (replace -1)
       (rewrite "inv_right")
       (rewrite "left_coset_one")
       (lemma "right_coset_assoc")
       (inst?)
       (replace -1)
       (rewrite "inv_right")
       (rewrite "left_coset_one"))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: normal_subgroups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1" (expand "normal_subgroup?") (flatten))
    ("2"
     (expand "normal_subgroup?")
     (flatten)
     (lemma "normal_prep")
     (inst - "G!1" "N!1")
     (assert)
     (replace -3)
     (skosimp*)
     (inst?)
     (case "a!1 * N!1 * inv(a!1)*a!1 = N!1*a!1")
     (("1"
       (hide -2)
       (expand "subgroup?")
       (lemma "right_coset_assoc")
       (inst?)
       (replace -1)
       (hide -1)
       (rewrite "inv_left")
       (rewrite "right_coset_one"))
      ("2" (assert))))
    ("3"
     (expand "normal_subgroup?")
     (assert)
     (skosimp*)
     (inst?)
     (("1"
       (replace -2)
       (lemma "right_coset_assoc")
       (inst?)
       (replace -1)
       (rewrite "inv_left")
       (rewrite "right_coset_one")
       (hide -1 -2 -3)
       (grind))
      ("2" (hide 2) (typepred "a!1") (rewrite "inv_in"))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: normal_subgroups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "H!1")
   (expand "normal_subgroup?")
   (flatten)
   (inst - "inv(a!1)")
   (("1"
     (expand "subset?")
     (assert)
     (inst - "a!1 * h!1 * inv(a!1)")
     (assert)
     (hide 2)
     (expand "*")
     (inst + "a!1*h!1")
     (inst + "h!1"))
    ("2" (hide 2) (rewrite "inv_in"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: normal_subgroups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "H!1")
   (expand "normal_subgroup?")
   (flatten)
   (inst - "a!1")
   (expand "subset?")
   (assert)
   (inst - "inv(a!1)*h!1*a!1")
   (assert)
   (hide 2)
   (expand "*")
   (inst + "inv(a!1)*h!1")
   (inst + "h!1"))


proof_type: f_proof
decl_type: formula
library: algebra
theory: normal_subgroups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "lc_gen_def")
   (inst?)
   (assert)
   (expand "normal_subgroup?")
   (flatten)
   (assert)
   (name "aa" "lc_gen(G!1, H!1, a!1 * H!1)")
   (replace -1)
   (lemma "lc_eq")
   (inst - "G!1" "H!1" "aa" "a!1")
   (assert)
   (skosimp*)
   (replace -1)
   (inst + "a!1*h!1*inv(a!1)")
   (("1"
     (rewrite "associative")
     (rewrite "associative")
     (rewrite "associative")
     (rewrite "inv_left")
     (rewrite "one_right"))
    ("2" (lemma "nsg_prop") (inst?) (inst - "G!1" "H!1") (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: normal_subgroups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "normal_subgroup?")
   (assert)
   (skosimp*)
   (expand "subset?")
   (skosimp*)
   (assert)
   (expand "*")
   (skosimp*)
   (replace -3)
   (typepred "h!1")
   (skosimp*)
   (typepred "h!2")
   (replace -2)
   (hide -2)
   (hide -4)
   (expand "abelian_group?")
   (expand "commutative?")
   (expand "restrict")
   (inst -2 "h!2" "a!1")
   (("1"
     (rewrite "associative")
     (replace -2)
     (rewrite "assoc")
     (rewrite "inv_left")
     (rewrite "one_left"))
    ("2"
     (hide 2)
     (expand "subgroup?")
     (expand "subset?")
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: factor_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (typepred "B!1")
   (typepred "A!1")
   (skosimp*)
   (replace -1)
   (hide -1)
   (replace -1)
   (hide -1)
   (inst - "(a!1*a!2)*H!1")
   (inst + "a!1" "a!2"))


proof_type: f_proof
decl_type: formula
library: algebra
theory: factor_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "left_coset_assoc" 1 :dir rl)
   (lemma "normal_left_is_right")
   (inst - "G!1" "H!1")
   (assert)
   (flatten)
   (inst - "b1!1")
   (replace -2)
   (rewrite "lr_coset_assoc" 1 :dir rl)
   (replace -3)
   (replace -4)
   (rewrite "lr_coset_assoc")
   (replace -4)
   (rewrite "left_coset_assoc"))


proof_type: f_proof
decl_type: formula
library: algebra
theory: factor_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "is_singleton[set[T]]")
   (inst?)
   (assert)
   (hide 2)
   (prop)
   (("1" (rewrite "p0"))
    ("2"
     (skosimp*)
     (replace -3)
     (hide -3)
     (replace -5)
     (hide -5)
     (lemma "prep")
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: factor_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "mult")
   (name "aa" "lc_gen(G!1, H!1, a!1 * H!1)")
   (replace -1)
   (name "bb" "lc_gen(G!1, H!1, b!1 * H!1)")
   (replace -1)
   (lemma "lc_is_eq")
   (inst - "G!1" "H!1" "aa*bb" "a!1*b!1")
   (typepred "H!1")
   (expand "normal_subgroup?")
   (flatten)
   (assert)
   (hide 2)
   (lemma "lc_gen_normal")
   (inst?)
   (assert)
   (skosimp*)
   (replace -1)
   (hide -1)
   (lemma "lc_gen_normal")
   (inst?)
   (assert)
   (skosimp*)
   (replace -1)
   (hide -1)
   (replace -4 :dir rl)
   (hide -4)
   (replace -4 :dir rl)
   (hide -4)
   (inst + "inv(b!1)*inv(a!1)*h!2*a!1*h!1*b!1")
   (("1"
     (rewrite "assoc")
     (rewrite "assoc")
     (rewrite "assoc")
     (rewrite "assoc")
     (rewrite "assoc")
     (rewrite "assoc")
     (case-replace "(a!1 * b!1 * inv(b!1)) = a!1")
     (("1" (rewrite "inv_right") (rewrite "one_left"))
      ("2"
       (assert)
       (hide 2)
       (rewrite "associative")
       (rewrite "inv_right")
       (assert)
       (rewrite "one_right"))))
    ("2"
     (lemma "nsg_prop2")
     (inst - "a!1" "h!2" "G!1" "H!1")
     (assert)
     (name "HH" "inv(a!1) * h!2 * a!1")
     (case-replace
      "inv[T, *, one](b!1) * inv[T, *, one](a!1) * h!2 * a!1 *
                     h!1
                     * b!1 = inv[T, *, one](b!1) * HH *
                     h!1
                     * b!1")
     (("1"
       (hide -1)
       (lemma "nsg_prop2")
       (inst - "b!1" "HH*h!1" "G!1" "H!1")
       (assert)
       (split -1)
       (("1" (assert) (rewrite "assoc"))
        ("2" (hide 2) (rewrite "star_closed"))))
      ("2"
       (hide 2)
       (rewrite "associative")
       (rewrite "associative")
       (replace -1)
       (propax))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: factor_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "B!1")
   (typepred "A!1")
   (skosimp*)
   (replace -1)
   (hide -1)
   (replace -1)
   (hide -1)
   (lemma "mult_lem")
   (inst?)
   (assert)
   (expand "restrict")
   (replace -1)
   (hide -1)
   (assert)
   (expand "*")
   (skosimp*)
   (typepred "a!2")
   (typepred "a!3")
   (typepred "h!1")
   (typepred "H!1")
   (expand "normal_subgroup?")
   (flatten)
   (expand "subgroup?")
   (hide -3)
   (expand "subset?")
   (assert)
   (inst - "h!1")
   (assert)
   (lemma "star_closed")
   (inst?)
   (name-replace "A23" "a!2 * a!3")
   (hide -2 -3 -4)
   (lemma "star_closed")
   (inst - "G!1" "A23" "h!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: factor_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "restrict")
   (typepred "B!1")
   (typepred "A!1")
   (skosimp*)
   (replace -1)
   (hide -1)
   (replace -1)
   (hide -1)
   (inst + "a!1*a!2")
   (("1" (lemma "mult_lem") (inst?) (expand "restrict") (propax))
    ("2"
     (typepred "a!1")
     (typepred "a!2")
     (assert)
     (lemma "closed")
     (inst?)
     (expand "member")
     (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: factor_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "restrict")
   (prop)
   (("1"
     (apply-extensionality 1 :hide? t)
     (typepred "N!1")
     (case-replace
      "mult(G!1, N!1)(N!1, A!1)(x!1) = mult(G!1, N!1)(one*N!1, A!1)(x!1)")
     (("1"
       (hide -1)
       (typepred "A!1")
       (skosimp*)
       (replace -1)
       (hide -1)
       (lemma "mult_lem")
       (inst?)
       (("1"
         (replace -1)
         (hide -1)
         (expand "restrict")
         (rewrite "left_identity"))
        ("2" (rewrite "one_in"))))
      ("2" (hide 2) (lemma "left_coset_one") (inst?) (assert))
      ("3" (hide 2) (inst + "one") (rewrite "one_in"))))
    ("2"
     (apply-extensionality 1 :hide? t)
     (case-replace
      "mult(G!1, N!1)(A!1,N!1)(x!1) = mult(G!1, N!1)(A!1,one*N!1)(x!1)")
     (("1"
       (hide -1)
       (typepred "A!1")
       (skosimp*)
       (replace -1)
       (hide -1)
       (lemma "mult_lem")
       (inst?)
       (("1"
         (replace -1)
         (hide -1)
         (expand "restrict")
         (rewrite "right_identity"))
        ("2" (rewrite "one_in"))))
      ("2" (hide 2) (lemma "left_coset_one") (inst?) (assert))
      ("3" (hide 2) (inst + "one") (rewrite "one_in"))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: factor_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "group?")
   (prop)
   (("1"
     (expand "monoid?")
     (prop)
     (("1"
       (expand "monad?")
       (prop)
       (("1"
         (expand "groupoid?")
         (expand "star_closed?")
         (skosimp*)
         (assert)
         (expand "fullset")
         (propax))
        ("2" (expand "member") (expand "fullset") (propax))
        ("3"
         (expand "restrict")
         (expand "identity?")
         (skosimp*)
         (lemma "N_is_identity")
         (inst?)
         (assert)
         (flatten)
         (assert))))
      ("2"
       (expand "associative?")
       (expand "restrict")
       (skosimp*)
       (typepred "z!1")
       (typepred "y!1")
       (typepred "x!1")
       (skosimp*)
       (replace -1)
       (hide -1)
       (replace -2)
       (hide -2)
       (replace -3)
       (hide -3)
       (rewrite "mult_lem")
       (lemma "mult_lem")
       (inst?)
       (("1"
         (replace -1)
         (hide -1)
         (lemma "mult_lem")
         (inst?)
         (replace -1)
         (hide -1)
         (lemma "mult_lem")
         (inst?)
         (("1"
           (replace -1)
           (hide -1)
           (lemma "mult_lem")
           (inst?)
           (("1" (hide -1) (rewrite "assoc"))
            ("2" (hide 2) (rewrite "star_closed"))))
          ("2" (hide 2) (rewrite "star_closed"))))
        ("2" (hide 2) (rewrite "star_closed"))))))
    ("2"
     (expand "inv_exists?")
     (skosimp*)
     (typepred "x!1")
     (skosimp*)
     (inst + "inv(a!1)*N!1")
     (("1"
       (replace -1)
       (hide -1)
       (lemma "mult_lem")
       (inst?)
       (("1"
         (replace -1)
         (hide -1)
         (lemma "mult_lem")
         (inst?)
         (("1"
           (replace -1)
           (hide -1)
           (rewrite "inv_right")
           (rewrite "inv_left")
           (rewrite "left_coset_one"))
          ("2" (hide 2) (typepred "a!1") (rewrite "inv_in"))))
        ("2" (rewrite "inv_in"))))
      ("2"
       (prop)
       (("1"
         (expand "*")
         (inst + "inv(a!1)")
         (expand "inv")
         (rewrite "inv_in"))
        ("2" (expand "fullset") (propax))))))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: factor_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (inst +
    "lc_gen[T, *, one](G!1, H!1, A!1) *
                  lc_gen[T, *, one](G!1, H!1, B!1)")
   (("1" (rewrite "star_closed"))
    ("2" (assert) (typepred "H!1") (expand "normal_subgroup?") (propax))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: factor_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (inst + "one")
   (("1"
     (assert)
     (apply-extensionality 1 :hide? t)
     (expand "*")
     (iff 1)
     (prop)
     (("1" (inst + "x!1") (rewrite "left_identity"))
      ("2" (skosimp*) (replace -1) (rewrite "left_identity") (assert))))
    ("2" (rewrite "one_in"))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: factor_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (inst + "one")
   (("1"
     (apply-extensionality 1 :hide? t)
     (expand "*")
     (iff 1)
     (ground)
     (("1" (inst?) (rewrite "one_left"))
      ("2"
       (skosimp*)
       (replace -1)
       (hide -1)
       (rewrite "one_left")
       (assert))))
    ("2" (rewrite "one_in"))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: factor_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (inst + "N!1")
   (inst + "one")
   (("1"
     (apply-extensionality 1 :hide? t)
     (("1"
       (iff 1)
       (ground)
       (("1" (expand "*") (inst?) (rewrite "one_left"))
        ("2"
         (expand "*")
         (skosimp*)
         (replace -1)
         (hide -1)
         (rewrite "one_left")
         (assert))))
      ("2" (lemma "fullset_is_group") (propax))))
    ("2" (rewrite "one_in"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: zn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "group?")
   (prop)
   (("1" (grind))
    ("2"
     (expand "inv_exists?")
     (skosimp*)
     (inst + "-x!1")
     (("1" (grind)) ("2" (grind))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: zn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "group?")
   (prop)
   (("1" (auto-rewrite-theory "group_rew") (grind))
    ("2"
     (expand "inv_exists?")
     (skosimp*)
     (expand "++")
     (case "x!1 = 0")
     (("1"
       (inst + "0")
       (("1"
         (assert)
         (assert)
         (replace -1)
         (assert)
         (lemma "mod_zero")
         (inst?)
         (assert))
        ("2" (expand "fullset") (propax))))
      ("2"
       (inst + "N-x!1")
       (("1" (assert) (assert) (rewrite "mod_eq_arg"))
        ("2" (assert) (expand "fullset") (propax))))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: zn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "group?")
   (prop)
   (("1" (grind))
    ("2"
     (expand "inv_exists?")
     (skosimp*)
     (inst + "-x!1")
     (("1" (grind))
      ("2"
       (typepred "x!1")
       (skosimp*)
       (replace -1)
       (prop)
       (("1" (inst + "-k!1") (assert)) ("2" (grind))))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: zn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "normal_subgroup?")
   (prop)
   (("1"
     (expand "restrict")
     (expand "subgroup?")
     (expand "subset?")
     (assert)
     (skosimp*)
     (typepred "x!1")
     (skosimp*)
     (replace -1)
     (assert)
     (expand "Z")
     (expand "fullset")
     (propax))
    ("2" (skosimp*) (grind))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: zn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "y!1")
   (typepred "x!1")
   (skosimp*)
   (replace -1)
   (hide -1)
   (replace -1)
   (hide -1)
   (inst + "k!1+k!2")
   (assert))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: zn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "x1!1`1")
   (typepred "x1!1`2")
   (skosimp*)
   (inst + "k!1+k!2")
   (assert)
   (case-replace "x1!1 = (x1!1`1,x1!1`2)")
   (("1" (assert)) ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: zn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "group?")
   (prop)
   (("1" (grind))
    ("2"
     (expand "inv_exists?")
     (skosimp*)
     (inst + "-x!1")
     (("1" (grind))
      ("2"
       (prop)
       (("1"
         (typepred "x!1")
         (skosimp*)
         (replace -1)
         (hide -1)
         (inst + "-k!1")
         (assert))
        ("2" (grind))))))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: zn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "group?")
   (prop)
   (("1"
     (typepred "Z")
     (expand "group?")
     (flatten)
     (hide -2)
     (grind)
     (typepred "Z")
     (expand "group?")
     (flatten)
     (hide-all-but (-1 1))
     (expand "monoid?")
     (flatten)
     (hide -2)
     (expand "monad?")
     (flatten)
     (expand "groupoid?")
     (expand "star_closed?")
     (expand "member")
     (inst?))
    ("2"
     (typepred "Z")
     (expand "group?")
     (expand "monoid?")
     (expand "monad?")
     (expand "groupoid?")
     (flatten)
     (expand "inv_exists?")
     (skosimp*)
     (inst - "x!1")
     (("1"
       (skosimp*)
       (inst + "y!1")
       (("1" (assert))
        ("2"
         (typepred "y!1")
         (typepred "x!1")
         (skosimp*)
         (prop)
         (("1" (inst + "-k!1") (assert))
          ("2" (expand "restrict") (propax))))))
      ("2"
       (assert)
       (hide 2)
       (typepred "x!1")
       (skosimp*)
       (expand "restrict")
       (propax))))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: zn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "fullset")
   (auto-rewrite "restrict")
   (auto-rewrite "extend")
   (auto-rewrite "nZ")
   (assert)
   (auto-rewrite "Z")
   (case " group?
                          [int, restrict[[numfield, numfield], [int, int], numfield](+), 0]
                          (extend[int, nZ_TYPE, bool, FALSE](fullset[nZ_TYPE]))")
   (("1"
     (assert)
     (expand "normal_subgroup?")
     (expand "subgroup?")
     (expand "subset?")
     (assert)
     (skosimp*)
     (expand "extend")
     (assert)
     (ground)
     (expand "*")
     (skosimp*)
     (replace -2 * lr)
     (hide -2)
     (typepred "h!1")
     (skosimp*)
     (case-replace
      "inv[int, restrict[[numfield, numfield], [int, int], numfield](+), 0]
                      (a!1) = -a!1")
     (("1" (assert)) ("2" (hide-all-but 1) (grind))))
    ("2"
     (hide 2)
     (expand "group?")
     (expand "monoid?")
     (expand "associative?")
     (assert)
     (prop)
     (("1"
       (expand "monad?")
       (assert)
       (expand "groupoid?")
       (expand "star_closed?")
       (assert)
       (prop)
       (("1"
         (skosimp*)
         (assert)
         (expand "extend")
         (ground)
         (typepred "x!1")
         (typepred "y!1")
         (expand "extend")
         (ground)
         (skosimp*)
         (inst + "k!1+k!2")
         (assert))
        ("2" (expand "extend") (ground) (inst + "0") (assert))
        ("3" (expand "identity?") (assert))))
      ("2"
       (expand "inv_exists?")
       (skosimp*)
       (assert)
       (inst + "-x!1")
       (("1" (assert))
        ("2"
         (assert)
         (expand "extend")
         (ground)
         (typepred "x!1")
         (expand "extend")
         (ground)
         (skosimp*)
         (inst + "-k!1")
         (assert))))))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: zn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "extend")
   (expand "*")
   (grind)
   (apply-extensionality 1 :hide? t)
   (lift-if)
   (ground)
   (("1"
     (skosimp*)
     (inst + "(k!1-1)*N")
     (("1" (assert)) ("2" (ground) (inst + "(k!1-1)") (assert))))
    ("2"
     (skosimp*)
     (replace -1 * lr)
     (hide -1)
     (typepred "h!1")
     (skosimp*)
     (replace -2 * lr)
     (hide -2)
     (hide -1)
     (inst + "k!1+1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: A_group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "group?")
   (prop)
   (("1"
     (expand "monoid?")
     (prop)
     (("1"
       (expand "monad?")
       (prop)
       (("1"
         (expand "groupoid?")
         (expand "star_closed?")
         (assert)
         (skosimp*)
         (grind))
        ("2" (grind))
        ("3"
         (grind)
         (("1" (expand "identity") (apply-extensionality 1 :hide? t))
          ("2" (apply-extensionality 1 :hide? t))))))
      ("2" (grind) (apply-extensionality 1 :hide? t))))
    ("2"
     (expand "inv_exists?")
     (skosimp*)
     (typepred "x!1")
     (inst + "(inverse(x!1))")
     (("1"
       (grind)
       (("1"
         (apply-extensionality 1 :hide? t)
         (("1"
           (inst?)
           (("1"
             (assert)
             (lemma "epsilon_ax[(S!1)]")
             (("1" (inst?) (assert) (inst + "x!2"))
              ("2" (typepred "S!1") (expand "nonempty?") (inst?))))
            ("2"
             (typepred "S!1")
             (expand "nonempty?")
             (typepred "S!1")
             (inst?))))
          ("2"
           (typepred "S!1")
           (expand "nonempty?")
           (expand "empty?")
           (skosimp*)
           (expand "member")
           (inst + "x!2"))))
        ("2"
         (apply-extensionality 1 :hide? t)
         (("1"
           (inst?)
           (("1"
             (assert)
             (lemma "epsilon_ax[(S!1)]")
             (("1" (inst?) (assert) (inst - "x!2"))
              ("2"
               (typepred "S!1")
               (expand "nonempty?")
               (expand "empty?")
               (skosimp*)
               (assert)
               (inst + "x!3"))))
            ("2"
             (typepred "S!1")
             (expand "nonempty?")
             (expand "empty?")
             (skosimp*)
             (assert)
             (inst + "x!3"))))
          ("2"
           (typepred "S!1")
           (expand "nonempty?")
           (expand "empty?")
           (skosimp*)
           (assert)
           (inst + "x!2"))))))
      ("2" (grind))
      ("3"
       (typepred "S!1")
       (expand "nonempty?")
       (expand "empty?")
       (assert)
       (skosimp*)
       (inst + "x!2"))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: homomorphisms
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "phi!1")
   (expand "homomorphism?")
   (inst - "one1" "one1")
   (rewrite "one_left")
   (lemma "divby[T2,o,one2]")
   (inst?)
   (assert))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: homomorphisms
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "G!1")
   (expand "group?")
   (expand "monoid?")
   (flatten)
   (expand "monad?")
   (flatten)
   (expand "member")
   (propax))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: homomorphisms
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case-replace
    "subgroup?[T1, *, one1]({a: T1 | G!1(a) AND phi!1(a) = one2}, G!1)")
   (("1" (expand "subgroup?") (flatten))
    ("2"
     (hide 2)
     (expand "subgroup?")
     (prop)
     (("1" (expand "subset?") (skosimp*) (assert) (assert))
      ("2"
       (expand "group?")
       (prop)
       (("1"
         (expand "monoid?")
         (prop)
         (("1"
           (expand "monad?")
           (prop)
           (("1"
             (expand "groupoid?")
             (expand "star_closed?")
             (skosimp*)
             (expand "member")
             (prop)
             (("1" (rewrite "star_closed"))
              ("2"
               (typepred "x!1")
               (typepred "y!1")
               (typepred "phi!1")
               (expand "homomorphism?")
               (inst?)
               (assert)
               (replace -1)
               (replace -3)
               (replace -5)
               (rewrite "one_left"))))
            ("2"
             (expand "member")
             (rewrite "one_in")
             (typepred "phi!1")
             (expand "homomorphism?")
             (inst?)
             (rewrite "homo_one"))
            ("3"
             (expand "restrict")
             (expand "identity?")
             (skosimp*)
             (rewrite "one_left")
             (rewrite "one_right"))))
          ("2"
           (expand "restrict")
           (expand "associative?")
           (skosimp*)
           (rewrite "associative"))))
        ("2"
         (expand "inv_exists?")
         (skosimp*)
         (inst + "inv(x!1)")
         (("1" (assert) (rewrite "inv_right") (rewrite "inv_left"))
          ("2"
           (prop)
           (("1" (expand "inv") (assert) (rewrite "inv_in"))
            ("2"
             (typepred "x!1")
             (typepred "phi!1")
             (expand "homomorphism?")
             (inst - "x!1" "inv(x!1)")
             (assert)
             (rewrite "inv_right")
             (rewrite "homo_one")
             (replace -3)
             (rewrite "one_left")
             (assert)
             (expand "inv")
             (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cayleys
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "bijective?")
   (prop)
   (("1"
     (expand "injective?")
     (skosimp*)
     (lemma "cancel_left[T,*,one]")
     (inst?)
     (assert))
    ("2"
     (expand "surjective?")
     (skosimp*)
     (typepred "y!1")
     (inst + "inv[T,*,one](a!1)*y!1")
     (("1"
       (rewrite "assoc[T,*,one]")
       (rewrite "inv_right[T,*,one]")
       (rewrite "one_left[T,*,one]"))
      ("2"
       (lemma "inv_in[T,*,one]")
       (inst?)
       (assert)
       (typepred "G!1")
       (expand "group?")
       (expand "monoid?")
       (expand "monad?")
       (expand "groupoid?")
       (expand "star_closed?")
       (flatten)
       (assert)
       (inst?))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cayleys
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "ML")
   (expand "restrict")
   (expand "group?")
   (prop)
   (("1"
     (expand "monoid?")
     (prop)
     (("1"
       (expand "monad?")
       (prop)
       (("1"
         (grind :if-match nil)
         (expand "o")
         (expand "al")
         (inst + "x!2*x!3")
         (("1"
           (assert)
           (apply-extensionality 1 :hide? t)
           (rewrite "assoc[T,*,one]"))
          ("2"
           (typepred "G!1")
           (expand "group?")
           (expand "monoid?")
           (expand "monad?")
           (expand "star_closed?")
           (flatten)
           (assert)
           (inst?))))
        ("2"
         (expand "member")
         (expand "al")
         (expand "id")
         (expand "identity")
         (inst + "one")
         (("1"
           (apply-extensionality 1 :hide? t)
           (("1" (rewrite "one_left[T,*,one]"))
            ("2"
             (skosimp*)
             (rewrite "one_left[T,*,one]")
             (typepred "s!1")
             (propax))))
          ("2"
           (rewrite "one_in[T,*,one]")
           (("1"
             (typepred "G!1")
             (expand "group?")
             (expand "monoid?")
             (propax))
            ("2"
             (lemma "fullset_is_group")
             (expand "group?")
             (expand "monoid?")
             (propax))))))
        ("3"
         (expand "restrict")
         (expand "identity?")
         (skosimp*)
         (expand "op")
         (expand "restrict")
         (expand "o")
         (expand "id")
         (expand "identity")
         (prop)
         (("1" (apply-extensionality 1 :hide? t))
          ("2" (apply-extensionality 1 :hide? t))))))
      ("2"
       (expand "restrict")
       (expand "op")
       (expand "restrict")
       (expand "o")
       (expand "associative?")
       (propax))))
    ("2"
     (expand "inv_exists?")
     (expand "op")
     (expand "o")
     (expand "id")
     (expand "identity")
     (expand "restrict")
     (skosimp*)
     (typepred "x!1")
     (skosimp*)
     (inst + "al(G!1,inv[T,*,one](x!2))")
     (("1"
       (prop)
       (("1"
         (apply-extensionality 1 :hide? t)
         (("1"
           (expand "al")
           (replace -2)
           (assert)
           (rewrite "assoc[T,*,one]")
           (rewrite "inv_right[T,*,one]")
           (rewrite "one_left[T,*,one]"))
          ("2"
           (skosimp*)
           (assert)
           (expand "al")
           (lemma "inv_in[T,*,one]")
           (inst?)
           (typepred "G!1")
           (expand "group?")
           (expand "monoid?")
           (expand "monad?")
           (expand "star_closed?")
           (flatten)
           (assert)
           (inst?))
          ("3" (skosimp*) (rewrite "inv_in[T,*,one]"))))
        ("2"
         (apply-extensionality 1 :hide? t)
         (("1"
           (expand "al")
           (replace -2)
           (assert)
           (rewrite "assoc[T,*,one]")
           (rewrite "inv_left[T,*,one]")
           (rewrite "one_left[T,*,one]"))
          ("2"
           (skosimp*)
           (typepred "x!2")
           (rewrite "inv_in[T,*,one]"))))))
      ("2"
       (prop)
       (("1"
         (skosimp*)
         (expand "al")
         (lemma "inv_in[T,*,one]")
         (inst?)
         (typepred "x1!1")
         (typepred "G!1")
         (expand "group?")
         (expand "monoid?")
         (expand "monad?")
         (expand "star_closed?")
         (flatten)
         (assert)
         (inst?))
        ("2"
         (expand "al")
         (expand "bijective?")
         (prop)
         (("1"
           (expand "injective?")
           (skosimp*)
           (typepred "x1!1")
           (typepred "x2!1")
           (replace -6)
           (assert)
           (inst -4 "x1!1" "x2!1")
           (assert)
           (lemma "cancel_left[T,*,one]")
           (inst?)
           (assert))
          ("2"
           (hide -1)
           (expand "surjective?")
           (skosimp*)
           (inst + "x!2*y!1")
           (("1"
             (rewrite "assoc[T,*,one]")
             (rewrite "inv_left[T,*,one]")
             (rewrite "one_left[T,*,one]"))
            ("2"
             (typepred "G!1")
             (expand "group?")
             (expand "monoid?")
             (expand "monad?")
             (expand "star_closed?")
             (expand "member")
             (inst?)
             (flatten)
             (inst?))))))
        ("3"
         (inst + "inv[T, *, one](x!2)")
         (lemma "inv_in[T,*,one]")
         (inst?))))
      ("3" (lemma "inv_in[T,*,one]") (inst?))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cayleys
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "isomorphic?")
   (expand "isomorphism?")
   (inst + "(LAMBDA (a:(G!1)):  (LAMBDA (s:(G!1)): a*s))")
   (("1"
     (prop)
     (("1"
       (expand "bijective?")
       (prop)
       (("1"
         (expand "injective?")
         (skosimp*)
         (case "(LAMBDA (s: (G!1)): x1!1 * s)(one) = (LAMBDA (s: (G!1)): x2!1 * s)(one)")
         (("1"
           (assert)
           (hide -2)
           (rewrite "one_right[T,*,one]")
           (rewrite "one_right[T,*,one]"))
          ("2" (replace -1) (propax))
          ("3"
           (hide -1 2)
           (rewrite "one_in[T,*,one]")
           (("1"
             (typepred "G!1")
             (expand "group?")
             (expand "monoid?")
             (propax))
            ("2"
             (lemma "fullset_is_group")
             (expand "group?")
             (expand "monoid?")
             (propax))))))
        ("2"
         (expand "surjective?")
         (skosimp*)
         (typepred "y!1")
         (expand "ML")
         (expand "restrict")
         (skosimp*)
         (expand "al")
         (inst + "x!1")
         (replace -2)
         (propax))))
      ("2"
       (expand "homomorphism?")
       (skosimp*)
       (apply-extensionality 1 :hide? t)
       (("1"
         (expand "op")
         (expand "restrict")
         (expand "o")
         (typepred "G!1")
         (expand "group?")
         (expand "monoid?")
         (expand "monad?")
         (expand "groupoid?")
         (flatten)
         (expand "associative?")
         (expand "restrict")
         (inst?))
        ("2" (lemma "cayley_prep") (inst?))
        ("3"
         (skosimp*)
         (typepred "G!1")
         (expand "group?")
         (expand "monoid?")
         (flatten)
         (expand "monad?")
         (expand "groupoid?")
         (expand "star_closed?")
         (flatten)
         (assert)
         (inst?))
        ("4"
         (expand "bijective?")
         (prop)
         (("1"
           (expand "injective?")
           (skosimp*)
           (lemma "cancel_left[T,*,one]")
           (inst?)
           (assert))
          ("2"
           (expand "surjective?")
           (skosimp*)
           (typepred "y!1")
           (inst + "inv[T,*,one](a!1)*y!1")
           (("1"
             (rewrite "assoc[T,*,one]")
             (rewrite "inv_right[T,*,one]")
             (rewrite "one_left[T,*,one]"))
            ("2"
             (lemma "inv_in[T,*,one]")
             (inst?)
             (typepred "G!1")
             (expand "group?")
             (expand "monoid?")
             (flatten)
             (expand "monad?")
             (expand "groupoid?")
             (expand "star_closed?")
             (flatten)
             (assert)
             (inst?))))))
        ("5"
         (skosimp*)
         (typepred "s!1")
         (typepred "a!1")
         (typepred "G!1")
         (expand "group?")
         (expand "monoid?")
         (expand "monad?")
         (flatten)
         (assert)
         (expand "groupoid?")
         (expand "star_closed?")
         (assert)
         (inst?))))))
    ("2"
     (skosimp*)
     (lemma "cayley_prep")
     (inst?)
     (assert)
     (expand "ML")
     (expand "restrict")
     (expand "al")
     (inst + "a!1"))
    ("3"
     (skosimp*)
     (typepred "s!1")
     (typepred "a!1")
     (typepred "G!1")
     (expand "group?")
     (expand "monoid?")
     (expand "monad?")
     (flatten)
     (assert)
     (expand "groupoid?")
     (expand "star_closed?")
     (assert)
     (inst?))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: cayleys
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_group")
   (expand "group?")
   (expand "monoid?")
   (expand "monad?")
   (flatten)
   (assert)
   (expand "semigroup?")
   (propax))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: cayleys
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "A_is_group")
   (hide 2)
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (inst - "one")
   (lemma "one_in[T,*,one]")
   (("1"
     (inst?)
     (typepred "G!1")
     (expand "group?")
     (expand "monoid?")
     (flatten))
    ("2"
     (lemma "fullset_is_group")
     (expand "group?")
     (expand "monoid?")
     (flatten))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: infinite_cyclic_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "(FORALL (n: nat): n = group[int,+,0].^(1,n) )")
   (("1"
     (case "i!1 >= 0")
     (("1" (inst?))
      ("2"
       (inst - "-i!1")
       (("1"
         (lemma "expt_neg[int,+,0]")
         (inst?)
         (replace -1)
         (hide -1)
         (lemma "inv_expt[int,+,0]")
         (inst - "1" "i!1")
         (replace -1 - rl)
         (hide -1)
         (case "inv[int,+,0](group[int,+,0].^(1,i!1)) =   -(group[int,+,0].^(1,i!1))")
         (("1" (replace -1) (hide -1) (assert)) ("2" (hide 3) (assert))))
        ("2" (assert))))))
    ("2"
     (hide 2)
     (induct "n" 1)
     (("1" (grind))
      ("2"
       (skosimp*)
       (lemma "expt_def1[int,+,0]")
       (inst - "1" "j!1")
       (replace -1)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: infinite_cyclic_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "isomorphic?")
   (inst + "(LAMBDA (n: int): group[T,*,one].^(a!1,n))")
   (("1"
     (expand "restrict")
     (expand "isomorphism?")
     (prop)
     (("1"
       (expand "bijective?")
       (prop)
       (("1"
         (expand "injective?")
         (skosimp*)
         (lemma "generated_by_is_finite[T,*,one]")
         (inst?)
         (assert)
         (inst?)
         (hide 3)
         (prop)
         (("1" (expand "F") (propax))
          ("2"
           (case "x1!1 >= x2!1")
           (("1"
             (inst + "x1!1 - x2!1")
             (("1"
               (lemma "expt_div[T,*,one]")
               (inst?)
               (replace -1 * rl)
               (hide -1)
               (lemma "cancel_right[T,*,one]")
               (inst?)
               (inst - "group[T, *, one].^(a!1, x2!1)")
               (flatten)
               (hide -1)
               (case-replace
                "group[T,*, one].^(a!1, x2!1) *
                                     group[T,*,one].^(inv[T,*,one](a!1),x2!1) = one")
               (("1" (hide -1) (assert))
                ("2"
                 (hide -1 -3)
                 (assert)
                 (lemma "expt_inv_right[T,*,one]")
                 (inst?))))
              ("2" (assert))))
            ("2"
             (inst + "x2!1 - x1!1")
             (("1"
               (lemma "expt_div[T,*,one]")
               (inst?)
               (replace -1 * rl)
               (hide -1)
               (lemma "cancel_right[T,*,one]")
               (inst?)
               (inst - "group[T, *, one].^(a!1, x1!1)")
               (flatten)
               (hide -1)
               (case-replace
                "group[T,*, one].^(a!1, x1!1) *
                                                   group[T,*,one].^(inv[T,*,one](a!1),x1!1) = one")
               (("1" (hide -1) (assert))
                ("2"
                 (hide -1 -3)
                 (assert)
                 (lemma "expt_inv_right[T,*,one]")
                 (inst?))))
              ("2" (assert))))))))
        ("2"
         (hide 2)
         (expand "surjective?")
         (skosimp*)
         (typepred "y!1")
         (expand "F")
         (expand "generated_by")
         (skosimp*)
         (inst?)
         (("1" (assert))
          ("2"
           (assert)
           (expand "Z")
           (expand "generated_by")
           (inst?)
           (rewrite "Z_gen"))))))
      ("2"
       (hide 2)
       (expand "homomorphism?")
       (skosimp*)
       (lemma "expt_mult[T,*,one]")
       (inst?)
       (assert))))
    ("2" (skosimp*) (expand "F") (expand "generated_by") (inst + "x1!1"))
    ("3" (skosimp*) (expand "F") (expand "generated_by") (inst + "n!1"))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: infinite_cyclic_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "group?")
   (prop)
   (("1" (grind))
    ("2"
     (expand "inv_exists?")
     (skosimp*)
     (inst + "-x!1")
     (("1" (ground)) ("2" (typepred "x!1") (grind))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cyclic_group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "abelian_group?")
   (assert)
   (expand "cyclic?")
   (skosimp*)
   (assert)
   (expand "commutative?")
   (skosimp*)
   (expand "restrict")
   (typepred "x!1")
   (typepred "y!1")
   (replace -3)
   (hide -3)
   (expand "generated_by")
   (skosimp*)
   (replace -1)
   (hide -1)
   (replace -1)
   (hide -1)
   (rewrite "expt_mult")
   (rewrite "expt_mult"))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cyclic_group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "H!1 = one_group")
   (("1"
     (expand "cyclic?" 1)
     (inst + "one")
     (("1"
       (hide -2 -3)
       (replace -1)
       (hide -1)
       (apply-extensionality 1 :hide? t)
       (expand "one_group")
       (expand "singleton")
       (expand "generated_by")
       (iff 1)
       (prop)
       (("1" (inst + "1") (grind) (rewrite "right_identity"))
        ("2" (skosimp*) (replace -1) (hide -1) (rewrite "one_expt"))))
      ("2" (rewrite "one_in"))))
    ("2"
     (expand "cyclic?")
     (skosimp*)
     (case "(EXISTS (h:T),(m:posnat): H!1(h) AND h /= one AND h = a!1^m)")
     (("1"
       (skosimp*)
       (name s "min({n: posnat | H!1(a!1^n)})")
       (("1"
         (inst + "a!1^s")
         (("1"
           (apply-extensionality 3 :hide? t)
           (iff 1)
           (prop)
           (("1"
             (expand "subgroup?")
             (expand "subset?")
             (assert)
             (inst?)
             (assert)
             (replace -6 -5)
             (expand "generated_by")
             (skosimp*)
             (lemma "euclid_int")
             (inst - "s" "i!1")
             (skosimp*)
             (typepred "r!1")
             (case "a!1^r!1 = (a!1^i!1)*(a!1^s)^(-q!1)")
             (("1"
               (inst + "q!1")
               (case "r!1 = 0")
               (("1"
                 (assert)
                 (replace -1)
                 (assert)
                 (replace -4)
                 (rewrite "expt_expt")
                 (rewrite "expt_expt"))
                ("2"
                 (typepred "min({n: posnat | H!1(a!1 ^ n)})")
                 (inst -3 "r!1")
                 (("1"
                   (assert)
                   (replace -7)
                   (lemma "expt_member")
                   (inst - "H!1" "a!1^s" "-q!1")
                   (assert)
                   (replace -4)
                   (rewrite "star_closed"))
                  ("2" (assert))))))
              ("2"
               (hide -6 -7 -8 2 3 4)
               (case "a!1 ^ i!1 = a!1^(s * q!1 + r!1)")
               (("1"
                 (hide -3 -4)
                 (rewrite "expt_mult" - :dir rl)
                 (rewrite "expt_expt" - :dir rl)
                 (lemma "cancel_left")
                 (inst - "a!1 ^ i!1" "(a!1 ^ s) ^ q!1 * a!1 ^ r!1"
                  "(a!1 ^ s) ^ (-q!1)")
                 (flatten)
                 (hide -1)
                 (split -1)
                 (("1"
                   (case-replace
                    "(a!1 ^ s) ^ (-q!1) * ((a!1 ^ s) ^ q!1 * a!1 ^ r!1) = a!1^r!1")
                   (("1"
                     (hide -1)
                     (lemma "cyclic_abelian")
                     (inst - "G!1")
                     (assert)
                     (split -1)
                     (("1"
                       (expand "abelian_group?")
                       (ground)
                       (expand "commutative?")
                       (assert)
                       (expand "restrict")
                       (assert)
                       (inst - "(a!1 ^ s) ^ (-q!1)" "a!1 ^ i!1")
                       (("1" (assert))
                        ("2"
                         (hide 2)
                         (reveal -10)
                         (replace -1 +)
                         (assert)
                         (inst + "i!1"))
                        ("3"
                         (reveal -10)
                         (replace -1 +)
                         (assert)
                         (inst + "-s*q!1")
                         (assert)
                         (rewrite "expt_expt")
                         (assert))))
                      ("2"
                       (expand "cyclic?")
                       (reveal -9)
                       (expand "generated_by")
                       (assert)
                       (inst + "a!1"))))
                    ("2"
                     (assert)
                     (rewrite "assoc")
                     (rewrite "expt_neg")
                     (rewrite "expt_inv_left")
                     (assert)
                     (rewrite "one_left"))))
                  ("2" (propax))))
                ("2" (assert))))))
            ("2"
             (expand "generated_by")
             (skosimp*)
             (typepred "min({n: posnat | H!1(a!1 ^ n)})")
             (replace -5)
             (lemma "expt_member")
             (assert)
             (inst - "H!1" "a!1^s" "i!1")
             (assert))))
          ("2"
           (typepred "min({n: posnat | H!1(a!1 ^ n)})")
           (replace -4)
           (propax))))
        ("2"
         (assert)
         (expand "nonempty?")
         (expand "empty?")
         (assert)
         (inst - "m!1")
         (assert))))
      ("2"
       (hide 3)
       (apply-extensionality 2 :hide? t)
       (expand "one_group")
       (expand "singleton")
       (iff 1)
       (prop)
       (("1"
         (expand "subgroup?")
         (expand "subset?")
         (assert)
         (inst? -)
         (assert)
         (replace -3 -)
         (expand "generated_by")
         (skosimp*)
         (case "i!1 >= 0")
         (("1"
           (inst + "a!1^i!1" "i!1")
           (("1" (assert))
            ("2"
             (assert)
             (case-replace "i!1 = 0")
             (("1" (assert) (grind)) ("2" (assert))))))
          ("2"
           (inst + "inv(a!1)^i!1" "-i!1")
           (("1"
             (rewrite "expt_neg")
             (replace -2)
             (lemma "inv_in")
             (inst - "H!1" "a!1^i!1")
             (assert)
             (rewrite "inv_expt")
             (assert)
             (flatten)
             (lemma "cancel_left")
             (inst - "x!1" "a!1 ^ i!1" "one")
             (flatten)
             (hide -1)
             (split -1)
             (("1"
               (rewrite "one_left" -1)
               (replace -4 - :dir rl)
               (rewrite "expt_inv_left")
               (assert))
              ("2" (propax))))
            ("2" (assert))))))
        ("2" (assert) (replace -1) (rewrite "one_in"))))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: cyclic_group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "cyclic?")
   (inst + "a!1")
   (apply-extensionality 1 :hide? t)
   (iff 1)
   (inst?)
   (("1"
     (skosimp*)
     (replace -1)
     (hide -1)
     (ground)
     (("1" (expand "generated_by") (inst?))
      ("2"
       (lemma "generated_is_subgroup")
       (inst?)
       (assert)
       (inst - "G!1")
       (assert)
       (expand "subgroup?")
       (expand "subset?")
       (inst - "a!1 ^ n!1")
       (assert))))
    ("2"
     (assert)
     (lemma "generated_is_subgroup")
     (inst - "G!1" "a!1")
     (assert)
     (expand "subgroup?")
     (expand "subset?")
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: lagrange_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (skosimp*)
   (apply-extensionality 1 :hide? t)
   (iff 1)
   (expand "Union")
   (expand "union")
   (expand "member")
   (prop)
   (("1"
     (skosimp*)
     (lemma "choose_rest_or[set[T]]")
     (assert)
     (inst - "PP!1" "a!1")
     (assert)
     (inst + "a!1"))
    ("2"
     (skosimp*)
     (typepred "a!1")
     (inst + "a!1")
     (lemma "rest_member[set[T]]")
     (inst?)
     (assert)
     (inst?)
     (assert))
    ("3" (inst + "choose(PP!1)"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: lagrange_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n" 1)
   (("1"
     (skosimp*)
     (assert)
     (lemma "card_empty?[set[T]]")
     (inst?)
     (assert)
     (expand "empty?")
     (assert)
     (lemma "card_empty?[T]")
     (inst?)
     (assert)
     (expand "empty?")
     (assert)
     (skosimp*)
     (expand "Union")
     (skosimp*)
     (typepred "a!1")
     (inst?))
    ("2"
     (skosimp*)
     (rewrite "card_Union_rest")
     (("1"
       (case "empty?(rest(PP!1))")
       (("1"
         (lemma "emptyset_is_empty?[set[T]]")
         (inst?)
         (assert)
         (replace -1)
         (hide -1)
         (rewrite "Union_emptyset_rew")
         (rewrite "union_commutative")
         (rewrite "union_empty")
         (inst? -4)
         (assert)
         (reveal -2)
         (lemma "card_rest[set[T]]")
         (inst?)
         (split -1)
         (("1"
           (assert)
           (replace -2)
           (rewrite "card_emptyset[set[T]]")
           (assert))
          ("2"
           (hide -2 -3 -4 1)
           (lemma "card_empty?[set[T]]")
           (inst?)
           (assert))))
        ("2"
         (inst - "rest(PP!1)" "m!1")
         (("1"
           (split -1)
           (("1"
             (rewrite "card_union")
             (("1"
               (case-replace
                "card(intersection(Union(rest(PP!1)), choose(PP!1))) = 0")
               (("1"
                 (assert)
                 (replace -2)
                 (inst - "choose(PP!1)")
                 (assert))
                ("2"
                 (hide 3)
                 (lemma "card_is_0[T]")
                 (inst?)
                 (assert)
                 (assert)
                 (hide 2)
                 (hide -1 -2 -3)
                 (apply-extensionality 1 :hide? t)
                 (expand "intersection")
                 (expand "Union")
                 (expand "emptyset")
                 (assert)
                 (flatten)
                 (skosimp*)
                 (typepred "a!1")
                 (inst - "a!1" "choose(PP!1)")
                 (("1"
                   (expand "disjoint?")
                   (expand "empty?")
                   (expand "member")
                   (skosimp*)
                   (expand "intersection")
                   (assert)
                   (split -5)
                   (("1"
                     (lemma "choose_not_member[set[T]]")
                     (inst?)
                     (assert)
                     (reveal -6)
                     (inst?)
                     (lemma "card_empty?[set[T]]")
                     (inst?)
                     (("1" (assert))
                      ("2"
                       (typepred "PP!1")
                       (expand "finite_partition?")
                       (flatten))))
                    ("2" (inst?) (assert))))
                  ("2"
                   (lemma "rest_member[set[T]]")
                   (inst?)
                   (assert)
                   (inst?)
                   (assert))))))
              ("2"
               (typepred "PP!1")
               (expand "finite_partition?")
               (flatten)
               (expand "every")
               (inst?))))
            ("2"
             (rewrite "card_rest")
             (("1" (assert))
              ("2"
               (lemma "card_empty?[set[T]]")
               (inst - "PP!1")
               (assert))))
            ("3"
             (skosimp*)
             (reveal -1)
             (typepred "A!1")
             (lemma "rest_member[set[T]]")
             (inst?)
             (assert)
             (inst?)
             (assert)
             (inst?)
             (inst?))
            ("4"
             (skosimp*)
             (expand "disjoint?")
             (hide -2)
             (hide 3)
             (typepred "A!1")
             (typepred "B!1")
             (inst?)
             (("1" (lemma "rest_member[set[T]]") (inst?) (assert))
              ("2"
               (lemma "rest_member[set[T]]")
               (assert)
               (inst?)
               (assert))
              ("3"
               (lemma "rest_member[set[T]]")
               (assert)
               (inst?)
               (assert))))))
          ("2"
           (typepred "PP!1")
           (expand "finite_partition?")
           (flatten)
           (prop)
           (("1"
             (expand "partition?")
             (skosimp*)
             (inst?)
             (("1" (assert))
              ("2"
               (typepred "b!1")
               (lemma "rest_member[set[T]]")
               (inst?)
               (assert)
               (inst?)
               (assert))
              ("3"
               (typepred "a!1")
               (lemma "rest_member[set[T]]")
               (inst?)
               (assert)
               (inst?)
               (assert))))
            ("2" (lemma "finite_rest[set[T]]") (inst?))
            ("3"
             (expand "every")
             (skosimp*)
             (inst?)
             (typepred "x!1")
             (lemma "rest_member[set[T]]")
             (inst?)
             (assert)
             (inst?)
             (assert))))))))
      ("2"
       (hide -1 -3 -4 2)
       (lemma "card_empty?[set[T]]")
       (inst?)
       (expand "nonempty?")
       (assert))))
    ("3"
     (hide 2)
     (skosimp*)
     (lemma "finite_Union_finite[T]")
     (inst?)
     (assert)
     (hide 2)
     (typepred "PP!1")
     (expand "finite_partition?")
     (flatten)
     (assert))
    ("4"
     (hide 2)
     (skosimp*)
     (typepred "A!1")
     (typepred "PP!1")
     (expand "finite_partition?")
     (flatten)
     (expand "every")
     (inst?))
    ("5"
     (hide 2)
     (skosimp*)
     (typepred "PP!1")
     (expand "finite_partition?")
     (flatten))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: lagrange_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "card_equal_partition")
   (inst?)
   (assert)
   (hide 2)
   (prop)
   (skosimp*)
   (hide -2)
   (inst?))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: lagrange_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "finite_partition?")
   (expand "partition?")
   (split)
   (("1" (skosimp*) (grind) (typepred "a!1") (grind))
    ("2"
     (expand "every")
     (skosimp*)
     (typepred "x!1")
     (expand "extend")
     (case-replace "(nonempty?[T])(x!1)")
     (("1" (expand "emptyset") (propax)) ("2" (assert))))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: lagrange_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "PP!1")
   (expand "finite_partition?")
   (flatten)
   (assert)
   (lemma "Union_finite[T]")
   (inst?)
   (assert))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: lagrange_scaf
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "PP!1")
   (expand "finite_partition?")
   (flatten)
   (lemma "Union_finite[T]")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: lagrange
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "right_coset_is" ("G" "G!1" "H" "H!1" "a" "a!1"))
   (assert)
   (replace -1 1)
   (hide -1)
   (typepred "G!1")
   (expand "finite_group?")
   (flatten)
   (case "subset?({x: T | congruent_mod(G!1, H!1)(a!1, x)},G!1)")
   (("1" (lemma "finite_subset[T]") (inst?) (assert))
    ("2"
     (hide 2)
     (expand "subset?")
     (skosimp*)
     (expand "member")
     (expand "congruent_mod")
     (expand "member")
     (expand "subgroup?")
     (flatten)
     (expand "subset?")
     (expand "member")
     (inst - "a!1 * inv(x!1)")
     (assert)
     (lemma "inv_in")
     (inst - "G!1" "a!1")
     (lemma "star_closed")
     (inst - "G!1" "inv(a!1)" "a!1 * inv(x!1)")
     (rewrite "assoc")
     (rewrite "inv_left")
     (rewrite "one_left")
     (lemma "inv_member")
     (inst?)
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: lagrange
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "right_coset_finite" ("G" "G!1" "H" "H!1" "a" "a!1"))
   (lemma "right_coset_finite" ("G" "G!1" "H" "H!1" "a" "b!1"))
   (assert)
   (name "A" "right_coset(G!1, H!1)(a!1)")
   (name "B" "right_coset(G!1, H!1)(b!1)")
   (lemma "right_coset_correspondence"
    ("A" "A" "B" "B" "G" "G!1" "H" "H!1" "a" "a!1" "b" "b!1"))
   (assert)
   (skolem!)
   (replace -3)
   (replace -2)
   (case "card(A) = card(B) IFF (EXISTS (g:[(A)->(B)]): bijective?(g))")
   (("1" (replace -1 1) (hide -1) (inst + "f!1"))
    ("2"
     (hide 2)
     (prop)
     (("1" (inst + "f!1"))
      ("2"
       (skolem!)
       (lemma "card_bij" ("S" "A" "N" "card(B)"))
       (replace -1 1)
       (hide -1)
       (lemma "bij_exists" ("S" "B"))
       (skolem!)
       (lemma "composition_bijective[(A),(B),below[card(B)]]"
        ("f1" "f!1" "f2" "f!2"))
       (("1" (inst + "f!2 o f!1")) ("2" (propax)) ("3" (propax))))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: lagrange
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (apply-extensionality 1 :hide? t)
   (expand "Union")
   (iff 1)
   (prop)
   (("1"
     (skosimp*)
     (typepred "a!1")
     (expand "extend")
     (ground)
     (skosimp*)
     (replace -1)
     (hide -1)
     (expand "*")
     (skosimp*)
     (replace -2)
     (hide -2)
     (typepred "a!2")
     (typepred "h!1")
     (typepred "H!1")
     (expand "subgroup?")
     (expand "subset?")
     (inst?)
     (expand "member")
     (rewrite "star_closed"))
    ("2"
     (inst + "H!1*x!1")
     (("1"
       (expand "*")
       (inst + "one")
       (("1" (rewrite "one_left")) ("2" (rewrite "one_in"))))
      ("2"
       (expand "extend")
       (expand "fullset")
       (ground)
       (inst + "x!1"))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: lagrange
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "disjoint?")
   (expand "empty?")
   (assert)
   (expand "intersection")
   (assert)
   (skosimp*)
   (typepred "B!1")
   (typepred "A!1")
   (skosimp*)
   (replace -1)
   (hide -1)
   (replace -1)
   (hide -1)
   (expand "*")
   (apply-extensionality 1 :hide? t)
   (iff 1)
   (skosimp*)
   (prop)
   (("1"
     (skosimp*)
     (inst + "h!3*inv(h!1)*h!2")
     (("1"
       (case-replace "inv(h!1)*x!1 = a!1")
       (("1"
         (assert)
         (replace -4 -1)
         (rewrite "assoc" -1)
         (rewrite "associative" 1)
         (rewrite "associative" 1)
         (replace -1)
         (propax))
        ("2"
         (hide 2)
         (hide -1 -3)
         (lemma "cancel_left")
         (inst?)
         (inst - "h!1*a!1")
         (flatten)
         (hide -1)
         (split -1)
         (("1"
           (rewrite "assoc" -1)
           (rewrite "inv_left")
           (rewrite "one_left"))
          ("2" (propax))))))
      ("2"
       (rewrite "star_closed")
       (rewrite "star_closed")
       (rewrite "inv_in"))))
    ("2"
     (skosimp*)
     (inst + "h!3*inv(h!2)*h!1")
     (("1"
       (replace -1)
       (hide -1)
       (lemma "divby")
       (inst - "x!1" "h!2" "a!2")
       (assert)
       (hide -3)
       (replace -2)
       (hide -2)
       (rewrite "associative" :dir rl)
       (rewrite "associative")
       (rewrite "associative")
       (rewrite "associative")
       (rewrite "associative")
       (assert))
      ("2"
       (rewrite "star_closed")
       (rewrite "star_closed")
       (rewrite "inv_in"))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: lagrange
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "finite_partition?")
   (lemma "set_right_cosets_full")
   (inst - "G!1" "H!1")
   (typepred "G!1")
   (prop)
   (("1"
     (expand "partition?")
     (skosimp*)
     (lemma "right_cosets_disjoint")
     (inst - "G!1" "H!1" "a!1" "b!1")
     (("1" (typepred "b!1") (expand "extend") (ground))
      ("2"
       (typepred "a!1")
       (expand "extend")
       (ground)
       (skosimp*)
       (assert)
       (typepred "b!1")
       (expand "extend")
       (ground))
      ("3" (typepred "a!1") (expand "extend") (ground))))
    ("2"
     (lemma "Union_finite[T]")
     (inst?)
     (assert)
     (hide 2)
     (replace -2)
     (expand "finite_group?")
     (propax))
    ("3"
     (expand "every")
     (skosimp*)
     (typepred "x!1")
     (expand "extend")
     (ground)
     (skosimp*)
     (replace -1)
     (hide -1)
     (lemma "right_coset_finite")
     (inst - "G!1" "H!1" "a!1")
     (("1" (assert) (expand "right_coset") (propax))
      ("2"
       (lemma "finite_subgroups")
       (assert)
       (typepred "H!1")
       (inst?)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: lagrange
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "set_right_cosets_full")
   (inst - "G!1" "H!1")
   (lemma "card_eq_part[T]")
   (inst?)
   (("1"
     (assert)
     (inst - "H!1")
     (split -1)
     (("1"
       (replace -2)
       (expand "order")
       (expand "divides")
       (inst +
        "card(extend[setof[T], right_cosets(G!1, H!1), bool, FALSE]
                        (fullset[right_cosets(G!1, H!1)]))")
       (assert))
      ("2"
       (hide 2)
       (skosimp*)
       (lemma "finite_right_coset_correspondence")
       (inst?)
       (typepred "A!1")
       (expand "extend")
       (ground)
       (skosimp*)
       (typepred "B!1")
       (expand "extend")
       (ground)
       (skosimp*)
       (inst -5 "a!1" "a!2")
       (assert)
       (expand "fullset")
       (expand "right_coset")
       (assert))
      ("3"
       (skosimp*)
       (hide 3)
       (lemma "right_cosets_disjoint")
       (inst - "G!1" "H!1" "A!1" "B!1")
       (("1" (assert))
        ("2"
         (typepred "B!1")
         (typepred "A!1")
         (expand "extend")
         (ground))
        ("3" (typepred "A!1") (expand "extend") (ground))))
      ("4"
       (hide 2)
       (expand "extend")
       (ground)
       (("1"
         (skosimp*)
         (replace -1)
         (hide -1)
         (expand "fullset")
         (propax))
        ("2"
         (inst + "one")
         (("1" (rewrite "right_coset_one"))
          ("2" (rewrite "one_in"))))))))
    ("2" (hide 2) (lemma "right_cosets_partition") (inst?))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: finite_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "generated_is_subgroup" ("a" "a!1" "G" "G!1"))
   (assert)
   (expand "subgroup?")
   (assert)
   (typepred "G!1")
   (expand "finite_group?")
   (flatten)
   (lemma "finite_subset[T]")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: finite_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "S!1(a!1)")
   (("1"
     (assert)
     (typepred "G!1")
     (expand "finite_group?")
     (flatten)
     (lemma "finite_subset" ("s" "S!1" "A" "G!1"))
     (("1"
       (assert)
       (lemma "nonempty_card" ("S" "S!1"))
       (("1"
         (flatten -1)
         (hide -2)
         (case-replace "nonempty?(S!1)")
         (("1"
           (name "X"
                 "{t: T | EXISTS (n: posnat): n <= card(S!1) AND t = a!1 ^ n}")
           (replace -1)
           (case "subset?(X,S!1)")
           (("1"
             (name "N" "card(S!1)")
             (replace -1)
             (case "FORALL (n:posnat): n < N => a!1^n /= one")
             (("1"
               (case "FORALL (i,j:posnat): i <= N & j <= N & i /= j => a!1^i /= a!1^j")
               (("1"
                 (lemma "card_bij" ("S" "X" "N" "N"))
                 (("1"
                   (case "(EXISTS (f: [(X) -> below[N]]): bijective?(f))")
                   (("1"
                     (replace -1 -2)
                     (flatten -2)
                     (lemma "same_card_subset" ("A" "X" "B" "S!1"))
                     (assert))
                    ("2"
                     (hide 2 -1)
                     (name "F"
                           "LAMBDA (n: below[N]):
                                                                                                        IF n = 0 THEN a!1 ^ N ELSE a!1 ^ n ENDIF")
                     (case "bijective?[below[N],(X)](F)")
                     (("1"
                       (lemma "bijective_inverse_exists[below[N],(X)]"
                        ("f" "F"))
                       (("1"
                         (expand "exists1")
                         (flatten)
                         (skolem!)
                         (lemma "bij_inv_is_bij_alt[below[N],(X)]"
                          ("f" "F" "g" "x!1"))
                         (("1" (inst + "x!1")) ("2" (propax))))
                        ("2" (propax))))
                      ("2"
                       (hide 2)
                       (expand "F" 1)
                       (assert)
                       (hide-all-but (-2 -3 -4 1))
                       (expand "bijective?")
                       (split)
                       (("1"
                         (expand "injective?")
                         (skosimp*)
                         (case-replace "x1!1=0")
                         (("1" (assert) (inst -3 "N" "x2!1") (assert))
                          ("2"
                           (assert)
                           (case-replace "x2!1=0")
                           (("1" (inst - "x1!1" "N") (assert))
                            ("2"
                             (assert)
                             (inst - "x1!1" "x2!1")
                             (assert))))))
                        ("2"
                         (expand "surjective?")
                         (skosimp*)
                         (typepred "y!1")
                         (expand "X" -1)
                         (skolem!)
                         (flatten)
                         (expand "<=" -1)
                         (split -1)
                         (("1"
                           (replace -2)
                           (inst + "n!1")
                           (("1" (assert)) ("2" (assert))))
                          ("2"
                           (replace -5)
                           (replace -2)
                           (replace -1)
                           (inst + "0"))))))
                      ("3"
                       (assert)
                       (hide 2)
                       (expand "X" 1)
                       (expand "F" 1)
                       (skosimp*)
                       (replace -4)
                       (typepred "x1!1")
                       (case-replace "x1!1=0")
                       (("1" (inst + "N") (assert))
                        ("2" (assert) (inst + "x1!1") (assert))))))))
                  ("2"
                   (lemma "generated_is_subgroup" ("a" "a!1" "G" "G!1"))
                   (expand "subgroup?")
                   (assert)
                   (lemma "finite_subset" ("s" "X" "A" "S!1"))
                   (assert))))
                ("2"
                 (hide 2)
                 (skosimp*)
                 (lemma "trichotomy" ("x" "i!1-j!1"))
                 (split -1)
                 (("1"
                   (lemma "cancel_right"
                    ("z" "a!1^(-j!1)" "x" "a!1^i!1" "y" "a!1^j!1"))
                   (rewrite "expt_mult" -1)
                   (rewrite "expt_mult" -1)
                   (assert)
                   (inst - "i!1-j!1")
                   (assert)
                   (rewrite "expt_0")
                   (assert))
                  ("2" (assert))
                  ("3"
                   (lemma "cancel_right"
                    ("z" "a!1^(-i!1)" "x" "a!1 ^ i!1" "y" "a!1 ^ j!1"))
                   (rewrite "expt_mult" -1)
                   (rewrite "expt_mult" -1)
                   (assert)
                   (inst - "j!1-i!1")
                   (assert)
                   (rewrite "expt_0")
                   (assert))))))
              ("2"
               (skosimp*)
               (case "subset?(S!1,X)")
               (("1"
                 (lemma "subset_antisymmetric" ("a" "S!1" "b" "X"))
                 (assert))
                ("2"
                 (hide 2)
                 (expand "subset?")
                 (skosimp*)
                 (expand "member")
                 (replace -6 1 rl)
                 (expand "generated_by")
                 (assert)
                 (replace -14 -1)
                 (simplify -1)
                 (skolem!)
                 (typepred "n!1")
                 (case "EXISTS (k:below[N],j:int): i!1 = j*n!1+k")
                 (("1"
                   (skolem!)
                   (typepred "k!1")
                   (case-replace "k!1=0")
                   (("1"
                     (replace -3 -5)
                     (lemma "expt_expt" ("a" "a!1" "i" "n!1" "j" "j!1"))
                     (replace -8 -1)
                     (assert)
                     (replace -1 * rl)
                     (replace -6)
                     (inst + "n!1")
                     (assert)
                     (rewrite "one_expt")
                     (assert))
                    ("2"
                     (replace -2 -4)
                     (lemma "expt_expt" ("a" "a!1" "i" "n!1" "j" "j!1"))
                     (replace -7)
                     (assert)
                     (rewrite "expt_mult" -5 :dir rl)
                     (replace -1 * rl)
                     (assert)
                     (inst + "k!1")
                     (assert)
                     (rewrite "one_expt")
                     (assert)
                     (rewrite "left_identity"))))
                  ("2"
                   (hide 2)
                   (hide-all-but (-1 -3 1))
                   (inst + "fractional(i!1/n!1)*n!1" "floor(i!1/n!1)")
                   (("1"
                     (lemma "real_parts" ("x" "i!1/n!1"))
                     (rewrite "div_cancel3" -1))
                    ("2"
                     (typepred "fractional(i!1 / n!1)")
                     (mult-by -1 "n!1")
                     (mult-by -2 "n!1")
                     (assert)
                     (expand "fractional")
                     (case-replace "i!1 / n!1 * n!1 = i!1")
                     (("1" (assert)) ("2" (assert))))))))))))
            ("2"
             (expand "subset?")
             (replace -1 * rl)
             (hide 2)
             (skosimp*)
             (expand "member")
             (expand "generated_by")
             (skosimp*)
             (replace -2 1)
             (replace -11 1)
             (simplify 1)
             (inst + "n!1"))))
          ("2"
           (expand "nonempty?")
           (expand "empty?")
           (inst - "a!1")
           (assert))))
        ("2"
         (lemma "generated_is_subgroup" ("a" "a!1" "G" "G!1"))
         (expand "subgroup?")
         (assert))))
      ("2" (propax))))
    ("2"
     (replace -2)
     (hide-all-but 1)
     (expand "generated_by")
     (inst + "1")
     (assert)
     (rewrite "expt_1"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: finite_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "finite_generated_by_def" ("a" "a!1" "G" "G!1" "S" "S!1"))
   (assert)
   (typepred "G!1")
   (expand "finite_group?")
   (flatten)
   (lemma "generated_is_subgroup" ("a" "a!1" "G" "G!1"))
   (expand "subgroup?")
   (assert)
   (lemma "finite_subset" ("s" "S!1" "A" "G!1"))
   (assert)
   (name "N" "card(S!1)")
   (replace -1)
   (case "EXISTS (i:posnat): i < N AND a!1^i = one")
   (("1"
     (skosimp*)
     (name "B" "{t: T | EXISTS (n: posnat): n <= i!1 AND t = a!1 ^ n}")
     (case "subset?(B,S!1)")
     (("1"
       (lemma "finite_subset" ("s" "B" "A" "S!1"))
       (assert)
       (lemma "smaller_card_subset" ("A" "B" "B" "S!1"))
       (assert)
       (case "card(B) <= i!1")
       (("1"
         (assert)
         (skosimp*)
         (replace -13 -2)
         (assert)
         (replace -5 1 rl)
         (assert)
         (skosimp*)
         (case "n!1<=i!1")
         (("1" (inst + "n!1") (assert))
          ("2"
           (typepred "i!1")
           (lemma "euclid_nat")
           (inst - "n!1" "i!1")
           (skosimp)
           (case "r!1=0")
           (("1"
             (replace -1)
             (lemma "expt_expt" ("a" "a!1" "i" "i!1" "j" "q!1"))
             (replace -12)
             (rewrite "one_expt")
             (replace -3 -1 rl)
             (assert)
             (inst + "i!1")
             (assert))
            ("2"
             (inst + "r!1")
             (("1"
               (lemma "expt_mult" ("a" "a!1" "i" "i!1*q!1" "j" "r!1"))
               (lemma "expt_expt" ("a" "a!1" "i" "i!1" "j" "q!1"))
               (replace -12)
               (rewrite "one_expt")
               (replace -1 * rl)
               (rewrite "left_identity")
               (replace -3 -2 rl)
               (assert))
              ("2" (assert))))))))
        ("2"
         (hide-all-but (-2 -4 -6 1))
         (rewrite "card_def")
         (lemma "Card_injection[T]" ("S" "B" "n" "i!1"))
         (split -1)
         (("1" (propax))
          ("2"
           (hide 2)
           (name "F" "lambda (i:below[i!1]): a!1^(i+1)")
           (case "surjective?[below[i!1],(B)](F)")
           (("1"
             (typepred "i!1")
             (lemma "inj_inv[below[i!1],(B)]" ("f" "F"))
             (("1"
               (assert)
               (inst + "inverse(F)")
               (("1"
                 (assert)
                 (expand "injective?")
                 (skosimp*)
                 (typepred "x1!1")
                 (typepred "x2!1")
                 (expand "restrict")
                 (inst -3 "x1!1" "x2!1")
                 (assert)
                 (expand "inverse")
                 (propax))
                ("2" (inst + "0"))))
              ("2" (inst + "0"))))
            ("2"
             (hide 2)
             (replace -1 1 rl)
             (expand "surjective?")
             (skosimp*)
             (typepred "y!1")
             (replace -4 -1 rl)
             (assert)
             (skosimp*)
             (case-replace "n!1=i!1")
             (("1"
               (assert)
               (replace -3)
               (replace -7)
               (case "i!1=0")
               (("1" (assert)) ("2" (inst + "i!1-1") (assert))))
              ("2"
               (case-replace "n!1=0")
               (("1" (assert))
                ("2"
                 (inst + "n!1-1")
                 (("1" (assert)) ("2" (assert))))))))
            ("3"
             (hide 2)
             (replace -3 1 rl)
             (replace -1 1 rl)
             (skosimp*)
             (typepred "x1!1")
             (inst + "x1!1+1")
             (assert))))))))
      ("2"
       (expand "subset?")
       (skosimp*)
       (assert)
       (replace -2 -1 rl)
       (replace -10 1)
       (assert)
       (typepred "generated_by(a!1)")
       (expand "group?")
       (expand "monoid?")
       (flatten)
       (assert)
       (expand "monad?")
       (flatten)
       (expand "member")
       (assert)
       (skosimp)
       (case-replace "n!1=N")
       (("1" (assert)) ("2" (inst + "n!1") (assert))))))
    ("2"
     (typepred "generated_by(a!1)")
     (expand "group?")
     (expand "monoid?")
     (flatten)
     (assert)
     (expand "monad?")
     (flatten)
     (expand "member")
     (replace -17 -2 rl)
     (replace -15 -2)
     (assert)
     (skosimp)
     (case-replace "n!1=N")
     (("1" (assert)) ("2" (inst + "n!1") (assert))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: finite_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "generated_by_lem")
   (inst - "a!1" "0")
   (expand "^")
   (expand "power")
   (assert)
   (lemma "card_one[T]")
   (inst?)
   (assert)
   (skosimp*)
   (replace -1)
   (expand "singleton")
   (assert)
   (replace -2 * rl)
   (lemma "generated_by_lem")
   (inst - "a!1" "1")
   (expand "^")
   (expand "power")
   (expand "power")
   (assert)
   (lemma "right_identity")
   (inst?)
   (assert)
   (replace -1)
   (hide -1)
   (replace -2)
   (hide -2)
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: finite_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "finite_generated_by_def"
    ("a" "a!1" "G" "G!1" "S" "generated_by(a!1)"))
   (("1"
     (assert)
     (expand "finite_order?")
     (expand "infinite_order?")
     (typepred "generated_by(a!1)")
     (expand "group?")
     (expand "monoid?")
     (flatten)
     (assert)
     (expand "monad?")
     (flatten)
     (expand "member")
     (replace -6 -2)
     (assert)
     (skosimp*)
     (typepred "n!1")
     (inst - "n!1")
     (expand "^")
     (assert))
    ("2"
     (expand "nonempty?")
     (expand "empty?")
     (inst - "a!1")
     (expand "generated_by")
     (assert)
     (expand "member")
     (inst + "1")
     (rewrite "expt_1"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: finite_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (name "N" "period(G!1, a!1)")
   (("1"
     (typepred "period(G!1, a!1)")
     (replace -2)
     (expand "period")
     (expand "member")
     (lemma "finite_generated_by_def"
      ("a" "a!1" "G" "G!1" "S" "generated_by(a!1)"))
     (("1" (split -1) (("1" (assert)) ("2" (assert)) ("3" (propax))))
      ("2"
       (expand "nonempty?")
       (expand "empty?")
       (inst - "a!1")
       (expand "member")
       (expand "generated_by")
       (inst + "1")
       (assert))))
    ("2" (assert) (expand "member") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: finite_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "subgroup_def")
   (prop)
   (expand "inv_closed?")
   (skolem!)
   (assert)
   (typepred "x!1")
   (case "G!1(x!1)")
   (("1"
     (lemma "a_hat_period" ("a" "x!1" "G" "G!1"))
     (name "NN" "period(G!1,x!1)")
     (("1"
       (assert)
       (typepred "period(G!1,x!1)")
       (replace -2)
       (lemma "expt_def2" ("a" "x!1" "i" "NN-1"))
       (lemma "expt_def1" ("a" "x!1" "i" "NN-1"))
       (lemma "unique_inv" ("x" "x!1" "y" "x!1^(NN-1)"))
       (assert)
       (case-replace "NN=1")
       (("1"
         (assert)
         (rewrite "expt_0")
         (rewrite "expt_1")
         (assert)
         (rewrite "left_identity")
         (rewrite "right_identity")
         (expand "member")
         (assert))
        ("2"
         (case "FORALL (n:posnat): S!1(x!1^n)")
         (("1"
           (inst - "NN-1")
           (("1" (assert) (expand "member") (assert)) ("2" (assert))))
          ("2"
           (hide-all-but (-10 1 -8))
           (induct "n")
           (("1" (assert)) ("2" (assert))
            ("3"
             (skosimp*)
             (case-replace "j!1=0")
             (("1" (assert) (rewrite "expt_1"))
              ("2"
               (rewrite "expt_def1" 2)
               (assert)
               (expand "star_closed?")
               (inst - "x!1^j!1" "x!1")
               (assert)
               (expand "member")
               (propax))))))))))
      ("2" (propax))))
    ("2"
     (expand "subset?")
     (inst - "x!1")
     (assert)
     (expand "member")
     (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: finite_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "same_card_subset[T]")
   (expand "order")
   (expand "subgroup?")
   (flatten)
   (inst - "H!1" "G!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: finite_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (name "M" "period(G!1, a!1)")
   (replace -1)
   (lemma "generated_is_subgroup" ("a" "a!1" "G" "G!1"))
   (assert)
   (lemma "Lagrange" ("H" "generated_by(a!1)" "G" "G!1"))
   (("1"
     (assert)
     (typepred "period(G!1, a!1)")
     (replace -4)
     (expand "period")
     (typepred "min({n: posnat | a!1 ^ n = one})")
     (("1"
       (replace -7)
       (lemma "finite_generated_by_one"
        ("a" "a!1" "G" "G!1" "S" "generated_by(a!1)"))
       (("1"
         (assert)
         (expand "order")
         (name "N" "card(generated_by(a!1))")
         (replace -1)
         (lemma "nonempty_card" ("S" "generated_by(a!1)"))
         (replace -2)
         (case "generated_by(a!1)(a!1)")
         (("1"
           (flatten -2)
           (hide -3)
           (split -2)
           (("1"
             (inst-cp - "N")
             (assert)
             (case "EXISTS (n:nat,m:below[M]): M*n+m = N")
             (("1"
               (skolem!)
               (typepred "m!1")
               (lemma "expt_mult" ("a" "a!1" "i" "M*n!1" "j" "m!1"))
               (replace -3)
               (replace -7)
               (rewrite "expt_expt" -1 :dir rl)
               (replace -9)
               (rewrite "one_expt")
               (case "m!1=0")
               (("1"
                 (case "n!1=1")
                 (("1" (assert))
                  ("2"
                   (replace -1)
                   (name "X" "generated_by(a!1)")
                   (replace -1)
                   (lemma "finite_generated_by_def"
                    ("a" "a!1" "G" "G!1" "S" "X"))
                   (("1"
                     (assert)
                     (lemma "card_bij_inv" ("S" "X" "N" "M"))
                     (flatten -1)
                     (hide -1)
                     (split -1)
                     (("1" (assert))
                      ("2"
                       (inst + "lambda (i:below[M]): a!1^(i+1)")
                       (("1"
                         (expand "bijective?")
                         (split 1)
                         (("1"
                           (expand "injective?")
                           (skosimp*)
                           (typepred "x1!1")
                           (typepred "x2!1")
                           (lemma "trich_lt" ("x" "x1!1" "y" "x2!1"))
                           (split -1)
                           (("1"
                             (lemma "cancel_right"
                              ("z"
                               "a!1^(x2!1-x1!1)"
                               "x"
                               "a!1 ^ (1 + x1!1)"
                               "y"
                               "a!1 ^ (1 + x2!1)"))
                             (rewrite "expt_mult" -1)
                             (assert)
                             (expand "subgroup?")
                             (typepred "generated_by(a!1)")
                             (expand "group?")
                             (flatten)
                             (expand "monoid?")
                             (flatten)
                             (lemma "cancel_left"
                              ("z"
                               "a!1^(-(1+x2!1))"
                               "x"
                               "a!1 ^ (1 + x2!1)"
                               "y"
                               "a!1 ^ (1 + x2!1) * a!1 ^ (x2!1 - x1!1)"))
                             (lemma "expt_mult"
                              ("a" "a!1" "i" "-(1+x2!1)" "j" "1+x2!1"))
                             (simplify -1)
                             (rewrite "expt_0" -1)
                             (replace -1 -2)
                             (rewrite "associative" -2 :dir rl)
                             (replace -1 -2)
                             (assert)
                             (inst - "x2!1-x1!1")
                             (assert))
                            ("2" (propax))
                            ("3"
                             (lemma "cancel_right"
                              ("z"
                               "a!1^(x1!1-x2!1)"
                               "x"
                               "a!1 ^ (1 + x1!1)"
                               "y"
                               "a!1 ^ (1 + x2!1)"))
                             (lemma "expt_mult"
                              ("a" "a!1" "i" "1+x2!1" "j" "x1!1-x2!1"))
                             (simplify -1)
                             (replace -1 -2)
                             (replace -6 -2 rl)
                             (flatten -2)
                             (lemma "cancel_left"
                              ("z"
                               "a!1^(-(1+x1!1))"
                               "x"
                               "a!1 ^ (1 + x1!1) * a!1 ^ (x1!1 - x2!1)"
                               "y"
                               "a!1 ^ (1 + x1!1)"))
                             (lemma "expt_mult"
                              ("a" "a!1" "i" "-(1+x1!1)" "j" "1+x1!1"))
                             (rewrite "expt_0" -1)
                             (rewrite "associative" -2 :dir rl)
                             (replace -1 -2)
                             (replace -8 * rl)
                             (replace -2 -3 rl)
                             (rewrite "left_identity")
                             (inst - "x1!1-x2!1")
                             (("1" (assert)) ("2" (assert))))))
                          ("2"
                           (expand "surjective?")
                           (skosimp*)
                           (typepred "y!1")
                           (replace -2 -1)
                           (simplify -1)
                           (skosimp*)
                           (case "EXISTS (n: nat, m: below[M]): M * n + m = n!2")
                           (("1"
                             (skolem!)
                             (replace -1 * rl)
                             (case-replace "m!2=0")
                             (("1"
                               (assert)
                               (rewrite "expt_expt" -4 :dir rl)
                               (replace -15)
                               (replace -4)
                               (assert)
                               (inst + "M-1")
                               (assert)
                               (replace -16)
                               (rewrite "one_expt"))
                              ("2"
                               (rewrite "expt_mult" -3 :dir rl)
                               (rewrite "expt_expt" -3 :dir rl)
                               (replace -14)
                               (assert)
                               (replace -3 2)
                               (inst + "m!2-1")
                               (assert)
                               (replace -15)
                               (rewrite "one_expt")
                               (rewrite "left_identity"))))
                            ("2"
                             (hide-all-but (-7 1))
                             (lemma "euclid_nat" ("a" "n!2" "b" "M"))
                             (skolem!)
                             (inst + "q!1" "r!1")
                             (assert))))))
                        ("2"
                         (replace -1 1)
                         (skosimp*)
                         (typepred "i!1")
                         (replace -10)
                         (inst + "1+i!1")
                         (assert))))))
                    ("2"
                     (expand "nonempty?")
                     (expand "empty?")
                     (inst -1 "a!1")
                     (replace -1 1 rl)
                     (expand "generated_by")
                     (assert)
                     (inst + "1")
                     (rewrite "expt_1"))))))
                ("2"
                 (inst - "m!1")
                 (("1" (assert))
                  ("2" (rewrite "left_identity") (assert))))))
              ("2"
               (hide-all-but (-1 -5 1))
               (lemma "euclid_nat" ("a" "N" "b" "M"))
               (skolem!)
               (inst + "q!1" "r!1")
               (assert))))
            ("2"
             (expand "nonempty?")
             (expand "empty?")
             (inst - "a!1")
             (assert))))
          ("2"
           (expand "generated_by")
           (inst + "1")
           (assert)
           (rewrite "expt_1"))))
        ("2"
         (expand "nonempty?")
         (expand "empty?")
         (inst - "a!1")
         (expand "generated_by")
         (assert)
         (inst + "1")
         (rewrite "expt_1"))))
      ("2"
       (expand "nonempty?")
       (expand "empty?")
       (expand "member")
       (inst - "M")
       (assert))))
    ("2"
     (expand "subgroup?")
     (typepred "G!1")
     (lemma "finite_subset" ("s" "generated_by(a!1)" "A" "G!1"))
     (("1"
       (assert)
       (typepred "generated_by[T, *, one](a!1)")
       (expand "finite_group?")
       (propax))
      ("2" (expand "finite_group?") (flatten))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: finite_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "period_is_generated_order" ("a" "a!1" "G" "G!1"))
   (assert)
   (lemma "generated_is_subgroup" ("a" "a!1" "G" "G!1"))
   (assert)
   (lemma "Lagrange" ("H" "generated_by(a!1)" "G" "G!1"))
   (("1" (assert))
    ("2"
     (typepred "generated_by[T, *, one](a!1)")
     (typepred "G!1")
     (expand "finite_group?")
     (flatten)
     (expand "subgroup?")
     (lemma "finite_subset"
      ("s" "generated_by[T, *, one](a!1)" "A" "G!1"))
     (("1" (assert)) ("2" (propax))))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: finite_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "nonempty?")
   (expand "empty?")
   (expand "member")
   (skosimp*)
   (lemma "finite_generated_by_def"
    ("a" "a!1" "G" "G!1" "S" "generated_by(a!1)"))
   (("1"
     (typepred "a!1")
     (expand "member")
     (typepred "generated_by(a!1)")
     (expand "group?")
     (expand "monoid?")
     (expand "monad?")
     (expand "groupoid?")
     (flatten)
     (expand "member")
     (replace -7 -2)
     (assert)
     (skosimp*)
     (inst - "n!1")
     (assert))
    ("2"
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (expand "generated_by")
     (hide -2)
     (inst - "a!1")
     (inst + "1")
     (rewrite "expt_1"))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: finite_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "member")
   (skosimp*)
   (use "generated_is_subgroup")
   (expand "member")
   (assert)
   (typepred "G!1")
   (lemma "finite_subgroups")
   (inst?)
   (assert)
   (expand "finite_group?")
   (expand "finite_monad?")
   (assert)
   (typepred "generated_by(a!1)")
   (expand "group?")
   (expand "monoid?")
   (propax))


proof_type: f_proof
decl_type: formula
library: algebra
theory: finite_cyclic_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "cyclic?")
   (expand "order")
   (case "card(G!1) > 1")
   (("1"
     (case "(EXISTS (a: (G!1)): a /= one)")
     (("1"
       (skosimp*)
       (name "HH" "generated_by(a!1)")
       (inst + "a!1")
       (assert)
       (replace -1)
       (case "subgroup?(HH,G!1)")
       (("1"
         (lemma "Lagrange")
         (inst?)
         (("1"
           (assert)
           (expand "prime?")
           (inst - "order(HH)")
           (expand "order")
           (split -5)
           (("1" (propax))
            ("2"
             (assert)
             (flatten)
             (lemma "generated_by_card_1")
             (inst?)
             (inst - "G!1")
             (expand "member")
             (propax))
            ("3"
             (flatten)
             (assert)
             (hide -2 -4)
             (expand "subgroup?")
             (lemma "same_card_subset[T]")
             (inst - "HH" "G!1")
             (assert))))
          ("2"
           (typepred "G!1")
           (lemma "finite_subgroups")
           (inst?)
           (assert))))
        ("2"
         (lemma "generated_is_subgroup")
         (inst?)
         (inst - "G!1")
         (assert))))
      ("2"
       (hide -2 2)
       (lemma "card_2_has_2[T]")
       (inst - "G!1")
       (assert)
       (skosimp*)
       (inst-cp + "x!1")
       (inst + "y!1")
       (assert))))
    ("2" (expand "prime?") (flatten))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: group_test
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "fullset")
   (expand "abelian_group?")
   (expand "group?")
   (split)
   (("1" (grind))
    ("2" (expand "inv_exists?") (skosimp*) (inst + "-x!1") (grind))
    ("3" (grind))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: group_test
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "abelian_group?")
   (expand "group?")
   (split)
   (("1" (grind))
    ("2"
     (expand "inv_exists?")
     (skosimp*)
     (typepred "x!1")
     (inst + "1/x!1")
     (("1" (assert)) ("2" (grind))))
    ("3" (grind))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: group_test
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "abelian_group?")
   (expand "group?")
   (split)
   (("1" (grind))
    ("2"
     (expand "inv_exists?")
     (skosimp*)
     (inst + "1/x!1")
     (("1" (grind)) ("2" (grind))))
    ("3" (grind))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: symmetric_groups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "group?")
   (prop)
   (("1"
     (expand "monoid?")
     (prop)
     (("1"
       (expand "monad?")
       (prop)
       (("1"
         (expand "groupoid?")
         (expand "Sym")
         (expand "fullset")
         (expand "star_closed?")
         (skosimp*)
         (expand "op")
         (expand "member")
         (propax))
        ("2"
         (expand "identity")
         (expand "member")
         (expand "Sym")
         (expand "fullset")
         (propax))
        ("3"
         (expand "restrict")
         (expand "identity?")
         (skosimp*)
         (expand "op")
         (expand "restrict")
         (expand "identity")
         (expand "o")
         (prop)
         (("1" (apply-extensionality :hide? t))
          ("2" (apply-extensionality 1 :hide? t))))))
      ("2"
       (grind)
       (expand "o" 1 1)
       (expand "o" 1 1)
       (expand "o" 1 1)
       (expand "o" 1 1)
       (propax))))
    ("2"
     (lemma "comp_inverse_right[(S),(S)]")
     (("1"
       (expand "inv_exists?")
       (skosimp*)
       (inst?)
       (assert)
       (expand "op")
       (expand "restrict")
       (expand "O")
       (assert)
       (typepred "x!1")
       (inst + "inverse(x!1)")
       (("1"
         (expand "identity")
         (lemma "comp_inverse_right[(S),(S)]")
         (inst?)
         (prop)
         (("1"
           (apply-extensionality 1 :hide? t)
           (skosimp*)
           (inst + "1")
           (hide -)
           (grind))
          ("2"
           (apply-extensionality 1 :hide? t)
           (("1" (lemma "comp_inverse_left[(S),(S)]") (inst?))
            ("2" (skosimp*) (inst + "1") (hide -) (grind))))))
        ("2" (expand "Sym") (expand "fullset") (propax))
        ("3" (inst + "1") (hide -) (grind))))
      ("2" (inst + "1") (hide 2) (grind))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: subgroups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "subgroup_def[T,*,one]")
   (inst - "G" "intersection(A, B)")
   (assert)
   (hide 2)
   (prop)
   (("1"
     (expand "nonempty?")
     (expand "empty?")
     (expand "member")
     (expand "intersection")
     (expand "member")
     (inst - "one")
     (grind))
    ("2"
     (expand "subgroup?")
     (flatten)
     (auto-rewrite-theory "sets[T]")
     (assert)
     (skosimp*)
     (inst?)
     (inst?)
     (assert))
    ("3"
     (expand "subgroup?")
     (expand "star_closed?")
     (expand "intersection")
     (assert)
     (skosimp*)
     (typepred "x!1")
     (typepred "y!1")
     (expand "intersection")
     (assert)
     (flatten)
     (expand "group?")
     (expand "monoid?")
     (expand "monad?")
     (flatten)
     (expand "star_closed?")
     (assert)
     (inst?)
     (inst?)
     (assert))
    ("4"
     (expand "inv_closed?")
     (expand "intersection")
     (expand "subgroup?")
     (expand "subset?")
     (expand "member")
     (flatten)
     (expand "group?")
     (flatten)
     (expand "inv_exists?")
     (skosimp*)
     (inst -3 "x!1")
     (("1"
       (inst -6 "x!1")
       (("1"
         (skosimp*)
         (replace -3 -7 rl)
         (rewrite "cancel_left[T,*,one]")
         (lemma "unique_inv[T,*,one]")
         (inst-cp -1 "x!1" "y!1")
         (inst -1 "x!1" "y!2")
         (assert))
        ("2" (typepred "x!1") (expand "intersection") (assert))))
      ("2" (typepred "x!1") (expand "intersection") (assert))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: subgroups
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "normal_subgroup?")
   (lemma "center_subgroup")
   (inst?)
   (assert)
   (skosimp*)
   (typepred "a!1")
   (expand "subset?")
   (skosimp*)
   (expand "member")
   (expand "*")
   (skosimp*)
   (typepred "h!1")
   (skosimp*)
   (typepred "h!2")
   (rewrite "center_def" +)
   (prop)
   (("1"
     (replace -5)
     (replace -2)
     (typepred "center(G)")
     (expand "subset?")
     (assert)
     (inst - "h!2")
     (assert)
     (hide -2 -3 -5 -6)
     (lemma "inv_member")
     (inst?)
     (inst?)
     (assert)
     (lemma "product_in")
     (inst?)
     (assert)
     (hide 2)
     (lemma "product_in")
     (inst?)
     (assert))
    ("2"
     (replace -5)
     (skeep)
     (hide -5)
     (replace -2)
     (hide -2)
     (name "w" "inv[T, *, one](a!1)")
     (replace -1)
     (hide -4)
     (rewrite "center_def")
     (flatten)
     (inst-cp -3 "w")
     (("1"
       (replace -4)
       (lemma "assoc")
       (inst - "h!2" "w" "a!1")
       (replace -1 + rl)
       (replace -2 + rl)
       (rewrite "inv_left")
       (assert)
       (inst?))
      ("2" (lemma "inv_in") (inst?) (assert))))))


proof_type: j_proof
decl_type: tcc
library: algebra
theory: cyclic_monoid
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "x!1")
   (expand "cyclic_monoid?")
   (expand "commutative_monoid?")
   (flatten)
   (assert)
   (skosimp)
   (lemma "fullset_is_cyclic_monoid")
   (expand "cyclic_monoid?")
   (flatten)
   (skosimp)
   (hide -3 -4 -1)
   (expand "commutative?")
   (skosimp)
   (case "generated_set(a!2)(x!2)")
   (("1"
     (case "generated_set(a!2)(y!1)")
     (("1"
       (expand "generated_set")
       (skosimp*)
       (replace -1)
       (replace -2)
       (expand "restrict")
       (rewrite "power_mult")
       (rewrite "power_mult"))
      ("2" (replace -2 * rl) (expand "fullset") (propax))))
    ("2" (replace -1 * rl) (expand "fullset") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: commutative_groupoid
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "fullset_is_commutative_groupoid")
   (expand "commutative_groupoid?")
   (flatten)
   (expand "commutative?")
   (inst - "x!1" "y!1")
   (("1" (expand "restrict") (propax)) ("2" (expand "fullset") (propax))
    ("3" (expand "fullset") (propax))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: commutative_semigroup
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_commutative_semigroup")
   (expand "commutative_semigroup?")
   (expand "commutative_groupoid?")
   (expand "semigroup?")
   (flatten)
   (assert))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: commutative_semigroup
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_commutative_semigroup")
   (expand "commutative_semigroup?")
   (flatten)
   (assert))


proof_type: j_proof
decl_type: tcc
library: algebra
theory: commutative_semigroup
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "x!1")
   (expand "commutative_semigroup?")
   (expand "semigroup?")
   (expand "commutative_groupoid?")
   (flatten)
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skosimp) (expand "has_length") (ground))
    ("2"
     (skosimp*)
     (expand "has_length" (-2 -3))
     (ground)
     (inst - "rest(cseq!1)" "m!1 - 1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (generalize-skolem-constants)
     (induct "cseq_1" :name "is_finite_induction")
     (skosimp)
     (case "empty?(cseq!2)")
     (("1" (inst + 0) (expand "has_length") (assert))
      ("2"
       (ground)
       (skolem!)
       (inst + "1 + n!1")
       (expand "has_length" +)
       (propax))))
    ("2"
     (skolem!)
     (generalize-skolem-constants)
     (induct "n_1")
     (("1" (skosimp) (expand* "has_length" "is_finite") (ground))
      ("2"
       (skosimp*)
       (expand "has_length" -2)
       (expand "is_finite" +)
       (ground)
       (inst - "rest(cseq!2)")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (lemma "some_weak_induction")
     (inst - "p!1" "LAMBDA cseq: NOT every(pred_NOT(p!1))(cseq)")
     (split)
     (("1" (inst - "cseq!1") (assert))
      ("2"
       (skosimp)
       (expand "every" -2)
       (expand "pred_NOT")
       (lift-if)
       (ground))))
    ("2"
     (lemma "every_weak_coinduction")
     (inst - "pred_NOT(p!1)" "LAMBDA cseq: NOT some(p!1)(cseq)")
     (split)
     (("1" (inst - "cseq!1") (assert))
      ("2"
       (skosimp)
       (expand "some" 1)
       (expand "pred_NOT")
       (lift-if)
       (ground))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "some_every_rew")
   (inst - "pred_NOT(p!1)" "cseq!1")
   (expand "pred_NOT")
   (replace-eta "p!1")
   (ground))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "cseq" :name "some_induction")
   (skosimp)
   (inst - "p!1" "LAMBDA cseq: some(q!1)(cseq)")
   (split)
   (("1" (inst - "cseq!1") (assert))
    ("2"
     (delete -2 2)
     (skosimp)
     (expand "some" +)
     (expand "pred_IMPLIES")
     (lift-if)
     (ground)
     (inst - "first(a!1)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "cseq" :name "every_coinduction")
   (skosimp)
   (inst - "q!1" "LAMBDA cseq: every(p!1)(cseq)")
   (split)
   (("1" (inst - "cseq!1") (assert))
    ("2"
     (delete -2 2)
     (skosimp)
     (expand "every" -)
     (expand "pred_IMPLIES")
     (lift-if)
     (ground)
     (inst - "first(a!1)")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_length
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (lemma "length_TCC1")
   (inst-cp - "fseq!1")
   (use "is_finite_def")
   (assert)
   (skolem!)
   (lemma "has_length_injective")
   (inst-cp - "fseq!1" "n!1"
    "choose[nat]({n | has_length[T](fseq!1, n)})")
   (assert)
   (expand "has_length" -3)
   (flatten)
   (assert)
   (expand "is_finite" -)
   (inst - "rest(fseq!1)")
   (inst - "rest(fseq!1)" "n!1 - 1"
    "choose[nat]({n | has_length[T](rest(fseq!1), n)})")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_length_comp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "length_eq")
   (use "length_empty?_rew[T2]")
   (use "length_empty?_rew[T1]")
   (ground))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_length_comp
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "length_eq")
   (expand "is_finite" 1 1)
   (expand "is_finite" 1 2)
   (expand "is_finite" 1 3)
   (expand "is_finite" 1 4)
   (expand "length" 1 1)
   (expand "length" 1 2)
   (propax))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_nth
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand* "index?" "is_finite") (reduce))
    ("2"
     (skosimp*)
     (expand "index?" +)
     (expand "is_finite" +)
     (inst - "rest(cseq!1)")
     (ground))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_nth
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "i" ("cseq" "i"))
   (typepred "x!2")
   (skosimp)
   (expand "index?" (-1 +))
   (ground)
   (inst - "rest(x!1)" "x!2 - 1")
   (inst - "n!1 - 1")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_nth
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (expand "index?" +)
     (expand "length" +)
     (lift-if)
     (ground)
     (("1" (inst - "n!1 - 1") (assert))
      ("2" (inst - "n!1 - 1") (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_nth
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skolem-typepred) (expand* "index?" "is_finite") (assert))
    ("2"
     (skosimp* t)
     (expand "is_finite" +)
     (expand "index?" +)
     (ground)
     (inst - "rest(iseq!1)"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_nth
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand* "full?" "member")
   (prop)
   (("1" (use "index?_infinite"))
    ("2" (use "index?_finite") (inst - "length(cseq!1)") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_nth
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "coinduction")
   (inst -
    "LAMBDA cseq1, cseq2: index?(cseq1) = index?(cseq2) AND (FORALL (n: indexes(cseq1)): nth(cseq1, n) = nth(cseq2, n))"
    "cseq1!1" "cseq2!1")
   (("1" (assert))
    ("2"
     (delete -1 -2 2)
     (expand "bisimulation?")
     (skosimp)
     (lemma "index?_0")
     (inst-cp - "y!1")
     (inst - "x!1")
     (smash)
     (("1"
       (skolem!)
       (inst - "1 + n!1")
       (("1" (expand "nth" -) (propax))
        ("2" (expand "index?" +) (propax))))
      ("2"
       (decompose-equality)
       (decompose-equality)
       (inst - "1 + x!2")
       (expand "index?" -)
       (propax))
      ("3" (inst - 0) (expand "nth") (propax))))
    ("3" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_nth
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (skolem-typepred)
     (generalize-skolem-constants)
     (skolem + ("_" "_" "p"))
     (measure-induct+ "i_1" ("cseq_1" "i_1") :skolem-typepreds? t)
     (("1"
       (expand "index?")
       (expand "every" -3)
       (expand "nth" +)
       (lift-if)
       (ground)
       (inst - "rest(x!1)" "x!2 - 1")
       (assert))
      ("2" (iff) (assert))))
    ("2"
     (lemma "every_weak_coinduction")
     (inst - "p!1"
      "LAMBDA cseq: FORALL (i: indexes(cseq)): p!1(nth(cseq, i))")
     (split)
     (("1" (inst - "cseq!1") (assert))
      ("2"
       (delete -1 2)
       (skosimp)
       (lift-if)
       (ground)
       (("1"
         (inst - 0)
         (("1" (expand "nth") (propax))
          ("2" (expand "index?") (propax))))
        ("2"
         (skolem!)
         (inst - "1 + i!1")
         (("1" (expand "nth" -) (propax))
          ("2" (expand "index?") (propax))))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_nth
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (lemma "some_weak_induction")
     (inst - "p!1"
      "LAMBDA cseq: EXISTS (i: indexes(cseq)): p!1(nth(cseq, i))")
     (split)
     (("1" (inst - "cseq!1") (assert))
      ("2"
       (delete -1 2)
       (skosimp)
       (lift-if)
       (ground)
       (("1"
         (inst + 0)
         (("1" (expand "nth") (propax))
          ("2" (expand "index?") (propax))))
        ("2"
         (skolem!)
         (inst + "1 + i!1")
         (("1" (expand "nth" +) (propax))
          ("2" (expand "index?") (propax))))))))
    ("2"
     (skolem-typepred)
     (generalize-skolem-constants)
     (skolem + ("_" "_" "p"))
     (measure-induct+ "i_1" ("cseq_1" "i_1") :skolem-typepreds? t)
     (("1"
       (expand "index?")
       (expand "some" +)
       (expand "nth" -3)
       (lift-if)
       (ground)
       (inst - "rest(x!1)" "x!2 - 1")
       (assert))
      ("2" (iff) (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_nth
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "nfseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert)) ("3" (assert))
    ("4"
     (skosimp)
     (expand "last")
     (expand "length" 2 2)
     (expand "nth" 2 2)
     (lemma "length_empty?_rew" ("cseq" "rest(cseq!1)"))
     (reduce))
    ("5" (skosimp) (forward-chain "last_rest_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_zip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+
    "IF is_finite(zip(cseq1, cseq2)) THEN length(zip(cseq1, cseq2)) ELSE 0 ENDIF"
    ("cseq1" "cseq2"))
   (("1"
     (expand* "zip" "zip_struct")
     (expand "coreduce" (-2 +))
     (expand "is_finite" (-2 +))
     (expand "length" +)
     (expand "min")
     (expand "coreduce" -1 3)
     (expand "coreduce" -1 4)
     (expand "is_finite" -1 2)
     (expand "length" -1 2)
     (smash)
     (("1" (inst - "rest(x!1)" "rest(x!2)") (assert))
      ("2" (inst - "rest(x!1)" "rest(x!2)") (assert))
      ("3" (inst - "rest(x!1)" "rest(x!2)") (assert))
      ("4" (inst - "rest(x!1)" "rest(x!2)") (assert))))
    ("2" (use "zip_infinite")) ("3" (use "zip_infinite"))
    ("4" (use "zip_infinite")) ("5" (use "zip_infinite"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_zip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand* "index?" "zip" "zip_struct" "coreduce") (reduce))
    ("2"
     (skosimp*)
     (expand "index?" +)
     (expand* "zip" "zip_struct")
     (expand "coreduce" +)
     (reduce))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_zip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "n" ("cseq1" "cseq2" "n") :skolem-typepreds? t)
   (("1"
     (use "zip_index")
     (ground)
     (use "index?_nonempty[T2]")
     (use "index?_nonempty[T1]")
     (expand "nth" +)
     (lift-if)
     (ground)
     (("1" (expand* "zip" "zip_struct" "coreduce"))
      ("2"
       (inst - "rest(x!1)" "rest(x!2)" "x!3 - 1")
       (("1"
         (assert)
         (expand* "zip" "zip_struct")
         (expand "coreduce" +)
         (propax))
        ("2"
         (expand "index?" -6)
         (flatten)
         (expand* "zip" "zip_struct")
         (expand "coreduce" -7)
         (propax))))))
    ("2" (use "zip_nth_TCC2")) ("3" (use "zip_nth_TCC1"))
    ("4" (use "zip_nth_TCC2")) ("5" (use "zip_nth_TCC1"))
    ("6" (use "zip_nth_TCC2")) ("7" (use "zip_nth_TCC1"))
    ("8" (use "zip_nth_TCC2")) ("9" (use "zip_nth_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_zip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand* "length_lt" "length_gt" "last")
   (use "length_empty?_rew[[T1, T2]]")
   (auto-rewrite "zip_nth")
   (auto-rewrite "zip_length")
   (reduce)
   (("1" (expand "min") (propax)) ("2" (expand "min") (propax))
    ("3" (rewrite "zip_length") (expand "min") (lift-if) (ground))
    ("4" (rewrite "zip_length") (expand "min") (propax))
    ("5" (expand "min") (propax)) ("6" (use "zip_infinite"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_zip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1"
     (lemma "coinduction[T1]")
     (inst -
      "LAMBDA (cseq1, cseq3: csequence[T1]): EXISTS (cseq2, cseq4: csequence[T2]): length_eq(cseq1, cseq2) AND length_eq(cseq3, cseq4) AND zip(cseq1, cseq2) = zip(cseq3, cseq4)"
      "cseq1!1" "cseq3!1")
     (("1" (assert) (inst + "cseq2!1" "cseq4!1") (assert))
      ("2"
       (delete -1 -2 -3 2)
       (expand "bisimulation?")
       (skosimp*)
       (case "nonempty?(x!1) AND nonempty?(y!1) AND nonempty?(cseq2!2) AND nonempty?(cseq4!2)")
       (("1"
         (smash)
         (("1"
           (inst + "rest(cseq2!2)" "rest(cseq4!2)")
           (lemma "length_eq_rest")
           (inst-cp - "y!1" "cseq4!2")
           (inst - "x!1" "cseq2!2")
           (lemma "zip_rest")
           (inst-cp - "y!1" "cseq4!2")
           (inst - "x!1" "cseq2!2")
           (assert))
          ("2"
           (lemma "zip_first")
           (inst-cp - "y!1" "cseq4!2")
           (inst - "x!1" "cseq2!2")
           (assert))))
        ("2"
         (hide 3)
         (lemma "zip_empty")
         (inst-cp - "y!1" "cseq4!2")
         (inst - "x!1" "cseq2!2")
         (expand "length_eq")
         (lemma "length_empty?_rew[T2]")
         (inst-cp - "cseq4!2")
         (inst - "cseq2!2")
         (lemma "length_empty?_rew[T1]")
         (inst-cp - "y!1")
         (inst - "x!1")
         (smash))))))
    ("2"
     (lemma "coinduction[T2]")
     (inst -
      "LAMBDA (cseq2, cseq4: csequence[T2]): EXISTS (cseq1, cseq3: csequence[T1]): length_eq(cseq1, cseq2) AND length_eq(cseq3, cseq4) AND zip(cseq1, cseq2) = zip(cseq3, cseq4)"
      "cseq2!1" "cseq4!1")
     (("1" (assert) (inst + "cseq1!1" "cseq3!1") (assert))
      ("2"
       (delete -1 -2 -3 2)
       (expand "bisimulation?")
       (skosimp*)
       (case "nonempty?(cseq1!2) AND nonempty?(cseq3!2) AND nonempty?(x!1) AND nonempty?(y!1)")
       (("1"
         (smash)
         (("1"
           (inst + "rest(cseq1!2)" "rest(cseq3!2)")
           (lemma "length_eq_rest")
           (inst-cp - "cseq3!2" "y!1")
           (inst - "cseq1!2" "x!1")
           (lemma "zip_rest")
           (inst-cp - "cseq3!2" "y!1")
           (inst - "cseq1!2" "x!1")
           (assert))
          ("2"
           (lemma "zip_first")
           (inst-cp - "cseq3!2" "y!1")
           (inst - "cseq1!2" "x!1")
           (assert))))
        ("2"
         (hide 3)
         (lemma "zip_empty")
         (inst-cp - "cseq3!2" "y!1")
         (inst - "cseq1!2" "x!1")
         (expand "length_eq")
         (lemma "length_empty?_rew[T2]")
         (inst-cp - "y!1")
         (inst - "x!1")
         (lemma "length_empty?_rew[T1]")
         (inst-cp - "cseq3!2")
         (inst - "cseq1!2")
         (smash))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_zip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "nth_some[[T1, T2]]")
   (smash)
   (("1"
     (skolem-typepred)
     (rewrite "zip_index")
     (prop)
     (("1"
       (use "nth_some[T1]")
       (assert)
       (inst + "i!1")
       (rewrite "zip_nth")
       (assert))
      ("2"
       (inst + "i!1")
       (rewrite "zip_nth")
       (assert)
       (rewrite "index?_finite"))))
    ("2"
     (skolem-typepred)
     (rewrite "zip_index")
     (prop)
     (("1"
       (inst + "i!1")
       (rewrite "zip_nth")
       (assert)
       (rewrite "index?_finite" -3))
      ("2"
       (use "nth_some[T2]")
       (assert)
       (inst + "i!1")
       (rewrite "zip_nth")
       (assert))))
    ("3"
     (skolem-typepred)
     (rewrite "zip_index")
     (prop)
     (("1"
       (use "nth_some[T1]")
       (assert)
       (inst + "i!1")
       (rewrite "zip_nth")
       (assert))
      ("2"
       (use "nth_some[T2]")
       (assert)
       (inst + "i!1")
       (rewrite "zip_nth")
       (assert))))
    ("4"
     (use "nth_some[T1]")
     (assert)
     (skolem-typepred)
     (inst + "i!1")
     (("1" (flatten) (rewrite "zip_nth") (assert))
      ("2"
       (rewrite "zip_index")
       (expand "length_lt")
       (prop)
       (("1"
         (rewrite "index?_finite")
         (rewrite "index?_finite")
         (assert))
        ("2" (use "index?_infinite[T2]"))))))
    ("5"
     (skosimp :preds? t)
     (inst + "i!1")
     (("1" (flatten) (rewrite "zip_nth") (assert))
      ("2" (rewrite "zip_index") (rewrite "index?_finite[T1]"))))
    ("6"
     (use "nth_some[T2]")
     (assert)
     (skolem-typepred)
     (inst + "i!1")
     (("1" (flatten) (rewrite "zip_nth") (assert))
      ("2"
       (rewrite "zip_index")
       (expand "length_lt")
       (prop)
       (("1" (use "index?_infinite[T1]"))
        ("2"
         (rewrite "index?_finite")
         (rewrite "index?_finite")
         (assert))))))
    ("7"
     (use "nth_some[T1]")
     (assert)
     (skolem-typepred)
     (inst + "i!1")
     (("1" (flatten) (rewrite "zip_nth") (assert))
      ("2"
       (rewrite "zip_index")
       (expand "length_gt")
       (prop)
       (("1" (use "index?_infinite[T2]"))
        ("2"
         (rewrite "index?_finite")
         (rewrite "index?_finite")
         (assert))))))
    ("8"
     (skosimp :preds? t)
     (inst + "i!1")
     (("1" (flatten) (rewrite "zip_nth") (assert))
      ("2" (rewrite "zip_index") (use "index?_finite[T2]") (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_zip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "nth_every[[T1, T2]]")
   (smash)
   (("1"
     (skosimp :preds? t)
     (inst - "i!1")
     (("1" (flatten) (rewrite "zip_nth") (assert))
      ("2" (use "index?_finite[T1]") (assert) (rewrite "zip_index"))))
    ("2"
     (use "nth_every[T1]")
     (assert)
     (skolem-typepred)
     (inst - "i!1")
     (("1" (flatten) (rewrite "zip_nth") (assert))
      ("2"
       (rewrite "zip_index")
       (expand "length_lt")
       (prop)
       (("1"
         (rewrite "index?_finite")
         (rewrite "index?_finite")
         (assert))
        ("2" (use "index?_infinite[T2]"))))))
    ("3"
     (use "nth_every[T2]")
     (assert)
     (skolem-typepred)
     (inst - "i!1")
     (("1" (flatten) (rewrite "zip_nth") (assert))
      ("2"
       (rewrite "zip_index")
       (expand "length_lt")
       (prop)
       (("1" (use "index?_infinite[T1]"))
        ("2"
         (rewrite "index?_finite")
         (rewrite "index?_finite")
         (assert))))))
    ("4"
     (skosimp :preds? t)
     (inst - "i!1")
     (("1" (rewrite "zip_nth") (assert))
      ("2" (use "index?_finite[T2]") (assert) (rewrite "zip_index"))))
    ("5"
     (use "nth_every[T1]")
     (assert)
     (skolem-typepred)
     (inst - "i!1")
     (("1" (flatten) (rewrite "zip_nth") (assert))
      ("2"
       (rewrite "zip_index")
       (expand "length_gt")
       (prop)
       (("1" (use "index?_infinite[T2]"))
        ("2"
         (rewrite "index?_finite")
         (rewrite "index?_finite")
         (assert))))))
    ("6"
     (skolem-typepred)
     (rewrite "zip_index")
     (prop)
     (("1"
       (use "nth_every[T1]")
       (assert)
       (inst - "i!1")
       (rewrite "zip_nth")
       (assert))
      ("2"
       (inst - "i!1")
       (rewrite "zip_nth")
       (assert)
       (rewrite "index?_finite"))))
    ("7"
     (skolem-typepred)
     (rewrite "zip_index")
     (prop)
     (("1"
       (use "nth_every[T1]")
       (assert)
       (inst - "i!1")
       (rewrite "zip_nth")
       (assert))
      ("2"
       (use "nth_every[T2]")
       (assert)
       (inst - "i!1")
       (rewrite "zip_nth")
       (assert))))
    ("8"
     (skolem-typepred)
     (rewrite "zip_index")
     (prop)
     (("1"
       (inst - "i!1")
       (rewrite "zip_nth")
       (assert)
       (rewrite "index?_finite" -2))
      ("2"
       (use "nth_every[T2]")
       (assert)
       (inst - "i!1")
       (rewrite "zip_nth")
       (assert))))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_zip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq1" :name "is_finite_induction[T1]")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (expand "is_finite" +)
     (expand* "zip" "zip_struct")
     (expand "coreduce" +)
     (smash)
     (inst - "rest(cseq2!1)"))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_zip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq2" :name "is_finite_induction[T2]")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (expand "is_finite" +)
     (expand* "zip" "zip_struct")
     (expand "coreduce" +)
     (smash)
     (inst - "rest(cseq1!1)"))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_zip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "is_finite_induction[[T1, T2]]")
   (inst -
    "LAMBDA (cseq: csequence[[T1, T2]]): FORALL cseq1, cseq2: cseq = zip(cseq1, cseq2) IMPLIES (is_finite(cseq1) OR is_finite(cseq2))")
   (split)
   (("1"
     (skolem!)
     (inst - "zip(iseq1!1, iseq2!1)")
     (assert)
     (inst - "iseq1!1" "iseq2!1")
     (assert))
    ("2"
     (delete 2)
     (skosimp*)
     (replace -2)
     (hide -2)
     (expand "is_finite" +)
     (ground)
     (("1" (expand* "zip" "zip_struct" "coreduce"))
      ("2"
       (expand* "zip" "zip_struct")
       (expand "coreduce" -1)
       (expand "coreduce" -2 1)
       (inst - "rest(cseq1!1)" "rest(cseq2!1)")
       (assert))))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_zip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "length_lt")
   (use "length_nonempty?_rew[T1]")
   (ground)
   (("1" (use "index?_infinite[T2]") (rewrite "index?_finite[T2]"))
    ("2" (use "index?_infinite[T2]"))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_zip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "length_gt")
   (use "length_nonempty?_rew[T2]")
   (ground)
   (("1" (use "index?_infinite[T1]") (rewrite "index?_finite[T1]"))
    ("2" (use "index?_infinite[T1]"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction[[T1, T2]]")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp)
     (expand "length" +)
     (expand* "unzip" "unzip_left_struct")
     (expand "coreduce" +)
     (reduce))
    ("4"
     (skosimp)
     (assert)
     (lemma "unzip_finite" ("fseq" "fseq!2"))
     (flatten))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction[[T1, T2]]")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp)
     (expand "length" +)
     (expand* "unzip" "unzip_right_struct")
     (expand "coreduce" +)
     (reduce))
    ("4"
     (skosimp)
     (assert)
     (lemma "unzip_finite" ("fseq" "fseq!2"))
     (flatten))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "index?_prop")
   (rewrite "index?_prop")
   (rewrite "unzip_length_left")
   (ground)
   (("1" (use "unzip_finite") (flatten))
    ("2" (use "unzip_infinite") (flatten))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "index?_prop")
   (rewrite "index?_prop")
   (rewrite "unzip_length_right")
   (ground)
   (("1" (use "unzip_finite") (flatten))
    ("2" (use "unzip_infinite") (flatten))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "n" ("cseq" "n") :skolem-typepreds? t)
   (("1"
     (expand "index?" -)
     (expand "nth" +)
     (expand* "unzip" "unzip_left_struct")
     (expand "coreduce" +)
     (reduce))
    ("2" (use "unzip_nth_left_TCC1")) ("3" (use "unzip_nth_left_TCC1"))
    ("4" (use "unzip_nth_left_TCC1")) ("5" (use "unzip_nth_left_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "n" ("cseq" "n") :skolem-typepreds? t)
   (("1"
     (expand "index?" -)
     (expand "nth" +)
     (expand* "unzip" "unzip_right_struct")
     (expand "coreduce" +)
     (reduce))
    ("2" (use "unzip_nth_right_TCC1")) ("3" (use "unzip_nth_right_TCC1"))
    ("4" (use "unzip_nth_right_TCC1"))
    ("5" (use "unzip_nth_right_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (decompose-equality)
   (("1"
     (lemma "coinduction[T1]")
     (inst -
      "LAMBDA (cseq1, cseq2: csequence[T1]): EXISTS cseq: cseq1 = unzip(cseq)`1 AND cseq2 = map[[T1, T2], T1](PROJ_1, cseq)"
      "unzip(cseq!1)`1" "map[[T1, T2], T1](PROJ_1, cseq!1)")
     (("1" (assert) (inst + "cseq!1"))
      ("2"
       (delete 2)
       (expand "bisimulation?")
       (skosimp*)
       (replace*)
       (hide -1 -2)
       (expand* "unzip" "unzip_left_struct" "coreduce" "map")
       (smash)
       (inst + "rest(cseq!2)")
       (expand "map" 2 1)
       (expand "coreduce" 2 1)
       (propax))))
    ("2"
     (lemma "coinduction[T2]")
     (inst -
      "LAMBDA (cseq1, cseq2: csequence[T2]): EXISTS cseq: cseq1 = unzip(cseq)`2 AND cseq2 = map[[T1, T2], T2](PROJ_2, cseq)"
      "unzip(cseq!1)`2" "map[[T1, T2], T2](PROJ_2, cseq!1)")
     (("1" (assert) (inst + "cseq!1"))
      ("2"
       (delete 2)
       (expand "bisimulation?")
       (skosimp*)
       (replace*)
       (hide -1 -2)
       (expand* "unzip" "unzip_right_struct" "coreduce" "map")
       (smash)
       (inst + "rest(cseq!2)")
       (expand "map" 2 1)
       (expand "coreduce" 2 1)
       (propax))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "coinduction[[T1, T2]]")
   (inst - "LAMBDA cseq1, cseq2: unzip(cseq1) = unzip(cseq2)" "cseq1!1"
    "cseq2!1")
   (("1" (assert))
    ("2"
     (delete -1 2)
     (expand "bisimulation?")
     (skosimp)
     (reduce)
     (("1"
       (expand* "unzip" "unzip_left_struct" "unzip_right_struct"
        "coreduce"))
      ("2"
       (expand* "unzip" "unzip_left_struct" "unzip_right_struct"
        "coreduce"))
      ("3"
       (expand* "unzip" "unzip_left_struct" "unzip_right_struct")
       (expand "coreduce" -)
       (reduce)
       (("1" (decompose-equality -2)) ("2" (decompose-equality))))
      ("4"
       (expand* "unzip" "unzip_left_struct" "unzip_right_struct"
        "coreduce")
       (reduce)
       (reduce-with-ext)
       (("1" (decompose-equality)) ("2" (decompose-equality -2))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand* "unzip" "unzip_left_struct" "unzip_right_struct")
   (expand "coreduce" 1 1)
   (expand "coreduce" 1 1)
   (propax))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (rewrite "length_nonempty?_rew")
   (expand "last")
   (rewrite "unzip_length_left")
   (rewrite "unzip_nth_left"))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (rewrite "length_nonempty?_rew")
   (expand "last")
   (rewrite "unzip_length_right")
   (rewrite "unzip_nth_right"))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "nth_some[[T1, T2]]")
   (use "nth_some[T2]")
   (use "nth_some[T1]")
   (smash)
   (("1"
     (skosimp* t)
     (rewrite "unzip_index_right")
     (inst + "i!2")
     (flatten)
     (rewrite "unzip_nth_right"))
    ("2"
     (skolem-typepred)
     (rewrite "unzip_index_left")
     (inst 4 "i!1")
     (flatten)
     (rewrite "unzip_nth_left"))
    ("3"
     (skolem-typepred)
     (rewrite "unzip_index_right")
     (inst 4 "i!1")
     (flatten)
     (rewrite "unzip_nth_right"))
    ("4"
     (skolem-typepred)
     (split)
     (("1"
       (rewrite "unzip_index_left" :dir rl)
       (inst + "i!1")
       (rewrite "unzip_nth_left"))
      ("2"
       (rewrite "unzip_index_right" :dir rl)
       (inst 4 "i!1")
       (rewrite "unzip_nth_right"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "nth_every[[T1, T2]]")
   (use "nth_every[[T2]]")
   (use "nth_every[[T1]]")
   (smash)
   (("1"
     (skolem-typepred)
     (split)
     (("1"
       (rewrite "unzip_index_left" :dir rl)
       (inst - "i!1")
       (rewrite "unzip_nth_left" :dir rl))
      ("2"
       (rewrite "unzip_index_right" :dir rl)
       (inst -5 "i!1")
       (rewrite "unzip_nth_right" :dir rl))))
    ("2"
     (skolem-typepred)
     (rewrite "unzip_index_right")
     (inst -5 "i!1")
     (flatten)
     (rewrite "unzip_nth_right"))
    ("3"
     (skolem-typepred)
     (rewrite "unzip_index_left")
     (inst -5 "i!1")
     (flatten)
     (rewrite "unzip_nth_left"))
    ("4"
     (skosimp* t)
     (rewrite "unzip_index_right")
     (inst - "i!2")
     (flatten)
     (rewrite "unzip_nth_right"))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction[[T1, T2]]")
   (("1" (assert)) ("2" (assert)) ("3" (assert)) ("4" (assert))
    ("5"
     (skosimp)
     (expand "is_finite" +)
     (expand* "unzip" "unzip_left_struct" "unzip_right_struct")
     (expand "coreduce" +)
     (reduce))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL iseq, n: NOT has_length(unzip(iseq)`1, n) AND NOT has_length(unzip(iseq)`2, n)")
   (("1"
     (skolem!)
     (split)
     (("1"
       (rewrite "is_finite_def")
       (skolem!)
       (inst - "iseq!1" "n!1")
       (flatten))
      ("2"
       (rewrite "is_finite_def")
       (skolem!)
       (inst - "iseq!1" "n!1")
       (flatten))))
    ("2"
     (delete 2)
     (induct "n")
     (("1"
       (skolem-typepred)
       (expand* "has_length" "unzip" "unzip_left_struct"
        "unzip_right_struct" "coreduce" "is_finite")
       (reduce))
      ("2"
       (skosimp* t)
       (expand "has_length" +)
       (expand "is_finite" +)
       (expand* "unzip" "unzip_left_struct" "unzip_right_struct")
       (expand "coreduce" +)
       (smash)
       (("1" (inst - "rest(iseq!1)") (flatten))
        ("2" (inst - "rest(iseq!1)") (flatten))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_zip_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "coinduction[[T1, T2]]")
   (inst -
    "LAMBDA (cseq1, cseq2: csequence[[T1, T2]]): cseq1 = zip(unzip(cseq2))"
    "zip(unzip(cseq!1))" "cseq!1")
   (delete 2)
   (expand "bisimulation?")
   (skosimp)
   (replace -1)
   (hide -1)
   (smash)
   (("1" (use "unzip_nonempty") (flatten) (use "zip_nonempty") (assert))
    ("2"
     (expand* "unzip" "unzip_left_struct" "unzip_right_struct" "coreduce"
      "zip" "zip_struct" "coreduce"))
    ("3"
     (use "unzip_nonempty")
     (flatten)
     (lemma "zip_rest")
     (inst - "unzip(y!1)`1" "unzip(y!1)`2")
     (lemma "unzip_rest_left")
     (inst - "y!1")
     (lemma "unzip_rest_right")
     (inst - "y!1")
     (assert))
    ("4"
     (expand* "unzip" "unzip_left_struct" "unzip_right_struct" "coreduce"
      "zip" "zip_struct" "coreduce")
     (smash))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_zip_unzip
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (decompose-equality)
   (("1"
     (lemma "coinduction[T1]")
     (inst -
      "LAMBDA (cseq1, cseq2: csequence[T1]): EXISTS (cseq: csequence[T2]):
       cseq1 = unzip(zip(cseq2, cseq))`1 AND length_eq(cseq2, cseq)"
      "unzip(zip(cseq1!1, cseq2!1))`1" "cseq1!1")
     (("1" (assert) (inst + "cseq2!1"))
      ("2"
       (delete -1 2)
       (expand "bisimulation?")
       (skosimp*)
       (replace -1)
       (hide -1)
       (smash)
       (("1"
         (rewrite "unzip_empty_left")
         (rewrite "zip_empty")
         (use "length_eq_empty")
         (assert))
        ("2" (use "unzip_empty_left") (assert) (rewrite "zip_empty"))
        ("3"
         (use "unzip_empty_left")
         (assert)
         (rewrite "zip_empty")
         (ground)
         (inst + "rest(cseq!1)")
         (use "length_eq_rest")
         (assert)
         (rewrite "unzip_rest_left")
         (rewrite "zip_rest"))
        ("4"
         (use "unzip_empty_left")
         (assert)
         (rewrite "zip_empty")
         (ground)
         (rewrite "unzip_first_left")
         (rewrite "zip_first")
         (assert))))))
    ("2"
     (lemma "coinduction[T2]")
     (inst -
      "LAMBDA (cseq1, cseq2: csequence[T2]): EXISTS (cseq: csequence[T1]): cseq1 = unzip(zip(cseq, cseq2))`2 AND length_eq(cseq, cseq2)"
      "unzip(zip(cseq1!1, cseq2!1))`2" "cseq2!1")
     (("1" (assert) (inst + "cseq1!1"))
      ("2"
       (delete -1 2)
       (expand "bisimulation?")
       (skosimp*)
       (replace -1)
       (hide -1)
       (smash)
       (("1"
         (rewrite "unzip_empty_right")
         (rewrite "zip_empty")
         (use "length_eq_empty")
         (assert))
        ("2" (use "unzip_empty_right") (assert) (rewrite "zip_empty"))
        ("3"
         (use "unzip_empty_right")
         (assert)
         (rewrite "zip_empty")
         (ground)
         (inst + "rest(cseq!1)")
         (use "length_eq_rest")
         (assert)
         (rewrite "unzip_rest_right")
         (rewrite "zip_rest"))
        ("4"
         (use "unzip_empty_right")
         (assert)
         (rewrite "zip_empty")
         (ground)
         (rewrite "unzip_first_right")
         (rewrite "zip_first")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma
    "measure_induction[{seqs : [csequence, csequence] | is_finite(seqs`1 o seqs`2)}, nat, LAMBDA (cseqs: {seqs : [csequence, csequence] | is_finite(seqs`1 o seqs`2)}): length(cseqs`1 o cseqs`2), restrict[[real, real], [nat, nat], bool](<)]")
   (("1"
     (inst -
      "LAMBDA (cseqs: [csequence, csequence] | is_finite(cseqs`1 o cseqs`2)): is_finite(cseqs`1) AND is_finite(cseqs`2)")
     (split)
     (("1" (inst - "(cseq1!1, cseq2!1)"))
      ("2"
       (delete -1 2)
       (skosimp :preds? t)
       (expand* "o" "concatenate_struct" "restrict")
       (expand "coreduce" -1)
       (expand "is_finite" -1)
       (hide 1)
       (smash)
       (("1" (reveal 1) (expand "is_finite" +) (propax))
        ("2" (reveal 1) (expand "is_finite" +) (propax))
        ("3"
         (reveal 1)
         (inst - "(x!1`1, rest(x!1`2))")
         (("1"
           (expand "is_finite" 1 2)
           (expand "coreduce" -3 2)
           (expand "length" -3 2)
           (propax))
          ("2" (expand* "o" "concatenate_struct"))))
        ("4"
         (reveal 1)
         (inst - "(rest(x!1`1), x!1`2)")
         (("1"
           (expand "is_finite" 1 1)
           (expand "coreduce" -2 2)
           (expand "length" -2 2)
           (propax))
          ("2" (expand* "o" "concatenate_struct"))))))))
    ("2" (hide-all-but 1) (lemma "wf_nat") (grind))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "coinduction")
   (inst - "LAMBDA cseq1, cseq2: cseq1 = eseq!1 o cseq2"
    "eseq!1 o cseq!1" "cseq!1")
   (hide 2)
   (expand* "bisimulation?" "o" "concatenate_struct")
   (skosimp)
   (expand "coreduce" -)
   (reduce-with-ext))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "coinduction")
   (inst - "LAMBDA cseq1, cseq2: cseq1 = cseq2 o eseq!1"
    "cseq!1 o eseq!1" "cseq!1")
   (hide 2)
   (expand* "bisimulation?" "o" "concatenate_struct")
   (skosimp)
   (expand "coreduce" -)
   (reduce-with-ext))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lift-if)
   (ground)
   (("1" (rewrite "o_empty_left"))
    ("2"
     (expand* "o" "concatenate_struct")
     (expand "coreduce" 2 1)
     (propax))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fseq1) + length(fseq2)" ("fseq1" "fseq2")
    :skolem-typepreds? t)
   (expand* "o" "concatenate_struct")
   (expand "coreduce" +)
   (smash)
   (("1" (rewrite "length_empty?_rew"))
    ("2"
     (expand "length" 2 1)
     (expand "is_finite" -2)
     (inst - "x!1" "rest(x!2)")
     (expand "length" -3 4)
     (expand "length" 2 3)
     (propax))
    ("3"
     (expand "is_finite" -1)
     (inst - "rest(x!1)" "x!2")
     (expand "length" -3 3)
     (expand "length" 2 2)
     (expand "length" 2 1)
     (propax))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "index?_prop")
   (use "o_finiteness")
   (use "o_length")
   (lemma "o_finite")
   (reduce))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "n" ("cseq1" "cseq2" "n") :skolem-typepreds? t)
   (("1"
     (expand "nth" +)
     (lift-if)
     (prop)
     (("1"
       (replace -1)
       (use "index?_0")
       (assert)
       (forward-chain "o_first")
       (lift-if)
       (rewrite "length_empty?_rew")
       (ground))
      ("2"
       (case "empty?(x!1)")
       (("1"
         (rewrite "o_empty_left")
         (rewrite "length_empty?_rew")
         (ground))
        ("2"
         (assert)
         (rewrite "o_rest")
         (("1"
           (inst - "rest(x!1)" "x!2" "x!3 - 1")
           (assert)
           (expand "nth" -2 2)
           (expand "is_finite" +)
           (expand "length" +)
           (lift-if)
           (ground))
          ("2" (rewrite "index?_0") (use "index?_lt") (assert))))))))
    ("2" (forward-chain "o_nth_TCC2")) ("3" (forward-chain "o_nth_TCC1"))
    ("4" (forward-chain "o_nth_TCC2")) ("5" (forward-chain "o_nth_TCC1"))
    ("6" (forward-chain "o_nth_TCC2")) ("7" (forward-chain "o_nth_TCC1"))
    ("8" (forward-chain "o_nth_TCC2"))
    ("9" (forward-chain "o_nth_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "length_nonempty?_rew")
   (assert)
   (forward-chain "o_finiteness")
   (expand "last")
   (rewrite "o_length")
   (rewrite "o_nth")
   (rewrite "length_empty?_rew")
   (reduce))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "coinduction")
   (inst -
    "LAMBDA cseq1, cseq2: is_infinite(cseq2) AND (EXISTS cseq: cseq1 = cseq2 o cseq)"
    "iseq!1 o cseq!1" "iseq!1")
   (("1" (assert) (inst + "cseq!1"))
    ("2"
     (delete 2)
     (expand "bisimulation?")
     (skosimp*)
     (replace -1)
     (hide -1)
     (expand "is_finite" 1)
     (use "o_nonempty_left")
     (smash)
     (("1" (inst + "cseq!2") (rewrite "o_rest"))
      ("2" (rewrite "o_first"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "coinduction")
   (inst -
    "LAMBDA cseq1, cseq2: EXISTS (s1, s2, s3: csequence): cseq1 = s1 o (s2 o s3) AND cseq2 = (s1 o s2) o s3"
    "cseq!1 o (cseq1!1 o cseq2!1)" "(cseq!1 o cseq1!1) o cseq2!1")
   (("1" (assert) (inst + "cseq!1" "cseq1!1" "cseq2!1"))
    ("2"
     (delete 2)
     (expand "bisimulation?")
     (skosimp*)
     (smash)
     (("1"
       (lemma "o_empty")
       (inst-cp - "s1!1" "s2!1 o s3!1")
       (inst - "s2!1" "s3!1")
       (ground))
      ("2"
       (lemma "o_empty")
       (inst-cp - "s1!1 o s2!1" "s3!1")
       (inst - "s1!1" "s2!1")
       (ground))
      ("3"
       (replace*)
       (hide -1 -2)
       (lemma "o_empty")
       (inst-cp - "s1!1 o s2!1" "s3!1")
       (inst-cp - "s1!1" "s2!1 o s3!1")
       (inst-cp - "s1!1" "s2!1")
       (inst - "s2!1" "s3!1")
       (auto-rewrite "o_rest")
       (auto-rewrite "o_empty_left")
       (smash)
       (("1" (inst + "rest(s1!1)" "s2!1" "s3!1") (assert))
        ("2" (inst + "s1!1" "s2!1" "rest(s3!1)") (assert))
        ("3" (inst + "rest(s1!1)" "s2!1" "s3!1"))
        ("4"
         (inst + "IF empty?(s1!1) THEN s1!1 ELSE rest(s1!1) ENDIF"
          "IF empty?(s1!1) THEN rest(s2!1) ELSE s2!1 ENDIF" "s3!1")
         (("1" (reduce)) ("2" (ground))))))
      ("4"
       (replace*)
       (hide-all-but 1)
       (expand* "o" "concatenate_struct" "coreduce")
       (reduce))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (case "empty?(cseq!1)")
     (("1" (rewrite "o_empty_left") (rewrite "o_empty_left"))
      ("2"
       (ground)
       (inst - "cseq1!1" "cseq2!1")
       (assert)
       (lemma "o_rest")
       (inst-cp - "cseq!1" "cseq2!1")
       (inst - "cseq!1" "cseq1!1")
       (use "o_nonempty")
       (ground))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case "is_finite(cseq1!1) AND is_finite(cseq2!1)")
   (("1"
     (ground)
     (lemma "is_finite_induction")
     (inst -
      "LAMBDA cseq1: FORALL fseq, cseq2: is_infinite(cseq2) OR cseq1 o fseq /= cseq2 o fseq OR cseq1 = cseq2")
     (split)
     (("1"
       (inst - "cseq1!1")
       (assert)
       (inst - "fseq!1" "cseq2!1")
       (assert))
      ("2"
       (delete -1 -2 -3 2)
       (skosimp*)
       (case "empty?(cseq!1) OR empty?(cseq2!2)")
       (("1"
         (ground)
         (("1"
           (rewrite "o_empty_left")
           (use "o_length")
           (lemma "length_empty?_rew" ("cseq" "cseq2!2"))
           (assert))
          ("2"
           (rewrite "o_empty_left")
           (use "o_length")
           (lemma "length_empty?_rew" ("cseq" "cseq2!2"))
           (assert))
          ("3"
           (rewrite "o_empty_left" :subst ("eseq" "cseq2!2"))
           (use "o_length")
           (("1"
             (lemma "length_empty?_rew" ("cseq" "cseq!1"))
             (expand "is_finite" -1)
             (assert))
            ("2" (expand "is_finite" +) (propax))))))
        ("2"
         (ground)
         (inst - "fseq!2" "rest(cseq2!2)")
         (expand "is_finite" -3)
         (ground)
         (("1"
           (lemma "o_rest")
           (inst-cp - "cseq2!2" "fseq!2")
           (inst - "cseq!1" "fseq!2")
           (rewrite "o_nonempty")
           (rewrite "o_nonempty")
           (assert))
          ("2"
           (lemma "csequence_add_extensionality")
           (inst - "cseq!1" "cseq2!2")
           (assert)
           (lemma "o_first")
           (inst-cp - "cseq2!2" "fseq!2")
           (inst - "cseq!1" "fseq!2")
           (rewrite "o_nonempty")
           (rewrite "o_nonempty")
           (assert))))))))
    ("2"
     (split)
     (("1"
       (rewrite "o_infinite")
       (rewrite "o_infinite")
       (use "o_finite")
       (assert))
      ("2"
       (rewrite "o_infinite" :subst ("iseq" "cseq2!1"))
       (rewrite "o_infinite")
       (use "o_finite")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (auto-rewrite "o_empty")
   (ground)
   (("1" (rewrite "o_infinite"))
    ("2"
     (lemma "some_induction")
     (inst - "p!1"
      "LAMBDA cseq: FORALL cseq1, cseq2: cseq = cseq1 o cseq2 IMPLIES some(p!1)(cseq1) OR some(p!1)(cseq2)")
     (split)
     (("1"
       (inst - "cseq1!1 o cseq2!1")
       (assert)
       (inst - "cseq1!1" "cseq2!1")
       (assert))
      ("2"
       (delete -1 2 3)
       (skosimp*)
       (lift-if)
       (replace -2)
       (hide -2)
       (prop)
       (("1" (rewrite "o_first") (expand "some") (lift-if) (ground))
        ("2"
         (use "o_rest")
         (expand "some" 2)
         (lift-if)
         (ground)
         (("1" (rewrite "o_empty_left") (expand "some" +) (propax))
          ("2" (inst - "rest(cseq1!2)" "cseq2!2") (assert))))))))
    ("3"
     (lemma "some_weak_induction")
     (inst - "p!1" "LAMBDA cseq: some(p!1)(cseq o cseq2!1)")
     (split)
     (("1" (inst - "cseq1!1") (assert))
      ("2"
       (delete -1 2)
       (skosimp)
       (expand "some" +)
       (reduce)
       (("1" (rewrite "o_first" 2) (use "o_empty") (assert))
        ("2" (rewrite "o_rest") (use "o_empty") (assert))))))
    ("4"
     (case "empty?(cseq1!1)")
     (("1" (rewrite "o_empty_left"))
      ("2"
       (generalize-skolem-constants)
       (induct "cseq1_1" :name "is_finite_induction")
       (("1" (assert))
        ("2"
         (skosimp*)
         (prop)
         (expand "some" +)
         (reduce)
         (("1"
           (rewrite "o_rest" 3)
           (("1" (rewrite "o_empty_left" 3))
            ("2" (use "o_empty") (assert))))
          ("2" (rewrite "o_rest") (use "o_empty") (assert))))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "every_some_rew")
   (inst-cp - "p!1" "cseq2!1")
   (inst-cp - "p!1" "cseq1!1")
   (inst - "p!1" "cseq1!1 o cseq2!1")
   (use "o_some")
   (ground))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fseq1) + length(fseq2)" ("fseq1" "fseq2")
    :skolem-typepreds? t)
   (expand* "o" "concatenate_struct")
   (expand "coreduce" +)
   (expand "is_finite" +)
   (smash)
   (("1"
     (expand "is_finite" -2)
     (inst - "x!1" "rest(x!2)")
     (expand "length" -3 4)
     (propax))
    ("2"
     (expand "is_finite" -1)
     (inst - "rest(x!1)" "x!2")
     (expand "length" -3 3)
     (propax))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (assert)
   (rewrite "o_index")
   (use "index?_infinite")
   (rewrite "index?_finite")
   (assert))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_concatenate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (forward-chain "o_finiteness")
   (assert)
   (expand* "o" "concatenate_struct" "coreduce"))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (prop)
   (("1"
     (use "suffix?_induction")
     (split)
     (("1" (inst - "cseq!1") (assert))
      ("2" (delete -1 2) (skosimp) (expand "is_finite" +) (ground))))
    ("2"
     (lemma "is_finite_induction")
     (inst - "LAMBDA cseq: suffix?(eseq!1, cseq)")
     (split)
     (("1" (inst - "cseq!1") (assert))
      ("2" (skosimp) (expand "suffix?" +) (ground))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "suffix?_induction")
   (inst - "nseq!1" "LAMBDA cseq: suffix?(rest(nseq!1), cseq)")
   (split)
   (("1" (inst - "cseq!1") (assert))
    ("2"
     (delete -1 2)
     (skosimp)
     (expand "suffix?" +)
     (ground)
     (expand "suffix?")
     (propax))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (expand "suffix?" -3)
     (ground)
     (("1" (expand "is_finite" +) (rewrite "suffix?_empty"))
      ("2"
       (forward-chain "suffix?_rest_right")
       (forward-chain "suffix?_rest_left")
       (inst - "cseq!2")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (expand "suffix?" -3)
     (expand "is_finite" +)
     (ground)
     (inst - "cseq!2")
     (expand "is_finite" -3)
     (propax))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq2" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (expand "length" +)
     (expand "suffix?" -3)
     (lift-if)
     (lift-if)
     (lift-if)
     (ground)
     (inst - "fseq1!1")
     (expand "length" -3 1)
     (propax))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq2" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (expand "suffix?" -3)
     (expand "length" -4)
     (lift-if)
     (lift-if)
     (lift-if)
     (ground)
     (inst - "rest(fseq1!1)")
     (forward-chain "suffix?_rest_left")
     (assert)
     (lemma "suffix?_length")
     (inst - "fseq1!1" "rest(fseq1!1)")
     (assert)
     (expand "length" -1 1)
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skosimp) (expand* "index?" "suffix?") (assert))
    ("2"
     (skosimp*)
     (expand "index?" (-3 +))
     (expand "suffix?" -2)
     (ground)
     (forward-chain "suffix?_rest_left")
     (inst - "rest(cseq1!1)" "rest(cseq2!1)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "o_empty_left")
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (expand "suffix?" +)
     (ground)
     (("1" (use "o_empty") (ground))
      ("2"
       (inst - "cseq!2")
       (use "o_nonempty_left")
       (rewrite "o_rest")
       (lift-if)
       (ground))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (lemma "suffix?_induction")
     (inst - "cseq1!1" "LAMBDA cseq: EXISTS fseq: fseq o cseq1!1 = cseq")
     (split)
     (("1" (inst - "cseq2!1") (assert))
      ("2"
       (delete -1 2)
       (skosimp)
       (prop)
       (("1" (inst + "empty_cseq") (rewrite "o_empty_left"))
        ("2"
         (skolem!)
         (inst + "add(first(cseq2!2), fseq!1)")
         (("1" (rewrite "o_add") (decompose-equality +))
          ("2" (expand "is_finite") (propax))))))))
    ("2" (skolem!) (use "suffix?_concatenate") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "suffix?_is_preorder")
   (use "preorder_restrict[csequence, finite_csequence]")
   (expand "partial_order?")
   (hide -1 -2)
   (expand* "restrict" "antisymmetric?")
   (skosimp)
   (lemma "suffix?_length")
   (inst-cp - "y!1" "x!1")
   (inst - "x!1" "y!1")
   (use "suffix?_length_eq")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "suffix?_induction")
   (inst - "cseq1!1"
    "LAMBDA cseq: FORALL cseq2: suffix?(cseq2, cseq) IMPLIES suffix?(cseq1!1, cseq2) OR suffix?(cseq2, cseq1!1)")
   (split)
   (("1" (inst - "cseq!1") (assert) (inst - "cseq2!1") (assert))
    ("2"
     (delete -1 -2 2 3)
     (skosimp*)
     (ground)
     (expand "suffix?" (-4 1))
     (inst - "cseq2!3")
     (ground))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "n" ("cseq" "n") :skolem-typepreds? t)
   (("1"
     (expand "index?")
     (expand "suffix" +)
     (lift-if)
     (lift-if)
     (lift-if)
     (expand "suffix" 1 1)
     (ground)
     (inst - "rest(x!1)" "x!2 - 1")
     (assert))
    ("2" (use "suffix_rest2_TCC1")) ("3" (use "suffix_rest2_TCC1"))
    ("4" (use "suffix_rest2_TCC1")) ("5" (use "suffix_rest2_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand "suffix") (propax))
    ("2"
     (skosimp*)
     (expand "suffix" +)
     (smash)
     (("1" (inst - "rest(cseq!1)" "m!1") (expand "suffix" -1 1) (propax))
      ("2"
       (inst - "rest(cseq!1)" "m!1")
       (expand "suffix" -1 1)
       (propax))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skolem!) (expand* "max" "suffix") (lift-if) (ground))
    ("2"
     (skosimp* t)
     (expand "suffix" +)
     (lift-if)
     (ground)
     (("1" (expand* "length" "max"))
      ("2"
       (expand "is_finite")
       (expand "length" 2 2)
       (inst - "rest(fseq!1)"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "n" ("nseq" "n") :skolem-typepreds? t)
   (("1"
     (expand "index?")
     (expand "suffix" +)
     (expand "nth" +)
     (lift-if)
     (ground)
     (inst - "rest(x!1)" "x!2 - 1")
     (("1" (assert)) ("2" (expand "index?") (flatten))))
    ("2" (use "suffix_first_TCC1")) ("3" (use "suffix_first_TCC1"))
    ("4" (use "suffix_first_TCC1")) ("5" (use "suffix_first_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "index?_prop")
   (rewrite "index?_prop")
   (prop)
   (("1" (rewrite "suffix_length") (expand "max") (lift-if) (assert))
    ("2" (use "suffix_is_finite" ("fseq" "cseq!1")))
    ("3" (rewrite "suffix_length") (expand "max") (assert))
    ("4" (use "suffix_is_infinite"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand "suffix") (propax))
    ("2"
     (skosimp* t)
     (expand "nth" +)
     (expand "suffix" (-1 +))
     (expand "index?")
     (lift-if)
     (ground)
     (("1"
       (use "suffix_first")
       (("1" (assert)) ("2" (expand "suffix" -3) (assert))))
      ("2"
       (use "suffix_first")
       (("1" (assert)) ("2" (expand "suffix" -3) (assert))))
      ("3"
       (inst - "rest(cseq!1)" "m!1")
       (("1" (expand "nth" -4 1) (propax))
        ("2" (expand "index?" +) (propax))))))
    ("3" (skolem!) (use "suffix_nth_TCC1" ("n" "n!2")) (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand* "index?" "suffix") (reduce))
    ("2" (skosimp*) (expand "index?" +) (expand "suffix" +) (reduce))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "o_empty_left")
   (auto-rewrite "o_empty_right")
   (auto-rewrite "o_rest")
   (induct "n")
   (("1"
     (skolem!)
     (expand "suffix" 1 1)
     (expand "index?")
     (expand "suffix" 1 1)
     (lift-if)
     (ground)
     (expand* "length" "suffix"))
    ("2"
     (skosimp*)
     (expand "suffix" +)
     (expand "index?" +)
     (expand "length" +)
     (smash)
     (("1" (use "o_nonempty_left") (assert))
      ("2" (use "o_nonempty_left") (assert))
      ("3" (use "o_nonempty_left") (assert))
      ("4" (inst - "rest(cseq1!1)" "cseq2!1") (assert))
      ("5"
       (inst - "rest(cseq1!1)" "cseq2!1")
       (assert)
       (expand "suffix" -1 2)
       (propax))
      ("6"
       (inst - "rest(cseq1!1)" "cseq2!1")
       (assert)
       (expand "suffix" -1 2)
       (propax))
      ("7"
       (rewrite "index?_prop")
       (ground)
       (inst - "rest(cseq1!1)" "cseq2!1")
       (assert)
       (expand "suffix" -1 2)
       (propax))))
    ("3" (skosimp) (use "suffix_concatenate_TCC2") (assert))
    ("4" (skosimp) (use "suffix_concatenate_TCC1") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (rewrite "suffix?_def")
     (skolem!)
     (inst + "length(fseq!1)")
     (replace -1 :dir rl)
     (rewrite "suffix_concatenate")
     (rewrite "index?_finite")
     (expand "suffix")
     (propax))
    ("2" (skolem!) (expand* "suffix?" "suffix") (lift-if) (ground))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "nth_some")
   (ground)
   (("1"
     (skolem-typepred)
     (rewrite "suffix_index")
     (inst + "i!1 + n!1")
     (assert)
     (rewrite "suffix_nth"))
    ("2"
     (skosimp :preds? t)
     (inst + "i!1 - n!1")
     (("1" (rewrite "suffix_nth"))
      ("2" (assert) (rewrite "suffix_index"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "nth_every")
   (ground)
   (("1"
     (skosimp :preds? t)
     (inst - "i!1 - n!1")
     (("1" (rewrite "suffix_nth"))
      ("2" (assert) (rewrite "suffix_index"))))
    ("2"
     (skolem-typepred)
     (rewrite "suffix_index")
     (inst - "i!1 + n!1")
     (assert)
     (rewrite "suffix_nth"))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand* "preorder?" "reflexive?" "transitive?")
   (expand "suffix?" 1 1)
   (skosimp)
   (lemma "suffix?_induction")
   (inst - "x!1"
    "LAMBDA cseq: FORALL cseq2: suffix?(x!1, cseq2) OR NOT suffix?(cseq, cseq2)")
   (split)
   (("1" (inst - "y!1") (assert) (inst - "z!1") (assert))
    ("2"
     (delete -1 -2 2)
     (skosimp*)
     (prop)
     (("1" (expand "suffix?") (ground))
      ("2"
       (use "suffix?_rest_left" ("cseq" "cseq2!2"))
       (assert)
       (expand "suffix?" (-1 +))
       (flatten)
       (inst - "rest(cseq2!2)")
       (assert))))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand "suffix") (propax))
    ("2"
     (skosimp* t)
     (expand "is_finite" -1)
     (expand "suffix" +)
     (ground)
     (inst - "rest(fseq!1)"))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand "suffix") (propax))
    ("2"
     (skosimp* t)
     (expand "suffix" -3)
     (expand "is_finite" +)
     (ground)
     (inst - "rest(iseq!1)"))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "n" ("cseq" "n") :skolem-typepreds? t)
   (expand "index?")
   (expand "suffix" +)
   (lift-if)
   (ground)
   (inst - "rest(x!1)" "x!2 - 1")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_add
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand "last")
   (expand "length" 1 1)
   (expand "nth" 1 1)
   (use "length_empty?_rew")
   (lift-if)
   (lift-if)
   (ground))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_extract
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "range`2" ("range"))
   (skolem!)
   (expand "^" +)
   (expand "is_finite" +)
   (expand "index?" +)
   (reduce))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_extract
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "range`2" ("range"))
   (skolem!)
   (smash)
   (("1" (use "length_empty?_rew") (expand "^") (flatten))
    ("2"
     (use "extract_empty")
     (assert)
     (rewrite "index?_prop")
     (assert)
     (rewrite "length_empty?_rew"))
    ("3"
     (expand "^" +)
     (expand "length" 3 1)
     (expand "length" 3 2)
     (expand "length" 3 3)
     (expand "length" (-3 2))
     (expand "is_finite" -2)
     (lift-if)
     (ground)
     (("1"
       (inst - "(x!1`1 - 1, x!1`2 - 1)")
       (inst - "rest(cseq!1)")
       (assert))
      ("2"
       (inst - "(x!1`1, x!1`2 - 1)")
       (inst - "rest(cseq!1)")
       (assert)
       (lift-if)
       (assert))))
    ("4"
     (expand "^" +)
     (expand "length" 4 1)
     (expand "length" 4 2)
     (expand "length" 4 2)
     (expand "length" (2 3))
     (lift-if)
     (ground)
     (("1"
       (inst - "(x!1`1 - 1, x!1`2 - 1)")
       (inst - "rest(cseq!1)")
       (assert))
      ("2"
       (inst - "(x!1`1, x!1`2 - 1)")
       (inst - "rest(cseq!1)")
       (assert))))
    ("5"
     (expand "^" +)
     (expand "length" 3 1)
     (expand "length" 3 2)
     (expand "length" 3 2)
     (expand "is_finite" +)
     (lift-if)
     (ground)
     (("1"
       (inst - "(x!1`1 - 1, x!1`2 - 1)")
       (inst - "rest(cseq!1)")
       (assert))
      ("2"
       (inst - "(x!1`1, x!1`2 - 1)")
       (inst - "rest(cseq!1)")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_extract
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "nfseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert)) ("3" (assert))
    ("4"
     (skosimp*)
     (expand "^" +)
     (expand "length" -4)
     (use "length_empty?_rew")
     (lift-if)
     (ground)
     (("1"
       (decompose-equality)
       (lemma "length_empty?_rew" ("cseq" "rest(cseq!1)"))
       (assert))
      ("2" (decompose-equality 2) (inst - "n!1 - 1") (assert))
      ("3" (decompose-equality))
      ("4" (decompose-equality 2) (expand "^") (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_extract
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "extract_rest_TCC1")
   (use "extract_def" ("n" "length(nfseq!1) - 1"))
   (assert)
   (expand "^")
   (lift-if)
   (ground)
   (("1" (decompose-equality -)) ("2" (decompose-equality -))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_extract
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand "^") (reduce))
    ("2"
     (skosimp*)
     (expand "^" (-2 +))
     (smash)
     (("1"
       (inst - "rest(cseq!1)" "m!1 - 1")
       (assert)
       (replace -1)
       (expand "^" +)
       (propax))
      ("2" (inst - "rest(cseq!1)" "m!1 - 1") (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_extract
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "range`2" ("range"))
   (skolem!)
   (expand "^" 1 1)
   (lift-if)
   (ground)
   (("1" (expand "^") (propax)) ("2" (expand "^") (propax))
    ("3"
     (inst - "(x!1`1 - 1, x!1`2 - 1)")
     (inst - "rest(cseq!1)" "range2!1")
     (assert)
     (replace -2)
     (hide -2)
     (expand "^" 1 2)
     (expand* "^" "min")
     (reduce))
    ("4" (hide -2) (expand "^" 1 2) (expand* "^" "^" "min") (reduce))
    ("5"
     (expand "^" 2 2)
     (lift-if)
     (ground)
     (("1" (expand* "^" "min"))
      ("2"
       (inst - "(x!1`1, x!1`2 - 1)")
       (inst - "rest(cseq!1)" "(range2!1`1 - 1, range2!1`2 - 1)")
       (assert)
       (replace -2)
       (hide -2)
       (expand "^" 1 2)
       (expand* "^" "min")
       (reduce))
      ("3" (expand* "^" "min"))
      ("4"
       (inst - "(x!1`1, x!1`2 - 1)")
       (inst - "rest(cseq!1)" "(range2!1`1, range2!1`2 - 1)")
       (assert)
       (replace -1)
       (hide -1)
       (expand "^" 2 2)
       (expand "min")
       (reduce))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_extract
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "index?_prop")
   (rewrite "index?_prop")
   (use "extract_length")
   (lift-if)
   (ground))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_extract
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "m")
   (("1" (skosimp) (expand* "^" "nth") (lift-if) (ground))
    ("2"
     (skosimp*)
     (expand "^" (-2 +))
     (expand "nth" +)
     (lift-if)
     (ground)
     (inst - "rest(cseq!1)" "n!1 - 1")
     (assert))
    ("3" (skosimp*) (forward-chain "extract_first_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_extract
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "m + n" ("cseq" "m" "n"))
   (("1"
     (skolem-typepred)
     (rewrite "extract_index")
     (flatten)
     (expand "^" +)
     (expand "nth" +)
     (smash)
     (("1" (expand "index?") (propax))
      ("2"
       (inst - "rest(x!1)" "x!2 - 1" "x!3 - 1")
       (("1"
         (inst - 0)
         (("1" (expand "nth" -3 1) (propax))
          ("2" (rewrite "extract_index") (expand "index?" -) (assert))))
        ("2" (expand "index?" -) (assert))))
      ("3" (expand "index?") (propax))
      ("4"
       (rewrite "extract_rest2")
       (("1"
         (inst - "rest(x!1)" "x!2" "x!3 - 1")
         (("1" (inst - "i!1 - 1") (assert))
          ("2"
           (expand "index?" -)
           (use "index?_lt" ("cseq" "rest(x!1)" "i" "i!1 - 1 + x!2"))
           (assert))))
        ("2"
         (rewrite "index?_0")
         (rewrite "extract_index")
         (expand "index?" -)
         (lemma "index?_lt"
          ("cseq" "rest(x!1)" "i" "i!1 - 1 + x!2" "n" "x!2 - 1"))
         (assert))))
      ("5"
       (inst - "rest(x!1)" "x!2" "x!3 - 1")
       (("1" (inst - "i!1 - 1") (assert))
        ("2"
         (expand "index?" -)
         (use "index?_lt" ("cseq" "rest(x!1)" "i" "i!1 - 1 + x!2"))
         (assert))))))
    ("2" (use "extract_nth_TCC1") (assert))
    ("3" (skolem!) (use "extract_nth_TCC1") (assert))
    ("4" (skolem!) (use "extract_nth_TCC1") (assert))
    ("5" (use "extract_nth_TCC1") (assert))
    ("6" (skolem!) (use "extract_nth_TCC1") (assert))
    ("7" (use "extract_nth_TCC1") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_extract
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skosimp)
     (expand* "^" "last" "index?")
     (expand "length" 1 1)
     (expand "length" 1 1)
     (expand "length" 1 1)
     (expand "nth" 1 2)
     (expand "nth" 1 2)
     (reduce))
    ("2"
     (skosimp*)
     (expand "^" (-2 +))
     (lift-if)
     (lift-if)
     (lift-if)
     (lift-if)
     (ground)
     (("1"
       (inst - "rest(cseq!1)" "m!1 - 1")
       (expand "index?" -1)
       (expand "nth" +)
       (assert))
      ("2"
       (inst - "rest(cseq!1)" "m!1 - 1")
       (expand "index?" +)
       (use "last_rest")
       (assert)
       (expand "^" -4)
       (assert))
      ("3"
       (expand "index?" -1)
       (use "add_last")
       (lift-if)
       (prop)
       (("1"
         (rewrite "extract_empty")
         (flatten)
         (lemma "index?_lt")
         (inst - "rest(cseq!1)" "j!1" "m!1")
         (assert))
        ("2" (inst - "rest(cseq!1)" "m!1") (expand "nth" +) (assert))))
      ("4"
       (expand "index?" +)
       (use "add_last")
       (lift-if)
       (prop)
       (("1"
         (rewrite "extract_empty")
         (flatten)
         (expand "index?" 1)
         (rewrite "length_nonempty?_rew")
         (flatten)
         (assert)
         (replace -3)
         (hide -3)
         (expand "last" +)
         (expand "length" 3)
         (expand "nth")
         (propax))
        ("2"
         (replace -1)
         (hide -1)
         (inst - "rest(cseq!1)" "m!1")
         (assert)
         (use "last_rest")
         (expand "^" 1)
         (assert))))))
    ("3" (skosimp) (forward-chain "extract_last_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_extract
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (use "nth_extensionality")
   (assert)
   (case "index?(cseq1!1) = index?(cseq2!1)")
   (("1"
     (assert)
     (skolem-typepred)
     (assert)
     (inst - "(0, n!1)")
     (lemma "extract_index")
     (inst - "cseq1!1" 0 "n!1" "n!1")
     (assert)
     (lemma "extract_nth")
     (inst-cp - "cseq2!1" 0 "n!1" "n!1")
     (("1"
       (inst - "cseq1!1" 0 "n!1" "n!1")
       (("1" (assert)) ("2" (use "index?_lt") (assert))))
      ("2" (use "index?_lt") (assert))))
    ("2"
     (hide 2)
     (decompose-equality)
     (iff)
     (inst - "(0, x!1)")
     (lemma "extract_index")
     (inst-cp - "cseq2!1" 0 "x!1" "x!1")
     (inst - "cseq1!1" 0 "x!1" "x!1")
     (ground))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_extract
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "nth_some")
   (prop)
   (("1"
     (skolem-typepred)
     (rewrite "extract_index")
     (flatten)
     (inst + "i!1 + m!1")
     (assert)
     (rewrite "extract_nth")
     (use "index?_lt")
     (assert))
    ("2"
     (skosimp)
     (inst + "index!1 - m!1")
     (("1" (rewrite "extract_nth") (use "index?_lt") (assert))
      ("2" (assert) (rewrite "extract_index"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_extract
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "nth_every")
   (prop)
   (("1"
     (skosimp)
     (inst - "index!1 - m!1")
     (("1" (rewrite "extract_nth") (use "index?_lt") (assert))
      ("2" (assert) (rewrite "extract_index"))))
    ("2"
     (skolem-typepred)
     (rewrite "extract_index")
     (flatten)
     (inst - "i!1 + m!1")
     (assert)
     (rewrite "extract_nth")
     (use "index?_lt")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (expand "is_finite" +)
     (expand "prefix?" -3)
     (ground)
     (inst - "rest(cseq!2)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (lemma "coinduction")
     (inst -
      "LAMBDA cseq1, cseq2: is_infinite(cseq1) AND prefix?(cseq1, cseq2)"
      "iseq!1" "cseq!1")
     (("1" (assert))
      ("2"
       (delete -1 2)
       (expand "bisimulation?")
       (skosimp)
       (expand "is_finite" 1)
       (expand "prefix?" -)
       (ground))))
    ("2"
     (lemma "prefix?_coinduction")
     (inst - "LAMBDA cseq1, cseq2: cseq1 = cseq2")
     (split)
     (("1" (inst - "iseq!1" "cseq!1") (assert))
      ("2" (skosimp) (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq2" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (expand "prefix?" -3)
     (expand "length" +)
     (lift-if)
     (lift-if)
     (lift-if)
     (ground)
     (inst - "rest(fseq1!1)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq2" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (expand "prefix?" -3)
     (expand "length" -4)
     (lift-if)
     (lift-if)
     (lift-if)
     (ground)
     (inst - "rest(fseq1!1)")
     (assert)
     (forward-chain "csequence_add_extensionality"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "index?_prop")
   (rewrite "index?_prop")
   (use "prefix?_finite")
   (ground)
   (forward-chain "prefix?_length")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "n" ("cseq1" "cseq2" "n") :skolem-typepreds? t)
   (("1"
     (expand "prefix?" -3)
     (expand "nth" +)
     (lift-if)
     (expand "index?")
     (ground)
     (inst - "rest(x!1)" "rest(x!2)" "x!3 - 1")
     (assert))
    ("2" (forward-chain "prefix?_index"))
    ("3" (typepred "x!1`3") (forward-chain "prefix?_index"))
    ("4" (typepred "y!1`3") (forward-chain "prefix?_index"))
    ("5" (forward-chain "prefix?_index"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "prefix?_coinduction")
   (inst - "LAMBDA cseq1, cseq2: EXISTS cseq: cseq2 = cseq1 o cseq")
   (split)
   (("1"
     (skolem!)
     (inst - "cseq1!1" "cseq1!1 o cseq2!1")
     (assert)
     (inst + "cseq2!1"))
    ("2"
     (delete 2)
     (skosimp*)
     (replace -1)
     (hide -1)
     (use "o_empty")
     (smash)
     (("1" (inst + "cseq!1") (rewrite "o_rest"))
      ("2" (rewrite "o_first"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (case "is_finite(cseq1!1)")
     (("1"
       (generalize-skolem-constants)
       (induct "cseq1_1" :name "is_finite_induction")
       (("1" (assert))
        ("2"
         (skosimp*)
         (expand "prefix?" -3)
         (smash)
         (("1" (inst + "cseq2!2") (rewrite "o_empty_left"))
          ("2"
           (inst - "rest(cseq2!2)")
           (assert)
           (skolem!)
           (forward-chain "o_first_rest")
           (inst + "cseq!2"))))))
      ("2"
       (rewrite "prefix?_infinite")
       (inst + "empty_cseq")
       (rewrite "o_empty_right"))))
    ("2" (skolem!) (use "prefix?_concatenate") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand* "total_order?" "dichotomous?" "restrict")
   (skosimp :preds? t)
   (lemma "prefix?_coinduction")
   (inst -
    "LAMBDA cseq1, cseq2: NOT prefix?(cseq2, cseq1) AND (EXISTS cseq: prefix?(cseq1, cseq) AND prefix?(cseq2, cseq))")
   (split)
   (("1" (inst - "x!1" "y!1") (assert) (inst + "cseq!1") (assert))
    ("2"
     (delete -1 -2 2 3)
     (skosimp*)
     (use "prefix?_empty_is_prefix")
     (expand "prefix?" (- 2))
     (ground)
     (inst + "rest(cseq!2)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand* "prefix" "prefix" "^"))
    ("2"
     (skosimp*)
     (expand "prefix" +)
     (expand "^" +)
     (lift-if)
     (ground)
     (decompose-equality)
     (inst - "rest(cseq!1)"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand* "prefix" "prefix"))
    ("2" (skosimp*) (expand "prefix" +) (expand "prefix" 1 2) (propax))
    ("3" (skolem!) (use "prefix_rest_TCC1") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (expand* "min" "prefix"))
    ("2" (skosimp*) (expand "prefix" +) (expand "min") (reduce))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skolem!)
     (expand* "min" "prefix")
     (expand "length" 1 1)
     (lift-if)
     (ground))
    ("2"
     (skosimp*)
     (expand "prefix" +)
     (expand "length" +)
     (expand "is_finite" +)
     (expand "min")
     (reduce))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "m")
   (("1" (skolem!) (expand* "index?" "prefix") (ground))
    ("2" (skosimp*) (expand "prefix" +) (expand "index?" +) (reduce))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skosimp) (expand* "prefix" "index?") (assert))
    ("2"
     (skosimp*)
     (expand "index?" +)
     (expand "prefix" +)
     (reduce-with-ext))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skolem!)
     (lift-if)
     (ground)
     (("1" (expand "prefix") (propax))
      ("2"
       (expand "index?")
       (use "length_empty?_rew")
       (ground)
       (expand "prefix")
       (rewrite "o_empty_right")
       (assert))))
    ("2"
     (skosimp*)
     (expand "prefix" +)
     (expand "index?" +)
     (expand "length" +)
     (auto-rewrite "o_empty_left")
     (auto-rewrite "o_empty_right")
     (auto-rewrite "o_first")
     (auto-rewrite "o_rest")
     (smash)
     (("1" (use "o_nonempty_left") (assert))
      ("2" (use "o_nonempty_left") (assert))
      ("3" (use "o_nonempty_right") (assert))
      ("4"
       (decompose-equality)
       (inst - "rest(cseq1!1)" "cseq2!1")
       (assert))
      ("5"
       (use "index?_prop")
       (assert)
       (decompose-equality)
       (inst - "rest(cseq1!1)" "cseq2!1")
       (assert)
       (expand "prefix" -2 2)
       (assert))
      ("6"
       (decompose-equality)
       (inst - "rest(cseq1!1)" "cseq2!1")
       (assert)
       (expand "prefix" -1 2)
       (assert))
      ("7"
       (use "index?_prop")
       (ground)
       (decompose-equality 7)
       (inst - "rest(cseq1!1)" "cseq2!1")
       (assert)
       (expand "prefix" -2 2)
       (propax))))
    ("3" (skosimp) (use "prefix_concatenate_TCC2") (assert))
    ("4" (skosimp) (use "prefix_concatenate_TCC1") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "cseq1" :name "is_finite_induction")
   (("1"
     (skolem!)
     (rewrite "prefix?_infinite")
     (prop)
     (skolem!)
     (use "prefix?_infinite")
     (assert))
    ("2"
     (skosimp*)
     (expand "prefix?" +)
     (smash)
     (("1" (inst + 0) (expand "prefix") (assert))
      ("2"
       (inst - "rest(cseq2!1)")
       (ground)
       (("1" (forward-chain "csequence_add_extensionality"))
        ("2"
         (skolem!)
         (inst + "1 + n!1")
         (expand "prefix" +)
         (decompose-equality 2))))
      ("3" (inst - "rest(cseq2!1)") (assert))
      ("4"
       (skolem!)
       (inst - "rest(cseq2!1)")
       (ground)
       (expand "prefix" -)
       (lift-if)
       (ground)
       (inst + "n!1 - 1")
       (decompose-equality))
      ("5" (skolem!) (expand "prefix" -3) (reduce-with-ext))
      ("6" (expand "prefix" -3) (propax))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "nth_some")
   (prop)
   (("1"
     (skolem-typepred)
     (rewrite "prefix_index")
     (flatten)
     (inst + "i!1")
     (assert)
     (use "prefix?_nth")
     (assert))
    ("2"
     (skosimp :preds? t)
     (inst + "i!1")
     (("1"
       (lemma "prefix?_nth")
       (inst - "prefix(cseq!1, n!1)" "cseq!1" "i!1")
       (assert))
      ("2" (rewrite "prefix_index"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "nth_every")
   (prop)
   (("1"
     (skosimp :preds? t)
     (inst - "i!1")
     (("1"
       (lemma "prefix?_nth")
       (inst - "prefix(cseq!1, n!1)" "cseq!1" "i!1")
       (assert))
      ("2" (rewrite "prefix_index"))))
    ("2"
     (skolem-typepred)
     (rewrite "prefix_index")
     (flatten)
     (inst - "i!1")
     (assert)
     (use "prefix?_nth")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "m")
   (("1" (skosimp) (expand* "prefix" "prefix?") (assert))
    ("2" (skosimp*) (expand "prefix" +) (expand "prefix?" +) (reduce))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand* "partial_order?" "preorder?")
   (split)
   (("1"
     (expand "reflexive?")
     (skolem!)
     (lemma "prefix?_concatenate")
     (inst - "x!1" "empty_cseq")
     (rewrite "o_empty_right"))
    ("2"
     (expand "transitive?")
     (lemma "prefix?_coinduction")
     (inst -
      "LAMBDA cseq1, cseq2: EXISTS cseq: prefix?(cseq1, cseq) AND prefix?(cseq, cseq2)")
     (split)
     (("1"
       (skosimp)
       (inst - "x!1" "z!1")
       (assert)
       (inst + "y!1")
       (assert))
      ("2"
       (delete 2)
       (skosimp*)
       (expand "prefix?" -)
       (ground)
       (inst + "rest(cseq!1)")
       (assert))))
    ("3"
     (expand "antisymmetric?")
     (induct "x" :name "is_finite_induction")
     (("1" (skosimp) (rewrite "prefix?_infinite"))
      ("2"
       (skosimp*)
       (expand "prefix?" (-2 -3))
       (ground)
       (inst - "rest(y!1)")
       (assert)
       (decompose-equality +))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand "subsequence?")
   (ground)
   (skosimp :preds? t)
   (expand "index?")
   (propax))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "subsequence?_coinduction")
   (inst -
    "LAMBDA cseq1, cseq2: EXISTS nseq1, nseq2: cseq1 = rest(nseq1) AND cseq2 = rest(nseq2) AND subsequence?(nseq1, nseq2)")
   (split)
   (("1"
     (inst - "rest(nseq1!1)" "rest(nseq2!1)")
     (assert)
     (inst + "nseq1!1" "nseq2!1"))
    ("2"
     (delete -1 2)
     (skosimp*)
     (expand "subsequence?" -)
     (skosimp :preds? t)
     (expand "subsequence?" -)
     (assert)
     (skosimp :preds? t)
     (rewrite "suffix_nth")
     (rewrite "suffix_suffix")
     (rewrite "suffix_index")
     (expand "index?" -1)
     (assert)
     (inst + "n!1 + n!2")
     (expand "nth" -6)
     (ground)
     (replace -4)
     (rewrite "suffix_rest1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "subsequence?_coinduction")
   (inst -
    "LAMBDA cseq1, cseq2: nonempty?(cseq2) AND subsequence?(cseq1, rest(cseq2))")
   (split)
   (("1" (inst - "cseq!1" "nseq!1") (assert))
    ("2"
     (delete -1 2)
     (skosimp)
     (expand "subsequence?" -)
     (assert)
     (skosimp)
     (inst + "1 + n!1")
     (("1" (rewrite "suffix_rest1") (expand "nth" +) (assert))
      ("2" (expand "index?") (propax))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "subsequence?" +)
   (inst + 0)
   (("1" (expand* "nth" "suffix" "suffix") (assert))
    ("2" (expand "index?") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fseq)" ("fseq"))
   (skosimp)
   (expand "subsequence?" -2)
   (expand "is_finite" +)
   (prop)
   (skosimp :preds? t)
   (inst - "suffix(x!1, 1 + n!1)")
   (inst - "rest(cseq!1)")
   (rewrite "suffix_length")
   (expand "max")
   (rewrite "index?_finite")
   (lift-if)
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (induct "n")
   (("1" (assert))
    ("2"
     (flatten)
     (expand "index?")
     (expand "subsequence?" -)
     (assert)
     (skosimp)
     (inst + "n!1")
     (expand "nth" 1 1)
     (assert)
     (rewrite "suffix_1"))
    ("3"
     (skosimp)
     (assert)
     (lemma "index?_lt")
     (inst - "cseq1!1" "1 + j!1" "j!1")
     (assert)
     (skosimp)
     (expand "subsequence?" -3)
     (split)
     (("1"
       (rewrite "length_empty?_rew")
       (flatten)
       (rewrite "suffix_is_infinite")
       (rewrite "suffix_length")
       (rewrite "index?_finite" -6)
       (expand "max")
       (lift-if)
       (ground))
      ("2"
       (skosimp :preds? t)
       (rewrite "suffix_rest2")
       (rewrite "suffix_suffix")
       (rewrite "suffix_index")
       (rewrite "suffix_nth")
       (use "index?_nonempty" ("cseq" "cseq1!1"))
       (rewrite "suffix_first")
       (inst + "1 + m!1 + n!1")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp)
     (expand "subsequence?" (-3 +))
     (ground)
     (("1"
       (rewrite "o_empty_left")
       (skosimp :preds? t)
       (inst + "n!1")
       (("1" (assert))
        ("2"
         (rewrite "o_index")
         (flatten)
         (rewrite "index?_finite")
         (assert))))
      ("2"
       (skosimp :preds? t)
       (case "index?(cseq!1 o cseq2!1)(length(cseq!1) + n!1)")
       (("1"
         (inst + "length(cseq!1) + n!1")
         (rewrite "o_nth")
         (assert)
         (rewrite "suffix_concatenate")
         (lift-if)
         (ground)
         (rewrite "index?_finite"))
        ("2"
         (rewrite "o_index")
         (flatten)
         (rewrite "index?_finite")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "IF is_finite(cseq2) THEN length(cseq2) ELSE 0 ENDIF"
    ("cseq2"))
   (skosimp*)
   (rewrite "o_infinite")
   (expand "subsequence?" (-3 +))
   (ground)
   (skosimp :preds? t)
   (inst + "n!1")
   (("1"
     (rewrite "o_nth")
     (("1"
       (lift-if)
       (rewrite "index?_finite")
       (ground)
       (inst - "suffix(x!1, 1 + n!1)")
       (inst - "rest(cseq1!1)")
       (use "suffix_is_finite" ("fseq" "x!1"))
       (assert)
       (rewrite "suffix_length")
       (expand "max")
       (lift-if)
       (assert)
       (inst - "cseq!1")
       (rewrite "suffix_concatenate")
       (use "suffix_empty")
       (lift-if)
       (ground)
       (rewrite "o_empty_left")
       (rewrite "index?_finite")
       (expand "suffix")
       (assert))
      ("2" (rewrite "o_index") (rewrite "index?_finite") (assert))))
    ("2"
     (rewrite "index?_prop")
     (rewrite "index?_finite")
     (flatten)
     (forward-chain "o_finiteness")
     (rewrite "o_length")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "subsequence?_coinduction")
   (inst -
    "LAMBDA cseq1, cseq2: EXISTS cseq, n, m: n <= m AND cseq1 = prefix(cseq, n) AND cseq2 = prefix(cseq, m)")
   (split)
   (("1"
     (skosimp)
     (inst - "prefix(cseq!1, n!1)" "prefix(cseq!1, m!1)")
     (assert)
     (inst + "cseq!1" "n!1" "m!1"))
    ("2"
     (delete 2)
     (skosimp*)
     (case "n!1 = 0")
     (("1" (expand "prefix" -) (ground))
      ("2"
       (assert)
       (inst + 0)
       (("1"
         (expand "nth")
         (replace*)
         (hide -2 -3)
         (expand "prefix" 2)
         (expand "prefix" 3 2)
         (expand "prefix" 3 1)
         (lift-if)
         (ground)
         (inst + "rest(cseq!1)" "n!1 - 1" "m!1 - 1")
         (assert)
         (rewrite "prefix_rest")
         (rewrite "suffix_1")
         (("1" (rewrite "prefix_rest"))
          ("2" (expand "prefix" (1 5)) (propax))))
        ("2" (expand* "index?" "prefix") (lift-if) (ground))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "subsequence?_coinduction")
   (inst -
    "LAMBDA cseq1, cseq2: EXISTS cseq, n, m: n <= m AND cseq1 = suffix(cseq, m) AND cseq2 = suffix(cseq, n)")
   (split)
   (("1"
     (skosimp)
     (inst - "suffix(cseq!1, m!1)" "suffix(cseq!1, n!1)")
     (assert)
     (inst + "cseq!1" "n!1" "m!1"))
    ("2"
     (delete 2)
     (skosimp*)
     (inst + "m!1 - n!1")
     (("1"
       (replace*)
       (hide -2 -3)
       (prop)
       (("1"
         (rewrite "suffix_nth")
         (rewrite "suffix_first")
         (expand "suffix" 3)
         (propax))
        ("2"
         (inst + "cseq!1" "m!1 + 1" "m!1 + 1")
         (assert)
         (rewrite "suffix_suffix")
         (rewrite "suffix_rest2")
         (use "suffix_empty")
         (assert))))
      ("2"
       (assert)
       (replace*)
       (hide -2 -3)
       (rewrite "suffix_index")
       (use "suffix_empty")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fseq1) + length(fseq2)" ("fseq1" "fseq2")
    :skolem-typepreds? t)
   (expand "is_finite" -1)
   (expand "subsequence?" -4)
   (rewrite "length_empty?_rew")
   (ground)
   (skosimp :preds? t)
   (use "index?_nonempty")
   (lemma "suffix_is_finite" ("fseq" "x!2" "n" "1 + n!1"))
   (inst - "rest(x!1)" "suffix(x!2, 1 + n!1)")
   (expand "length" -8 3)
   (rewrite "suffix_length")
   (expand "max")
   (expand "length" 1 1)
   (lift-if)
   (lift-if)
   (lift-if)
   (ground)
   (lemma "length_empty?_rew" ("cseq" "x!2"))
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fseq1) + length(fseq2)" ("fseq1" "fseq2")
    :skolem-typepreds? t)
   (expand "subsequence?" -4)
   (lemma "length_empty?_rew")
   (inst-cp - "x!2")
   (inst - "x!1")
   (ground)
   (skosimp :preds? t)
   (lemma "suffix_is_finite" ("fseq" "x!2" "n" "1 + n!1"))
   (expand "is_finite" -5)
   (inst - "rest(x!1)" "suffix(x!2, 1 + n!1)")
   (expand "length" -7 3)
   (forward-chain "subsequence?_length")
   (rewrite "suffix_length")
   (expand "max")
   (expand "length" -9 1)
   (lift-if)
   (ground)
   (("1"
     (expand* "nth" "suffix" "suffix")
     (forward-chain "csequence_add_extensionality"))
    ("2"
     (rewrite "index?_finite")
     (expand* "nth" "suffix" "suffix")
     (use "csequence_add_extensionality")
     (ground))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "subsequence?_is_preorder")
   (use "preorder_restrict[csequence, finite_csequence]")
   (expand "partial_order?")
   (hide -1 -2)
   (expand* "restrict" "antisymmetric?")
   (skosimp)
   (lemma "subsequence?_length")
   (inst-cp - "y!1" "x!1")
   (inst - "x!1" "y!1")
   (use "subsequence?_length_eq")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "some_induction")
   (inst - "p!1"
    "LAMBDA cseq: FORALL cseq2: subsequence?(cseq, cseq2) IMPLIES some(p!1)(cseq2)")
   (split)
   (("1" (inst - "cseq1!1") (assert) (inst - "cseq2!1") (assert))
    ("2"
     (delete -1 -2 2)
     (skosimp*)
     (lift-if)
     (ground)
     (("1"
       (expand "subsequence?")
       (skosimp :preds? t)
       (use "nth_some")
       (assert)
       (inst + "n!1")
       (assert))
      ("2"
       (expand "subsequence?" -3)
       (skosimp :preds? t)
       (inst - "suffix(cseq2!2, 1 + n!1)")
       (assert)
       (use "suffix_some")
       (assert)
       (skosimp)
       (lemma "nth_some")
       (inst - "cseq2!2" "p!1")
       (assert)
       (inst + "i!1"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "every_some_rew")
   (inst-cp - "p!1" "cseq2!1")
   (inst - "p!1" "cseq1!1")
   (lemma "subsequence?_some")
   (inst - "cseq1!1" "cseq2!1" "pred_NOT(p!1)")
   (expand "pred_NOT")
   (ground))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "m" ("cseq1" "m"))
   (skosimp :preds? t)
   (expand "subsequence_func" +)
   (lift-if)
   (lift-if)
   (lift-if)
   (ground)
   (inst - "rest(x!1)" "x!2 - 1")
   (use "subsequence_func_TCC7")
   (inst -
    "suffix(cseq2!1, 1 + min[indexes[T](cseq2!1)]({i: indexes(cseq2!1) | first(x!1) = nth(cseq2!1, i)}))"
    "n!1 - 1")
   (assert)
   (hide 2)
   (expand "subsequence?" -)
   (use "index?_nonempty")
   (assert)
   (skosimp)
   (typepred
    "min[indexes[T](cseq2!1)]({i: indexes(cseq2!1) | first(x!1) = nth(cseq2!1, i)})")
   (inst - "n!2")
   (assert)
   (lemma "subsequence?_suffix")
   (inst - "cseq2!1"
    "1 + min[indexes[T](cseq2!1)]({i: indexes(cseq2!1) | first(x!1) = nth(cseq2!1, i)})"
    "1 + n!2")
   (assert)
   (lemma "subsequence?_is_preorder")
   (expand* "preorder?" "transitive?")
   (flatten)
   (inst - "rest(x!1)" "suffix(cseq2!1, 1 + n!2)"
    "suffix(cseq2!1, 1 + min[indexes[T](cseq2!1)]({i: indexes(cseq2!1) | first(x!1) = nth(cseq2!1, i)}))")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "n" ("cseq1" "n"))
   (skosimp)
   (expand "nth" +)
   (lift-if)
   (lift-if)
   (lift-if)
   (ground)
   (("1"
     (expand "subsequence_func" -1)
     (use "subsequence_func_TCC7")
     (rewrite "min_def")
     (expand "minimum?")
     (expand "nth" -2)
     (propax))
    ("2"
     (expand "subsequence_func" +)
     (use "subsequence_func_TCC7")
     (assert)
     (typepred
      "min[indexes[T](cseq2!1)]({i: indexes(cseq2!1) | first(x!1) = nth(cseq2!1, i)})")
     (expand "nth" -2 1)
     (propax))
    ("3" (expand "subsequence_func" -1) (assert))
    ("4"
     (expand "subsequence_func" 2)
     (use "subsequence_func_TCC7")
     (assert)
     (name "min_first"
           "min[indexes[T](cseq2!1)]({i: indexes(cseq2!1) | first(x!1) = nth(cseq2!1, i)})")
     (replace -1)
     (inst - "rest(x!1)" "x!2 - 1")
     (inst - "suffix(cseq2!1, 1 + min_first)")
     (ground)
     (("1" (rewrite "suffix_nth") (expand "nth" -1 2) (propax))
      ("2"
       (expand "subsequence?" -)
       (split)
       (("1" (use "index?_nonempty") (assert))
        ("2"
         (skosimp)
         (rewrite "min_def")
         (expand "minimum?")
         (inst - "n!1")
         (assert)
         (lemma "subsequence?_suffix")
         (inst - "cseq2!1" "1 + min_first" "1 + n!1")
         (assert)
         (lemma "subsequence?_is_preorder")
         (expand* "preorder?" "transitive?")
         (flatten)
         (inst - "rest(x!1)" "suffix(cseq2!1, 1 + n!1)"
          "suffix(cseq2!1, 1 + min_first)")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (inst + "subsequence_func(cseq2!1, cseq1!1)")
     (split)
     (("1" (skosimp) (forward-chain "subsequence_func_monotonic"))
      ("2" (skolem!) (rewrite "subsequence_func_nth"))))
    ("2"
     (lemma "subsequence?_weak_coinduction")
     (inst -
      "LAMBDA cseq1, cseq2: EXISTS (f: [indexes(cseq1) -> indexes(cseq2)]): (FORALL (i1, i2: indexes(cseq1)): i1 < i2 IMPLIES f(i1) < f(i2)) AND (FORALL (i: indexes(cseq1)): nth(cseq1, i) = nth(cseq2, f(i)))")
     (split)
     (("1" (inst - "cseq1!1" "cseq2!1") (assert))
      ("2"
       (delete -1 2)
       (skosimp*)
       (use "index?_0")
       (assert)
       (inst-cp -3 0)
       (expand "nth" -4 1)
       (inst + "f!1(0)")
       (assert)
       (inst +
        "LAMBDA (i: indexes(rest(cseq1!2))): f!1(i + 1) - f!1(0) - 1")
       (("1"
         (split)
         (("1" (skosimp) (inst - "i1!1 + 1" "i2!1 + 1") (assert))
          ("2"
           (skolem!)
           (inst - "i!1 + 1")
           (expand "nth" -3 1)
           (rewrite "suffix_nth")
           (inst - 0 "1 + i!1")
           (assert))))
        ("2"
         (skolem-typepred)
         (inst - 0 "1 + i!1")
         (("1" (ground) (rewrite "suffix_index"))
          ("2" (expand "index?") (propax))))
        ("3" (expand "index?") (propax))))))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand* "preorder?" "reflexive?" "transitive?")
   (split)
   (("1"
     (skolem!)
     (lemma "subsequence?_suffix")
     (inst - "x!1" 0 0)
     (expand "suffix")
     (propax))
    ("2"
     (lemma "subsequence?_weak_coinduction")
     (inst -
      "LAMBDA cseq1, cseq2: EXISTS (cseq3: csequence): subsequence?(cseq1, cseq3) AND subsequence?(cseq3, cseq2)")
     (split)
     (("1"
       (skosimp)
       (inst - "x!1" "z!1")
       (assert)
       (inst + "y!1")
       (assert))
      ("2"
       (delete 2)
       (skosimp*)
       (lemma "subsequence?_nth" ("cseq1" "cseq3!1" "cseq2" "cseq2!1"))
       (assert)
       (expand "subsequence?" -2)
       (skosimp)
       (inst - "n!1")
       (skosimp)
       (inst + "m!1")
       (assert)
       (inst + "suffix(cseq3!1, 1 + n!1)")
       (assert))))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "subsequence?_weak_coinduction")
   (inst - "prefix?")
   (split)
   (("1" (skolem!) (inst - "x!1" "cseq!1") (assert))
    ("2"
     (delete 2)
     (skosimp)
     (expand "prefix?" -)
     (ground)
     (lemma "suffix_1" ("nseq" "cseq2!1"))
     (rewrite "index?_0")
     (inst + 0)
     (expand "nth")
     (assert))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (lemma "suffix?_induction")
   (inst - "x!1" "LAMBDA cseq: subsequence?(x!1, cseq)")
   (split)
   (("1" (inst - "cseq!1") (assert))
    ("2"
     (delete -1 2)
     (skosimp)
     (prop)
     (("1"
       (lemma "subsequence?_is_preorder")
       (expand* "preorder?" "reflexive?")
       (flatten)
       (inst - "x!1")
       (assert))
      ("2" (forward-chain "subsequence?_rest2"))))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (lemma "index?_nonempty")
   (inst-cp - "cseq2!1" "index!1")
   (inst - "cseq1!1" "n!1")
   (assert)
   (expand "subsequence?" -)
   (skosimp)
   (inst - "n!2")
   (assert)
   (lemma "subsequence?_suffix")
   (inst - "cseq2!1" "1 + index!1" "1 + n!2")
   (assert)
   (lemma "subsequence?_is_preorder")
   (expand* "preorder?" "transitive?")
   (flatten)
   (inst - "rest(cseq1!1)" "suffix(cseq2!1, 1 + n!2)"
    "suffix(cseq2!1, 1 + index!1)")
   (assert))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (use "subsequence_func_TCC2")
   (assert)
   (replace -7)
   (typepred
    "v!1(suffix[T](cseq2!1, 1 + min[indexes[T](cseq2!1)]({i: indexes[T](cseq2!1) | first[T](cseq1!1) = nth[T](cseq2!1, i)})), rest[T](cseq1!1))(n!1 - 1)")
   (("1" (rewrite "suffix_index"))
    ("2"
     (expand* "nonempty?" "empty?" "member" "subsequence?")
     (skosimp)
     (inst - "n!2"))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_subsequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "nonempty?" "empty?" "member" "subsequence?")
   (use "index?_nonempty")
   (assert)
   (skosimp)
   (inst - "n!2"))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_strict_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (lemma "strict_prefix?_induction")
     (inst - "LAMBDA cseq1, cseq2: prefix?(cseq1, cseq2)")
     (split)
     (("1" (inst - "cseq1!1" "cseq2!1") (assert))
      ("2"
       (delete -1 2)
       (skosimp)
       (ground)
       (("1" (expand "prefix?") (propax))
        ("2" (expand "prefix?" +) (propax))))))
    ("2"
     (lemma "strict_prefix?_induction")
     (inst - "LAMBDA cseq1, cseq2: cseq1 /= cseq2")
     (split)
     (("1" (inst - "cseq1!1" "cseq2!1") (assert))
      ("2" (delete -1 -2) (skosimp) (ground) (assert))))
    ("3"
     (use "prefix?_infinite")
     (("1" (assert))
      ("2"
       (lemma "is_finite_induction")
       (inst -
        "LAMBDA cseq1: FORALL cseq2: prefix?(cseq1, cseq2) IMPLIES cseq1 = cseq2 OR strict_prefix?(cseq1, cseq2)")
       (split)
       (("1" (inst - "cseq1!1") (assert) (inst - "cseq2!1") (assert))
        ("2"
         (delete -1 -2 2 3)
         (skosimp*)
         (expand "prefix?" -2)
         (expand "strict_prefix?" +)
         (ground)
         (inst - "rest(cseq2!2)")
         (assert)
         (forward-chain "csequence_add_extensionality"))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_strict_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "strict_prefix?_prefix?")
   (flatten)
   (forward-chain "prefix?_length")
   (use "prefix?_length_eq")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_strict_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (expand "strict_prefix?" +)
     (ground)
     (("1" (rewrite "o_first"))
      ("2" (inst - "nseq!1") (rewrite "o_rest"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_strict_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "strict_prefix?_prefix?")
   (use "prefix?_def")
   (smash)
   (("1" (skosimp) (inst + "cseq!1") (rewrite "o_empty_right"))
    ("2" (skosimp) (rewrite "o_infinite"))
    ("3"
     (skosimp*)
     (lemma "o_finiteness")
     (inst - "cseq1!1" "nseq!1")
     (assert)
     (lemma "o_length")
     (inst - "cseq1!1" "nseq!1")
     (use "length_empty?_rew")
     (assert))
    ("4" (skolem!) (inst + "nseq!1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_strict_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand* "well_ordered?" "strict_total_order?" "restrict"
    "trichotomous?" "well_founded?")
   (split)
   (("1"
     (skosimp* t)
     (rewrite "strict_prefix?_prefix?")
     (rewrite "strict_prefix?_prefix?")
     (rewrite "strict_prefix?_prefix?")
     (rewrite "strict_prefix?_prefix?")
     (ground)
     (lemma "prefix?_total_order")
     (inst - "cseq!1")
     (expand* "restrict" "total_order?" "dichotomous?")
     (flatten)
     (inst - "x!1" "y!1")
     (assert))
    ("2"
     (skosimp* t)
     (forward-chain "strict_prefix?_finite")
     (name "min_length"
           "min({n | EXISTS (seq: (p!1)): is_finite(seq) AND length(seq) = n})")
     (("1"
       (rewrite "min_def")
       (expand "minimum?")
       (skosimp* t)
       (inst + "seq!1")
       (skolem-typepred)
       (inst - "length(x!1)")
       (("1"
         (split)
         (("1"
           (lemma "strict_prefix?_length")
           (inst - "x!1" "seq!1")
           (assert))
          ("2" (inst + "x!1") (forward-chain "strict_prefix?_finite"))))
        ("2" (forward-chain "strict_prefix?_finite"))))
      ("2"
       (expand* "nonempty?" "empty?" "member")
       (inst - "length(y!1)")
       (inst + "y!1"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_strict_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "strict_prefix?_prefix?")
   (use "prefix?_prefix")
   (ground)
   (("1" (skosimp) (assert) (use "prefix_length") (assert))
    ("2"
     (skolem!)
     (inst + "n!1")
     (ground)
     (use "prefix_full")
     (rewrite "index?_finite")
     (assert))
    ("3" (skosimp*) (assert) (use "prefix_length") (assert))
    ("4" (skosimp) (inst + "n!1"))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_strict_prefix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand* "strict_order?" "irreflexive?" "transitive?")
   (split)
   (("1"
     (skolem!)
     (forward-chain "strict_prefix?_finite")
     (forward-chain "strict_prefix?_length")
     (assert))
    ("2"
     (skosimp)
     (lemma "strict_prefix?_finite")
     (inst-cp - "y!1" "z!1")
     (inst - "x!1" "y!1")
     (assert)
     (rewrite "strict_prefix?_prefix?")
     (rewrite "strict_prefix?_prefix?")
     (rewrite "strict_prefix?_prefix?")
     (prop)
     (("1"
       (use "prefix?_is_partial_order")
       (expand* "partial_order?" "preorder?" "transitive?")
       (flatten)
       (inst - "x!1" "y!1" "z!1")
       (assert))
      ("2"
       (assert)
       (lemma "prefix?_length")
       (inst-cp - "y!1" "z!1")
       (inst - "x!1" "y!1")
       (assert)
       (lemma "prefix?_length_eq")
       (inst - "x!1" "y!1")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "coinduction")
   (inst -
    "LAMBDA (cseq1, cseq2: csequence): (empty?(cseq1) AND empty?(cseq2)) OR (EXISTS nseq: cseq1 = split(rest(nseq))`1 AND cseq2 = split(nseq)`2)"
    "split(rest(nseq!1))`1" "split(nseq!1)`2")
   (("1" (ground) (("1" (inst + "nseq!1")) ("2" (inst + "nseq!1"))))
    ("2"
     (delete 2)
     (expand "bisimulation?")
     (skosimp)
     (smash)
     (("1"
       (skosimp)
       (expand* "split" "split_left_struct" "split_right_struct"
        "coreduce")
       (reduce))
      ("2"
       (skosimp)
       (expand* "split" "split_left_struct" "split_right_struct"
        "coreduce")
       (reduce))
      ("3"
       (skosimp)
       (replace*)
       (hide -2 -3)
       (use "split_nonempty_left")
       (assert)
       (lemma "split_nonempty_right" ("cseq" "rest(rest(nseq!2))"))
       (use "split_rest_right")
       (use "split_rest_left")
       (lift-if)
       (ground)
       (inst + "rest(rest(nseq!2))")
       (assert))
      ("4"
       (skosimp)
       (replace*)
       (hide -2 -3)
       (use "split_nonempty_left")
       (assert)
       (lemma "split_rest_left" ("nseq" "rest(nseq!2)"))
       (lift-if)
       (ground)
       (inst + "rest(rest(nseq!2))")
       (assert)
       (use "split_rest_right")
       (assert))
      ("5"
       (skosimp)
       (replace*)
       (hide -2 -3)
       (use "split_nonempty_left")
       (assert)
       (rewrite "split_first_right")
       (rewrite "split_first_left"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "coinduction")
   (inst -
    "LAMBDA (cseq1, cseq2: csequence): (empty?(cseq1) AND empty?(cseq2)) OR (EXISTS nseq: cseq1 = split(rest(nseq))`2 AND cseq2 = rest(split(nseq)`1))"
    "split(rest(nseq!1))`2" "rest(split(nseq!1)`1)")
   (("1" (ground) (("1" (inst + "nseq!1")) ("2" (inst + "nseq!1"))))
    ("2"
     (delete 2)
     (expand "bisimulation?")
     (skosimp)
     (smash)
     (("1"
       (skosimp)
       (expand* "split" "split_left_struct" "split_right_struct"
        "coreduce" "coreduce")
       (reduce))
      ("2"
       (skosimp)
       (expand* "split" "split_left_struct" "split_right_struct"
        "coreduce" "coreduce")
       (reduce))
      ("3"
       (skosimp)
       (replace*)
       (hide -2 -3)
       (use "split_nonempty_right")
       (ground)
       (use "split_rest_right")
       (assert)
       (inst + "rest(rest(nseq!2))")
       (assert)
       (use "split_rest_left")
       (assert))
      ("4"
       (skosimp)
       (replace*)
       (hide -2 -3)
       (use "split_nonempty_right")
       (ground)
       (use "split_rest_right")
       (assert)
       (inst + "rest(rest(nseq!2))")
       (assert)
       (use "split_rest_left")
       (assert))
      ("5"
       (skosimp)
       (replace*)
       (hide -2 -3)
       (use "split_nonempty_right")
       (ground)
       (rewrite "split_first_right")
       (use "split_rest_left")
       (assert)
       (replace -1)
       (rewrite "split_first_left"))))
    ("3" (skosimp*) (rewrite "split_nonempty_left"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fseq)" ("fseq") :skolem-typepreds? t)
   (expand "length" +)
   (lift-if)
   (rewrite "split_empty_left")
   (lift-if)
   (ground)
   (use "split_rest_left")
   (lift-if)
   (ground)
   (("1" (expand "length" +) (typepred "ceiling(1 / 2)") (assert))
    ("2"
     (replace -1)
     (hide -1)
     (inst - "rest(rest(x!1))")
     (("1"
       (expand "length" -2 2)
       (expand "length" -2 2)
       (expand "length" 3 2)
       (typepred "ceiling((2 + length(rest(rest(x!1)))) / 2)")
       (assert))
      ("2" (expand "is_finite" -) (expand "is_finite" -) (propax))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fseq)" ("fseq") :skolem-typepreds? t)
   (expand "length" +)
   (lift-if)
   (rewrite "split_empty_right")
   (lift-if)
   (ground)
   (("1" (expand "length" +) (typepred "floor(1 / 2)") (assert))
    ("2"
     (use "split_rest_right")
     (assert)
     (replace -1)
     (hide -1)
     (inst - "rest(rest(x!1))")
     (("1"
       (expand "length" -2 2)
       (expand "length" -2 2)
       (expand "length" 3 2)
       (typepred "floor((2 + length(rest(rest(x!1)))) / 2)")
       (assert))
      ("2" (expand "is_finite" -) (expand "is_finite" -) (propax))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "split_length_left")
   (use "split_length_right")
   (use "floor_split")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "index?_prop")
   (rewrite "index?_prop")
   (rewrite "split_length_left")
   (use "split_finite")
   (ground)
   (use "split_infinite")
   (flatten))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "index?_prop")
   (rewrite "index?_prop")
   (rewrite "split_length_right")
   (use "split_finite")
   (ground)
   (use "split_infinite")
   (flatten))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "n" ("cseq" "n") :skolem-typepreds? t)
   (("1"
     (expand "nth" +)
     (lift-if)
     (lift-if)
     (lift-if)
     (ground)
     (("1" (rewrite "split_first_left"))
      ("2"
       (use "split_rest_left")
       (lift-if)
       (ground)
       (("1" (rewrite "split_index_left") (expand* "index?" "index?"))
        ("2"
         (replace -1)
         (hide -1)
         (expand "nth" 3 2)
         (inst - "rest(rest(x!1))" "x!2 - 1")
         (assert))))))
    ("2" (use "split_index_left" ("cseq" "y!1")) (assert))
    ("3" (use "split_index_left") (assert))
    ("4" (use "split_index_left") (assert))
    ("5" (use "split_index_left") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "n" ("cseq" "n") :skolem-typepreds? t)
   (("1"
     (expand "nth" +)
     (lift-if)
     (ground)
     (("1"
       (expand "nth" +)
       (rewrite "split_first_right")
       (rewrite "split_index_right")
       (expand* "index?" "index?"))
      ("2"
       (use "split_rest_right")
       (expand "nth" 2 2)
       (split)
       (("1"
         (replace -1)
         (hide -1)
         (inst - "rest(rest(x!1))" "x!2 - 1")
         (assert))
        ("2"
         (rewrite "split_index_right")
         (expand* "index?" "index?")
         (flatten))))))
    ("2" (use "split_index_right" ("cseq" "y!1")) (assert))
    ("3" (use "split_index_right") (assert))
    ("4" (use "split_index_right") (assert))
    ("5" (use "split_index_right") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (decompose-equality)
   (("1"
     (lemma "coinduction")
     (inst -
      "LAMBDA (cseq1, cseq2: csequence): (empty?(cseq1) AND empty?(cseq2)) OR (EXISTS cseq, t: cseq1 = split(add(t, cseq))`1 AND cseq2 = add(t, split(cseq)`2))"
      "split(add(t!1, cseq!1))`1" "add(t!1, split(cseq!1)`2)")
     (("1"
       (ground)
       (("1" (inst + "cseq!1" "t!1")) ("2" (inst + "cseq!1" "t!1"))))
      ("2"
       (delete 2)
       (expand "bisimulation?")
       (skosimp)
       (smash)
       (("1" (skosimp) (expand* "split" "split_left_struct" "coreduce"))
        ("2"
         (skosimp)
         (replace*)
         (hide -2 -3)
         (assert)
         (use "split_rest_left")
         (lift-if)
         (rewrite "split_empty_right")
         (ground)
         (inst + "rest(rest(cseq!2))" "first(rest(cseq!2))")
         (lemma "csequence_add_eta")
         (inst - "rest(cseq!2)")
         (assert)
         (hide-all-but 4)
         (expand* "split" "split_right_struct")
         (expand "coreduce" 1 1)
         (propax))
        ("3"
         (skosimp)
         (replace*)
         (hide -2 -3)
         (use "split_rest_left")
         (lift-if)
         (ground)
         (case "empty?(rest(cseq!2))")
         (("1"
           (hide 3)
           (expand* "split" "split_left_struct" "coreduce")
           (reduce))
          ("2"
           (assert)
           (inst + "rest(rest(cseq!2))" "first(rest(cseq!2))")
           (rewrite "csequence_add_eta")
           (assert)
           (decompose-equality 4)
           (("1" (rewrite "split_first_right"))
            ("2" (rewrite "split_rest_right"))
            ("3" (rewrite "split_nonempty_right"))))))
        ("4"
         (skosimp)
         (replace*)
         (hide -2 -3)
         (assert)
         (rewrite "split_first_left"))))))
    ("2"
     (lemma "coinduction")
     (inst -
      "LAMBDA (cseq1, cseq2: csequence): (empty?(cseq1) AND empty?(cseq2)) OR (EXISTS cseq, t: cseq1 = split(add(t, cseq))`2 AND cseq2 = split(cseq)`1)"
      "split(add(t!1, cseq!1))`2" "split(cseq!1)`1")
     (("1"
       (ground)
       (("1" (inst + "cseq!1" "t!1")) ("2" (inst + "cseq!1" "t!1"))))
      ("2"
       (delete 2)
       (expand "bisimulation?")
       (skosimp)
       (smash)
       (("1"
         (skosimp)
         (expand* "split" "split_left_struct" "split_right_struct"
          "coreduce")
         (reduce))
        ("2"
         (skosimp)
         (expand* "split" "split_left_struct" "split_right_struct"
          "coreduce")
         (reduce))
        ("3"
         (skosimp)
         (replace*)
         (hide -2 -3)
         (assert)
         (use "split_nonempty_right")
         (assert)
         (use "split_rest_right")
         (assert)
         (case "empty?(rest(cseq!2))")
         (("1"
           (hide 2)
           (expand* "split" "split_left_struct" "split_right_struct"
            "coreduce")
           (reduce))
          ("2"
           (assert)
           (inst + "rest(rest(cseq!2))" "first(rest(cseq!2))")
           (rewrite "csequence_add_eta")
           (assert)
           (use "split_rest_left")
           (assert))))
        ("4"
         (skosimp)
         (replace*)
         (hide -2 -3)
         (use "split_nonempty_right")
         (assert)
         (use "split_rest_right")
         (assert)
         (case "empty?(rest(cseq!2))")
         (("1"
           (hide 2)
           (expand* "split" "split_left_struct" "split_right_struct"
            "coreduce")
           (reduce))
          ("2"
           (assert)
           (inst + "rest(rest(cseq!2))" "first(rest(cseq!2))")
           (rewrite "csequence_add_eta")
           (assert)
           (use "split_rest_left")
           (assert))))
        ("5"
         (skosimp)
         (replace*)
         (hide -2 -3)
         (use "split_nonempty_right")
         (assert)
         (rewrite "split_first_left")
         (rewrite "split_first_right"))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "last")
   (use "split_length")
   (use "length_nonempty?_rew")
   (assert)
   (use "split_nth_left")
   (use "split_length_left")
   (lift-if)
   (ground)
   (("1" (expand "odd?") (skolem!) (replace -1) (hide -1) (assert))
    ("2"
     (use "even_or_odd")
     (assert)
     (expand "even?")
     (skolem!)
     (replace -1)
     (hide -1)
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "last")
   (lemma "split_length" ("fseq" "fseq!1"))
   (use "length_nonempty?_rew")
   (assert)
   (use "split_nth_right")
   (use "split_length_right")
   (lift-if)
   (ground)
   (("1" (expand "even?") (skolem!) (replace -1) (hide -1) (assert))
    ("2"
     (rewrite "even_or_odd")
     (expand "odd?")
     (skolem!)
     (replace -1)
     (hide -1)
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "coinduction")
   (inst - "LAMBDA cseq1, cseq2: split(cseq1) = split(cseq2)" "cseq1!1"
    "cseq2!1")
   (("1" (assert))
    ("2"
     (delete -1 2)
     (expand "bisimulation?")
     (reduce)
     (("1"
       (lemma "split_empty_left")
       (inst-cp - "y!1")
       (inst - "x!1")
       (assert))
      ("2"
       (lemma "split_empty_left")
       (inst-cp - "y!1")
       (inst - "x!1")
       (assert))
      ("3"
       (decompose-equality +)
       (("1"
         (rewrite "split_rest_swap_left")
         (rewrite "split_rest_swap_left")
         (assert))
        ("2"
         (rewrite "split_rest_swap_right")
         (rewrite "split_rest_swap_right")
         (assert))))
      ("4"
       (lemma "split_first_left")
       (inst-cp - "y!1")
       (inst - "x!1")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + ("_" "p!1"))
   (case "FORALL (a: csequence[T]): CASES a OF empty_cseq: FALSE, add(add1_var, add2_var): p!1(add1_var) OR some(p!1)(add2_var) AND (FORALL (cseq2: csequence): add2_var = split(cseq2)`1 OR add2_var = split(cseq2)`2 IMPLIES some(p!1)(cseq2)) ENDCASES IMPLIES (FORALL (cseq2: csequence): a = split(cseq2)`1 OR a = split(cseq2)`2 IMPLIES some(p!1)(cseq2))")
   (("1"
     (skolem!)
     (prop)
     (("1"
       (lemma "some_induction")
       (inst - "p!1"
        "LAMBDA cseq: some(p!1)(split(cseq)`1) OR some(p!1)(split(cseq)`2)")
       (split)
       (("1" (inst - "cseq!1") (assert))
        ("2"
         (delete -1 -2 2 3)
         (skosimp)
         (lift-if)
         (ground)
         (("1"
           (expand "some" 2)
           (lift-if)
           (rewrite "split_empty_left")
           (flatten)
           (rewrite "split_first_left"))
          ("2" (rewrite "split_rest_swap_left"))
          ("3"
           (expand "some" 2)
           (lift-if)
           (rewrite "split_empty_left")
           (flatten)
           (rewrite "split_rest_swap_right"))))))
      ("2"
       (lemma "some_induction")
       (inst - "p!1"
        "LAMBDA cseq: FORALL (cseq2: csequence): cseq = split(cseq2)`1 OR cseq = split(cseq2)`2 IMPLIES some(p!1)(cseq2)")
       (ground)
       (inst - "split(cseq!1)`1")
       (assert)
       (inst - "cseq!1"))
      ("3"
       (lemma "some_induction")
       (inst - "p!1"
        "LAMBDA cseq: FORALL (cseq2: csequence): cseq = split(cseq2)`1 OR cseq = split(cseq2)`2 IMPLIES some(p!1)(cseq2)")
       (ground)
       (inst - "split(cseq!1)`2")
       (assert)
       (inst - "cseq!1"))))
    ("2"
     (delete 2)
     (skosimp*)
     (split)
     (("1"
       (replace -1)
       (hide -1)
       (lift-if)
       (ground)
       (("1"
         (rewrite "split_empty_left")
         (rewrite "split_first_left")
         (expand "some")
         (assert))
        ("2"
         (use "split_nonempty_left")
         (assert)
         (rewrite "split_rest_swap_right" :dir rl)
         (expand "some" +)
         (flatten)
         (inst - "rest(cseq2!1)"))))
      ("2"
       (replace -1)
       (hide -1)
       (lift-if)
       (ground)
       (("1"
         (rewrite "split_empty_right")
         (ground)
         (rewrite "split_first_right")
         (expand* "some" "some")
         (flatten))
        ("2"
         (use "split_nonempty_right")
         (ground)
         (rewrite "split_rest_right")
         (expand "some" +)
         (expand "some" +)
         (flatten)
         (inst - "rest(rest(cseq2!1))"))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "every_some_rew")
   (inst-cp - "p!1" "split(cseq!1)`2")
   (inst-cp - "p!1" "split(cseq!1)`1")
   (inst - "p!1" "cseq!1")
   (use "split_some")
   (ground))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fseq)" ("fseq") :skolem-typepreds? t)
   (expand "is_finite" +)
   (ground)
   (("1"
     (use "split_empty_right")
     (prop)
     (use "split_rest_right")
     (assert)
     (replace -1)
     (hide -1)
     (inst - "rest(rest(x!1))")
     (("1" (expand "length" -2 2) (expand "length" 6 2) (assert))
      ("2" (expand "is_finite" -) (expand "is_finite" -) (propax))))
    ("2"
     (use "split_empty_left")
     (assert)
     (lemma "split_rest_left" ("nseq" "x!1"))
     (lift-if)
     (expand "is_finite" +)
     (ground)
     (replace -1)
     (hide -1)
     (inst - "rest(rest(x!1))")
     (("1" (expand "length" -2 2) (expand "length" 6 2) (assert))
      ("2" (expand "is_finite" -) (expand "is_finite" -) (propax))))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (prop)
   (("1"
     (generalize-skolem-constants)
     (measure-induct+
      "IF is_finite(split(iseq_1)`2) THEN length(split(iseq_1)`2) ELSE 0 ENDIF"
      ("iseq_1"))
     (expand "is_finite" (-2 +))
     (ground)
     (("1" (rewrite "split_empty_right") (expand "is_finite" +) (assert))
      ("2"
       (use "split_rest_right")
       (expand "is_finite" +)
       (ground)
       (inst - "rest(rest(x!1))")
       (assert)
       (expand "is_finite" 1)
       (expand "length" 1 2)
       (lift-if)
       (ground)
       (rewrite "split_empty_right"))))
    ("2"
     (generalize-skolem-constants)
     (measure-induct+
      "IF is_finite(split(iseq_1)`1) THEN length(split(iseq_1)`1) ELSE 0 ENDIF"
      ("iseq_1"))
     (expand "is_finite" (-2 +))
     (rewrite "split_empty_left")
     (ground)
     (use "split_rest_left")
     (expand "is_finite" +)
     (lift-if -1)
     (ground)
     (replace -1)
     (inst - "rest(rest(x!1))")
     (assert)
     (expand "is_finite" 2)
     (expand "length" 2 2)
     (lift-if)
     (ground)
     (rewrite "split_empty_left"))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (use "split_nonempty_left")
   (assert)
   (rewrite "length_nonempty?_rew")
   (expand "odd?")
   (inst + 0)
   (assert)
   (rewrite "index?_finite"))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (use "split_nonempty_right")
   (assert)
   (flatten)
   (expand "is_finite")
   (assert)
   (lemma "length_nonempty?_rew" ("cseq" "rest(fseq!1)"))
   (assert)
   (expand "length" +)
   (expand "index?")
   (flatten)
   (rewrite "index?_finite"))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_sequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (expand* "nth" "from_sequence" "from_sequence_struct" "coreduce"))
    ("2"
     (skosimp*)
     (expand "nth" +)
     (expand* "from_sequence" "from_sequence_struct")
     (expand "coreduce" +)
     (inst - "LAMBDA n: seq!1(1 +  n)"))
    ("3" (skolem!) (use "from_sequence_nth_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_sequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "nth_extensionality")
   (assert)
   (hide 2)
   (split)
   (("1"
     (decompose-equality)
     (rewrite "index?_infinite")
     (rewrite "index?_infinite"))
    ("2"
     (skolem!)
     (rewrite "from_sequence_nth")
     (rewrite "to_sequence_nth"))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_sequence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (seq: sequence[T], x: nat): NOT has_length(coreduce[T, sequence](from_sequence_struct)(seq), x)")
   (("1"
     (skolem!)
     (rewrite "is_finite_def")
     (skolem!)
     (inst - "seq!1" "n!1"))
    ("2"
     (delete 2)
     (induct "x")
     (("1" (expand* "has_length" "from_sequence_struct" "coreduce"))
      ("2"
       (skosimp*)
       (expand "has_length" -2)
       (prop)
       (expand "from_sequence_struct")
       (expand "coreduce" -1)
       (inst - "LAMBDA n: seq!1(1 + n)"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_insert
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "index")
   (("1" (expand "insert") (expand "length" 1 1) (propax))
    ("2"
     (skosimp*)
     (expand "insert" +)
     (expand "length" +)
     (lift-if)
     (rewrite "length_empty?_rew")
     (ground)
     (inst - "rest(fseq!1)" "t!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_insert
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "index?_prop")
   (auto-rewrite "insert_length")
   (skolem!)
   (smash)
   (("1" (use "insert_finite" ("fseq" "cseq!1")))
    ("2" (use "insert_infinite") (assert))
    ("3" (use "insert_infinite") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_insert
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "index")
   (("1" (skolem!) (expand "insert") (expand "nth" 1 2) (propax))
    ("2"
     (skosimp*)
     (expand "insert" +)
     (expand "nth" +)
     (use "index?_0")
     (use "index?_lt")
     (lift-if)
     (lift-if)
     (ground)
     (inst - "rest(cseq!1)" "t!1" "n!1 - 1")
     (lift-if)
     (lift-if)
     (lift-if)
     (ground))
    ("3" (skolem!) (use "insert_nth_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_insert
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (ground)
     (("1" (expand* "insert" "index?" "last" "nth" "length" "length"))
      ("2"
       (expand "insert" +)
       (expand "last")
       (expand "nth" +)
       (expand "length" +)
       (expand "length" 1 2)
       (expand "index?" +)
       (use "length_empty?_rew")
       (smash)
       (("1" (expand "nth" +) (propax)) ("2" (expand "nth" 4 1) (propax))
        ("3"
         (lemma "length_empty?_rew"
          ("cseq" "insert(t!1, index!1 - 1, rest(cseq!1))"))
         (assert)
         (use "insert_finite"
              ("fseq" "rest(cseq!1)" "index" "index!1 - 1")))
        ("4"
         (lemma "length_empty?_rew"
          ("cseq" "insert(t!1, index!1 - 1, rest(cseq!1))"))
         (assert)
         (use "insert_finite"
              ("fseq" "rest(cseq!1)" "index" "index!1 - 1")))
        ("5"
         (lemma "length_empty?_rew" ("cseq" "rest(cseq!1)"))
         (assert)
         (expand "index?")
         (propax))
        ("6" (inst - "t!1" "index!1 - 1") (assert))
        ("7" (inst - "t!1" "index!1 - 1") (assert))))))
    ("4" (skosimp*) (use "index?_nonempty"))
    ("5" (skosimp*) (use "insert_finite" ("fseq" "fseq!2")))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_insert
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (expand "insert" +)
     (lift-if)
     (lift-if)
     (ground)
     (rewrite "length_empty?_rew")
     (decompose-equality 3)
     (inst - "t!1" "index!1 - 1")
     (expand "length" (-4 1))
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_insert
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + ("t!1" "u!1" "_" "_" "_"))
   (induct "n")
   (("1"
     (skolem!)
     (expand "insert" 1 1)
     (expand "insert" 1 3)
     (expand "insert" 1 4)
     (reduce)
     (expand "insert" 1 2)
     (propax))
    ("2"
     (skosimp*)
     (lemma "length_empty?_rew" ("cseq" "cseq!1"))
     (hide 1)
     (prop)
     (("1"
       (reveal 1)
       (assert)
       (expand "insert" 1 2)
       (expand "insert" 1 1)
       (expand "insert" 1 3)
       (expand "insert" 1 4)
       (expand "insert" +)
       (propax))
      ("2"
       (reveal 1)
       (expand "insert" +)
       (smash)
       (("1" (expand "insert" +) (propax))
        ("2" (decompose-equality 2) (expand "insert" 1 1) (propax))
        ("3"
         (decompose-equality 2)
         (inst - "m!1 - 1" "rest(cseq!1)")
         (expand "is_finite" +)
         (assert))
        ("4"
         (decompose-equality 3)
         (inst - "m!1 - 1" "rest(cseq!1)")
         (expand "is_finite" +)
         (assert))))
      ("3"
       (reveal 1)
       (expand "length" 1)
       (expand "insert" +)
       (smash)
       (("1" (expand "insert" +) (propax))
        ("2" (decompose-equality 2) (expand "insert" 1 1) (propax))
        ("3"
         (decompose-equality 2)
         (inst - "m!1 - 1" "rest(cseq!1)")
         (expand "is_finite" -1)
         (assert))
        ("4"
         (decompose-equality 3)
         (inst - "m!1 - 1" "rest(cseq!1)")
         (assert))
        ("5"
         (decompose-equality 4)
         (inst - "m!1 - 1" "rest(cseq!1)")
         (assert))
        ("6"
         (decompose-equality 3)
         (inst - "m!1 - 1" "rest(cseq!1)")
         (assert))
        ("7"
         (decompose-equality 4)
         (inst - "m!1 - 1" "rest(cseq!1)")
         (assert))
        ("8"
         (decompose-equality 3)
         (inst - "m!1 - 1" "rest(cseq!1)")
         (expand "is_finite" +)
         (assert))
        ("9"
         (decompose-equality 4)
         (inst - "m!1 - 1" "rest(cseq!1)")
         (expand "is_finite" +)
         (assert))))))
    ("3" (skosimp) (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_insert
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "index")
   (("1" (expand "insert") (skosimp) (decompose-equality))
    ("2"
     (skosimp*)
     (expand "insert" -2)
     (lift-if)
     (lift-if)
     (lift-if)
     (ground)
     (("1" (decompose-equality)) ("2" (decompose-equality))
      ("3" (decompose-equality) (inst? -) (decompose-equality 3))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_insert
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "index")
   (("1" (expand "insert") (expand "some" 1 1) (propax))
    ("2"
     (skosimp*)
     (expand "some" +)
     (expand "insert" +)
     (lift-if)
     (lift-if)
     (lift-if)
     (ground)
     (("1" (expand "some" -1) (propax))
      ("2" (inst - "p!1" "t!1" "rest(cseq!1)") (assert))
      ("3" (inst - "p!1" "t!1" "rest(cseq!1)") (assert))
      ("4" (inst - "p!1" "t!1" "rest(cseq!1)") (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_insert
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "index")
   (("1" (expand "insert") (expand "every" 1 1) (propax))
    ("2"
     (skosimp*)
     (expand "every" +)
     (expand "insert" +)
     (lift-if)
     (lift-if)
     (lift-if)
     (ground)
     (("1" (expand "every" +) (propax))
      ("2" (inst - "p!1" "t!1" "rest(cseq!1)") (assert))
      ("3" (inst - "p!1" "t!1" "rest(cseq!1)") (assert))
      ("4" (inst - "p!1" "t!1" "rest(cseq!1)") (assert))))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_insert
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "index")
   (("1" (reduce)) ("2" (expand* "insert" "is_finite"))
    ("3"
     (skosimp* t)
     (expand "insert" +)
     (expand "is_finite" (-1 +))
     (ground)
     (inst - "rest(fseq!1)" "t!1"))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_insert
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "index")
   (("1"
     (skolem-typepred)
     (expand "insert")
     (expand "is_finite" -)
     (propax))
    ("2"
     (skosimp* t)
     (expand "insert" -3)
     (expand "is_finite" (-3 +))
     (ground)
     (inst - "rest(iseq!1)" "t!1"))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_insert
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "insert_index")
   (lift-if)
   (ground)
   (use "index?_lt" ("n" "n!1 - 1"))
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_append
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "coinduction")
   (inst -
    "LAMBDA (cseq1, cseq2: csequence): (empty?(cseq1) AND empty?(cseq2)) OR (EXISTS nseq: cseq1 = append(t!1, rest(nseq)) AND cseq2 = rest(append(t!1, nseq)))"
    "append(t!1, rest(nseq!1))" "rest(append(t!1, nseq!1))")
   (("1" (assert) (inst?))
    ("2"
     (delete 2)
     (expand "bisimulation?")
     (skosimp* t)
     (smash)
     (("1" (grind))
      ("2"
       (skosimp)
       (inst + "rest(nseq!2)")
       (("1" (expand* "append" "append_struct" "coreduce") (grind))
        ("2" (grind))))
      ("3"
       (skosimp)
       (inst + "rest(nseq!2)")
       (("1" (expand* "append" "append_struct" "coreduce") (grind))
        ("2" (grind))))
      ("4" (grind))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_append
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (use "length_empty?_rew")
     (reduce)
     (("1"
       (expand* "insert" "append" "append_struct" "coreduce" "coreduce")
       (assert))
      ("2"
       (decompose-equality 3)
       (("1" (rewrite "append_first") (rewrite "insert_first"))
        ("2"
         (rewrite "append_rest")
         (rewrite "insert_rest")
         (expand "length" 1)
         (propax))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_append
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "coinduction")
   (inst -
    "LAMBDA (cseq1, cseq2: csequence): is_infinite(cseq2) AND cseq1 = append(t!1, cseq2)"
    "append(t!1, iseq!1)" "iseq!1")
   (("1" (assert))
    ("2"
     (delete 2)
     (expand "bisimulation?")
     (skosimp)
     (expand "is_finite" 1)
     (grind :rewrites ("append_rest")))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_append
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (expand "length" +)
     (reduce)
     (("1"
       (expand* "append" "append_struct" "coreduce" "coreduce" "length"))
      ("2"
       (expand* "append" "append_struct" "coreduce" "coreduce" "length"))
      ("3" (rewrite "append_rest"))))
    ("4" (skosimp*) (use "append_finite" ("fseq" "fseq!2")))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_append
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skolem!) (use "length_empty?_rew") (expand "index?") (ground))
    ("2"
     (skosimp*)
     (case "empty?(cseq!1)")
     (("1"
       (hide -2)
       (use "length_empty?_rew")
       (expand* "append" "append_struct" "coreduce" "coreduce" "index?"
        "index?")
       (ground))
      ("2"
       (assert)
       (inst - "t!1" "rest(cseq!1)")
       (auto-rewrite "index?_prop")
       (assert)
       (expand* "append" "append_struct")
       (expand "coreduce" +)
       (expand "is_finite" +)
       (expand "length" +)
       (reduce))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_append
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (rewrite "index?_prop")
   (split)
   (("1"
     (rewrite "append_finite_def")
     (use "insert_nth")
     (lift-if)
     (assert))
    ("2" (rewrite "append_infinite_def"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_append
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + ("t!1" "_"))
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp)
     (ground)
     (("1"
       (expand* "append" "append_struct" "coreduce" "coreduce" "last"
        "length" "length" "nth"))
      ("2"
       (lemma "last_rest" ("nfseq" "append(t!1, cseq!1)"))
       (rewrite "append_rest")
       (assert))))
    ("4" (skosimp) (use "append_finite" ("fseq" "fseq!2")))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_append
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case "is_finite(cseq1!1) AND is_finite(cseq2!1)")
   (("1"
     (flatten)
     (assert)
     (rewrite "append_finite_def")
     (rewrite "append_finite_def")
     (lemma "append_length")
     (inst-cp - "t!1" "cseq2!1")
     (inst - "t!1" "cseq1!1")
     (assert)
     (use "insert_extensionality")
     (assert))
    ("2"
     (split)
     (("1"
       (rewrite "append_infinite_def")
       (rewrite "append_infinite_def")
       (use "append_finite" ("fseq" "cseq2!1"))
       (assert))
      ("2"
       (rewrite "append_infinite_def")
       (("1" (rewrite "append_infinite_def"))
        ("2"
         (use "append_finite" ("fseq" "cseq1!1"))
         (use "append_infinite_def")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_append
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (case "is_finite(cseq!1)")
   (("1" (rewrite "append_finite_def") (rewrite "insert_some") (prop))
    ("2" (rewrite "append_infinite_def") (prop))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_append
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (case "is_finite(cseq!1)")
   (("1" (rewrite "append_finite_def") (rewrite "insert_every") (prop))
    ("2" (rewrite "append_infinite_def") (prop))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_append
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (skolem!) (inst?) (assert)) ("2" (assert)) ("3" (assert))
    ("4"
     (skosimp*)
     (expand "is_finite" +)
     (expand* "append" "append_struct")
     (expand "coreduce" +)
     (reduce))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_reverse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(nfseq)" ("nfseq"))
   (("1"
     (expand "reverse" +)
     (expand* "append" "append_struct" "coreduce")
     (smash)
     (("1"
       (hide -1)
       (rewrite "reverse_empty")
       (use "length_empty?_rew")
       (assert)
       (expand* "last" "length" "nth"))
      ("2"
       (expand "reverse" 1)
       (lift-if)
       (ground)
       (inst - "rest(x!1)")
       (expand "length" -1 2)
       (use "last_rest")
       (assert))))
    ("2" (use "reverse_first_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_reverse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp)
     (expand "reverse" +)
     (expand "length" 1 3)
     (use "length_empty?_rew")
     (lift-if)
     (ground)
     (rewrite "append_length")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_reverse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (decompose-equality)
   (rewrite "index?_finite")
   (rewrite "index?_finite")
   (rewrite "reverse_length"))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_reverse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fseq)" ("fseq"))
   (("1"
     (skolem-typepred)
     (expand "reverse" (-1 1))
     (ground)
     (("1" (use "index?_nonempty") (assert))
      ("2"
       (rewrite "append_index")
       (split)
       (("1"
         (use "append_last")
         (expand "last")
         (rewrite "append_length")
         (rewrite "reverse_length")
         (expand "length" +)
         (expand "nth" 2 2)
         (assert))
        ("2"
         (rewrite "append_nth")
         (expand "length" +)
         (inst - "rest(x!1)")
         (expand "length" -2 2)
         (inst - "n!1")
         (expand "nth" 2 2)
         (lift-if)
         (ground)
         (rewrite "reverse_index")
         (rewrite "index?_finite"))))))
    ("2" (use "reverse_nth_TCC1") (ground))
    ("3" (use "reverse_nth_TCC1") (ground))
    ("4" (use "reverse_nth_TCC1") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_reverse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (auto-rewrite "append_first")
     (expand "reverse" +)
     (smash)
     (("1"
       (expand "append" 2 2)
       (expand* "append_struct" "coreduce" "coreduce" "reverse" "append"
        "append_struct" "coreduce" "coreduce")
       (assert))
      ("2"
       (expand "append" 1 2)
       (expand* "append_struct" "coreduce" "coreduce" "reverse" "append"
        "append_struct" "coreduce" "coreduce")
       (assert))
      ("3"
       (auto-rewrite "append_rest")
       (assert)
       (inst - "t!1")
       (replace -2 :dir rl)
       (hide -2)
       (decompose-equality))))
    ("4" (skosimp*) (use "append_finite" ("fseq" "fseq!2")))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_reverse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "nth_extensionality")
   (assert)
   (hide 2)
   (split)
   (("1"
     (decompose-equality)
     (rewrite "reverse_index")
     (rewrite "reverse_index"))
    ("2"
     (skolem-typepred)
     (rewrite "reverse_nth")
     (rewrite "reverse_nth")
     (("1" (rewrite "reverse_length") (assert))
      ("2"
       (rewrite "index?_finite")
       (rewrite "reverse_length")
       (rewrite "reverse_length")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_reverse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "nth_extensionality")
   (inst - "fseq1!1" "fseq2!1")
   (assert)
   (case "index?(fseq1!1) = index?(fseq2!1)")
   (("1"
     (assert)
     (skolem-typepred)
     (copy -1)
     (replace -3 -2)
     (rewrite "index?_finite")
     (rewrite "index?_finite")
     (assert)
     (lemma "reverse_length")
     (inst-cp - "fseq2!1")
     (inst - "fseq1!1")
     (lemma "reverse_nth")
     (inst-cp - "fseq2!1" "length(fseq2!1) - n!1 - 1")
     (("1"
       (inst - "fseq1!1" "length(fseq1!1) - n!1 - 1")
       (("1" (assert)) ("2" (rewrite "index?_finite") (assert))))
      ("2" (rewrite "index?_finite") (assert))))
    ("2"
     (delete 2)
     (rewrite "reverse_index" :dir rl)
     (rewrite "reverse_index" :dir rl :subst ("fseq" "fseq2!1"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_reverse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "nth_some")
   (inst-cp - "fseq!1" "p!1")
   (inst - "reverse(fseq!1)" "p!1")
   (prop)
   (("1"
     (skolem!)
     (rewrite "reverse_nth")
     (inst + "length(fseq!1) - 1 - i!1")
     (use "reverse_nth_TCC1")
     (assert))
    ("2"
     (skolem-typepred)
     (rewrite "reverse_index" :dir rl)
     (assert)
     (use "reverse_nth_TCC1" ("fseq" "fseq!1"))
     (ground)
     (lemma "reverse_nth")
     (inst - "fseq!1" "length(fseq!1) - i!1 - 1")
     (("1" (assert) (inst + "length(fseq!1) - 1 - i!1") (assert))
      ("2" (rewrite "reverse_index"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_reverse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "every_some_rew")
   (inst-cp - "p!1" "reverse(fseq!1)")
   (inst - "p!1" "fseq!1")
   (use "reverse_some")
   (prop))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_reverse
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (rewrite "reverse_index")
   (rewrite "index?_finite")
   (rewrite "index?_finite")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_rest
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1" (inst + "first(nseq!1)") (decompose-equality))
    ("2" (skolem!) (replace -1) (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_remove
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "index")
   (("1" (skosimp) (expand "remove") (propax))
    ("2"
     (skosimp*)
     (expand "remove" +)
     (lift-if)
     (ground)
     (("1" (expand "remove") (propax)) ("2" (expand "remove") (propax))
      ("3"
       (decompose-equality 2)
       (("1" (expand "remove") (propax))
        ("2"
         (inst - "rest(nseq!1)")
         (assert)
         (expand* "remove" "remove"))
        ("3" (expand "remove") (propax))))))
    ("3" (skosimp) (assert))
    ("4" (skosimp) (forward-chain "remove_rest_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_remove
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp* t)
     (expand "remove" +)
     (use "length_empty?_rew")
     (lift-if)
     (ground)
     (decompose-equality 2)
     (inst - "index!1 - 1")
     (expand "length" -)
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_remove
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (expand "remove" +)
     (expand "length" 1 1)
     (expand "length" 1 2)
     (expand "length" 1 3)
     (expand "index?" +)
     (reduce))
    ("4" (skosimp*) (use "remove_finite" ("fseq" "fseq!2")))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_remove
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (case "is_finite(cseq!1)")
   (("1"
     (use "remove_finite")
     (use "remove_length")
     (lemma "index?_finite")
     (reduce :if-match all))
    ("2"
     (use "remove_infinite")
     (lemma "index?_infinite")
     (reduce :if-match all))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_remove
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skolem-typepred)
     (expand "remove" +)
     (expand "nth" 1 2)
     (lift-if)
     (ground)
     (expand* "remove" "index?"))
    ("2"
     (skosimp* t)
     (expand "remove" +)
     (expand "nth" +)
     (smash)
     (("1" (expand* "remove" "index?"))
      ("2" (inst - "rest(cseq!1)" "m!1 - 1") (assert))
      ("3" (inst - "rest(cseq!1)" "m!1 - 1") (assert))))
    ("3" (skolem!) (use "remove_nth_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_remove
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (case "empty?(cseq!1)")
     (("1" (rewrite "remove_nonempty") (ground))
      ("2"
       (ground)
       (rewrite "remove_nonempty")
       (expand "last")
       (expand "remove" +)
       (expand "length" +)
       (expand "nth" +)
       (smash)
       (("1" (rewrite "remove_length") (lift-if) (assert))
        ("2"
         (rewrite "remove_length")
         (lift-if)
         (ground)
         (rewrite "index?_finite"))
        ("3"
         (rewrite "remove_length")
         (lift-if)
         (ground)
         (rewrite "index?_finite"))
        ("4"
         (inst - "index!1 - 1")
         (assert)
         (rewrite "remove_nonempty")
         (expand "length" -)
         (assert))
        ("5"
         (inst - "index!1 - 1")
         (assert)
         (rewrite "remove_nonempty")
         (ground)
         (expand "length" 4)
         (propax))
        ("6"
         (lemma "length_empty?_rew" ("cseq" "rest(cseq!1)"))
         (assert)
         (expand "remove" 2)
         (propax))
        ("7" (expand "length" -7) (assert))
        ("8" (expand "length" 3) (expand "nth" +) (propax))
        ("9" (rewrite "length_nonempty?_rew"))
        ("10" (expand "length" 4 2) (expand "nth" 4 2) (propax))
        ("11" (rewrite "remove_length") (lift-if) (assert))
        ("12"
         (rewrite "remove_length")
         (lift-if)
         (ground)
         (rewrite "index?_finite"))
        ("13" (expand "remove" 3) (expand "length" -5) (assert))
        ("14"
         (inst - "index!1 - 1")
         (assert)
         (rewrite "remove_nonempty"))
        ("15"
         (inst - "index!1 - 1")
         (assert)
         (rewrite "remove_nonempty")
         (flatten)
         (expand "remove" 5)
         (assert)
         (rewrite "length_nonempty?_rew"))
        ("16" (rewrite "length_nonempty?_rew"))))))
    ("4" (skosimp*) (forward-chain "remove_last_TCC2"))
    ("5" (skosimp*) (forward-chain "remove_last_TCC1"))
    ("6" (skosimp*) (use "remove_finite" ("fseq" "fseq!2")))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_remove
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skolem!)
     (lift-if)
     (assert)
     (expand "remove" 1 2)
     (expand "remove" 1 2)
     (lift-if)
     (ground)
     (("1" (expand "remove") (propax))
      ("2"
       (lift-if)
       (ground)
       (("1" (expand "remove") (propax))
        ("2" (rewrite "remove_rest"))))))
    ("2"
     (skosimp*)
     (expand "remove" 1 2)
     (expand "remove" 1 4)
     (lift-if)
     (lift-if)
     (lift-if)
     (ground)
     (("1" (expand "remove") (propax)) ("2" (expand "remove" +) (propax))
      ("3"
       (expand "remove" 1 1)
       (expand "remove" 1 3)
       (decompose-equality)
       (inst - "rest(cseq!1)" "m!1 - 1")
       (assert))
      ("4"
       (expand "remove" 2 1)
       (lift-if)
       (ground)
       (("1" (expand "remove" 1 3) (propax))
        ("2"
         (expand "remove" 2 3)
         (lift-if)
         (ground)
         (("1" (rewrite "remove_empty"))
          ("2"
           (decompose-equality)
           (("1" (rewrite "remove_first"))
            ("2"
             (rewrite "remove_rest")
             (inst - "rest(cseq!1)" "m!1 - 1")
             (assert))))))))))
    ("3" (skosimp) (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_remove
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skosimp)
     (expand* "remove" "index?" "nth")
     (reduce)
     (decompose-equality +))
    ("2"
     (skosimp*)
     (expand "remove" -2)
     (expand "index?" -3)
     (expand "nth" -3)
     (smash)
     (("1"
       (decompose-equality -2)
       (inst - "rest(cseq1!1)" "rest(cseq2!1)")
       (assert)
       (decompose-equality +))
      ("2"
       (decompose-equality)
       (inst - "rest(cseq1!1)" "rest(cseq2!1)")
       (assert)
       (forward-chain "csequence_add_extensionality"))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_remove
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "nth_some")
   (prop)
   (("1"
     (skolem-typepred)
     (rewrite "remove_index")
     (flatten)
     (rewrite "remove_nth")
     (lift-if -4)
     (split -)
     (("1" (flatten) (inst + "i!1") (assert))
      ("2" (flatten) (inst + "i!1 + 1") (assert))))
    ("2"
     (skosimp :preds? t)
     (case "n!1 < index!1")
     (("1"
       (inst + "n!1")
       (("1" (rewrite "remove_nth") (assert))
        ("2"
         (rewrite "remove_index")
         (flatten)
         (rewrite "index?_finite")
         (rewrite "index?_finite")
         (assert))))
      ("2"
       (inst + "n!1 - 1")
       (("1" (rewrite "remove_nth") (assert))
        ("2"
         (assert)
         (rewrite "remove_index")
         (prop)
         (("1" (use "index?_lt" ("n" "n!1 - 1")) (assert))
          ("2"
           (rewrite "index?_finite")
           (rewrite "index?_finite")
           (assert))))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_remove
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "every_some_rew")
   (use "remove_some")
   (expand "pred_NOT")
   (ground)
   (("1" (skosimp) (inst?) (assert)) ("2" (skosimp) (inst?) (assert))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_remove
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "index")
   (("1"
     (skolem-typepred)
     (expand "remove")
     (expand "is_finite" -)
     (ground))
    ("2"
     (skosimp* t)
     (expand "is_finite" (-1 +))
     (expand "remove" +)
     (lift-if)
     (ground)
     (inst - "rest(fseq!1)"))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_remove
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "index")
   (("1"
     (skolem-typepred)
     (expand "remove")
     (expand "is_finite" +)
     (ground))
    ("2"
     (skosimp* t)
     (expand "is_finite" (-3 +))
     (expand "remove" -3)
     (lift-if)
     (ground)
     (inst - "rest(iseq!1)"))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_remove
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (rewrite "remove_nonempty")
   (ground)
   (("1" (rewrite "index?_finite"))
    ("2"
     (expand* "length" "is_finite")
     (use "length_nonempty?_rew")
     (assert))
    ("3"
     (rewrite "index?_finite")
     (expand* "length" "is_finite")
     (use "length_nonempty?_rew")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skolem!) (expand* "prefix" "suffix") (rewrite "o_empty_left"))
    ("2"
     (skosimp*)
     (expand "prefix" +)
     (expand "suffix" +)
     (lift-if)
     (rewrite "o_empty_left")
     (ground)
     (rewrite "o_add")
     (decompose-equality)
     (inst - "rest(cseq!1)"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix_suffix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "prefix_suffix_eta")
   (inst-cp - "cseq2!1" "n!1")
   (inst - "cseq1!1" "n!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_prefix_append
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + ("_" "t!1"))
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp)
     (use "length_empty?_rew")
     (expand "length" +)
     (expand "prefix" +)
     (expand* "append" "append_struct")
     (expand "coreduce" +)
     (reduce)
     (decompose-equality 3))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "coinduction")
   (inst -
    "LAMBDA cseq1, cseq2: cseq1 = merge(cseq2, eseq!1) OR cseq1 = merge(eseq!1, cseq2)"
    "merge(eseq!1, cseq!1)" "cseq!1")
   (delete 2)
   (expand "bisimulation?")
   (skosimp)
   (smash)
   (("1" (expand* "merge" "merge_struct" "coreduce"))
    ("2" (expand* "merge" "merge_struct" "coreduce"))
    ("3"
     (replace -1)
     (hide -1)
     (expand* "merge" "merge_struct")
     (expand "coreduce" 1 1)
     (expand "coreduce" 2 1)
     (expand "coreduce" -)
     (reduce))
    ("4" (expand* "merge" "merge_struct" "coreduce") (reduce))
    ("5" (expand* "merge" "merge_struct" "coreduce"))
    ("6" (expand* "merge" "merge_struct" "coreduce"))
    ("7"
     (replace -1)
     (hide -1)
     (expand* "merge" "merge_struct")
     (expand "coreduce" 1 1)
     (expand "coreduce" 2 1)
     (expand "coreduce" -)
     (reduce))
    ("8" (expand* "merge" "merge_struct" "coreduce") (reduce))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "coinduction")
   (inst -
    "LAMBDA cseq1, cseq2: cseq1 = merge(cseq2, eseq!1) OR cseq1 = merge(eseq!1, cseq2)"
    "merge(cseq!1, eseq!1)" "cseq!1")
   (delete 2)
   (expand "bisimulation?")
   (skosimp)
   (smash)
   (("1" (expand* "merge" "merge_struct" "coreduce"))
    ("2" (expand* "merge" "merge_struct" "coreduce"))
    ("3"
     (replace -1)
     (hide -1)
     (expand* "merge" "merge_struct")
     (expand "coreduce" 1 1)
     (expand "coreduce" 2 1)
     (expand "coreduce" -)
     (reduce))
    ("4" (expand* "merge" "merge_struct" "coreduce") (reduce))
    ("5" (expand* "merge" "merge_struct" "coreduce"))
    ("6" (expand* "merge" "merge_struct" "coreduce"))
    ("7"
     (replace -1)
     (hide -1)
     (expand* "merge" "merge_struct")
     (expand "coreduce" 1 1)
     (expand "coreduce" 2 1)
     (expand "coreduce" -)
     (reduce))
    ("8" (expand* "merge" "merge_struct" "coreduce") (reduce))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lift-if)
   (prop)
   (("1"
     (expand* "merge" "merge_struct")
     (expand "coreduce" 1 1)
     (reduce))
    ("2" (rewrite "merge_empty_left"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "is_finite_induction")
   (inst -
    "LAMBDA cseq: FORALL cseq1, cseq2: cseq = merge(cseq1, cseq2) IMPLIES is_finite(cseq1) AND is_finite(cseq2)")
   (split)
   (("1"
     (inst - "merge(cseq1!1, cseq2!1)")
     (assert)
     (inst - "cseq1!1" "cseq2!1"))
    ("2"
     (delete -1 2)
     (skosimp*)
     (replace -2)
     (hide -2)
     (split)
     (("1" (rewrite "merge_empty") (expand "is_finite") (ground))
      ("2"
       (flatten)
       (case "empty?(cseq1!2)")
       (("1"
         (rewrite "merge_empty_left")
         (expand "is_finite" +)
         (assert))
        ("2"
         (assert)
         (inst - "cseq2!2" "rest(cseq1!2)")
         (expand "is_finite" 2 1)
         (expand* "merge" "merge_struct")
         (expand "coreduce" -2 1)
         (ground))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq1" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (case "empty?(cseq!1)")
     (("1"
       (rewrite "merge_empty_left")
       (rewrite "length_empty?_rew")
       (ground))
      ("2"
       (ground)
       (case "empty?(fseq2!1)")
       (("1"
         (rewrite "merge_empty_right")
         (rewrite "length_empty?_rew")
         (assert))
        ("2"
         (assert)
         (expand* "merge" "merge_struct")
         (expand "coreduce" +)
         (expand "length" 3 1)
         (expand "coreduce" +)
         (expand "length" +)
         (inst - "rest(fseq2!1)")
         (assert))))))
    ("4"
     (skosimp*)
     (lemma "merge_finite" ("fseq1" "fseq1!2" "fseq2" "fseq2!1"))
     (("1" (propax)) ("2" (propax))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "merge_length")
   (auto-rewrite "index?_prop")
   (skolem!)
   (smash)
   (("1" (use "merge_finite")) ("2" (use "merge_infinite2") (assert))
    ("3" (use "merge_infinite1")) ("4" (use "merge_infinite2") (assert))
    ("5" (use "merge_infinite1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "n" ("cseq1" "cseq2" "n") :skolem-typepreds? t)
   (("1"
     (case-replace "x!3 = 0")
     (("1"
       (hide -3)
       (expand* "index?" "nth" "length_lt")
       (rewrite "merge_first")
       (rewrite "merge_nonempty")
       (lemma "length_nonempty?_rew")
       (inst-cp - "x!2")
       (inst - "x!1")
       (smash))
      ("2"
       (assert)
       (expand "index?")
       (flatten)
       (lemma "merge_index_TCC1" ("cseq1" "x!1" "n" "x!3"))
       (use "merge_index")
       (case "is_finite(x!1)")
       (("1"
         (assert)
         (case "empty?(x!1)")
         (("1"
           (use "length_empty?_rew")
           (assert)
           (rewrite "merge_empty_left")
           (expand "length_lt")
           (use "length_nonempty?_rew")
           (expand "index?" -5 1)
           (ground))
          ("2"
           (expand "nth" 3 1)
           (forward-chain "merge_rest")
           (assert)
           (replace -1)
           (inst - "x!2" "rest(x!1)" "x!3 - 1")
           (use "length_empty?_rew")
           (assert)
           (expand "length_lt")
           (expand "is_finite" -2)
           (case-replace "length(x!1) = length(rest(x!1)) + 1")
           (("1"
             (expand "nth" 4 3)
             (expand "nth" 4 4)
             (use "even_plus1")
             (lemma "index?_prop")
             (inst - "x!1" "x!3")
             (expand "is_finite" -1)
             (expand "length" -1)
             (auto-rewrite "index?_finite")
             (smash))
            ("2" (expand "length" 1 1) (propax))))))
        ("2"
         (hide -1 -2)
         (expand "length_lt")
         (assert)
         (expand "nth" 3 1)
         (forward-chain "merge_rest")
         (use "infinite_csequence_is_nonempty")
         (assert)
         (replace -2)
         (inst - "x!2" "rest(x!1)" "x!3 - 1")
         (expand "is_finite" 1)
         (assert)
         (expand "nth" 3 2)
         (expand "nth" 3 3)
         (use "even_plus1")
         (reduce))))))
    ("2" (use "merge_nth_TCC6") (ground))
    ("3" (use "merge_nth_TCC5") (ground))
    ("4" (use "merge_nth_TCC4") (ground))
    ("5" (forward-chain "merge_nth_TCC3") (assert))
    ("6" (forward-chain "merge_nth_TCC3") (assert))
    ("7" (forward-chain "merge_nth_TCC2") (assert))
    ("8" (use "merge_nth_TCC1") (assert))
    ("9" (use "merge_nth_TCC1") (assert))
    ("10" (use "merge_nth_TCC6") (ground))
    ("11" (use "merge_nth_TCC5") (ground))
    ("12" (use "merge_nth_TCC4") (ground))
    ("13" (forward-chain "merge_nth_TCC3") (assert))
    ("14" (forward-chain "merge_nth_TCC3") (assert))
    ("15" (forward-chain "merge_nth_TCC2") (assert))
    ("16" (use "merge_nth_TCC1") (assert))
    ("17" (use "merge_nth_TCC1") (assert))
    ("18" (use "merge_nth_TCC6") (ground))
    ("19" (use "merge_nth_TCC5") (ground))
    ("20" (use "merge_nth_TCC4") (ground))
    ("21" (forward-chain "merge_nth_TCC3") (assert))
    ("22" (forward-chain "merge_nth_TCC3") (assert))
    ("23" (forward-chain "merge_nth_TCC2") (assert))
    ("24" (use "merge_nth_TCC1") (assert))
    ("25" (use "merge_nth_TCC1") (assert))
    ("26" (use "merge_nth_TCC6") (ground))
    ("27" (use "merge_nth_TCC5") (ground))
    ("28" (use "merge_nth_TCC4") (ground))
    ("29" (forward-chain "merge_nth_TCC3") (assert))
    ("30" (forward-chain "merge_nth_TCC3") (assert))
    ("31" (forward-chain "merge_nth_TCC2") (assert))
    ("32" (use "merge_nth_TCC1") (assert))
    ("33" (use "merge_nth_TCC1") (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "last")
   (rewrite "merge_length")
   (use "merge_nth")
   (("1" (expand* "length_lt" "even?") (reduce))
    ("2"
     (rewrite "merge_nonempty")
     (lemma "length_nonempty?_rew")
     (inst-cp - "fseq2!1")
     (inst - "fseq1!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1"
     (lemma "coinduction")
     (inst -
      "LAMBDA cseq1, cseq3: EXISTS cseq2, cseq4: length_eq(cseq1, cseq2) AND length_eq(cseq3, cseq4) AND merge(cseq1, cseq2) = merge(cseq3, cseq4)"
      "cseq1!1" "cseq3!1")
     (("1" (assert) (inst + "cseq2!1" "cseq4!1") (assert))
      ("2"
       (delete -1 -2 -3 2)
       (expand "bisimulation?")
       (skosimp*)
       (lemma "length_eq_empty")
       (inst-cp - "y!1" "cseq4!2")
       (inst - "x!1" "cseq2!2")
       (smash)
       (("1" (rewrite "merge_empty_left") (use "merge_empty") (assert))
        ("2"
         (rewrite "merge_empty_left" :subst ("eseq" "y!1"))
         (use "merge_empty")
         (assert))
        ("3"
         (inst + "rest(cseq2!2)" "rest(cseq4!2)")
         (lemma "length_eq_rest")
         (inst-cp - "y!1" "cseq4!2")
         (inst - "x!1" "cseq2!2")
         (assert)
         (expand* "merge" "merge_struct")
         (expand "coreduce" -)
         (expand "coreduce" -)
         (smash)
         (decompose-equality)
         (decompose-equality))
        ("4"
         (expand* "merge" "merge_struct" "coreduce")
         (decompose-equality))))))
    ("2"
     (lemma "coinduction")
     (inst -
      "LAMBDA cseq2, cseq4: EXISTS cseq1, cseq3: length_eq(cseq1, cseq2) AND length_eq(cseq3, cseq4) AND merge(cseq1, cseq2) = merge(cseq3, cseq4)"
      "cseq2!1" "cseq4!1")
     (("1" (assert) (inst + "cseq1!1" "cseq3!1") (assert))
      ("2"
       (delete -1 -2 -3 2)
       (expand "bisimulation?")
       (skosimp*)
       (lemma "length_eq_empty")
       (inst-cp - "cseq3!2" "y!1")
       (inst - "cseq1!2" "x!1")
       (smash)
       (("1" (rewrite "merge_empty_right") (use "merge_empty") (assert))
        ("2"
         (rewrite "merge_empty_right" :subst ("eseq" "y!1"))
         (use "merge_empty")
         (assert))
        ("3"
         (inst + "rest(cseq1!2)" "rest(cseq3!2)")
         (lemma "length_eq_rest")
         (inst-cp - "cseq3!2" "y!1")
         (inst - "cseq1!2" "x!1")
         (assert)
         (expand* "merge" "merge_struct")
         (expand "coreduce" -)
         (expand "coreduce" -)
         (smash)
         (decompose-equality)
         (decompose-equality))
        ("4"
         (expand* "merge" "merge_struct" "coreduce" "coreduce")
         (decompose-equality)
         (decompose-equality))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_merge
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: FORALL cseq1, cseq2: cseq = merge(cseq1, cseq2) IMPLIES some(p!1)(cseq1) OR some(p!1)(cseq2)")
     (split)
     (("1"
       (inst - "merge(cseq1!1, cseq2!1)")
       (assert)
       (inst - "cseq1!1" "cseq2!1")
       (assert))
      ("2"
       (delete -1 2 3)
       (skosimp*)
       (replace -2)
       (hide -2)
       (lift-if)
       (ground)
       (("1"
         (use "merge_first")
         (expand "some" +)
         (lift-if)
         (ground)
         (rewrite "merge_empty"))
        ("2"
         (use "merge_rest")
         (assert)
         (lift-if)
         (ground)
         (("1"
           (inst - "cseq2!2" "rest(cseq1!2)")
           (expand "some" 2)
           (assert))
          ("2"
           (rewrite "merge_empty_left")
           (expand "some" 4)
           (assert))))))))
    ("2"
     (lemma "some_induction")
     (inst - "p!1"
      "LAMBDA cseq1: FORALL cseq2: some(p!1)(merge(cseq1, cseq2))")
     (split)
     (("1" (inst - "cseq1!1") (assert) (inst - "cseq2!1"))
      ("2"
       (delete -1 2)
       (skosimp*)
       (lift-if)
       (ground)
       (("1"
         (use "merge_nonempty")
         (assert)
         (forward-chain "merge_first")
         (expand "some")
         (assert))
        ("2"
         (use "merge_nonempty")
         (assert)
         (lemma "merge_rest")
         (inst-cp - "a!1" "cseq2!2")
         (assert)
         (expand "some" +)
         (flatten)
         (replace -2)
         (hide -2)
         (inst - "cseq2!2" "rest(a!1)")
         (smash)
         (("1"
           (expand "some" +)
           (lift-if)
           (ground)
           (("1" (rewrite "merge_empty"))
            ("2" (inst - "rest(cseq2!2)") (assert))))
          ("2" (rewrite "merge_empty_left"))
          ("3" (rewrite "merge_nonempty"))))))))
    ("3"
     (lemma "some_induction")
     (inst - "p!1"
      "LAMBDA cseq2: FORALL cseq1: some(p!1)(merge(cseq1, cseq2))")
     (split)
     (("1" (inst - "cseq2!1") (assert) (inst - "cseq1!1"))
      ("2"
       (delete -1 2)
       (skosimp*)
       (lift-if)
       (ground)
       (("1"
         (expand* "merge" "merge_struct" "coreduce" "some")
         (smash)
         (expand* "coreduce" "some"))
        ("2"
         (expand "some" +)
         (lift-if)
         (use "merge_empty")
         (assert)
         (flatten)
         (use "merge_rest")
         (assert)
         (lift-if)
         (ground)
         (replace -2)
         (hide -2)
         (expand "some" +)
         (lift-if)
         (use "merge_empty" ("cseq2" "rest(cseq1!2)"))
         (assert)
         (flatten)
         (use "merge_rest")
         (assert)
         (inst - "rest(cseq1!2)")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "every_some_rew")
   (inst-cp - " p!1" "merge(cseq1!1, cseq2!1)")
   (inst-cp - " p!1" "cseq2!1")
   (inst - " p!1" "cseq1!1")
   (use "merge_some")
   (ground))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq1" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp)
     (case "empty?(cseq!1)")
     (("1" (skolem!) (rewrite "merge_empty_left") (assert))
      ("2"
       (ground)
       (skolem-typepred)
       (case "empty?(fseq2!1)")
       (("1" (rewrite "merge_empty_right"))
        ("2"
         (assert)
         (expand* "merge" "merge_struct")
         (expand "coreduce" +)
         (expand "is_finite" +)
         (expand "coreduce" +)
         (expand "is_finite" +)
         (inst - "rest(fseq2!1)")
         (expand "is_finite" -1)
         (propax))))))))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (assert)
   (rewrite "merge_index")
   (expand "length_lt")
   (auto-rewrite "index?_finite")
   (ground))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (rewrite "merge_index")
   (expand "length_lt")
   (auto-rewrite "index?_finite")
   (auto-rewrite "index?_infinite")
   (reduce))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (expand "even?")
   (skolem!)
   (assert)
   (expand "length_lt")
   (rewrite "index?_prop")
   (rewrite "index?_prop")
   (lemma "merge_finite")
   (lemma "merge_length")
   (reduce))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (use "even_or_odd")
   (assert)
   (expand* "odd?" "length_lt")
   (rewrite "merge_index")
   (auto-rewrite "index?_prop")
   (reduce))


proof_type: t_proof
decl_type: tcc
library: co_structures
theory: csequence_merge
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "merge_nonempty")
   (assert)
   (lemma "length_nonempty?_rew")
   (inst-cp - "fseq2!1")
   (inst - "fseq1!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_merge_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "coinduction")
   (inst - "LAMBDA cseq1, cseq2: cseq1 = merge(split(cseq2))"
    "merge(split(cseq!1))" "cseq!1")
   (delete 2)
   (expand "bisimulation?")
   (skosimp)
   (replace -1)
   (hide -1)
   (smash)
   (("1"
     (lemma "merge_empty")
     (inst - "split(y!1)`1" "split(y!1)`2")
     (ground)
     (rewrite "split_empty_left"))
    ("2"
     (use "split_empty_right")
     (use "split_empty_left")
     (assert)
     (lemma "merge_nonempty")
     (inst - "split(y!1)`1" "split(y!1)`2")
     (assert))
    ("3"
     (lemma "merge_rest")
     (inst - "split(y!1)`1" "split(y!1)`2")
     (assert)
     (lift-if)
     (ground)
     (("1"
       (use "split_rest_swap_left")
       (use "split_rest_swap_right")
       (assert))
      ("2"
       (use "split_empty_left")
       (assert)
       (use "split_empty_right")
       (assert)
       (use "merge_nonempty")
       (assert))))
    ("4"
     (lemma "merge_first")
     (inst - "split(y!1)`1" "split(y!1)`2")
     (assert)
     (lift-if)
     (ground)
     (("1" (rewrite "split_first_left") (assert))
      ("2"
       (use "split_empty_left")
       (assert)
       (use "split_empty_right")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_merge_split
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (decompose-equality)
   (("1"
     (lemma "coinduction")
     (inst -
      "LAMBDA cseq, cseq1: EXISTS cseq2: length_eq(cseq1, cseq2) AND cseq = split(merge(cseq1, cseq2))`1"
      "split(merge(cseq1!1, cseq2!1))`1" "cseq1!1")
     (("1" (assert) (inst + "cseq2!1"))
      ("2"
       (delete -1 2)
       (expand "bisimulation?")
       (skosimp*)
       (replace -2)
       (hide -2)
       (smash)
       (("1" (rewrite "split_empty_left") (rewrite "merge_empty"))
        ("2"
         (rewrite "split_nonempty_left")
         (rewrite "merge_nonempty")
         (rewrite "length_nonempty?_rew")
         (rewrite "length_empty?_rew")
         (expand "length_eq")
         (ground))
        ("3"
         (inst + "rest(cseq2!2)")
         (("1"
           (expand "length_eq")
           (expand "is_finite" -)
           (expand "length" -)
           (smash)
           (("1"
             (rewrite "split_nonempty_left")
             (rewrite "merge_nonempty"))
            ("2"
             (rewrite "split_nonempty_left")
             (rewrite "merge_nonempty"))
            ("3"
             (case "nonempty?(merge(y!1, cseq2!2))")
             (("1"
               (rewrite "split_rest_left")
               (lift-if)
               (ground)
               (("1"
                 (expand* "merge" "merge_struct" "coreduce" "coreduce"))
                ("2"
                 (lemma "merge_rest")
                 (inst-cp - "y!1" "cseq2!2")
                 (assert)
                 (inst - "cseq2!2" "rest(y!1)")
                 (assert))))
              ("2" (rewrite "split_nonempty_left"))))
            ("4"
             (use "split_nonempty_left")
             (assert)
             (rewrite "split_rest_left")
             (lift-if)
             (ground)
             (("1"
               (expand* "merge" "merge_struct" "coreduce" "coreduce"))
              ("2"
               (lemma "merge_rest")
               (inst-cp - "y!1" "cseq2!2")
               (assert)
               (inst - "cseq2!2" "rest(y!1)")
               (assert))))))
          ("2"
           (rewrite "split_nonempty_left")
           (rewrite "merge_nonempty")
           (assert)
           (rewrite "length_nonempty?_rew")
           (rewrite "length_nonempty?_rew")
           (expand "length_eq")
           (ground))))
        ("4"
         (rewrite "split_nonempty_left")
         (rewrite "split_first_left")
         (rewrite "merge_first")
         (lift-if)
         (ground)
         (expand "length_eq")
         (ground)
         (("1" (use "infinite_csequence_is_nonempty"))
          ("2" (expand "length") (assert))))))))
    ("2"
     (lemma "coinduction")
     (inst -
      "LAMBDA cseq, cseq2: EXISTS cseq1: length_eq(cseq1, cseq2) AND cseq = split(merge(cseq1, cseq2))`2"
      "split(merge(cseq1!1, cseq2!1))`2" "cseq2!1")
     (("1" (assert) (inst + "cseq1!1"))
      ("2"
       (delete -1 2)
       (expand "bisimulation?")
       (skosimp*)
       (replace -2)
       (hide -2)
       (smash)
       (("1"
         (rewrite "split_empty_right")
         (rewrite "merge_empty")
         (expand* "merge" "merge_struct" "coreduce" "coreduce")
         (reduce)
         (rewrite "length_empty?_rew")
         (rewrite "length_empty?_rew")
         (rewrite "length_nonempty?_rew")
         (expand "length_eq")
         (ground))
        ("2"
         (rewrite "split_nonempty_right")
         (flatten)
         (rewrite "merge_nonempty")
         (hide -3)
         (rewrite "length_nonempty?_rew")
         (rewrite "length_empty?_rew")
         (expand "length_eq")
         (ground))
        ("3"
         (rewrite "split_nonempty_right")
         (flatten)
         (inst + "rest(cseq1!2)")
         (("1"
           (split)
           (("1"
             (expand "length_eq")
             (expand "is_finite" -)
             (expand "length" -)
             (reduce))
            ("2"
             (rewrite "split_rest_right")
             (lemma "merge_rest")
             (inst-cp - "cseq1!2" "y!1")
             (assert)
             (lift-if)
             (ground)
             (("1"
               (replace -2)
               (inst - "y!1" "rest(cseq1!2)")
               (assert)
               (lift-if)
               (ground)
               (hide -1 -3 -5 -6 2)
               (rewrite "length_nonempty?_rew")
               (rewrite "length_nonempty?_rew")
               (expand "length_eq")
               (ground))
              ("2"
               (rewrite "merge_empty_left" -5)
               (hide -1 -4 2)
               (rewrite "length_nonempty?_rew")
               (rewrite "length_nonempty?_rew")
               (expand "length_eq")
               (ground))))))
          ("2"
           (rewrite "merge_nonempty")
           (assert)
           (hide -3)
           (rewrite "length_nonempty?_rew")
           (rewrite "length_nonempty?_rew")
           (expand "length_eq")
           (ground))))
        ("4"
         (rewrite "split_nonempty_right")
         (flatten)
         (rewrite "split_first_right")
         (assert)
         (rewrite "merge_rest")
         (rewrite "merge_nonempty")
         (lift-if)
         (ground)
         (("1"
           (rewrite "merge_first")
           (lift-if)
           (ground)
           (hide -2 -3 -4 2)
           (rewrite "length_nonempty?_rew")
           (rewrite "length_nonempty?_rew")
           (expand "length_eq")
           (ground))
          ("2" (rewrite "merge_first"))
          ("3"
           (hide -1 2 3)
           (rewrite "length_nonempty?_rew")
           (rewrite "length_nonempty?_rew")
           (expand "length_eq")
           (ground))))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_map_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + ("f!1" "_"))
   (induct "fseq" :name "is_finite_induction[T1]")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp)
     (ground)
     (("1" (use "map_empty") (expand "length") (assert))
      ("2" (expand "map" +) (expand "length" +) (reduce))))
    ("4" (skosimp) (rewrite "map_finite"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_map_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (decompose-equality)
   (rewrite "index?_prop[T1]")
   (rewrite "index?_prop[T2]")
   (iff)
   (rewrite "map_length")
   (ground)
   (("1" (rewrite "map_finite")) ("2" (rewrite "map_infinite"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_map_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + ("f!1" "_" "_"))
   (measure-induct+ "n" ("cseq" "n") :skolem-typepreds? t)
   (("1"
     (expand "map" +)
     (lift-if)
     (use "index?_nonempty[T1]")
     (assert)
     (expand "nth" +)
     (lift-if)
     (ground)
     (inst - "rest(x!1)" "x!2 - 1")
     (assert))
    ("2" (rewrite "map_index")) ("3" (rewrite "map_index") (assert))
    ("4" (rewrite "map_index") (assert)) ("5" (rewrite "map_index"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_map_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "map_length")
   (skolem-typepred)
   (expand "last")
   (rewrite "map_nth")
   (rewrite "length_nonempty?_rew[T1]")
   (assert)
   (rewrite "index?_finite"))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_map_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "coinduction[T2]")
   (inst -
    "LAMBDA (cseq1, cseq2: csequence[T2]): EXISTS cseq: cseq1 = map(f!1)(cseq) AND cseq2 = map(f!1, cseq)"
    "map(f!1)(cseq!1)" "map(f!1, cseq!1)")
   (("1" (assert) (inst + "cseq!1"))
    ("2"
     (delete 2)
     (expand "bisimulation?")
     (skosimp*)
     (expand "map" -)
     (replace*)
     (hide -1 -2)
     (smash)
     (inst + "rest(cseq!2)"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_map_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "injective?")
   (skosimp*)
   (lemma "coinduction[T1]")
   (inst - "LAMBDA cseq1, cseq2: map(f!1)(cseq1) = map(f!1)(cseq2)"
    "x1!1" "x2!1")
   (("1" (assert))
    ("2"
     (delete -2 2)
     (expand "bisimulation?")
     (skosimp)
     (expand "map" -)
     (reduce)
     (("1" (decompose-equality)) ("2" (decompose-equality))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_map_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (forward-chain "map_injective")
   (expand "injective?" -1)
   (inst - "cseq1!1" "cseq2!1")
   (assert)
   (rewrite "map_map")
   (rewrite "map_map"))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_map_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (lemma "some_induction[T2]")
     (inst - "p!1"
      "LAMBDA (cseq2: csequence[T2]): FORALL cseq: cseq2 = map(f!1, cseq) IMPLIES some(p!1 o f!1)(cseq)")
     (split)
     (("1" (inst - "map(f!1, cseq!1)") (assert) (inst - "cseq!1"))
      ("2"
       (delete -1 2)
       (skosimp*)
       (replace -2)
       (hide -2)
       (lift-if)
       (ground)
       (("1" (expand* "map" "o" "some") (reduce))
        ("2"
         (use "map_empty")
         (assert)
         (rewrite "map_rest")
         (inst - "rest(cseq!2)")
         (expand "some" +)
         (flatten))))))
    ("2"
     (lemma "some_induction[T1]")
     (inst - "p!1 o f!1" "LAMBDA cseq: some(p!1)(map(f!1, cseq))")
     (split)
     (("1" (inst - "cseq!1") (assert))
      ("2"
       (delete -1 2)
       (skosimp)
       (lift-if)
       (ground)
       (("1" (expand* "map" "o" "some") (flatten))
        ("2"
         (use "map_empty" ("cseq" "a!1"))
         (assert)
         (expand "some" +)
         (flatten)
         (rewrite "map_rest"))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_map_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (lemma "every_coinduction[T1]")
     (inst - "p!1 o f!1" "LAMBDA cseq: every(p!1)(map(f!1, cseq))")
     (split)
     (("1" (inst - "cseq!1") (assert))
      ("2"
       (delete -1 2)
       (skosimp)
       (lift-if)
       (ground)
       (("1" (expand* "map" "o" "every") (flatten))
        ("2"
         (use "map_empty" ("cseq" "a!1"))
         (assert)
         (expand "every" -)
         (flatten)
         (rewrite "map_rest"))))))
    ("2"
     (lemma "every_coinduction[T2]")
     (inst - "p!1"
      "LAMBDA (cseq2: csequence[T2]): EXISTS cseq: cseq2 = map(f!1, cseq) AND every(p!1 o f!1)(cseq)")
     (split)
     (("1" (inst - "map(f!1, cseq!1)") (assert) (inst + "cseq!1"))
      ("2"
       (delete -1 2)
       (skosimp*)
       (replace -1)
       (hide -1)
       (lift-if)
       (ground)
       (("1" (expand* "map" "o" "every") (reduce))
        ("2"
         (use "map_empty")
         (assert)
         (rewrite "map_rest")
         (inst + "rest(cseq!2)")
         (expand "every" -)
         (flatten))))))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_map_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + ("f!1" "_"))
   (induct "fseq" :name "is_finite_induction[T1]")
   (("1" (assert)) ("2" (assert))
    ("3" (skosimp) (expand "map" +) (expand "is_finite" +) (reduce))))


proof_type: j_proof
decl_type: tcc
library: co_structures
theory: csequence_map_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem + ("f!1" "_"))
   (measure-induct+
    "IF is_finite[T2](map(f!1, iseq)) THEN length(map(f!1, iseq)) ELSE 0 ENDIF"
    ("iseq") :skolem-typepreds? t)
   (assert)
   (expand "is_finite" (-2 +))
   (expand "map" -2)
   (lift-if)
   (ground)
   (inst - "rest(x!1)")
   (assert)
   (expand "map" 4 2)
   (expand "length" 4 2)
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_map_composition
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "coinduction[T3]")
   (inst -
    "LAMBDA (cseq1, cseq2: csequence[T3]): EXISTS (cseq: csequence[T1]): map[T2, T3](f23!1)(map[T1, T2](f12!1)(cseq)) = cseq1 AND map[T1, T3](f23!1 o f12!1)(cseq) = cseq2"
    "map[T2, T3](f23!1)(map[T1, T2](f12!1)(cseq!1))"
    "map[T1, T3](f23!1 o f12!1)(cseq!1)")
   (("1" (assert) (inst + "cseq!1"))
    ("2"
     (delete 2)
     (expand "bisimulation?")
     (skosimp*)
     (expand "map" -)
     (expand "o")
     (smash)
     (("1"
       (inst + "rest(cseq!2)")
       (decompose-equality)
       (decompose-equality -3)
       (assert))
      ("2" (decompose-equality) (decompose-equality -3) (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_list
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "l")
   (("1" (expand* "from_list" "length"))
    ("2" (skosimp) (expand "from_list" +) (expand "length" +) (propax))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_list
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "l")
   (("1" (expand* "from_list" "length" "index?"))
    ("2"
     (skosimp*)
     (expand "from_list" +)
     (expand "length" +)
     (expand "index?" +)
     (ground)
     (("1" (inst - "n!1 - 1") (assert))
      ("2" (inst - "n!1 - 1") (assert))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_list
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "l")
   (("1" (skolem-typepred) (expand "length") (assert))
    ("2"
     (skosimp* t)
     (expand "from_list" +)
     (expand "nth" +)
     (expand "length")
     (lift-if)
     (ground)
     (inst - "n!1 - 1"))
    ("3" (lemma "from_list_nth_TCC1") (propax))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_list
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp)
     (ground)
     (("1" (expand* "to_list" "length"))
      ("2"
       (expand "to_list" +)
       (expand "length" +)
       (lift-if)
       (ground))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_list
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp*)
     (split)
     (("1" (expand* "to_list" "length" "index?") (assert))
      ("2"
       (flatten)
       (assert)
       (expand "to_list" +)
       (expand "length" +)
       (expand "index?" +)
       (lift-if)
       (ground)
       (("1" (inst - "n!1 - 1") (assert))
        ("2" (inst - "n!1 - 1") (assert))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_list
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp* t)
     (expand "index?")
     (expand "to_list" +)
     (expand "nth" +)
     (reduce))
    ("4" (skosimp*) (use "to_list_nth_TCC1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_list
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "l")
   (("1" (expand* "from_list" "to_list"))
    ("2" (skosimp) (expand "from_list" +) (expand "to_list" +) (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_list
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "fseq" :name "is_finite_induction")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skosimp)
     (expand "to_list" +)
     (expand "from_list" +)
     (reduce-with-ext))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: ascending_chains
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "<=")
   (induct "m")
   (("1" (grind))
    ("2"
     (skosimp* t)
     (expand* "partial_order?" "preorder?" "reflexive?" "transitive?"
      "ascending_chain?")
     (flatten)
     (inst - "j!1")
     (inst - "chain!1" "n!1")
     (inst - "chain!1(n!1)")
     (inst - "chain!1(n!1)" "chain!1(j!1)" "chain!1(j!1 + 1)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: ascending_chains
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "<=")
   (expand* "least_upperbound?" "partial_order?" "antisymmetric?")
   (skosimp)
   (inst - "t!1" "u!1")
   (inst - "u!1")
   (inst - "t!1")
   (ground))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "ascending_chain?_def")
   (inst - "chain!1" "n!1" "m!1")
   (assert)
   (forward-chain "prefix?_index")
   (use "prefix?_nth")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand* "limit" "limit_struct" "coreduce")
   (reduce)
   (typepred "min({n | nonempty?(chain!1(n))})")
   (("1"
     (inst - "n!1")
     (assert)
     (lemma "ascending_chain?_nth")
     (inst - "chain!1" "min({n | nonempty?(chain!1(n))})" "n!1" 0)
     (("1" (assert) (expand* "index?" "nth") (assert))
      ("2" (expand* "nonempty?" "empty?" "member") (inst - "n!1"))))
    ("2" (expand* "nonempty?" "empty?" "member") (inst - "n!1"))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand* "limit" "limit_struct")
   (expand "coreduce" -)
   (expand "coreduce" 1 1)
   (reduce))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skolem!)
     (expand* "suffix_chain" "suffix")
     (replace-eta "chain!1"))
    ("2"
     (skosimp*)
     (expand "suffix_chain")
     (expand "suffix" +)
     (lift-if)
     (ground)
     (("1"
       (expand "limit" +)
       (expand* "limit_struct" "coreduce")
       (smash)
       (("1" (skolem!) (inst - "n!1") (assert))
        ("2" (skolem!) (inst - "n!1") (assert))
        ("3"
         (skolem!)
         (inst - "n!1")
         (assert)
         (hide -3 2)
         (expand* "limit" "limit_struct" "coreduce")
         (lift-if)
         (ground))
        ("4"
         (hide -2 -3 2 3)
         (expand* "limit" "limit_struct" "coreduce")
         (lift-if)
         (ground))
        ("5"
         (hide -2 2 3 4)
         (expand* "limit" "limit_struct" "coreduce")
         (lift-if)
         (ground))))
      ("2"
       (inst - "rest_chain(chain!1)")
       (use "limit_rest_chain")
       (assert)
       (replace -1 :dir rl)
       (case-replace
        "(LAMBDA m: suffix(rest_chain(chain!1)(m), j!1)) = (LAMBDA m: IF empty?(chain!1(m)) THEN chain!1(m) ELSE suffix(rest(chain!1(m)), j!1) ENDIF)")
       (("1"
         (hide -1 -2 3)
         (decompose-equality)
         (("1"
           (lift-if)
           (ground)
           (("1" (expand* "rest_chain" "suffix") (assert))
            ("2" (expand "rest_chain") (propax))))
          ("2" (skosimp) (expand "rest_chain") (assert))
          ("3" (skosimp) (assert))
          ("4" (skosimp) (expand* "rest_chain" "suffix?") (assert))))
        ("2" (skosimp) (assert))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand "least_upperbound?")
   (split)
   (("1"
     (expand "upperbound?")
     (skolem!)
     (rewrite "prefix?_prefix")
     (flatten)
     (lemma "coinduction")
     (inst -
      "LAMBDA (cseq1, cseq2: csequence): EXISTS chain, n: cseq1 = chain(n) AND cseq2 = limit(chain) AND NOT (EXISTS m: chain(n) = prefix(limit(chain), m))"
      "chain!1(n!1)" "limit(chain!1)")
     (("1" (assert) (inst + "chain!1" "n!1"))
      ("2"
       (delete 2 3)
       (expand "bisimulation?")
       (skosimp*)
       (replace*)
       (hide -1 -2)
       (smash)
       (("1" (inst + 0) (expand "prefix") (assert))
        ("2" (rewrite "limit_empty") (inst - "n!2") (assert))
        ("3"
         (inst + "rest_chain(chain!2)" "n!2")
         (rewrite "limit_rest_chain")
         (("1"
           (expand "rest_chain" 2 1)
           (skolem!)
           (use "limit_rest_chain")
           (split)
           (("1"
             (replace -1 :dir rl)
             (hide -1)
             (inst + "1 + m!1")
             (expand "prefix" +)
             (lift-if)
             (prop)
             (("1" (rewrite "limit_empty") (inst - "n!2") (assert))
              ("2"
               (expand "rest_chain" -)
               (decompose-equality)
               (forward-chain "limit_first"))))
            ("2" (rewrite "limit_nonempty") (inst + "n!2"))))
          ("2" (rewrite "limit_nonempty") (inst + "n!2"))))
        ("4" (forward-chain "limit_first"))))))
    ("2"
     (lemma "prefix?_coinduction")
     (inst -
      "LAMBDA (cseq1, cseq2: csequence): EXISTS chain: cseq1 = limit(chain) AND upperbound?(chain)(cseq2)")
     (split)
     (("1"
       (skosimp)
       (inst - "limit(chain!1)" "u!1")
       (assert)
       (inst + "chain!1"))
      ("2"
       (delete 2)
       (skosimp*)
       (replace -1)
       (hide -1)
       (rewrite "limit_empty")
       (skolem!)
       (ground)
       (("1" (expand* "upperbound?" "prefix?") (inst - "n!1"))
        ("2"
         (expand* "limit" "limit_struct" "coreduce")
         (reduce)
         (expand* "upperbound?" "prefix?")
         (inst - "min({n | nonempty?(chain!2(n))})")
         (("1" (assert))
          ("2"
           (expand* "nonempty?" "empty?" "member")
           (inst - "n!1")
           (assert))))
        ("3"
         (inst + "rest_chain(chain!2)")
         (rewrite "limit_rest_chain")
         (("1"
           (expand "upperbound?")
           (skolem!)
           (inst - "n!2")
           (expand "prefix?" -)
           (expand "rest_chain" 2)
           (lift-if)
           (expand "prefix?" 2 1)
           (ground))
          ("2" (rewrite "limit_nonempty") (inst + "n!1") (assert))))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (use "limit_lub")
   (expand "least_upperbound?")
   (flatten)
   (expand "upperbound?" -1)
   (inst - "n!1")
   (forward-chain "prefix?_index")
   (use "prefix?_nth")
   (assert))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (skolem!)
     (use "limit_lub")
     (replace -2)
     (expand "least_upperbound?")
     (prop)
     (("1"
       (use "limit_suffix_chain")
       (lemma "limit_empty" ("chain" "suffix_chain(chain!1, n!1)"))
       (prop)
       (("1"
         (inst - "n!1")
         (expand "suffix_chain" -2)
         (replace -3 -1 :dir rl)
         (rewrite "suffix_empty" -1)
         (assert))
        ("2"
         (skolem!)
         (inst + "n!2")
         (expand "suffix_chain" 1)
         (rewrite "suffix_empty")
         (assert)
         (forward-chain "limit_nth")
         (assert))))
      ("2" (skosimp) (forward-chain "limit_nth") (assert))
      ("3" (skosimp) (forward-chain "limit_nth") (assert))))
    ("2"
     (lemma "coinduction")
     (inst -
      "LAMBDA (cseq1, cseq2: csequence): EXISTS chain: cseq1 = limit(chain) AND (FORALL t, n: index?(cseq2)(n) AND nth(cseq2, n) = t IFF (EXISTS m: index?(chain(m))(n) AND nth(chain(m), n) = t))"
      "limit(chain!1)" "cseq!1")
     (("1" (assert) (inst + "chain!1"))
      ("2"
       (delete -1 2)
       (expand "bisimulation?")
       (skosimp*)
       (replace -1)
       (hide -1)
       (case "empty?(y!1)")
       (("1"
         (reduce)
         (rewrite "limit_empty")
         (skolem!)
         (inst - "first(chain!2(n!1))" 0)
         (("1" (expand* "index?" "nth") (inst + "n!1") (assert))
          ("2" (assert))))
        ("2"
         (smash)
         (("1"
           (rewrite "limit_empty")
           (inst - "first(y!1)" 0)
           (expand* "index?" "nth")
           (skosimp)
           (inst - "m!1")
           (assert))
          ("2"
           (inst + "rest_chain(chain!2)")
           (rewrite "limit_rest_chain")
           (("1"
             (skolem!)
             (prop)
             (("1"
               (inst - "nth(y!1, n!1 + 1)" "n!1 + 1")
               (("1"
                 (expand "index?" -4)
                 (assert)
                 (skosimp)
                 (inst + "m!1")
                 (expand "rest_chain")
                 (expand "nth" -6)
                 (assert))
                ("2" (expand "index?" 1) (propax))))
              ("2"
               (skosimp)
               (expand "rest_chain")
               (lift-if)
               (ground)
               (("1" (expand "index?" -4) (propax))
                ("2"
                 (inst - "t!1" "n!1 + 1")
                 (expand "index?" -4)
                 (expand "nth" +)
                 (inst + "m!1")
                 (assert))))
              ("3"
               (skosimp)
               (expand "rest_chain")
               (lift-if)
               (ground)
               (("1" (expand "index?" -4) (propax))
                ("2"
                 (inst - "t!1" "n!1 + 1")
                 (expand "index?" -4)
                 (expand "nth" -4)
                 (inst + "m!1")
                 (assert))))))
            ("2"
             (rewrite "limit_nonempty")
             (inst - "first(y!1)" 0)
             (expand "index?" -)
             (expand "nth" -)
             (skosimp)
             (inst + "m!1"))))
          ("3"
           (inst - "first(y!1)" 0)
           (expand "index?" -)
           (expand "nth" -)
           (skosimp)
           (forward-chain "limit_first")
           (assert))))))))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "limit_def")
   (expand "prefix_chain")
   (skolem!)
   (prop)
   (("1"
     (inst + "n!1 + 1")
     (rewrite "prefix_index")
     (assert)
     (lemma "prefix?_nth")
     (inst - "prefix(cseq!1, 1 + n!1)" "cseq!1" "n!1")
     (assert))
    ("2" (skosimp) (rewrite "prefix_index") (flatten))
    ("3"
     (skosimp)
     (rewrite "prefix_index")
     (flatten)
     (lemma "prefix?_nth")
     (inst - "prefix(cseq!1, m!1)" "cseq!1" "n!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skosimp) (inst + 0) (expand* "prefix" "prefix?"))
    ("2"
     (skosimp*)
     (assert)
     (expand "prefix" +)
     (expand "prefix?" +)
     (assert)
     (inst - "rest(cseq!1)" "rest_chain(chain!1)")
     (("1"
       (expand "rest_chain")
       (expand "index?" -2)
       (case "j!1 = 0")
       (("1"
         (smash)
         (("1"
           (skolem!)
           (lift-if)
           (ground)
           (("1"
             (expand* "prefix" "prefix" "prefix?" "prefix?")
             (flatten)
             (hide -2)
             (rewrite "limit_nonempty")
             (skolem!)
             (inst + "n!1")
             (assert)
             (forward-chain "limit_first")
             (assert))
            ("2"
             (expand* "prefix" "prefix" "prefix?")
             (flatten)
             (hide -1 -6)
             (rewrite "limit_nonempty")
             (skolem!)
             (inst + "n!1")
             (assert)
             (forward-chain "limit_first")
             (assert))))
          ("2" (expand "prefix" 1) (expand "prefix?" 1) (propax))))
        ("2"
         (ground)
         (("1"
           (skolem!)
           (lift-if)
           (ground)
           (("1"
             (expand "prefix?" -2)
             (expand "prefix" -2)
             (lift-if)
             (ground)
             (expand* "prefix" "prefix?")
             (flatten)
             (rewrite "limit_nonempty")
             (skolem!)
             (inst + "n!1")
             (assert)
             (forward-chain "limit_first")
             (assert))
            ("2"
             (inst + "m!1")
             (assert)
             (expand "prefix" -4)
             (expand "prefix?" -4)
             (flatten)
             (use "limit_first")
             (assert))))
          ("2"
           (expand "prefix" -)
           (expand "prefix?" -)
           (flatten)
           (forward-chain "limit_rest_chain")
           (expand "rest_chain")
           (assert))))))
      ("2" (assert))))
    ("3" (skosimp) (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (skosimp)
     (use "limit_prefix_compact" ("n" "length(cseq!1)"))
     (rewrite "index?_finite")
     (("1"
       (use "prefix_full" ("n" "length(cseq!1)"))
       (rewrite "index?_finite")
       (assert))
      ("2"
       (use "length_empty?_rew")
       (assert)
       (expand "prefix?" +)
       (propax))))
    ("2"
     (inst - "prefix_chain(cseq!1)")
     (rewrite "limit_prefix_chain")
     (lemma "prefix?_is_partial_order")
     (expand* "partial_order?" "preorder?" "reflexive?")
     (flatten)
     (inst - "cseq!1")
     (assert)
     (skolem!)
     (expand "prefix_chain")
     (use "prefix?_finite")
     (assert))))


proof_type: f_proof
decl_type: formula
library: co_structures
theory: csequence_limit
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (use "limit_prefix_chain")
   (expand "continuous?")
   (inst - "prefix_chain(cseq!1)")
   (assert)
   (skolem!)
   (inst - "prefix(cseq!1, n!1)")
   (expand "prefix_chain")
   (propax))


