Theory: ModML

Parents


Type constants


Term constants


Axioms


Definitions

joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (TRP
         (\v tl.
           (v = INL one) /\ (LENGTH tl = SUC 0) \/
           (?s. v = INR (INL s)) /\ (LENGTH tl = 0) \/
           (?v. v = INR (INR (INL v))) /\ (LENGTH tl = 0) \/
           (?e. v = INR (INR (INR (INL e)))) /\ (LENGTH tl = 0) \/
           (v = INR (INR (INR (INR (INL one))))) /\ (LENGTH tl = SUC 0) \/
           (v = INR (INR (INR (INR (INR (INL one)))))) /\
           (LENGTH tl = SUC (SUC 0)) \/
           (?n. v = INR (INR (INR (INR (INR (INR (INL n))))))) /\
           (LENGTH tl = 0) \/
           (?n. v = INR (INR (INR (INR (INR (INR (INR (INL n)))))))) /\
           (LENGTH tl = 0) \/
           (v = INR (INR (INR (INR (INR (INR (INR (INR (INL one))))))))) /\
           (LENGTH tl = 0) \/
           (v =
            INR (INR (INR (INR (INR (INR (INR (INR (INR (INL one)))))))))) /\
           (LENGTH tl = SUC (SUC 0)) \/
           (?s.
             v =
             INR
               (INR
                 (INR (INR (INR (INR (INR (INR (INR (INR (INL s))))))))))) /\
           (LENGTH tl = SUC (SUC 0)) \/
           (v =
            INR
              (INR
                (INR
                  (INR
                    (INR (INR (INR (INR (INR (INR (INR (INL one)))))))))))) /\
           (LENGTH tl = 0) \/
           (v =
            INR
              (INR
                (INR
                  (INR
                    (INR (INR (INR (INR (INR (INR (INR (INR one)))))))))))) /\
           (LENGTH tl = SUC 0)))
       rep
joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_ISO_DEF
|- (!a.
     ABS_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
       (REP_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
         a) =
     a) /\
   (!r.
     TRP
       (\v tl.
         (v = INL one) /\ (LENGTH tl = SUC 0) \/
         (?s. v = INR (INL s)) /\ (LENGTH tl = 0) \/
         (?v. v = INR (INR (INL v))) /\ (LENGTH tl = 0) \/
         (?e. v = INR (INR (INR (INL e)))) /\ (LENGTH tl = 0) \/
         (v = INR (INR (INR (INR (INL one))))) /\ (LENGTH tl = SUC 0) \/
         (v = INR (INR (INR (INR (INR (INL one)))))) /\
         (LENGTH tl = SUC (SUC 0)) \/
         (?n. v = INR (INR (INR (INR (INR (INR (INL n))))))) /\
         (LENGTH tl = 0) \/
         (?n. v = INR (INR (INR (INR (INR (INR (INR (INL n)))))))) /\
         (LENGTH tl = 0) \/
         (v = INR (INR (INR (INR (INR (INR (INR (INR (INL one))))))))) /\
         (LENGTH tl = 0) \/
         (v =
          INR (INR (INR (INR (INR (INR (INR (INR (INR (INL one)))))))))) /\
         (LENGTH tl = SUC (SUC 0)) \/
         (?s.
           v =
           INR
             (INR (INR (INR (INR (INR (INR (INR (INR (INR (INL s))))))))))) /\
         (LENGTH tl = SUC (SUC 0)) \/
         (v =
          INR
            (INR
              (INR
                (INR
                  (INR (INR (INR (INR (INR (INR (INR (INL one)))))))))))) /\
         (LENGTH tl = 0) \/
         (v =
          INR
            (INR
              (INR
                (INR
                  (INR (INR (INR (INR (INR (INR (INR (INR one)))))))))))) /\
         (LENGTH tl = SUC 0))
       r =
     REP_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
       (ABS_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
         r) =
     r)
JOINT_int_SIGsigexp_DEF
|- !j.
     JOINT_int_SIGsigexp j =
     ABS_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
       (Node (INL one)
         [REP_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
            j])
JOINT_int_SIGIDsigexp_DEF
|- !s.
     JOINT_int_SIGIDsigexp s =
     ABS_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
       (Node (INR (INL s)) [])
JOINT_int_VALspec_DEF
|- !v'.
     JOINT_int_VALspec v' =
     ABS_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
       (Node (INR (INR (INL v'))) [])
JOINT_int_EXCEPTIONspec_DEF
|- !e.
     JOINT_int_EXCEPTIONspec e =
     ABS_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
       (Node (INR (INR (INR (INL e)))) [])
JOINT_int_STRUCTUREspec_DEF
|- !j.
     JOINT_int_STRUCTUREspec j =
     ABS_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
       (Node (INR (INR (INR (INR (INL one)))))
         [REP_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
            j])
JOINT_int_LOCALspec_DEF
|- !j1 j2.
     JOINT_int_LOCALspec j1 j2 =
     ABS_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
       (Node (INR (INR (INR (INR (INR (INL one))))))
         [REP_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
            j1;
          REP_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
            j2])
JOINT_int_OPENspec_DEF
|- !n.
     JOINT_int_OPENspec n =
     ABS_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
       (Node (INR (INR (INR (INR (INR (INR (INL n))))))) [])
JOINT_int_INCLUDEspec_DEF
|- !n.
     JOINT_int_INCLUDEspec n =
     ABS_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
       (Node (INR (INR (INR (INR (INR (INR (INR (INL n)))))))) [])
JOINT_int_EMPTYspec_DEF
|- JOINT_int_EMPTYspec =
   ABS_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
     (Node (INR (INR (INR (INR (INR (INR (INR (INR (INL one))))))))) [])
JOINT_int_SEQspec_DEF
|- !j1 j2.
     JOINT_int_SEQspec j1 j2 =
     ABS_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
       (Node (INR (INR (INR (INR (INR (INR (INR (INR (INR (INL one))))))))))
         [REP_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
            j1;
          REP_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
            j2])
JOINT_int_STRIDstrdesc_DEF
|- !s j1 j2.
     JOINT_int_STRIDstrdesc s j1 j2 =
     ABS_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
       (Node
          (INR (INR (INR (INR (INR (INR (INR (INR (INR (INR (INL s)))))))))))
         [REP_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
            j1;
          REP_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
            j2])
JOINT_int_sigexp_spec_strdesc_NONE_strdesc_DEF
|- JOINT_int_sigexp_spec_strdesc_NONE_strdesc =
   ABS_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
     (Node
        (INR
          (INR
            (INR (INR (INR (INR (INR (INR (INR (INR (INR (INL one))))))))))))
       [])
JOINT_int_sigexp_spec_strdesc_SOME_strdesc_DEF
|- !j.
     JOINT_int_sigexp_spec_strdesc_SOME_strdesc j =
     ABS_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
       (Node
          (INR
            (INR
              (INR
                (INR (INR (INR (INR (INR (INR (INR (INR (INR one))))))))))))
         [REP_joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc
            j])
joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select_DEF
|- (!j.
     joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
       (JOINT_int_SIGsigexp j) =
     ((joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
         j =
       2)
      => 1
      | 0)) /\
   (!s.
     joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
       (JOINT_int_SIGIDsigexp s) =
     1) /\
   (!v'.
     joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
       (JOINT_int_VALspec v') =
     2) /\
   (!e.
     joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
       (JOINT_int_EXCEPTIONspec e) =
     2) /\
   (!j.
     joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
       (JOINT_int_STRUCTUREspec j) =
     ((joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
         j =
       3)
      => 2
      | 0)) /\
   (!j1 j2.
     joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
       (JOINT_int_LOCALspec j1 j2) =
     (((joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
          j1 =
        2) /\
       (joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
          j2 =
        2))
      => 2
      | 0)) /\
   (!n.
     joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
       (JOINT_int_OPENspec n) =
     2) /\
   (!n.
     joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
       (JOINT_int_INCLUDEspec n) =
     2) /\
   (joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
      JOINT_int_EMPTYspec =
    2) /\
   (!j1 j2.
     joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
       (JOINT_int_SEQspec j1 j2) =
     (((joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
          j1 =
        2) /\
       (joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
          j2 =
        2))
      => 2
      | 0)) /\
   (!s j1 j2.
     joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
       (JOINT_int_STRIDstrdesc s j1 j2) =
     (((joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
          j1 =
        1) /\
       (joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
          j2 =
        4))
      => 3
      | 0)) /\
   (joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
      JOINT_int_sigexp_spec_strdesc_NONE_strdesc =
    4) /\
   (!j.
     joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
       (JOINT_int_sigexp_spec_strdesc_SOME_strdesc j) =
     ((joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
         j =
       3)
      => 4
      | 0))
strdesc_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
           x =
         3)
       rep
strdesc_REP_ABS
|- (!a. strdesc_abs (strdesc_rep a) = a) /\
   (!r.
     (\x.
       joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
         x =
       3)
       r =
     strdesc_rep (strdesc_abs r) =
     r)
strdesc_option_sigexp_spec_strdesc_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
           x =
         4)
       rep
strdesc_option_sigexp_spec_strdesc_REP_ABS
|- (!a.
     strdesc_option_sigexp_spec_strdesc_abs
       (strdesc_option_sigexp_spec_strdesc_rep a) =
     a) /\
   (!r.
     (\x.
       joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
         x =
       4)
       r =
     strdesc_option_sigexp_spec_strdesc_rep
       (strdesc_option_sigexp_spec_strdesc_abs r) =
     r)
spec_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
           x =
         2)
       rep
spec_REP_ABS
|- (!a. spec_abs (spec_rep a) = a) /\
   (!r.
     (\x.
       joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
         x =
       2)
       r =
     spec_rep (spec_abs r) =
     r)
sigexp_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
           x =
         1)
       rep
sigexp_REP_ABS
|- (!a. sigexp_abs (sigexp_rep a) = a) /\
   (!r.
     (\x.
       joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_select
         x =
       1)
       r =
     sigexp_rep (sigexp_abs r) =
     r)
int_SIGsigexp_DEF
|- !x1. int_SIGsigexp x1 = sigexp_abs (JOINT_int_SIGsigexp (spec_rep x1))
int_SIGIDsigexp_DEF
|- !x1. int_SIGIDsigexp x1 = sigexp_abs (JOINT_int_SIGIDsigexp x1)
int_VALspec_DEF
|- !x1. int_VALspec x1 = spec_abs (JOINT_int_VALspec x1)
int_EXCEPTIONspec_DEF
|- !x1. int_EXCEPTIONspec x1 = spec_abs (JOINT_int_EXCEPTIONspec x1)
int_STRUCTUREspec_DEF
|- !x1.
     int_STRUCTUREspec x1 =
     spec_abs (JOINT_int_STRUCTUREspec (strdesc_rep x1))
int_LOCALspec_DEF
|- !x1 x2.
     int_LOCALspec x1 x2 =
     spec_abs (JOINT_int_LOCALspec (spec_rep x1) (spec_rep x2))
int_OPENspec_DEF
|- !x1. int_OPENspec x1 = spec_abs (JOINT_int_OPENspec x1)
int_INCLUDEspec_DEF
|- !x1. int_INCLUDEspec x1 = spec_abs (JOINT_int_INCLUDEspec x1)
int_EMPTYspec_DEF
|- int_EMPTYspec = spec_abs JOINT_int_EMPTYspec
int_SEQspec_DEF
|- !x1 x2.
     int_SEQspec x1 x2 =
     spec_abs (JOINT_int_SEQspec (spec_rep x1) (spec_rep x2))
int_STRIDstrdesc_DEF
|- !x1 x2 x3.
     int_STRIDstrdesc x1 x2 x3 =
     strdesc_abs
       (JOINT_int_STRIDstrdesc x1 (sigexp_rep x2)
         (strdesc_option_sigexp_spec_strdesc_rep x3))
int_sigexp_spec_strdesc_NONE_strdesc_DEF
|- int_sigexp_spec_strdesc_NONE_strdesc =
   strdesc_option_sigexp_spec_strdesc_abs
     JOINT_int_sigexp_spec_strdesc_NONE_strdesc
int_sigexp_spec_strdesc_SOME_strdesc_DEF
|- !x1.
     int_sigexp_spec_strdesc_SOME_strdesc x1 =
     strdesc_option_sigexp_spec_strdesc_abs
       (JOINT_int_sigexp_spec_strdesc_SOME_strdesc (strdesc_rep x1))
SIGsigexp
|- SIGsigexp = (\x0. int_SIGsigexp x0)
SIGIDsigexp
|- SIGIDsigexp = (\x0. int_SIGIDsigexp x0)
VALspec
|- VALspec = (\x0. int_VALspec x0)
EXCEPTIONspec
|- EXCEPTIONspec = (\x0. int_EXCEPTIONspec x0)
STRUCTUREspec
|- STRUCTUREspec = (\x0. int_STRUCTUREspec x0)
LOCALspec
|- LOCALspec = (\x0 x1. int_LOCALspec x0 x1)
OPENspec
|- OPENspec = (\x0. int_OPENspec x0)
INCLUDEspec
|- INCLUDEspec = (\x0. int_INCLUDEspec x0)
EMPTYspec
|- EMPTYspec = int_EMPTYspec
SEQspec
|- SEQspec = (\x0 x1. int_SEQspec x0 x1)
int_inj_strdesc_option_sigexp_spec_strdesc
|- (int_inj_strdesc_option_sigexp_spec_strdesc NONE =
    int_sigexp_spec_strdesc_NONE_strdesc) /\
   (!x0.
     int_inj_strdesc_option_sigexp_spec_strdesc (SOME x0) =
     int_sigexp_spec_strdesc_SOME_strdesc x0)
int_inv_strdesc_option_sigexp_spec_strdesc
|- (int_inv_strdesc_option_sigexp_spec_strdesc
      int_sigexp_spec_strdesc_NONE_strdesc =
    NONE) /\
   (!x1.
     int_inv_strdesc_option_sigexp_spec_strdesc
       (int_sigexp_spec_strdesc_SOME_strdesc x1) =
     SOME x1)
STRIDstrdesc
|- STRIDstrdesc =
   (\x0 x1 x2.
     int_STRIDstrdesc x0 x1 (int_inj_strdesc_option_sigexp_spec_strdesc x2))
dist_aux_ftn_sigexp_DEF
|- (!x1. dist_aux_ftn_sigexp (int_SIGsigexp x1) = 0) /\
   (!x1. dist_aux_ftn_sigexp (int_SIGIDsigexp x1) = 1) /\
   (!x1. dist_aux_ftn_spec (int_VALspec x1) = 2) /\
   (!x1. dist_aux_ftn_spec (int_EXCEPTIONspec x1) = 3) /\
   (!x1. dist_aux_ftn_spec (int_STRUCTUREspec x1) = 4) /\
   (!x1 x2. dist_aux_ftn_spec (int_LOCALspec x1 x2) = 5) /\
   (!x1. dist_aux_ftn_spec (int_OPENspec x1) = 6) /\
   (!x1. dist_aux_ftn_spec (int_INCLUDEspec x1) = 7) /\
   (dist_aux_ftn_spec int_EMPTYspec = 8) /\
   (!x1 x2. dist_aux_ftn_spec (int_SEQspec x1 x2) = 9) /\
   (!x1 x2 x3. dist_aux_ftn_strdesc (int_STRIDstrdesc x1 x2 x3) = 10) /\
   (dist_aux_ftn_strdesc_option_sigexp_spec_strdesc
      int_sigexp_spec_strdesc_NONE_strdesc =
    11) /\
   (!x1.
     dist_aux_ftn_strdesc_option_sigexp_spec_strdesc
       (int_sigexp_spec_strdesc_SOME_strdesc x1) =
     12)
int_SIGsigexp_arg_DEF
|- (!x1. int_SIGsigexp_arg (int_SIGsigexp x1) = x1) /\
   (!x1. int_SIGsigexp_arg (int_SIGIDsigexp x1) = (@x. T))
int_SIGIDsigexp_arg_DEF
|- (!x1. int_SIGIDsigexp_arg (int_SIGIDsigexp x1) = x1) /\
   (!x1. int_SIGIDsigexp_arg (int_SIGsigexp x1) = (@x. T))
int_VALspec_arg_DEF
|- (!x1. int_VALspec_arg (int_VALspec x1) = x1) /\
   (!x1. int_VALspec_arg (int_EXCEPTIONspec x1) = (@x. T)) /\
   (!x1. int_VALspec_arg (int_STRUCTUREspec x1) = (@x. T)) /\
   (!x1 x2. int_VALspec_arg (int_LOCALspec x1 x2) = (@x. T)) /\
   (!x1. int_VALspec_arg (int_OPENspec x1) = (@x. T)) /\
   (!x1. int_VALspec_arg (int_INCLUDEspec x1) = (@x. T)) /\
   (int_VALspec_arg int_EMPTYspec = (@x. T)) /\
   (!x1 x2. int_VALspec_arg (int_SEQspec x1 x2) = (@x. T))
int_EXCEPTIONspec_arg_DEF
|- (!x1. int_EXCEPTIONspec_arg (int_EXCEPTIONspec x1) = x1) /\
   (!x1. int_EXCEPTIONspec_arg (int_VALspec x1) = (@x. T)) /\
   (!x1. int_EXCEPTIONspec_arg (int_STRUCTUREspec x1) = (@x. T)) /\
   (!x1 x2. int_EXCEPTIONspec_arg (int_LOCALspec x1 x2) = (@x. T)) /\
   (!x1. int_EXCEPTIONspec_arg (int_OPENspec x1) = (@x. T)) /\
   (!x1. int_EXCEPTIONspec_arg (int_INCLUDEspec x1) = (@x. T)) /\
   (int_EXCEPTIONspec_arg int_EMPTYspec = (@x. T)) /\
   (!x1 x2. int_EXCEPTIONspec_arg (int_SEQspec x1 x2) = (@x. T))
int_STRUCTUREspec_arg_DEF
|- (!x1. int_STRUCTUREspec_arg (int_STRUCTUREspec x1) = x1) /\
   (!x1. int_STRUCTUREspec_arg (int_VALspec x1) = (@x. T)) /\
   (!x1. int_STRUCTUREspec_arg (int_EXCEPTIONspec x1) = (@x. T)) /\
   (!x1 x2. int_STRUCTUREspec_arg (int_LOCALspec x1 x2) = (@x. T)) /\
   (!x1. int_STRUCTUREspec_arg (int_OPENspec x1) = (@x. T)) /\
   (!x1. int_STRUCTUREspec_arg (int_INCLUDEspec x1) = (@x. T)) /\
   (int_STRUCTUREspec_arg int_EMPTYspec = (@x. T)) /\
   (!x1 x2. int_STRUCTUREspec_arg (int_SEQspec x1 x2) = (@x. T))
int_LOCALspec_arg1_DEF
|- (!x1 x2. int_LOCALspec_arg1 (int_LOCALspec x1 x2) = x1) /\
   (!x1. int_LOCALspec_arg1 (int_VALspec x1) = (@x. T)) /\
   (!x1. int_LOCALspec_arg1 (int_EXCEPTIONspec x1) = (@x. T)) /\
   (!x1. int_LOCALspec_arg1 (int_STRUCTUREspec x1) = (@x. T)) /\
   (!x1. int_LOCALspec_arg1 (int_OPENspec x1) = (@x. T)) /\
   (!x1. int_LOCALspec_arg1 (int_INCLUDEspec x1) = (@x. T)) /\
   (int_LOCALspec_arg1 int_EMPTYspec = (@x. T)) /\
   (!x1 x2. int_LOCALspec_arg1 (int_SEQspec x1 x2) = (@x. T))
int_LOCALspec_arg2_DEF
|- (!x1 x2. int_LOCALspec_arg2 (int_LOCALspec x1 x2) = x2) /\
   (!x1. int_LOCALspec_arg2 (int_VALspec x1) = (@x. T)) /\
   (!x1. int_LOCALspec_arg2 (int_EXCEPTIONspec x1) = (@x. T)) /\
   (!x1. int_LOCALspec_arg2 (int_STRUCTUREspec x1) = (@x. T)) /\
   (!x1. int_LOCALspec_arg2 (int_OPENspec x1) = (@x. T)) /\
   (!x1. int_LOCALspec_arg2 (int_INCLUDEspec x1) = (@x. T)) /\
   (int_LOCALspec_arg2 int_EMPTYspec = (@x. T)) /\
   (!x1 x2. int_LOCALspec_arg2 (int_SEQspec x1 x2) = (@x. T))
int_OPENspec_arg_DEF
|- (!x1. int_OPENspec_arg (int_OPENspec x1) = x1) /\
   (!x1. int_OPENspec_arg (int_VALspec x1) = (@x. T)) /\
   (!x1. int_OPENspec_arg (int_EXCEPTIONspec x1) = (@x. T)) /\
   (!x1. int_OPENspec_arg (int_STRUCTUREspec x1) = (@x. T)) /\
   (!x1 x2. int_OPENspec_arg (int_LOCALspec x1 x2) = (@x. T)) /\
   (!x1. int_OPENspec_arg (int_INCLUDEspec x1) = (@x. T)) /\
   (int_OPENspec_arg int_EMPTYspec = (@x. T)) /\
   (!x1 x2. int_OPENspec_arg (int_SEQspec x1 x2) = (@x. T))
int_INCLUDEspec_arg_DEF
|- (!x1. int_INCLUDEspec_arg (int_INCLUDEspec x1) = x1) /\
   (!x1. int_INCLUDEspec_arg (int_VALspec x1) = (@x. T)) /\
   (!x1. int_INCLUDEspec_arg (int_EXCEPTIONspec x1) = (@x. T)) /\
   (!x1. int_INCLUDEspec_arg (int_STRUCTUREspec x1) = (@x. T)) /\
   (!x1 x2. int_INCLUDEspec_arg (int_LOCALspec x1 x2) = (@x. T)) /\
   (!x1. int_INCLUDEspec_arg (int_OPENspec x1) = (@x. T)) /\
   (int_INCLUDEspec_arg int_EMPTYspec = (@x. T)) /\
   (!x1 x2. int_INCLUDEspec_arg (int_SEQspec x1 x2) = (@x. T))
int_SEQspec_arg1_DEF
|- (!x1 x2. int_SEQspec_arg1 (int_SEQspec x1 x2) = x1) /\
   (!x1. int_SEQspec_arg1 (int_VALspec x1) = (@x. T)) /\
   (!x1. int_SEQspec_arg1 (int_EXCEPTIONspec x1) = (@x. T)) /\
   (!x1. int_SEQspec_arg1 (int_STRUCTUREspec x1) = (@x. T)) /\
   (!x1 x2. int_SEQspec_arg1 (int_LOCALspec x1 x2) = (@x. T)) /\
   (!x1. int_SEQspec_arg1 (int_OPENspec x1) = (@x. T)) /\
   (!x1. int_SEQspec_arg1 (int_INCLUDEspec x1) = (@x. T)) /\
   (int_SEQspec_arg1 int_EMPTYspec = (@x. T))
int_SEQspec_arg2_DEF
|- (!x1 x2. int_SEQspec_arg2 (int_SEQspec x1 x2) = x2) /\
   (!x1. int_SEQspec_arg2 (int_VALspec x1) = (@x. T)) /\
   (!x1. int_SEQspec_arg2 (int_EXCEPTIONspec x1) = (@x. T)) /\
   (!x1. int_SEQspec_arg2 (int_STRUCTUREspec x1) = (@x. T)) /\
   (!x1 x2. int_SEQspec_arg2 (int_LOCALspec x1 x2) = (@x. T)) /\
   (!x1. int_SEQspec_arg2 (int_OPENspec x1) = (@x. T)) /\
   (!x1. int_SEQspec_arg2 (int_INCLUDEspec x1) = (@x. T)) /\
   (int_SEQspec_arg2 int_EMPTYspec = (@x. T))
int_STRIDstrdesc_arg1_DEF
|- !x1 x2 x3. int_STRIDstrdesc_arg1 (int_STRIDstrdesc x1 x2 x3) = x1
int_STRIDstrdesc_arg2_DEF
|- !x1 x2 x3. int_STRIDstrdesc_arg2 (int_STRIDstrdesc x1 x2 x3) = x2
int_STRIDstrdesc_arg3_DEF
|- !x1 x2 x3. int_STRIDstrdesc_arg3 (int_STRIDstrdesc x1 x2 x3) = x3
int_sigexp_spec_strdesc_SOME_strdesc_arg_DEF
|- (!x1.
     int_sigexp_spec_strdesc_SOME_strdesc_arg
       (int_sigexp_spec_strdesc_SOME_strdesc x1) =
     x1) /\
   (int_sigexp_spec_strdesc_SOME_strdesc_arg
      int_sigexp_spec_strdesc_NONE_strdesc =
    (@x. T))
joint_ty_sigbind_sigbind_option_sigbind_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (TRP
         (\v tl.
           (?s0 s1. v = INL (s0,s1)) /\ (LENGTH tl = SUC 0) \/
           (v = INR (INL one)) /\ (LENGTH tl = 0) \/
           (v = INR (INR one)) /\ (LENGTH tl = SUC 0)))
       rep
joint_ty_sigbind_sigbind_option_sigbind_ISO_DEF
|- (!a.
     ABS_joint_ty_sigbind_sigbind_option_sigbind
       (REP_joint_ty_sigbind_sigbind_option_sigbind a) =
     a) /\
   (!r.
     TRP
       (\v tl.
         (?s0 s1. v = INL (s0,s1)) /\ (LENGTH tl = SUC 0) \/
         (v = INR (INL one)) /\ (LENGTH tl = 0) \/
         (v = INR (INR one)) /\ (LENGTH tl = SUC 0))
       r =
     REP_joint_ty_sigbind_sigbind_option_sigbind
       (ABS_joint_ty_sigbind_sigbind_option_sigbind r) =
     r)
JOINT_int_BINDsigbind_DEF
|- !s0 s1 j.
     JOINT_int_BINDsigbind s0 s1 j =
     ABS_joint_ty_sigbind_sigbind_option_sigbind
       (Node (INL (s0,s1)) [REP_joint_ty_sigbind_sigbind_option_sigbind j])
JOINT_int_sigbind_NONE_sigbind_DEF
|- JOINT_int_sigbind_NONE_sigbind =
   ABS_joint_ty_sigbind_sigbind_option_sigbind (Node (INR (INL one)) [])
JOINT_int_sigbind_SOME_sigbind_DEF
|- !j.
     JOINT_int_sigbind_SOME_sigbind j =
     ABS_joint_ty_sigbind_sigbind_option_sigbind
       (Node (INR (INR one)) [REP_joint_ty_sigbind_sigbind_option_sigbind j])
joint_ty_sigbind_sigbind_option_sigbind_select_DEF
|- (!s0 s1 j.
     joint_ty_sigbind_sigbind_option_sigbind_select
       (JOINT_int_BINDsigbind s0 s1 j) =
     ((joint_ty_sigbind_sigbind_option_sigbind_select j = 2) => 1 | 0)) /\
   (joint_ty_sigbind_sigbind_option_sigbind_select
      JOINT_int_sigbind_NONE_sigbind =
    2) /\
   (!j.
     joint_ty_sigbind_sigbind_option_sigbind_select
       (JOINT_int_sigbind_SOME_sigbind j) =
     ((joint_ty_sigbind_sigbind_option_sigbind_select j = 1) => 2 | 0))
sigbind_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x. joint_ty_sigbind_sigbind_option_sigbind_select x = 1)
       rep
sigbind_REP_ABS
|- (!a. sigbind_abs (sigbind_rep a) = a) /\
   (!r.
     (\x. joint_ty_sigbind_sigbind_option_sigbind_select x = 1) r =
     sigbind_rep (sigbind_abs r) =
     r)
sigbind_option_sigbind_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x. joint_ty_sigbind_sigbind_option_sigbind_select x = 2)
       rep
sigbind_option_sigbind_REP_ABS
|- (!a. sigbind_option_sigbind_abs (sigbind_option_sigbind_rep a) = a) /\
   (!r.
     (\x. joint_ty_sigbind_sigbind_option_sigbind_select x = 2) r =
     sigbind_option_sigbind_rep (sigbind_option_sigbind_abs r) =
     r)
int_BINDsigbind_DEF
|- !x1 x2 x3.
     int_BINDsigbind x1 x2 x3 =
     sigbind_abs (JOINT_int_BINDsigbind x1 x2 (sigbind_option_sigbind_rep x3))
int_sigbind_NONE_sigbind_DEF
|- int_sigbind_NONE_sigbind =
   sigbind_option_sigbind_abs JOINT_int_sigbind_NONE_sigbind
int_sigbind_SOME_sigbind_DEF
|- !x1.
     int_sigbind_SOME_sigbind x1 =
     sigbind_option_sigbind_abs
       (JOINT_int_sigbind_SOME_sigbind (sigbind_rep x1))
int_inj_sigbind_option_sigbind
|- (int_inj_sigbind_option_sigbind NONE = int_sigbind_NONE_sigbind) /\
   (!x0.
     int_inj_sigbind_option_sigbind (SOME x0) = int_sigbind_SOME_sigbind x0)
int_inv_sigbind_option_sigbind
|- (int_inv_sigbind_option_sigbind int_sigbind_NONE_sigbind = NONE) /\
   (!x1.
     int_inv_sigbind_option_sigbind (int_sigbind_SOME_sigbind x1) = SOME x1)
BINDsigbind
|- BINDsigbind =
   (\x0 x1 x2. int_BINDsigbind x0 x1 (int_inj_sigbind_option_sigbind x2))
dist_aux_ftn_sigbind_DEF
|- (!x1 x2 x3. dist_aux_ftn_sigbind (int_BINDsigbind x1 x2 x3) = 0) /\
   (dist_aux_ftn_sigbind_option_sigbind int_sigbind_NONE_sigbind = 1) /\
   (!x1.
     dist_aux_ftn_sigbind_option_sigbind (int_sigbind_SOME_sigbind x1) = 2)
int_BINDsigbind_arg1_DEF
|- !x1 x2 x3. int_BINDsigbind_arg1 (int_BINDsigbind x1 x2 x3) = x1
int_BINDsigbind_arg2_DEF
|- !x1 x2 x3. int_BINDsigbind_arg2 (int_BINDsigbind x1 x2 x3) = x2
int_BINDsigbind_arg3_DEF
|- !x1 x2 x3. int_BINDsigbind_arg3 (int_BINDsigbind x1 x2 x3) = x3
int_sigbind_SOME_sigbind_arg_DEF
|- (!x1. int_sigbind_SOME_sigbind_arg (int_sigbind_SOME_sigbind x1) = x1) /\
   (int_sigbind_SOME_sigbind_arg int_sigbind_NONE_sigbind = (@x. T))
sigdec_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (TRP
         (\v tl.
           (?s. v = INL s) /\ (LENGTH tl = 0) \/
           (v = INR (INL one)) /\ (LENGTH tl = 0) \/
           (v = INR (INR one)) /\ (LENGTH tl = SUC (SUC 0))))
       rep
sigdec_ISO_DEF
|- (!a. ABS_sigdec (REP_sigdec a) = a) /\
   (!r.
     TRP
       (\v tl.
         (?s. v = INL s) /\ (LENGTH tl = 0) \/
         (v = INR (INL one)) /\ (LENGTH tl = 0) \/
         (v = INR (INR one)) /\ (LENGTH tl = SUC (SUC 0)))
       r =
     REP_sigdec (ABS_sigdec r) =
     r)
SIGNATUREsigdec_DEF
|- !s. SIGNATUREsigdec s = ABS_sigdec (Node (INL s) [])
EMPTYsigdec_DEF
|- EMPTYsigdec = ABS_sigdec (Node (INR (INL one)) [])
SEQsigdec_DEF
|- !s1 s2.
     SEQsigdec s1 s2 =
     ABS_sigdec (Node (INR (INR one)) [REP_sigdec s1; REP_sigdec s2])
joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (TRP
         (\v tl.
           (v = INL one) /\ (LENGTH tl = 0) \/
           (?s. v = INR (INL s)) /\ (LENGTH tl = 0) \/
           (?s. v = INR (INR (INL s))) /\ (LENGTH tl = SUC (SUC (SUC 0))) \/
           (v = INR (INR (INR (INL one)))) /\ (LENGTH tl = 0) \/
           (v = INR (INR (INR (INR (INL one))))) /\ (LENGTH tl = SUC 0) \/
           (?d. v = INR (INR (INR (INR (INR (INL d)))))) /\ (LENGTH tl = 0) \/
           (v = INR (INR (INR (INR (INR (INR (INL one))))))) /\
           (LENGTH tl = SUC 0) \/
           (v = INR (INR (INR (INR (INR (INR (INR (INL one)))))))) /\
           (LENGTH tl = SUC (SUC 0)) \/
           (v = INR (INR (INR (INR (INR (INR (INR (INR (INL one))))))))) /\
           (LENGTH tl = 0) \/
           (v =
            INR (INR (INR (INR (INR (INR (INR (INR (INR (INL one)))))))))) /\
           (LENGTH tl = SUC (SUC 0)) \/
           (v =
            INR
              (INR
                (INR (INR (INR (INR (INR (INR (INR (INR (INL one))))))))))) /\
           (LENGTH tl = SUC 0) \/
           (?l.
             v =
             INR
               (INR
                 (INR
                   (INR
                     (INR (INR (INR (INR (INR (INR (INR (INL l)))))))))))) /\
           (LENGTH tl = 0) \/
           (?f.
             v =
             INR
               (INR
                 (INR
                   (INR
                     (INR
                       (INR
                         (INR (INR (INR (INR (INR (INR (INL f))))))))))))) /\
           (LENGTH tl = SUC 0) \/
           (v =
            INR
              (INR
                (INR
                  (INR
                    (INR
                      (INR
                        (INR (INR (INR (INR (INR (INR (INR one))))))))))))) /\
           (LENGTH tl = SUC (SUC 0))))
       rep
joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_ISO_DEF
|- (!a.
     ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
       (REP_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
         a) =
     a) /\
   (!r.
     TRP
       (\v tl.
         (v = INL one) /\ (LENGTH tl = 0) \/
         (?s. v = INR (INL s)) /\ (LENGTH tl = 0) \/
         (?s. v = INR (INR (INL s))) /\ (LENGTH tl = SUC (SUC (SUC 0))) \/
         (v = INR (INR (INR (INL one)))) /\ (LENGTH tl = 0) \/
         (v = INR (INR (INR (INR (INL one))))) /\ (LENGTH tl = SUC 0) \/
         (?d. v = INR (INR (INR (INR (INR (INL d)))))) /\ (LENGTH tl = 0) \/
         (v = INR (INR (INR (INR (INR (INR (INL one))))))) /\
         (LENGTH tl = SUC 0) \/
         (v = INR (INR (INR (INR (INR (INR (INR (INL one)))))))) /\
         (LENGTH tl = SUC (SUC 0)) \/
         (v = INR (INR (INR (INR (INR (INR (INR (INR (INL one))))))))) /\
         (LENGTH tl = 0) \/
         (v =
          INR (INR (INR (INR (INR (INR (INR (INR (INR (INL one)))))))))) /\
         (LENGTH tl = SUC (SUC 0)) \/
         (v =
          INR
            (INR
              (INR (INR (INR (INR (INR (INR (INR (INR (INL one))))))))))) /\
         (LENGTH tl = SUC 0) \/
         (?l.
           v =
           INR
             (INR
               (INR
                 (INR (INR (INR (INR (INR (INR (INR (INR (INL l)))))))))))) /\
         (LENGTH tl = 0) \/
         (?f.
           v =
           INR
             (INR
               (INR
                 (INR
                   (INR
                     (INR (INR (INR (INR (INR (INR (INR (INL f))))))))))))) /\
         (LENGTH tl = SUC 0) \/
         (v =
          INR
            (INR
              (INR
                (INR
                  (INR
                    (INR
                      (INR (INR (INR (INR (INR (INR (INR one))))))))))))) /\
         (LENGTH tl = SUC (SUC 0)))
       r =
     REP_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
       (ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
         r) =
     r)
JOINT_int_strbind_strdec_strexp_NONE_sigexp_DEF
|- JOINT_int_strbind_strdec_strexp_NONE_sigexp =
   ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
     (Node (INL one) [])
JOINT_int_strbind_strdec_strexp_SOME_sigexp_DEF
|- !s.
     JOINT_int_strbind_strdec_strexp_SOME_sigexp s =
     ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
       (Node (INR (INL s)) [])
JOINT_int_BINDstrbind_DEF
|- !s j1 j2 j3.
     JOINT_int_BINDstrbind s j1 j2 j3 =
     ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
       (Node (INR (INR (INL s)))
         [REP_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
            j1;
          REP_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
            j2;
          REP_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
            j3])
JOINT_int_strbind_strdec_strexp_NONE_strbind_DEF
|- JOINT_int_strbind_strdec_strexp_NONE_strbind =
   ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
     (Node (INR (INR (INR (INL one)))) [])
JOINT_int_strbind_strdec_strexp_SOME_strbind_DEF
|- !j.
     JOINT_int_strbind_strdec_strexp_SOME_strbind j =
     ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
       (Node (INR (INR (INR (INR (INL one)))))
         [REP_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
            j])
JOINT_int_DECstrdec_DEF
|- !d.
     JOINT_int_DECstrdec d =
     ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
       (Node (INR (INR (INR (INR (INR (INL d)))))) [])
JOINT_int_STRUCTUREstrdec_DEF
|- !j.
     JOINT_int_STRUCTUREstrdec j =
     ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
       (Node (INR (INR (INR (INR (INR (INR (INL one)))))))
         [REP_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
            j])
JOINT_int_LOCALstrdec_DEF
|- !j1 j2.
     JOINT_int_LOCALstrdec j1 j2 =
     ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
       (Node (INR (INR (INR (INR (INR (INR (INR (INL one))))))))
         [REP_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
            j1;
          REP_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
            j2])
JOINT_int_EMPTYstrdec_DEF
|- JOINT_int_EMPTYstrdec =
   ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
     (Node (INR (INR (INR (INR (INR (INR (INR (INR (INL one))))))))) [])
JOINT_int_SEQstrdec_DEF
|- !j1 j2.
     JOINT_int_SEQstrdec j1 j2 =
     ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
       (Node (INR (INR (INR (INR (INR (INR (INR (INR (INR (INL one))))))))))
         [REP_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
            j1;
          REP_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
            j2])
JOINT_int_STRUCTstrexp_DEF
|- !j.
     JOINT_int_STRUCTstrexp j =
     ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
       (Node
          (INR
            (INR (INR (INR (INR (INR (INR (INR (INR (INR (INL one)))))))))))
         [REP_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
            j])
JOINT_int_LONGSTRIDstrexp_DEF
|- !l.
     JOINT_int_LONGSTRIDstrexp l =
     ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
       (Node
          (INR
            (INR
              (INR (INR (INR (INR (INR (INR (INR (INR (INR (INL l))))))))))))
         [])
JOINT_int_APPstrexp_DEF
|- !f' j.
     JOINT_int_APPstrexp f' j =
     ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
       (Node
          (INR
            (INR
              (INR
                (INR
                  (INR (INR (INR (INR (INR (INR (INR (INR (INL f')))))))))))))
         [REP_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
            j])
JOINT_int_LETstrexp_DEF
|- !j1 j2.
     JOINT_int_LETstrexp j1 j2 =
     ABS_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
       (Node
          (INR
            (INR
              (INR
                (INR
                  (INR
                    (INR (INR (INR (INR (INR (INR (INR (INR one)))))))))))))
         [REP_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
            j1;
          REP_joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp
            j2])
joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select_DEF
|- (joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
      JOINT_int_strbind_strdec_strexp_NONE_sigexp =
    1) /\
   (!s.
     joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
       (JOINT_int_strbind_strdec_strexp_SOME_sigexp s) =
     1) /\
   (!s j1 j2 j3.
     joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
       (JOINT_int_BINDstrbind s j1 j2 j3) =
     (((joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
          j1 =
        1) /\
       (joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
          j2 =
        5) /\
       (joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
          j3 =
        3))
      => 2
      | 0)) /\
   (joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
      JOINT_int_strbind_strdec_strexp_NONE_strbind =
    3) /\
   (!j.
     joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
       (JOINT_int_strbind_strdec_strexp_SOME_strbind j) =
     ((joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
         j =
       2)
      => 3
      | 0)) /\
   (!d.
     joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
       (JOINT_int_DECstrdec d) =
     4) /\
   (!j.
     joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
       (JOINT_int_STRUCTUREstrdec j) =
     ((joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
         j =
       2)
      => 4
      | 0)) /\
   (!j1 j2.
     joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
       (JOINT_int_LOCALstrdec j1 j2) =
     (((joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
          j1 =
        4) /\
       (joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
          j2 =
        4))
      => 4
      | 0)) /\
   (joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
      JOINT_int_EMPTYstrdec =
    4) /\
   (!j1 j2.
     joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
       (JOINT_int_SEQstrdec j1 j2) =
     (((joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
          j1 =
        4) /\
       (joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
          j2 =
        4))
      => 4
      | 0)) /\
   (!j.
     joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
       (JOINT_int_STRUCTstrexp j) =
     ((joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
         j =
       4)
      => 5
      | 0)) /\
   (!l.
     joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
       (JOINT_int_LONGSTRIDstrexp l) =
     5) /\
   (!f' j.
     joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
       (JOINT_int_APPstrexp f' j) =
     ((joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
         j =
       5)
      => 5
      | 0)) /\
   (!j1 j2.
     joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
       (JOINT_int_LETstrexp j1 j2) =
     (((joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
          j1 =
        4) /\
       (joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
          j2 =
        5))
      => 5
      | 0))
strbind_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
           x =
         2)
       rep
strbind_REP_ABS
|- (!a. strbind_abs (strbind_rep a) = a) /\
   (!r.
     (\x.
       joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
         x =
       2)
       r =
     strbind_rep (strbind_abs r) =
     r)
strexp_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
           x =
         5)
       rep
strexp_REP_ABS
|- (!a. strexp_abs (strexp_rep a) = a) /\
   (!r.
     (\x.
       joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
         x =
       5)
       r =
     strexp_rep (strexp_abs r) =
     r)
strdec_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
           x =
         4)
       rep
strdec_REP_ABS
|- (!a. strdec_abs (strdec_rep a) = a) /\
   (!r.
     (\x.
       joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
         x =
       4)
       r =
     strdec_rep (strdec_abs r) =
     r)
strbind_option_strbind_strdec_strexp_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
           x =
         3)
       rep
strbind_option_strbind_strdec_strexp_REP_ABS
|- (!a.
     strbind_option_strbind_strdec_strexp_abs
       (strbind_option_strbind_strdec_strexp_rep a) =
     a) /\
   (!r.
     (\x.
       joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
         x =
       3)
       r =
     strbind_option_strbind_strdec_strexp_rep
       (strbind_option_strbind_strdec_strexp_abs r) =
     r)
sigexp_option_strbind_strdec_strexp_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
           x =
         1)
       rep
sigexp_option_strbind_strdec_strexp_REP_ABS
|- (!a.
     sigexp_option_strbind_strdec_strexp_abs
       (sigexp_option_strbind_strdec_strexp_rep a) =
     a) /\
   (!r.
     (\x.
       joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_select
         x =
       1)
       r =
     sigexp_option_strbind_strdec_strexp_rep
       (sigexp_option_strbind_strdec_strexp_abs r) =
     r)
int_strbind_strdec_strexp_NONE_sigexp_DEF
|- int_strbind_strdec_strexp_NONE_sigexp =
   sigexp_option_strbind_strdec_strexp_abs
     JOINT_int_strbind_strdec_strexp_NONE_sigexp
int_strbind_strdec_strexp_SOME_sigexp_DEF
|- !x1.
     int_strbind_strdec_strexp_SOME_sigexp x1 =
     sigexp_option_strbind_strdec_strexp_abs
       (JOINT_int_strbind_strdec_strexp_SOME_sigexp x1)
int_BINDstrbind_DEF
|- !x1 x2 x3 x4.
     int_BINDstrbind x1 x2 x3 x4 =
     strbind_abs
       (JOINT_int_BINDstrbind x1 (sigexp_option_strbind_strdec_strexp_rep x2)
          (strexp_rep x3)
         (strbind_option_strbind_strdec_strexp_rep x4))
int_strbind_strdec_strexp_NONE_strbind_DEF
|- int_strbind_strdec_strexp_NONE_strbind =
   strbind_option_strbind_strdec_strexp_abs
     JOINT_int_strbind_strdec_strexp_NONE_strbind
int_strbind_strdec_strexp_SOME_strbind_DEF
|- !x1.
     int_strbind_strdec_strexp_SOME_strbind x1 =
     strbind_option_strbind_strdec_strexp_abs
       (JOINT_int_strbind_strdec_strexp_SOME_strbind (strbind_rep x1))
int_DECstrdec_DEF
|- !x1. int_DECstrdec x1 = strdec_abs (JOINT_int_DECstrdec x1)
int_STRUCTUREstrdec_DEF
|- !x1.
     int_STRUCTUREstrdec x1 =
     strdec_abs (JOINT_int_STRUCTUREstrdec (strbind_rep x1))
int_LOCALstrdec_DEF
|- !x1 x2.
     int_LOCALstrdec x1 x2 =
     strdec_abs (JOINT_int_LOCALstrdec (strdec_rep x1) (strdec_rep x2))
int_EMPTYstrdec_DEF
|- int_EMPTYstrdec = strdec_abs JOINT_int_EMPTYstrdec
int_SEQstrdec_DEF
|- !x1 x2.
     int_SEQstrdec x1 x2 =
     strdec_abs (JOINT_int_SEQstrdec (strdec_rep x1) (strdec_rep x2))
int_STRUCTstrexp_DEF
|- !x1.
     int_STRUCTstrexp x1 = strexp_abs (JOINT_int_STRUCTstrexp (strdec_rep x1))
int_LONGSTRIDstrexp_DEF
|- !x1. int_LONGSTRIDstrexp x1 = strexp_abs (JOINT_int_LONGSTRIDstrexp x1)
int_APPstrexp_DEF
|- !x1 x2.
     int_APPstrexp x1 x2 = strexp_abs (JOINT_int_APPstrexp x1 (strexp_rep x2))
int_LETstrexp_DEF
|- !x1 x2.
     int_LETstrexp x1 x2 =
     strexp_abs (JOINT_int_LETstrexp (strdec_rep x1) (strexp_rep x2))
int_inj_sigexp_option_strbind_strdec_strexp
|- (int_inj_sigexp_option_strbind_strdec_strexp NONE =
    int_strbind_strdec_strexp_NONE_sigexp) /\
   (!x0.
     int_inj_sigexp_option_strbind_strdec_strexp (SOME x0) =
     int_strbind_strdec_strexp_SOME_sigexp x0)
int_inv_sigexp_option_strbind_strdec_strexp
|- (int_inv_sigexp_option_strbind_strdec_strexp
      int_strbind_strdec_strexp_NONE_sigexp =
    NONE) /\
   (!x1.
     int_inv_sigexp_option_strbind_strdec_strexp
       (int_strbind_strdec_strexp_SOME_sigexp x1) =
     SOME x1)
int_inj_strbind_option_strbind_strdec_strexp
|- (int_inj_strbind_option_strbind_strdec_strexp NONE =
    int_strbind_strdec_strexp_NONE_strbind) /\
   (!x0.
     int_inj_strbind_option_strbind_strdec_strexp (SOME x0) =
     int_strbind_strdec_strexp_SOME_strbind x0)
int_inv_strbind_option_strbind_strdec_strexp
|- (int_inv_strbind_option_strbind_strdec_strexp
      int_strbind_strdec_strexp_NONE_strbind =
    NONE) /\
   (!x1.
     int_inv_strbind_option_strbind_strdec_strexp
       (int_strbind_strdec_strexp_SOME_strbind x1) =
     SOME x1)
BINDstrbind
|- BINDstrbind =
   (\x0 x1 x2 x3.
     int_BINDstrbind x0 (int_inj_sigexp_option_strbind_strdec_strexp x1) x2
       (int_inj_strbind_option_strbind_strdec_strexp x3))
DECstrdec
|- DECstrdec = (\x0. int_DECstrdec x0)
STRUCTUREstrdec
|- STRUCTUREstrdec = (\x0. int_STRUCTUREstrdec x0)
LOCALstrdec
|- LOCALstrdec = (\x0 x1. int_LOCALstrdec x0 x1)
EMPTYstrdec
|- EMPTYstrdec = int_EMPTYstrdec
SEQstrdec
|- SEQstrdec = (\x0 x1. int_SEQstrdec x0 x1)
STRUCTstrexp
|- STRUCTstrexp = (\x0. int_STRUCTstrexp x0)
LONGSTRIDstrexp
|- LONGSTRIDstrexp = (\x0. int_LONGSTRIDstrexp x0)
APPstrexp
|- APPstrexp = (\x0 x1. int_APPstrexp x0 x1)
LETstrexp
|- LETstrexp = (\x0 x1. int_LETstrexp x0 x1)
dist_aux_ftn_sigexp_option_strbind_strdec_strexp_DEF
|- (dist_aux_ftn_sigexp_option_strbind_strdec_strexp
      int_strbind_strdec_strexp_NONE_sigexp =
    0) /\
   (!x1.
     dist_aux_ftn_sigexp_option_strbind_strdec_strexp
       (int_strbind_strdec_strexp_SOME_sigexp x1) =
     1) /\
   (!x1 x2 x3 x4. dist_aux_ftn_strbind (int_BINDstrbind x1 x2 x3 x4) = 2) /\
   (dist_aux_ftn_strbind_option_strbind_strdec_strexp
      int_strbind_strdec_strexp_NONE_strbind =
    3) /\
   (!x1.
     dist_aux_ftn_strbind_option_strbind_strdec_strexp
       (int_strbind_strdec_strexp_SOME_strbind x1) =
     4) /\
   (!x1. dist_aux_ftn_strdec (int_DECstrdec x1) = 5) /\
   (!x1. dist_aux_ftn_strdec (int_STRUCTUREstrdec x1) = 6) /\
   (!x1 x2. dist_aux_ftn_strdec (int_LOCALstrdec x1 x2) = 7) /\
   (dist_aux_ftn_strdec int_EMPTYstrdec = 8) /\
   (!x1 x2. dist_aux_ftn_strdec (int_SEQstrdec x1 x2) = 9) /\
   (!x1. dist_aux_ftn_strexp (int_STRUCTstrexp x1) = 10) /\
   (!x1. dist_aux_ftn_strexp (int_LONGSTRIDstrexp x1) = 11) /\
   (!x1 x2. dist_aux_ftn_strexp (int_APPstrexp x1 x2) = 12) /\
   (!x1 x2. dist_aux_ftn_strexp (int_LETstrexp x1 x2) = 13)
int_strbind_strdec_strexp_SOME_sigexp_arg_DEF
|- (!x1.
     int_strbind_strdec_strexp_SOME_sigexp_arg
       (int_strbind_strdec_strexp_SOME_sigexp x1) =
     x1) /\
   (int_strbind_strdec_strexp_SOME_sigexp_arg
      int_strbind_strdec_strexp_NONE_sigexp =
    (@x. T))
int_BINDstrbind_arg1_DEF
|- !x1 x2 x3 x4. int_BINDstrbind_arg1 (int_BINDstrbind x1 x2 x3 x4) = x1
int_BINDstrbind_arg2_DEF
|- !x1 x2 x3 x4. int_BINDstrbind_arg2 (int_BINDstrbind x1 x2 x3 x4) = x2
int_BINDstrbind_arg3_DEF
|- !x1 x2 x3 x4. int_BINDstrbind_arg3 (int_BINDstrbind x1 x2 x3 x4) = x3
int_BINDstrbind_arg4_DEF
|- !x1 x2 x3 x4. int_BINDstrbind_arg4 (int_BINDstrbind x1 x2 x3 x4) = x4
int_strbind_strdec_strexp_SOME_strbind_arg_DEF
|- (!x1.
     int_strbind_strdec_strexp_SOME_strbind_arg
       (int_strbind_strdec_strexp_SOME_strbind x1) =
     x1) /\
   (int_strbind_strdec_strexp_SOME_strbind_arg
      int_strbind_strdec_strexp_NONE_strbind =
    (@x. T))
int_DECstrdec_arg_DEF
|- (!x1. int_DECstrdec_arg (int_DECstrdec x1) = x1) /\
   (!x1. int_DECstrdec_arg (int_STRUCTUREstrdec x1) = (@x. T)) /\
   (!x1 x2. int_DECstrdec_arg (int_LOCALstrdec x1 x2) = (@x. T)) /\
   (int_DECstrdec_arg int_EMPTYstrdec = (@x. T)) /\
   (!x1 x2. int_DECstrdec_arg (int_SEQstrdec x1 x2) = (@x. T))
int_STRUCTUREstrdec_arg_DEF
|- (!x1. int_STRUCTUREstrdec_arg (int_STRUCTUREstrdec x1) = x1) /\
   (!x1. int_STRUCTUREstrdec_arg (int_DECstrdec x1) = (@x. T)) /\
   (!x1 x2. int_STRUCTUREstrdec_arg (int_LOCALstrdec x1 x2) = (@x. T)) /\
   (int_STRUCTUREstrdec_arg int_EMPTYstrdec = (@x. T)) /\
   (!x1 x2. int_STRUCTUREstrdec_arg (int_SEQstrdec x1 x2) = (@x. T))
int_LOCALstrdec_arg1_DEF
|- (!x1 x2. int_LOCALstrdec_arg1 (int_LOCALstrdec x1 x2) = x1) /\
   (!x1. int_LOCALstrdec_arg1 (int_DECstrdec x1) = (@x. T)) /\
   (!x1. int_LOCALstrdec_arg1 (int_STRUCTUREstrdec x1) = (@x. T)) /\
   (int_LOCALstrdec_arg1 int_EMPTYstrdec = (@x. T)) /\
   (!x1 x2. int_LOCALstrdec_arg1 (int_SEQstrdec x1 x2) = (@x. T))
int_LOCALstrdec_arg2_DEF
|- (!x1 x2. int_LOCALstrdec_arg2 (int_LOCALstrdec x1 x2) = x2) /\
   (!x1. int_LOCALstrdec_arg2 (int_DECstrdec x1) = (@x. T)) /\
   (!x1. int_LOCALstrdec_arg2 (int_STRUCTUREstrdec x1) = (@x. T)) /\
   (int_LOCALstrdec_arg2 int_EMPTYstrdec = (@x. T)) /\
   (!x1 x2. int_LOCALstrdec_arg2 (int_SEQstrdec x1 x2) = (@x. T))
int_SEQstrdec_arg1_DEF
|- (!x1 x2. int_SEQstrdec_arg1 (int_SEQstrdec x1 x2) = x1) /\
   (!x1. int_SEQstrdec_arg1 (int_DECstrdec x1) = (@x. T)) /\
   (!x1. int_SEQstrdec_arg1 (int_STRUCTUREstrdec x1) = (@x. T)) /\
   (!x1 x2. int_SEQstrdec_arg1 (int_LOCALstrdec x1 x2) = (@x. T)) /\
   (int_SEQstrdec_arg1 int_EMPTYstrdec = (@x. T))
int_SEQstrdec_arg2_DEF
|- (!x1 x2. int_SEQstrdec_arg2 (int_SEQstrdec x1 x2) = x2) /\
   (!x1. int_SEQstrdec_arg2 (int_DECstrdec x1) = (@x. T)) /\
   (!x1. int_SEQstrdec_arg2 (int_STRUCTUREstrdec x1) = (@x. T)) /\
   (!x1 x2. int_SEQstrdec_arg2 (int_LOCALstrdec x1 x2) = (@x. T)) /\
   (int_SEQstrdec_arg2 int_EMPTYstrdec = (@x. T))
int_STRUCTstrexp_arg_DEF
|- (!x1. int_STRUCTstrexp_arg (int_STRUCTstrexp x1) = x1) /\
   (!x1. int_STRUCTstrexp_arg (int_LONGSTRIDstrexp x1) = (@x. T)) /\
   (!x1 x2. int_STRUCTstrexp_arg (int_APPstrexp x1 x2) = (@x. T)) /\
   (!x1 x2. int_STRUCTstrexp_arg (int_LETstrexp x1 x2) = (@x. T))
int_LONGSTRIDstrexp_arg_DEF
|- (!x1. int_LONGSTRIDstrexp_arg (int_LONGSTRIDstrexp x1) = x1) /\
   (!x1. int_LONGSTRIDstrexp_arg (int_STRUCTstrexp x1) = (@x. T)) /\
   (!x1 x2. int_LONGSTRIDstrexp_arg (int_APPstrexp x1 x2) = (@x. T)) /\
   (!x1 x2. int_LONGSTRIDstrexp_arg (int_LETstrexp x1 x2) = (@x. T))
int_APPstrexp_arg1_DEF
|- (!x1 x2. int_APPstrexp_arg1 (int_APPstrexp x1 x2) = x1) /\
   (!x1. int_APPstrexp_arg1 (int_STRUCTstrexp x1) = (@x. T)) /\
   (!x1. int_APPstrexp_arg1 (int_LONGSTRIDstrexp x1) = (@x. T)) /\
   (!x1 x2. int_APPstrexp_arg1 (int_LETstrexp x1 x2) = (@x. T))
int_APPstrexp_arg2_DEF
|- (!x1 x2. int_APPstrexp_arg2 (int_APPstrexp x1 x2) = x2) /\
   (!x1. int_APPstrexp_arg2 (int_STRUCTstrexp x1) = (@x. T)) /\
   (!x1. int_APPstrexp_arg2 (int_LONGSTRIDstrexp x1) = (@x. T)) /\
   (!x1 x2. int_APPstrexp_arg2 (int_LETstrexp x1 x2) = (@x. T))
int_LETstrexp_arg1_DEF
|- (!x1 x2. int_LETstrexp_arg1 (int_LETstrexp x1 x2) = x1) /\
   (!x1. int_LETstrexp_arg1 (int_STRUCTstrexp x1) = (@x. T)) /\
   (!x1. int_LETstrexp_arg1 (int_LONGSTRIDstrexp x1) = (@x. T)) /\
   (!x1 x2. int_LETstrexp_arg1 (int_APPstrexp x1 x2) = (@x. T))
int_LETstrexp_arg2_DEF
|- (!x1 x2. int_LETstrexp_arg2 (int_LETstrexp x1 x2) = x2) /\
   (!x1. int_LETstrexp_arg2 (int_STRUCTstrexp x1) = (@x. T)) /\
   (!x1. int_LETstrexp_arg2 (int_LONGSTRIDstrexp x1) = (@x. T)) /\
   (!x1 x2. int_LETstrexp_arg2 (int_APPstrexp x1 x2) = (@x. T))
joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (TRP
         (\v tl.
           (?f s0 s1 s2. v = INL (f,s0,s1,s2)) /\ (LENGTH tl = SUC (SUC 0)) \/
           (v = INR (INL one)) /\ (LENGTH tl = 0) \/
           (v = INR (INR (INL one))) /\ (LENGTH tl = SUC 0) \/
           (v = INR (INR (INR (INL one)))) /\ (LENGTH tl = 0) \/
           (?s. v = INR (INR (INR (INR s)))) /\ (LENGTH tl = 0)))
       rep
joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_ISO_DEF
|- (!a.
     ABS_joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind
       (REP_joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind a) =
     a) /\
   (!r.
     TRP
       (\v tl.
         (?f s0 s1 s2. v = INL (f,s0,s1,s2)) /\ (LENGTH tl = SUC (SUC 0)) \/
         (v = INR (INL one)) /\ (LENGTH tl = 0) \/
         (v = INR (INR (INL one))) /\ (LENGTH tl = SUC 0) \/
         (v = INR (INR (INR (INL one)))) /\ (LENGTH tl = 0) \/
         (?s. v = INR (INR (INR (INR s)))) /\ (LENGTH tl = 0))
       r =
     REP_joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind
       (ABS_joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind r) =
     r)
JOINT_int_BINDfunbind_DEF
|- !f' s0 s1 j1 s2 j2.
     JOINT_int_BINDfunbind f' s0 s1 j1 s2 j2 =
     ABS_joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind
       (Node (INL (f',s0,s1,s2))
         [REP_joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind
            j1;
          REP_joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind
            j2])
JOINT_int_funbind_NONE_funbind_DEF
|- JOINT_int_funbind_NONE_funbind =
   ABS_joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind
     (Node (INR (INL one)) [])
JOINT_int_funbind_SOME_funbind_DEF
|- !j.
     JOINT_int_funbind_SOME_funbind j =
     ABS_joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind
       (Node (INR (INR (INL one)))
         [REP_joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind
            j])
JOINT_int_funbind_NONE_sigexp_DEF
|- JOINT_int_funbind_NONE_sigexp =
   ABS_joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind
     (Node (INR (INR (INR (INL one)))) [])
JOINT_int_funbind_SOME_sigexp_DEF
|- !s.
     JOINT_int_funbind_SOME_sigexp s =
     ABS_joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind
       (Node (INR (INR (INR (INR s)))) [])
joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_select_DEF
|- (!f' s0 s1 j1 s2 j2.
     joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_select
       (JOINT_int_BINDfunbind f' s0 s1 j1 s2 j2) =
     (((joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_select
          j1 =
        3) /\
       (joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_select
          j2 =
        2))
      => 1
      | 0)) /\
   (joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_select
      JOINT_int_funbind_NONE_funbind =
    2) /\
   (!j.
     joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_select
       (JOINT_int_funbind_SOME_funbind j) =
     ((joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_select
         j =
       1)
      => 2
      | 0)) /\
   (joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_select
      JOINT_int_funbind_NONE_sigexp =
    3) /\
   (!s.
     joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_select
       (JOINT_int_funbind_SOME_sigexp s) =
     3)
funbind_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_select
           x =
         1)
       rep
funbind_REP_ABS
|- (!a. funbind_abs (funbind_rep a) = a) /\
   (!r.
     (\x.
       joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_select
         x =
       1)
       r =
     funbind_rep (funbind_abs r) =
     r)
sigexp_option_funbind_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_select
           x =
         3)
       rep
sigexp_option_funbind_REP_ABS
|- (!a. sigexp_option_funbind_abs (sigexp_option_funbind_rep a) = a) /\
   (!r.
     (\x.
       joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_select
         x =
       3)
       r =
     sigexp_option_funbind_rep (sigexp_option_funbind_abs r) =
     r)
funbind_option_funbind_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_select
           x =
         2)
       rep
funbind_option_funbind_REP_ABS
|- (!a. funbind_option_funbind_abs (funbind_option_funbind_rep a) = a) /\
   (!r.
     (\x.
       joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_select
         x =
       2)
       r =
     funbind_option_funbind_rep (funbind_option_funbind_abs r) =
     r)
int_BINDfunbind_DEF
|- !x1 x2 x3 x4 x5 x6.
     int_BINDfunbind x1 x2 x3 x4 x5 x6 =
     funbind_abs
       (JOINT_int_BINDfunbind x1 x2 x3 (sigexp_option_funbind_rep x4) x5
         (funbind_option_funbind_rep x6))
int_funbind_NONE_funbind_DEF
|- int_funbind_NONE_funbind =
   funbind_option_funbind_abs JOINT_int_funbind_NONE_funbind
int_funbind_SOME_funbind_DEF
|- !x1.
     int_funbind_SOME_funbind x1 =
     funbind_option_funbind_abs
       (JOINT_int_funbind_SOME_funbind (funbind_rep x1))
int_funbind_NONE_sigexp_DEF
|- int_funbind_NONE_sigexp =
   sigexp_option_funbind_abs JOINT_int_funbind_NONE_sigexp
int_funbind_SOME_sigexp_DEF
|- !x1.
     int_funbind_SOME_sigexp x1 =
     sigexp_option_funbind_abs (JOINT_int_funbind_SOME_sigexp x1)
int_inj_funbind_option_funbind
|- (int_inj_funbind_option_funbind NONE = int_funbind_NONE_funbind) /\
   (!x0.
     int_inj_funbind_option_funbind (SOME x0) = int_funbind_SOME_funbind x0)
int_inv_funbind_option_funbind
|- (int_inv_funbind_option_funbind int_funbind_NONE_funbind = NONE) /\
   (!x1.
     int_inv_funbind_option_funbind (int_funbind_SOME_funbind x1) = SOME x1)
int_inj_sigexp_option_funbind
|- (int_inj_sigexp_option_funbind NONE = int_funbind_NONE_sigexp) /\
   (!x0. int_inj_sigexp_option_funbind (SOME x0) = int_funbind_SOME_sigexp x0)
int_inv_sigexp_option_funbind
|- (int_inv_sigexp_option_funbind int_funbind_NONE_sigexp = NONE) /\
   (!x1. int_inv_sigexp_option_funbind (int_funbind_SOME_sigexp x1) = SOME x1)
BINDfunbind
|- BINDfunbind =
   (\x0 x1 x2 x3 x4 x5.
     int_BINDfunbind x0 x1 x2 (int_inj_sigexp_option_funbind x3) x4
       (int_inj_funbind_option_funbind x5))
dist_aux_ftn_funbind_DEF
|- (!x1 x2 x3 x4 x5 x6.
     dist_aux_ftn_funbind (int_BINDfunbind x1 x2 x3 x4 x5 x6) = 0) /\
   (dist_aux_ftn_funbind_option_funbind int_funbind_NONE_funbind = 1) /\
   (!x1.
     dist_aux_ftn_funbind_option_funbind (int_funbind_SOME_funbind x1) = 2) /\
   (dist_aux_ftn_sigexp_option_funbind int_funbind_NONE_sigexp = 3) /\
   (!x1. dist_aux_ftn_sigexp_option_funbind (int_funbind_SOME_sigexp x1) = 4)
int_BINDfunbind_arg1_DEF
|- !x1 x2 x3 x4 x5 x6.
     int_BINDfunbind_arg1 (int_BINDfunbind x1 x2 x3 x4 x5 x6) = x1
int_BINDfunbind_arg2_DEF
|- !x1 x2 x3 x4 x5 x6.
     int_BINDfunbind_arg2 (int_BINDfunbind x1 x2 x3 x4 x5 x6) = x2
int_BINDfunbind_arg3_DEF
|- !x1 x2 x3 x4 x5 x6.
     int_BINDfunbind_arg3 (int_BINDfunbind x1 x2 x3 x4 x5 x6) = x3
int_BINDfunbind_arg4_DEF
|- !x1 x2 x3 x4 x5 x6.
     int_BINDfunbind_arg4 (int_BINDfunbind x1 x2 x3 x4 x5 x6) = x4
int_BINDfunbind_arg5_DEF
|- !x1 x2 x3 x4 x5 x6.
     int_BINDfunbind_arg5 (int_BINDfunbind x1 x2 x3 x4 x5 x6) = x5
int_BINDfunbind_arg6_DEF
|- !x1 x2 x3 x4 x5 x6.
     int_BINDfunbind_arg6 (int_BINDfunbind x1 x2 x3 x4 x5 x6) = x6
int_funbind_SOME_funbind_arg_DEF
|- (!x1. int_funbind_SOME_funbind_arg (int_funbind_SOME_funbind x1) = x1) /\
   (int_funbind_SOME_funbind_arg int_funbind_NONE_funbind = (@x. T))
int_funbind_SOME_sigexp_arg_DEF
|- (!x1. int_funbind_SOME_sigexp_arg (int_funbind_SOME_sigexp x1) = x1) /\
   (int_funbind_SOME_sigexp_arg int_funbind_NONE_sigexp = (@x. T))
fundec_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (TRP
         (\v tl.
           (?f. v = INL f) /\ (LENGTH tl = 0) \/
           (v = INR (INL one)) /\ (LENGTH tl = 0) \/
           (v = INR (INR one)) /\ (LENGTH tl = SUC (SUC 0))))
       rep
fundec_ISO_DEF
|- (!a. ABS_fundec (REP_fundec a) = a) /\
   (!r.
     TRP
       (\v tl.
         (?f. v = INL f) /\ (LENGTH tl = 0) \/
         (v = INR (INL one)) /\ (LENGTH tl = 0) \/
         (v = INR (INR one)) /\ (LENGTH tl = SUC (SUC 0)))
       r =
     REP_fundec (ABS_fundec r) =
     r)
FUNCTORfundec_DEF
|- !f'. FUNCTORfundec f' = ABS_fundec (Node (INL f') [])
EMPTYfundec_DEF
|- EMPTYfundec = ABS_fundec (Node (INR (INL one)) [])
SEQfundec_DEF
|- !f1 f2.
     SEQfundec f1 f2 =
     ABS_fundec (Node (INR (INR one)) [REP_fundec f1; REP_fundec f2])
topdec_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (TRP
         (\v tl.
           (?s. v = INL s) /\ (LENGTH tl = 0) \/
           (?s. v = INR (INL s)) /\ (LENGTH tl = 0) \/
           (?f. v = INR (INR f)) /\ (LENGTH tl = 0)))
       rep
topdec_ISO_DEF
|- (!a. ABS_topdec (REP_topdec a) = a) /\
   (!r.
     TRP
       (\v tl.
         (?s. v = INL s) /\ (LENGTH tl = 0) \/
         (?s. v = INR (INL s)) /\ (LENGTH tl = 0) \/
         (?f. v = INR (INR f)) /\ (LENGTH tl = 0))
       r =
     REP_topdec (ABS_topdec r) =
     r)
STRDEC_DEF
|- !s. STRDEC s = ABS_topdec (Node (INL s) [])
SIGDEC_DEF
|- !s. SIGDEC s = ABS_topdec (Node (INR (INL s)) [])
FUNDEC_DEF
|- !f'. FUNDEC f' = ABS_topdec (Node (INR (INR f')) [])
joint_ty_program_program_option_program_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (TRP
         (\v tl.
           (?t. v = INL t) /\ (LENGTH tl = SUC 0) \/
           (v = INR (INL one)) /\ (LENGTH tl = 0) \/
           (v = INR (INR one)) /\ (LENGTH tl = SUC 0)))
       rep
joint_ty_program_program_option_program_ISO_DEF
|- (!a.
     ABS_joint_ty_program_program_option_program
       (REP_joint_ty_program_program_option_program a) =
     a) /\
   (!r.
     TRP
       (\v tl.
         (?t. v = INL t) /\ (LENGTH tl = SUC 0) \/
         (v = INR (INL one)) /\ (LENGTH tl = 0) \/
         (v = INR (INR one)) /\ (LENGTH tl = SUC 0))
       r =
     REP_joint_ty_program_program_option_program
       (ABS_joint_ty_program_program_option_program r) =
     r)
JOINT_int_SEQprogram_DEF
|- !t j.
     JOINT_int_SEQprogram t j =
     ABS_joint_ty_program_program_option_program
       (Node (INL t) [REP_joint_ty_program_program_option_program j])
JOINT_int_program_NONE_program_DEF
|- JOINT_int_program_NONE_program =
   ABS_joint_ty_program_program_option_program (Node (INR (INL one)) [])
JOINT_int_program_SOME_program_DEF
|- !j.
     JOINT_int_program_SOME_program j =
     ABS_joint_ty_program_program_option_program
       (Node (INR (INR one)) [REP_joint_ty_program_program_option_program j])
joint_ty_program_program_option_program_select_DEF
|- (!t j.
     joint_ty_program_program_option_program_select
       (JOINT_int_SEQprogram t j) =
     ((joint_ty_program_program_option_program_select j = 2) => 1 | 0)) /\
   (joint_ty_program_program_option_program_select
      JOINT_int_program_NONE_program =
    2) /\
   (!j.
     joint_ty_program_program_option_program_select
       (JOINT_int_program_SOME_program j) =
     ((joint_ty_program_program_option_program_select j = 1) => 2 | 0))
program_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x. joint_ty_program_program_option_program_select x = 1)
       rep
program_REP_ABS
|- (!a. program_abs (program_rep a) = a) /\
   (!r.
     (\x. joint_ty_program_program_option_program_select x = 1) r =
     program_rep (program_abs r) =
     r)
program_option_program_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x. joint_ty_program_program_option_program_select x = 2)
       rep
program_option_program_REP_ABS
|- (!a. program_option_program_abs (program_option_program_rep a) = a) /\
   (!r.
     (\x. joint_ty_program_program_option_program_select x = 2) r =
     program_option_program_rep (program_option_program_abs r) =
     r)
int_SEQprogram_DEF
|- !x1 x2.
     int_SEQprogram x1 x2 =
     program_abs (JOINT_int_SEQprogram x1 (program_option_program_rep x2))
int_program_NONE_program_DEF
|- int_program_NONE_program =
   program_option_program_abs JOINT_int_program_NONE_program
int_program_SOME_program_DEF
|- !x1.
     int_program_SOME_program x1 =
     program_option_program_abs
       (JOINT_int_program_SOME_program (program_rep x1))
int_inj_program_option_program
|- (int_inj_program_option_program NONE = int_program_NONE_program) /\
   (!x0.
     int_inj_program_option_program (SOME x0) = int_program_SOME_program x0)
int_inv_program_option_program
|- (int_inv_program_option_program int_program_NONE_program = NONE) /\
   (!x1.
     int_inv_program_option_program (int_program_SOME_program x1) = SOME x1)
SEQprogram
|- SEQprogram =
   (\x0 x1. int_SEQprogram x0 (int_inj_program_option_program x1))
dist_aux_ftn_program_DEF
|- (!x1 x2. dist_aux_ftn_program (int_SEQprogram x1 x2) = 0) /\
   (dist_aux_ftn_program_option_program int_program_NONE_program = 1) /\
   (!x1.
     dist_aux_ftn_program_option_program (int_program_SOME_program x1) = 2)
int_SEQprogram_arg1_DEF
|- !x1 x2. int_SEQprogram_arg1 (int_SEQprogram x1 x2) = x1
int_SEQprogram_arg2_DEF
|- !x1 x2. int_SEQprogram_arg2 (int_SEQprogram x1 x2) = x2
int_program_SOME_program_arg_DEF
|- (!x1. int_program_SOME_program_arg (int_program_SOME_program x1) = x1) /\
   (int_program_SOME_program_arg int_program_NONE_program = (@x. T))
strenv_pack_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (TRP
         (\v tl.
           (?s. v = INL s) /\ (LENGTH tl = 0) \/
           (?p. v = INR p) /\ (LENGTH tl = 0)))
       rep
strenv_pack_ISO_DEF
|- (!a. ABS_strenv_pack (REP_strenv_pack a) = a) /\
   (!r.
     TRP
       (\v tl.
         (?s. v = INL s) /\ (LENGTH tl = 0) \/
         (?p. v = INR p) /\ (LENGTH tl = 0))
       r =
     REP_strenv_pack (ABS_strenv_pack r) =
     r)
STRENVsp_DEF
|- !s. STRENVsp s = ABS_strenv_pack (Node (INL s) [])
PACKsp_DEF
|- !p. PACKsp p = ABS_strenv_pack (Node (INR p) [])
joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (TRP
         (\v tl.
           (?s0 s1. v = INL (s0,s1)) /\ (LENGTH tl = SUC 0) \/
           (v = INR (INL one)) /\ (LENGTH tl = SUC 0) \/
           (?s. v = INR (INR (INL s))) /\ (LENGTH tl = SUC 0) \/
           (v = INR (INR (INR (INL one)))) /\ (LENGTH tl = 0) \/
           (v = INR (INR (INR (INR (INL one))))) /\
           (LENGTH tl = SUC (SUC 0)) \/
           (v = INR (INR (INR (INR (INR one))))) /\ (LENGTH tl = SUC 0)))
       rep
joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_ISO_DEF
|- (!a.
     ABS_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
       (REP_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
         a) =
     a) /\
   (!r.
     TRP
       (\v tl.
         (?s0 s1. v = INL (s0,s1)) /\ (LENGTH tl = SUC 0) \/
         (v = INR (INL one)) /\ (LENGTH tl = SUC 0) \/
         (?s. v = INR (INR (INL s))) /\ (LENGTH tl = SUC 0) \/
         (v = INR (INR (INR (INL one)))) /\ (LENGTH tl = 0) \/
         (v = INR (INR (INR (INR (INL one))))) /\ (LENGTH tl = SUC (SUC 0)) \/
         (v = INR (INR (INR (INR (INR one))))) /\ (LENGTH tl = SUC 0))
       r =
     REP_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
       (ABS_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
         r) =
     r)
JOINT_int_BASICint_DEF
|- !j s0 s1.
     JOINT_int_BASICint j s0 s1 =
     ABS_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
       (Node (INL (s0,s1))
         [REP_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
            j])
JOINT_int_INTENV_DEF
|- !j.
     JOINT_int_INTENV j =
     ABS_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
       (Node (INR (INL one))
         [REP_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
            j])
JOINT_int_int_intenv_ch44_strid_int_DEF
|- !s j.
     JOINT_int_int_intenv_ch44_strid_int s j =
     ABS_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
       (Node (INR (INR (INL s)))
         [REP_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
            j])
JOINT_int_int_intenv_NIL_strid_int_prod_int_intenv_DEF
|- JOINT_int_int_intenv_NIL_strid_int_prod_int_intenv =
   ABS_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
     (Node (INR (INR (INR (INL one)))) [])
JOINT_int_int_intenv_CONS_strid_int_prod_int_intenv_DEF
|- !j1 j2.
     JOINT_int_int_intenv_CONS_strid_int_prod_int_intenv j1 j2 =
     ABS_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
       (Node (INR (INR (INR (INR (INL one)))))
         [REP_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
            j1;
          REP_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
            j2])
JOINT_int_int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv_DEF
|- !j.
     JOINT_int_int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv j =
     ABS_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
       (Node (INR (INR (INR (INR (INR one)))))
         [REP_joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
            j])
joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select_DEF
|- (!j s0 s1.
     joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
       (JOINT_int_BASICint j s0 s1) =
     ((joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
         j =
       2)
      => 1
      | 0)) /\
   (!j.
     joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
       (JOINT_int_INTENV j) =
     ((joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
         j =
       5)
      => 2
      | 0)) /\
   (!s j.
     joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
       (JOINT_int_int_intenv_ch44_strid_int s j) =
     ((joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
         j =
       1)
      => 3
      | 0)) /\
   (joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
      JOINT_int_int_intenv_NIL_strid_int_prod_int_intenv =
    4) /\
   (!j1 j2.
     joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
       (JOINT_int_int_intenv_CONS_strid_int_prod_int_intenv j1 j2) =
     (((joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
          j1 =
        3) /\
       (joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
          j2 =
        4))
      => 4
      | 0)) /\
   (!j.
     joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
       (JOINT_int_int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv
         j) =
     ((joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
         j =
       4)
      => 5
      | 0))
strid_int_prod_int_intenv_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
           x =
         3)
       rep
strid_int_prod_int_intenv_REP_ABS
|- (!a.
     strid_int_prod_int_intenv_abs (strid_int_prod_int_intenv_rep a) = a) /\
   (!r.
     (\x.
       joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
         x =
       3)
       r =
     strid_int_prod_int_intenv_rep (strid_int_prod_int_intenv_abs r) =
     r)
int_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
           x =
         1)
       rep
int_REP_ABS
|- (!a. int_abs (int_rep a) = a) /\
   (!r.
     (\x.
       joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
         x =
       1)
       r =
     int_rep (int_abs r) =
     r)
intenv_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
           x =
         2)
       rep
intenv_REP_ABS
|- (!a. intenv_abs (intenv_rep a) = a) /\
   (!r.
     (\x.
       joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
         x =
       2)
       r =
     intenv_rep (intenv_abs r) =
     r)
strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
           x =
         5)
       rep
strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_REP_ABS
|- (!a.
     strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_abs
       (strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_rep a) =
     a) /\
   (!r.
     (\x.
       joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
         x =
       5)
       r =
     strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_rep
       (strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_abs r) =
     r)
strid_int_prod_int_intenv_list_int_intenv_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
           x =
         4)
       rep
strid_int_prod_int_intenv_list_int_intenv_REP_ABS
|- (!a.
     strid_int_prod_int_intenv_list_int_intenv_abs
       (strid_int_prod_int_intenv_list_int_intenv_rep a) =
     a) /\
   (!r.
     (\x.
       joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_select
         x =
       4)
       r =
     strid_int_prod_int_intenv_list_int_intenv_rep
       (strid_int_prod_int_intenv_list_int_intenv_abs r) =
     r)
int_BASICint_DEF
|- !x1 x2 x3.
     int_BASICint x1 x2 x3 =
     int_abs (JOINT_int_BASICint (intenv_rep x1) x2 x3)
int_INTENV_DEF
|- !x1.
     int_INTENV x1 =
     intenv_abs
       (JOINT_int_INTENV
         (strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_rep x1))
int_int_intenv_ch44_strid_int_DEF
|- !x1 x2.
     int_int_intenv_ch44_strid_int x1 x2 =
     strid_int_prod_int_intenv_abs
       (JOINT_int_int_intenv_ch44_strid_int x1 (int_rep x2))
int_int_intenv_NIL_strid_int_prod_int_intenv_DEF
|- int_int_intenv_NIL_strid_int_prod_int_intenv =
   strid_int_prod_int_intenv_list_int_intenv_abs
     JOINT_int_int_intenv_NIL_strid_int_prod_int_intenv
int_int_intenv_CONS_strid_int_prod_int_intenv_DEF
|- !x1 x2.
     int_int_intenv_CONS_strid_int_prod_int_intenv x1 x2 =
     strid_int_prod_int_intenv_list_int_intenv_abs
       (JOINT_int_int_intenv_CONS_strid_int_prod_int_intenv
          (strid_int_prod_int_intenv_rep x1)
         (strid_int_prod_int_intenv_list_int_intenv_rep x2))
int_int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv_DEF
|- !x1.
     int_int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv x1 =
     strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_abs
       (JOINT_int_int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv
         (strid_int_prod_int_intenv_list_int_intenv_rep x1))
BASICint
|- BASICint = (\x0 x1 x2. int_BASICint x0 x1 x2)
int_inj_strid_int_prod_int_intenv
|- !x1 x0.
     int_inj_strid_int_prod_int_intenv (x0,x1) =
     int_int_intenv_ch44_strid_int x0 x1
int_inv_strid_int_prod_int_intenv
|- !x1 x2.
     int_inv_strid_int_prod_int_intenv (int_int_intenv_ch44_strid_int x1 x2) =
     (x1,x2)
int_inj_strid_int_prod_int_intenv_list_int_intenv
|- (int_inj_strid_int_prod_int_intenv_list_int_intenv [] =
    int_int_intenv_NIL_strid_int_prod_int_intenv) /\
   (!x1 x0.
     int_inj_strid_int_prod_int_intenv_list_int_intenv (CONS x0 x1) =
     int_int_intenv_CONS_strid_int_prod_int_intenv
       (int_inj_strid_int_prod_int_intenv x0)
       (int_inj_strid_int_prod_int_intenv_list_int_intenv x1))
int_inv_strid_int_prod_int_intenv_list_int_intenv
|- (int_inv_strid_int_prod_int_intenv_list_int_intenv
      int_int_intenv_NIL_strid_int_prod_int_intenv =
    []) /\
   (!x1 x2.
     int_inv_strid_int_prod_int_intenv_list_int_intenv
       (int_int_intenv_CONS_strid_int_prod_int_intenv x1 x2) =
     CONS (int_inv_strid_int_prod_int_intenv x1)
       (int_inv_strid_int_prod_int_intenv_list_int_intenv x2))
int_inj_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
|- !x0.
     int_inj_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
       (FINMAP x0) =
     int_int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv
       (int_inj_strid_int_prod_int_intenv_list_int_intenv x0)
int_inv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
|- !x1.
     int_inv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
       (int_int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv x1) =
     FINMAP (int_inv_strid_int_prod_int_intenv_list_int_intenv x1)
INTENV
|- INTENV =
   (\x0.
     int_INTENV
       (int_inj_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
         x0))
dist_aux_ftn_int_DEF
|- (!x1 x2 x3. dist_aux_ftn_int (int_BASICint x1 x2 x3) = 0) /\
   (!x1. dist_aux_ftn_intenv (int_INTENV x1) = 1) /\
   (!x1 x2.
     dist_aux_ftn_strid_int_prod_int_intenv
       (int_int_intenv_ch44_strid_int x1 x2) =
     2) /\
   (dist_aux_ftn_strid_int_prod_int_intenv_list_int_intenv
      int_int_intenv_NIL_strid_int_prod_int_intenv =
    3) /\
   (!x1 x2.
     dist_aux_ftn_strid_int_prod_int_intenv_list_int_intenv
       (int_int_intenv_CONS_strid_int_prod_int_intenv x1 x2) =
     4) /\
   (!x1.
     dist_aux_ftn_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv
       (int_int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv x1) =
     5)
int_BASICint_arg1_DEF
|- !x1 x2 x3. int_BASICint_arg1 (int_BASICint x1 x2 x3) = x1
int_BASICint_arg2_DEF
|- !x1 x2 x3. int_BASICint_arg2 (int_BASICint x1 x2 x3) = x2
int_BASICint_arg3_DEF
|- !x1 x2 x3. int_BASICint_arg3 (int_BASICint x1 x2 x3) = x3
int_INTENV_arg_DEF
|- !x1. int_INTENV_arg (int_INTENV x1) = x1
int_int_intenv_ch44_strid_int_arg1_DEF
|- !x1 x2.
     int_int_intenv_ch44_strid_int_arg1
       (int_int_intenv_ch44_strid_int x1 x2) =
     x1
int_int_intenv_ch44_strid_int_arg2_DEF
|- !x1 x2.
     int_int_intenv_ch44_strid_int_arg2
       (int_int_intenv_ch44_strid_int x1 x2) =
     x2
int_int_intenv_CONS_strid_int_prod_int_intenv_arg1_DEF
|- (!x1 x2.
     int_int_intenv_CONS_strid_int_prod_int_intenv_arg1
       (int_int_intenv_CONS_strid_int_prod_int_intenv x1 x2) =
     x1) /\
   (int_int_intenv_CONS_strid_int_prod_int_intenv_arg1
      int_int_intenv_NIL_strid_int_prod_int_intenv =
    (@x. T))
int_int_intenv_CONS_strid_int_prod_int_intenv_arg2_DEF
|- (!x1 x2.
     int_int_intenv_CONS_strid_int_prod_int_intenv_arg2
       (int_int_intenv_CONS_strid_int_prod_int_intenv x1 x2) =
     x2) /\
   (int_int_intenv_CONS_strid_int_prod_int_intenv_arg2
      int_int_intenv_NIL_strid_int_prod_int_intenv =
    (@x. T))
int_int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv_arg_DEF
|- !x1.
     int_int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv_arg
       (int_int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv x1) =
     x1
sigenv_TY_DEF
|- ?rep. TYPE_DEFINITION (TRP (\v tl. (?f. v = f) /\ (LENGTH tl = 0))) rep
sigenv_ISO_DEF
|- (!a. ABS_sigenv (REP_sigenv a) = a) /\
   (!r.
     TRP (\v tl. (?f. v = f) /\ (LENGTH tl = 0)) r =
     REP_sigenv (ABS_sigenv r) =
     r)
SIGENV_DEF
|- !f'. SIGENV f' = ABS_sigenv (Node f' [])
intbasis_TY_DEF
|- ?rep.
     TYPE_DEFINITION (TRP (\v tl. (?s i. v = (s,i)) /\ (LENGTH tl = 0))) rep
intbasis_ISO_DEF
|- (!a. ABS_intbasis (REP_intbasis a) = a) /\
   (!r.
     TRP (\v tl. (?s i. v = (s,i)) /\ (LENGTH tl = 0)) r =
     REP_intbasis (ABS_intbasis r) =
     r)
INTBASIS_DEF
|- !s i. INTBASIS s i = ABS_intbasis (Node (s,i) [])
joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (TRP
         (\v tl.
           (?s e. v = INL (s,e)) /\ (LENGTH tl = SUC 0) \/
           (?s0 i s1. v = INR (INL (s0,i,s1))) /\ (LENGTH tl = SUC (SUC 0)) \/
           (v = INR (INR (INL one))) /\ (LENGTH tl = SUC 0) \/
           (?f. v = INR (INR (INR (INL f)))) /\ (LENGTH tl = SUC 0) \/
           (v = INR (INR (INR (INR (INL one))))) /\ (LENGTH tl = 0) \/
           (v = INR (INR (INR (INR (INR (INL one)))))) /\
           (LENGTH tl = SUC (SUC 0)) \/
           (v = INR (INR (INR (INR (INR (INR (INL one))))))) /\
           (LENGTH tl = SUC 0) \/
           (v = INR (INR (INR (INR (INR (INR (INR (INL one)))))))) /\
           (LENGTH tl = 0) \/
           (?i. v = INR (INR (INR (INR (INR (INR (INR (INR i)))))))) /\
           (LENGTH tl = 0)))
       rep
joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_ISO_DEF
|- (!a.
     ABS_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
       (REP_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
         a) =
     a) /\
   (!r.
     TRP
       (\v tl.
         (?s e. v = INL (s,e)) /\ (LENGTH tl = SUC 0) \/
         (?s0 i s1. v = INR (INL (s0,i,s1))) /\ (LENGTH tl = SUC (SUC 0)) \/
         (v = INR (INR (INL one))) /\ (LENGTH tl = SUC 0) \/
         (?f. v = INR (INR (INR (INL f)))) /\ (LENGTH tl = SUC 0) \/
         (v = INR (INR (INR (INR (INL one))))) /\ (LENGTH tl = 0) \/
         (v = INR (INR (INR (INR (INR (INL one)))))) /\
         (LENGTH tl = SUC (SUC 0)) \/
         (v = INR (INR (INR (INR (INR (INR (INL one))))))) /\
         (LENGTH tl = SUC 0) \/
         (v = INR (INR (INR (INR (INR (INR (INR (INL one)))))))) /\
         (LENGTH tl = 0) \/
         (?i. v = INR (INR (INR (INR (INR (INR (INR (INR i)))))))) /\
         (LENGTH tl = 0))
       r =
     REP_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
       (ABS_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
         r) =
     r)
JOINT_int_BASIS_DEF
|- !j s e.
     JOINT_int_BASIS j s e =
     ABS_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
       (Node (INL (s,e))
         [REP_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
            j])
JOINT_int_FUNCLOS_DEF
|- !s0 i s1 j1 j2.
     JOINT_int_FUNCLOS s0 i s1 j1 j2 =
     ABS_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
       (Node (INR (INL (s0,i,s1)))
         [REP_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
            j1;
          REP_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
            j2])
JOINT_int_FUNENV_DEF
|- !j.
     JOINT_int_FUNENV j =
     ABS_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
       (Node (INR (INR (INL one)))
         [REP_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
            j])
JOINT_int_basis_funclos_funenv_ch44_funid_funclos_DEF
|- !f' j.
     JOINT_int_basis_funclos_funenv_ch44_funid_funclos f' j =
     ABS_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
       (Node (INR (INR (INR (INL f'))))
         [REP_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
            j])
JOINT_int_basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv_DEF
|- JOINT_int_basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv =
   ABS_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
     (Node (INR (INR (INR (INR (INL one))))) [])
JOINT_int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv_DEF
|- !j1 j2.
     JOINT_int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv
       j1
       j2 =
     ABS_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
       (Node (INR (INR (INR (INR (INR (INL one))))))
         [REP_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
            j1;
          REP_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
            j2])
JOINT_int_basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_DEF
|- !j.
     JOINT_int_basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
       j =
     ABS_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
       (Node (INR (INR (INR (INR (INR (INR (INL one)))))))
         [REP_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
            j])
JOINT_int_basis_funclos_funenv_NONE_int_DEF
|- JOINT_int_basis_funclos_funenv_NONE_int =
   ABS_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
     (Node (INR (INR (INR (INR (INR (INR (INR (INL one)))))))) [])
JOINT_int_basis_funclos_funenv_SOME_int_DEF
|- !i.
     JOINT_int_basis_funclos_funenv_SOME_int i =
     ABS_joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv
       (Node (INR (INR (INR (INR (INR (INR (INR (INR i)))))))) [])
joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select_DEF
|- (!j s e.
     joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
       (JOINT_int_BASIS j s e) =
     ((joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
         j =
       3)
      => 1
      | 0)) /\
   (!s0 i s1 j1 j2.
     joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
       (JOINT_int_FUNCLOS s0 i s1 j1 j2) =
     (((joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
          j1 =
        7) /\
       (joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
          j2 =
        1))
      => 2
      | 0)) /\
   (!j.
     joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
       (JOINT_int_FUNENV j) =
     ((joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
         j =
       6)
      => 3
      | 0)) /\
   (!f' j.
     joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
       (JOINT_int_basis_funclos_funenv_ch44_funid_funclos f' j) =
     ((joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
         j =
       2)
      => 4
      | 0)) /\
   (joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
      JOINT_int_basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv =
    5) /\
   (!j1 j2.
     joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
       (JOINT_int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv
          j1
         j2) =
     (((joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
          j1 =
        4) /\
       (joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
          j2 =
        5))
      => 5
      | 0)) /\
   (!j.
     joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
       (JOINT_int_basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
         j) =
     ((joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
         j =
       5)
      => 6
      | 0)) /\
   (joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
      JOINT_int_basis_funclos_funenv_NONE_int =
    7) /\
   (!i.
     joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
       (JOINT_int_basis_funclos_funenv_SOME_int i) =
     7)
funid_funclos_prod_basis_funclos_funenv_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
           x =
         4)
       rep
funid_funclos_prod_basis_funclos_funenv_REP_ABS
|- (!a.
     funid_funclos_prod_basis_funclos_funenv_abs
       (funid_funclos_prod_basis_funclos_funenv_rep a) =
     a) /\
   (!r.
     (\x.
       joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
         x =
       4)
       r =
     funid_funclos_prod_basis_funclos_funenv_rep
       (funid_funclos_prod_basis_funclos_funenv_abs r) =
     r)
funclos_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
           x =
         2)
       rep
funclos_REP_ABS
|- (!a. funclos_abs (funclos_rep a) = a) /\
   (!r.
     (\x.
       joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
         x =
       2)
       r =
     funclos_rep (funclos_abs r) =
     r)
basis_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
           x =
         1)
       rep
basis_REP_ABS
|- (!a. basis_abs (basis_rep a) = a) /\
   (!r.
     (\x.
       joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
         x =
       1)
       r =
     basis_rep (basis_abs r) =
     r)
funenv_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
           x =
         3)
       rep
funenv_REP_ABS
|- (!a. funenv_abs (funenv_rep a) = a) /\
   (!r.
     (\x.
       joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
         x =
       3)
       r =
     funenv_rep (funenv_abs r) =
     r)
int_option_basis_funclos_funenv_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
           x =
         7)
       rep
int_option_basis_funclos_funenv_REP_ABS
|- (!a.
     int_option_basis_funclos_funenv_abs
       (int_option_basis_funclos_funenv_rep a) =
     a) /\
   (!r.
     (\x.
       joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
         x =
       7)
       r =
     int_option_basis_funclos_funenv_rep
       (int_option_basis_funclos_funenv_abs r) =
     r)
funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
           x =
         6)
       rep
funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_REP_ABS
|- (!a.
     funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_abs
       (funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_rep
         a) =
     a) /\
   (!r.
     (\x.
       joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
         x =
       6)
       r =
     funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_rep
       (funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_abs
         r) =
     r)
funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (\x.
         joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
           x =
         5)
       rep
funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_REP_ABS
|- (!a.
     funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_abs
       (funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_rep
         a) =
     a) /\
   (!r.
     (\x.
       joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_select
         x =
       5)
       r =
     funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_rep
       (funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_abs
         r) =
     r)
int_BASIS_DEF
|- !x1 x2 x3.
     int_BASIS x1 x2 x3 = basis_abs (JOINT_int_BASIS (funenv_rep x1) x2 x3)
int_FUNCLOS_DEF
|- !x1 x2 x3 x4 x5.
     int_FUNCLOS x1 x2 x3 x4 x5 =
     funclos_abs
       (JOINT_int_FUNCLOS x1 x2 x3 (int_option_basis_funclos_funenv_rep x4)
         (basis_rep x5))
int_FUNENV_DEF
|- !x1.
     int_FUNENV x1 =
     funenv_abs
       (JOINT_int_FUNENV
         (funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_rep
           x1))
int_basis_funclos_funenv_ch44_funid_funclos_DEF
|- !x1 x2.
     int_basis_funclos_funenv_ch44_funid_funclos x1 x2 =
     funid_funclos_prod_basis_funclos_funenv_abs
       (JOINT_int_basis_funclos_funenv_ch44_funid_funclos x1 (funclos_rep x2))
int_basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv_DEF
|- int_basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv =
   funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_abs
     JOINT_int_basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv
int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv_DEF
|- !x1 x2.
     int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv x1
       x2 =
     funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_abs
       (JOINT_int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv
          (funid_funclos_prod_basis_funclos_funenv_rep x1)
         (funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_rep
           x2))
int_basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_DEF
|- !x1.
     int_basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
       x1 =
     funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_abs
       (JOINT_int_basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
         (funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_rep
           x1))
int_basis_funclos_funenv_NONE_int_DEF
|- int_basis_funclos_funenv_NONE_int =
   int_option_basis_funclos_funenv_abs JOINT_int_basis_funclos_funenv_NONE_int
int_basis_funclos_funenv_SOME_int_DEF
|- !x1.
     int_basis_funclos_funenv_SOME_int x1 =
     int_option_basis_funclos_funenv_abs
       (JOINT_int_basis_funclos_funenv_SOME_int x1)
BASIS
|- BASIS = (\x0 x1 x2. int_BASIS x0 x1 x2)
int_inj_funid_funclos_prod_basis_funclos_funenv
|- !x1 x0.
     int_inj_funid_funclos_prod_basis_funclos_funenv (x0,x1) =
     int_basis_funclos_funenv_ch44_funid_funclos x0 x1
int_inv_funid_funclos_prod_basis_funclos_funenv
|- !x1 x2.
     int_inv_funid_funclos_prod_basis_funclos_funenv
       (int_basis_funclos_funenv_ch44_funid_funclos x1 x2) =
     (x1,x2)
int_inj_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
|- (int_inj_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
      [] =
    int_basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv) /\
   (!x1 x0.
     int_inj_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
       (CONS x0 x1) =
     int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv
       (int_inj_funid_funclos_prod_basis_funclos_funenv x0)
       (int_inj_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
         x1))
int_inv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
|- (int_inv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
      int_basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv =
    []) /\
   (!x1 x2.
     int_inv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
       (int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv
          x1
         x2) =
     CONS (int_inv_funid_funclos_prod_basis_funclos_funenv x1)
       (int_inv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
         x2))
int_inj_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv
|- !x0.
     int_inj_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv
       (FINMAP x0) =
     int_basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
       (int_inj_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
         x0)
int_inv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv
|- !x1.
     int_inv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv
       (int_basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
         x1) =
     FINMAP
       (int_inv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
         x1)
FUNENV
|- FUNENV =
   (\x0.
     int_FUNENV
       (int_inj_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv
         x0))
int_inj_int_option_basis_funclos_funenv
|- (int_inj_int_option_basis_funclos_funenv NONE =
    int_basis_funclos_funenv_NONE_int) /\
   (!x0.
     int_inj_int_option_basis_funclos_funenv (SOME x0) =
     int_basis_funclos_funenv_SOME_int x0)
int_inv_int_option_basis_funclos_funenv
|- (int_inv_int_option_basis_funclos_funenv
      int_basis_funclos_funenv_NONE_int =
    NONE) /\
   (!x1.
     int_inv_int_option_basis_funclos_funenv
       (int_basis_funclos_funenv_SOME_int x1) =
     SOME x1)
FUNCLOS
|- FUNCLOS =
   (\x0 x1 x2 x3 x4.
     int_FUNCLOS x0 x1 x2 (int_inj_int_option_basis_funclos_funenv x3) x4)
dist_aux_ftn_basis_DEF
|- (!x1 x2 x3. dist_aux_ftn_basis (int_BASIS x1 x2 x3) = 0) /\
   (!x1 x2 x3 x4 x5. dist_aux_ftn_funclos (int_FUNCLOS x1 x2 x3 x4 x5) = 1) /\
   (!x1. dist_aux_ftn_funenv (int_FUNENV x1) = 2) /\
   (!x1 x2.
     dist_aux_ftn_funid_funclos_prod_basis_funclos_funenv
       (int_basis_funclos_funenv_ch44_funid_funclos x1 x2) =
     3) /\
   (dist_aux_ftn_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
      int_basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv =
    4) /\
   (!x1 x2.
     dist_aux_ftn_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
       (int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv
          x1
         x2) =
     5) /\
   (!x1.
     dist_aux_ftn_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv
       (int_basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
         x1) =
     6) /\
   (dist_aux_ftn_int_option_basis_funclos_funenv
      int_basis_funclos_funenv_NONE_int =
    7) /\
   (!x1.
     dist_aux_ftn_int_option_basis_funclos_funenv
       (int_basis_funclos_funenv_SOME_int x1) =
     8)
int_BASIS_arg1_DEF
|- !x1 x2 x3. int_BASIS_arg1 (int_BASIS x1 x2 x3) = x1
int_BASIS_arg2_DEF
|- !x1 x2 x3. int_BASIS_arg2 (int_BASIS x1 x2 x3) = x2
int_BASIS_arg3_DEF
|- !x1 x2 x3. int_BASIS_arg3 (int_BASIS x1 x2 x3) = x3
int_FUNCLOS_arg1_DEF
|- !x1 x2 x3 x4 x5. int_FUNCLOS_arg1 (int_FUNCLOS x1 x2 x3 x4 x5) = x1
int_FUNCLOS_arg2_DEF
|- !x1 x2 x3 x4 x5. int_FUNCLOS_arg2 (int_FUNCLOS x1 x2 x3 x4 x5) = x2
int_FUNCLOS_arg3_DEF
|- !x1 x2 x3 x4 x5. int_FUNCLOS_arg3 (int_FUNCLOS x1 x2 x3 x4 x5) = x3
int_FUNCLOS_arg4_DEF
|- !x1 x2 x3 x4 x5. int_FUNCLOS_arg4 (int_FUNCLOS x1 x2 x3 x4 x5) = x4
int_FUNCLOS_arg5_DEF
|- !x1 x2 x3 x4 x5. int_FUNCLOS_arg5 (int_FUNCLOS x1 x2 x3 x4 x5) = x5
int_FUNENV_arg_DEF
|- !x1. int_FUNENV_arg (int_FUNENV x1) = x1
int_basis_funclos_funenv_ch44_funid_funclos_arg1_DEF
|- !x1 x2.
     int_basis_funclos_funenv_ch44_funid_funclos_arg1
       (int_basis_funclos_funenv_ch44_funid_funclos x1 x2) =
     x1
int_basis_funclos_funenv_ch44_funid_funclos_arg2_DEF
|- !x1 x2.
     int_basis_funclos_funenv_ch44_funid_funclos_arg2
       (int_basis_funclos_funenv_ch44_funid_funclos x1 x2) =
     x2
int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv_arg1_DEF
|- (!x1 x2.
     int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv_arg1
       (int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv
          x1
         x2) =
     x1) /\
   (int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv_arg1
      int_basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv =
    (@x. T))
int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv_arg2_DEF
|- (!x1 x2.
     int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv_arg2
       (int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv
          x1
         x2) =
     x2) /\
   (int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv_arg2
      int_basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv =
    (@x. T))
int_basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_arg_DEF
|- !x1.
     int_basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_arg
       (int_basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
         x1) =
     x1
int_basis_funclos_funenv_SOME_int_arg_DEF
|- (!x1.
     int_basis_funclos_funenv_SOME_int_arg
       (int_basis_funclos_funenv_SOME_int x1) =
     x1) /\
   (int_basis_funclos_funenv_SOME_int_arg int_basis_funclos_funenv_NONE_int =
    (@x. T))
basis_pack_TY_DEF
|- ?rep.
     TYPE_DEFINITION
       (TRP
         (\v tl.
           (?b. v = INL b) /\ (LENGTH tl = 0) \/
           (?p. v = INR p) /\ (LENGTH tl = 0)))
       rep
basis_pack_ISO_DEF
|- (!a. ABS_basis_pack (REP_basis_pack a) = a) /\
   (!r.
     TRP
       (\v tl.
         (?b. v = INL b) /\ (LENGTH tl = 0) \/
         (?p. v = INR p) /\ (LENGTH tl = 0))
       r =
     REP_basis_pack (ABS_basis_pack r) =
     r)
BASISbp_DEF
|- !b. BASISbp b = ABS_basis_pack (Node (INL b) [])
PACKbp_DEF
|- !p. PACKbp p = ABS_basis_pack (Node (INR p) [])
intenv_of_int_DEF
|- !x1 x2 x3. intenv_of_int (BASICint x1 x2 x3) = x1
vars_of_int_DEF
|- !x1 x2 x3. vars_of_int (BASICint x1 x2 x3) = x2
excons_of_int_DEF
|- !x1 x2 x3. excons_of_int (BASICint x1 x2 x3) = x3
env_of_basis_DEF
|- !x1 x2 x3. env_of_basis (BASIS x1 x2 x3) = x3
INTENV_arg_DEF
|- !x1. INTENV_arg (INTENV x1) = x1
FUNENV_arg_DEF
|- !x1. FUNENV_arg (FUNENV x1) = x1
SIGENV_arv_DEF
|- !s. SIGENV_arg (SIGENV s) = s
empty_env_DEF
|- empty_env = ENV empty_strenv empty_varenv empty_exconenv
empty_intenv_DEF
|- empty_intenv = INTENV empty_finmap
empty_int_DEF
|- empty_int = BASICint empty_intenv {} {}
empty_sigenv_DEF
|- empty_sigenv = SIGENV (\x. undefined)
empty_funenv_DEF
|- empty_funenv = FUNENV empty_finmap
insert_into_funenv_DEF
|- !x1.
     insert_into_funenv (FUNENV x1) =
     (\funid fcl. FUNENV (finmap_insert less_funid funid fcl x1))
insert_into_intenv_DEF
|- !x1.
     insert_into_intenv (INTENV x1) =
     (\strid int. INTENV (finmap_insert less_strid strid int x1))
insert_into_sigenv
|- !l sigid i.
     insert_into_sigenv (SIGENV l) sigid i =
     SIGENV (\x. (x = sigid) => (lift i) | (l x))
funenv_map_DEF
|- !fi fc. funenv_map fi fc = FUNENV (FINMAP [fi,fc])
intenv_map_DEF
|- !si i. intenv_map si i = INTENV (FINMAP [si,i])
sigenv_map_DEF
|- !si i. sigenv_map si i = SIGENV (\x. (x = si) => (lift i) | undefined)
strenv_map_DEF
|- !si e. strenv_map si e = STRENV (FINMAP [si,e])
add_funenv_DEF
|- !fe1 fe2.
     add_funenv fe1 fe2 =
     FUNENV (finmap_modify less_funid (FUNENV_arg fe1) (FUNENV_arg fe2))
add_sigenv_DEF
|- !s1 s2.
     add_sigenv s1 s2 =
     SIGENV
       (\x.
         (SIGENV_arg s1 x = undefined)
         => (SIGENV_arg s2 x)
         | (SIGENV_arg s1 x))
add_basis_aux_DEF
|- !x1 x2 x3.
     add_basis_aux (BASIS x1 x2 x3) =
     (\f1 s1 e1. BASIS (add_funenv f1 x1) (add_sigenv s1 x2) (add_env e1 x3))
add_basis_DEF
|- !x1 x2 x3. add_basis (BASIS x1 x2 x3) = (\b. add_basis_aux b x1 x2 x3)
add_intenv_DEF
|- !ie1 ie2.
     add_intenv ie1 ie2 =
     INTENV (finmap_modify less_strid (INTENV_arg ie1) (INTENV_arg ie2))
add_int_aux_DEF
|- !x1 x2 x3.
     add_int_aux (BASICint x1 x2 x3) =
     (\i1 v1 e1. BASICint (add_intenv i1 x1) (v1 UNION x2) (e1 UNION x3))
add_int_DEF
|- !x1 x2 x3. add_int (BASICint x1 x2 x3) = (\int. add_int_aux int x1 x2 x3)
add_env_to_basis_DEF
|- !x1 x2 x3.
     add_env_to_basis (BASIS x1 x2 x3) = (\e'. BASIS x1 x2 (add_env x3 e'))
add_funenv_to_basis_DEF
|- !x1 x2 x3.
     add_funenv_to_basis (BASIS x1 x2 x3) =
     (\f. BASIS (add_funenv x1 f) x2 x3)
add_sigenv_to_intbasis_DEF
|- !s i s'.
     add_sigenv_to_intbasis (INTBASIS s i) s' = INTBASIS (add_sigenv s s') i
add_intenv_to_intbasis_DEF
|- !s i i'.
     add_intenv_to_intbasis (INTBASIS s i) i' = INTBASIS s (add_intenv i i')
strenv_in_env_DEF
|- !s. strenv_in_env s = ENV s empty_varenv empty_exconenv
vars_in_int_DEF
|- !x. vars_in_int x = BASICint empty_intenv x {}
excons_in_int_DEF
|- !x. excons_in_int x = BASICint empty_intenv {} x
intenv_in_int_DEF
|- !x. intenv_in_int x = BASICint x {} {}
env_in_basis_DEF
|- !e. env_in_basis e = BASIS empty_funenv empty_sigenv e
strenv_in_basis_DEF
|- !s. strenv_in_basis s = env_in_basis (strenv_in_env s)
sigenv_in_basis_DEF
|- !s. sigenv_in_basis s = BASIS empty_funenv s empty_env
funenv_in_basis_DEF
|- !f. funenv_in_basis f = BASIS f empty_sigenv empty_env
define_mutual_functions
|- !x1 x2 x3.
     lookup_longstrid_basis (BASIS x1 x2 x3) =
     (\ls. lookuplongstrid_env x3 ls)
lookup_strid_int_DEF
|- (!x1 x2 x3.
     lookup_strid_int (BASICint x1 x2 x3) =
     (\strid. lookup_strid_intenv x1 strid)) /\
   (!x1. lookup_strid_intenv (INTENV x1) = (\id. finmap_lookup id x1))
lookup_longstrid_intenv_DEF
|- (!i s. lookup_longstrid_intenv i (BASE s) = lookup_strid_intenv i s) /\
   (!i ls strid.
     lookup_longstrid_intenv i (QUALIFIED strid ls) =
     ((lookup_strid_intenv i strid = undefined)
      => undefined
      | (lookup_longstrid_intenv
           (intenv_of_int (lower (lookup_strid_intenv i strid)))
          ls)))
lookup_longstrid_intbasis_DEF
|- !s i ls.
     lookup_longstrid_intbasis (INTBASIS s i) ls =
     lookup_longstrid_intenv i ls
lookup_funid_funenv_DEF
|- !x1. lookup_funid_funenv (FUNENV x1) = (\funid. finmap_lookup funid x1)
lookup_funid_basis_DEF
|- !x1 x2 x3.
     lookup_funid_basis (BASIS x1 x2 x3) =
     (\funid. lookup_funid_funenv x1 funid)
lookup_sigid_sigenv_DEF
|- !l sigid. lookup_sigid_sigenv (SIGENV l) sigid = l sigid
lookup_sigid_intbasis_DEF
|- !sigenv intenv sigid.
     lookup_sigid_intbasis (INTBASIS sigenv intenv) sigid =
     lookup_sigid_sigenv sigenv sigid
Inter_DEF
|- (!x1 x2 x3.
     Inter (ENV x1 x2 x3) =
     BASICint (intenv_from_strenv x1) (vars_from_varenv x2)
       (excons_from_exconenv x3)) /\
   (!x1.
     intenv_from_strenv (STRENV x1) =
     INTENV (intenv_from_strenv_finmap x1)) /\
   (!x1.
     intenv_from_strenv_finmap (FINMAP x1) =
     FINMAP (intenv_from_strenv_list x1)) /\
   (intenv_from_strenv_list [] = []) /\
   (!x1 x2.
     intenv_from_strenv_list (CONS x1 x2) =
     CONS (intenv_from_strenv_pair x1) (intenv_from_strenv_list x2)) /\
   (!x1 x2. intenv_from_strenv_pair (x1,x2) = (x1,Inter x2))
Inter_basis_DEF
|- !x1 x2 x3.
     Inter_basis (BASIS x1 x2 x3) = INTBASIS x2 (intenv_of_int (Inter x3))
cut_env_DEF
|- (!x1 x2 x3.
     cut_env (ENV x1 x2 x3) =
     (\int.
       ENV (cut_strenv x1 (intenv_of_int int))
         (cut_varenv x2 (vars_of_int int))
         (cut_exconenv x3 (excons_of_int int)))) /\
   (!x1.
     cut_strenv (STRENV x1) =
     (\intenv. STRENV (cut_strenv_finmap x1 intenv))) /\
   (!x1.
     cut_strenv_finmap (FINMAP x1) =
     (\intenv. FINMAP (cut_strenv_list x1 intenv))) /\
   (cut_strenv_list [] = (\intenv. [])) /\
   (!x1 x2.
     cut_strenv_list (CONS x1 x2) =
     (\intenv.
       (cut_strenv_pair x1 intenv = undefined)
       => (cut_strenv_list x2 intenv)
       | (CONS (lower (cut_strenv_pair x1 intenv))
           (cut_strenv_list x2 intenv)))) /\
   (!x1 x2.
     cut_strenv_pair (x1,x2) =
     (\intenv.
       (lookup_strid_intenv intenv x1 = undefined)
       => undefined
       | (lift (x1,cut_env x2 (lower (lookup_strid_intenv intenv x1))))))
ModML_eval_signatures_pred_DEF
|- !eval_sigexp eval_spec eval_strdesc.
     ModML_eval_signatures_pred eval_sigexp eval_spec eval_strdesc =
     (!i IB spec s1 s2.
       eval_spec spec s1 IB s2 i ==>
       eval_sigexp (SIGsigexp spec) s1 IB s2 i) /\
     (!i IB s sigid.
       (lookup_sigid_intbasis IB sigid = lift i) ==>
       eval_sigexp (SIGIDsigexp sigid) s IB s i) /\
     (!IB valdesc vars s1 s2.
       eval_valdesc valdesc s1 s2 vars ==>
       eval_spec (VALspec valdesc) s1 IB s2 (vars_in_int vars)) /\
     (!IB excons exdesc s1 s2.
       eval_exdesc exdesc s1 s2 excons ==>
       eval_spec (EXCEPTIONspec exdesc) s1 IB s2 (excons_in_int excons)) /\
     (!IB IE strdesc s1 s2.
       eval_strdesc strdesc s1 IB s2 IE ==>
       eval_spec (STRUCTUREspec strdesc) s1 IB s2 (intenv_in_int IE)) /\
     (!IB I1 I2 spec1 spec2 s1 s2 s3.
       eval_spec spec1 s1 IB s2 I1 /\
       eval_spec spec2 s2 (add_intenv_to_intbasis IB (intenv_of_int I1)) s3
         I2 ==>
       eval_spec (LOCALspec spec1 spec2) s1 IB s3 I2) /\
     (!IB nonempty_int_list nonempty_lift_int_list nonempty_longstrid_list s.
       (nonempty_MAP (lookup_longstrid_intbasis IB) nonempty_longstrid_list =
        nonempty_lift_int_list) /\
       (nonempty_MAP lift nonempty_int_list = nonempty_lift_int_list) ==>
       eval_spec (OPENspec nonempty_longstrid_list) s IB s
         (nonempty_FOLDL_WITH_INIT add_int nonempty_int_list)) /\
     (!IB nonempty_int_list nonempty_lift_int_list nonempty_sigid_list s.
       (nonempty_MAP (lookup_sigid_intbasis IB) nonempty_sigid_list =
        nonempty_lift_int_list) /\
       (nonempty_MAP lift nonempty_int_list = nonempty_lift_int_list) ==>
       eval_spec (INCLUDEspec nonempty_sigid_list) s IB s
         (nonempty_FOLDL_WITH_INIT add_int nonempty_int_list)) /\
     (!IB s. eval_spec EMPTYspec s IB s empty_int) /\
     (!IB I1 I2 spec1 spec2 s1 s2 s3.
       eval_spec spec1 s1 IB s2 I1 /\
       eval_spec spec2 s2 (add_intenv_to_intbasis IB (intenv_of_int I1)) s3
         I2 ==>
       eval_spec (SEQspec spec1 spec2) s1 IB s3 (add_int I1 I2)) /\
     (!i IB sigexp strid s1 s2.
       eval_sigexp sigexp s1 IB s2 i ==>
       eval_strdesc (STRIDstrdesc strid sigexp NONE) s1 IB s2
         (intenv_map strid i)) /\
     (!i IB IE sigexp strdesc strid s1 s2 s3.
       eval_sigexp sigexp s1 IB s2 i /\ eval_strdesc strdesc s2 IB s3 IE ==>
       eval_strdesc (STRIDstrdesc strid sigexp (SOME strdesc)) s1 IB s3
         (add_intenv (intenv_map strid i) IE))
eval_sigexp_DEF
|- !sigexp s1 IB s2 i.
     eval_sigexp sigexp s1 IB s2 i =
     (!poss_eval_sigexp poss_eval_spec poss_eval_strdesc.
       ModML_eval_signatures_pred poss_eval_sigexp poss_eval_spec
         poss_eval_strdesc ==>
       poss_eval_sigexp sigexp s1 IB s2 i)
eval_spec_DEF
|- !spec s1 IB s2 i.
     eval_spec spec s1 IB s2 i =
     (!poss_eval_sigexp poss_eval_spec poss_eval_strdesc.
       ModML_eval_signatures_pred poss_eval_sigexp poss_eval_spec
         poss_eval_strdesc ==>
       poss_eval_spec spec s1 IB s2 i)
eval_strdesc_DEF
|- !strdesc s1 IB s2 int.
     eval_strdesc strdesc s1 IB s2 int =
     (!poss_eval_sigexp poss_eval_spec poss_eval_strdesc.
       ModML_eval_signatures_pred poss_eval_sigexp poss_eval_spec
         poss_eval_strdesc ==>
       poss_eval_strdesc strdesc s1 IB s2 int)
ModML_eval_sigbind_pred_DEF
|- !eval_sigbind.
     ModML_eval_sigbind_pred eval_sigbind =
     (!sigexp IB i sigid s1 s2.
       eval_sigexp sigexp s1 IB s2 i ==>
       eval_sigbind (BINDsigbind sigid sigexp NONE) s1 IB s2
         (sigenv_map sigid i)) /\
     (!sigbind IB G sigexp i sigid s1 s2 s3.
       eval_sigbind sigbind s2 IB s3 G /\ eval_sigexp sigexp s1 IB s2 i ==>
       eval_sigbind (BINDsigbind sigid sigexp (SOME sigbind)) s1 IB s3
         (add_sigenv (sigenv_map sigid i) G))
eval_sigbind_DEF
|- !sigbind s1 IB s2 G.
     eval_sigbind sigbind s1 IB s2 G =
     (!poss_eval_sigbind.
       ModML_eval_sigbind_pred poss_eval_sigbind ==>
       poss_eval_sigbind sigbind s1 IB s2 G)
eval_sigdec_DEF
|- ((!sigbind s1 IB s2 G.
      eval_sigbind sigbind s1 IB s2 G ==>
      eval_sigdec (SIGNATUREsigdec sigbind) s1 IB s2 G) /\
    (!s IB. eval_sigdec EMPTYsigdec s IB s empty_sigenv) /\
    (!sigdec1 s1 IB G1 sigdec2 s3 G2.
      (?s2.
        eval_sigdec sigdec1 s1 IB s2 G1 /\
        eval_sigdec sigdec2 s2 (add_sigenv_to_intbasis IB G1) s3 G2) ==>
      eval_sigdec (SEQsigdec sigdec1 sigdec2) s1 IB s3 (add_sigenv G1 G2))) /\
   (!P.
     (!sigbind s1 IB s2 G.
       eval_sigbind sigbind s1 IB s2 G ==>
       P (SIGNATUREsigdec sigbind) s1 IB s2 G) /\
     (!s IB. P EMPTYsigdec s IB s empty_sigenv) /\
     (!sigdec1 s1 IB G1 sigdec2 s3 G2.
       (?s2.
         P sigdec1 s1 IB s2 G1 /\
         P sigdec2 s2 (add_sigenv_to_intbasis IB G1) s3 G2) ==>
       P (SEQsigdec sigdec1 sigdec2) s1 IB s3 (add_sigenv G1 G2)) ==>
     (!sigdec s1 IB s2 G.
       eval_sigdec sigdec s1 IB s2 G ==> P sigdec s1 IB s2 G))
ModML_eval_structures_pred_DEF
|- !eval_strexp eval_strdec eval_strbind.
     ModML_eval_structures_pred eval_strexp eval_strdec eval_strbind =
     (!B E strdec s1 s2.
       eval_strdec strdec s1 B s2 (ENVep E) ==>
       eval_strexp (STRUCTstrexp strdec) s1 B s2 (ENVep E)) /\
     (!B p strdec s1 s2.
       eval_strdec strdec s1 B s2 (PACKep p) ==>
       eval_strexp (STRUCTstrexp strdec) s1 B s2 (PACKep p)) /\
     (!B E longstrid s.
       (lift E = lookup_longstrid_basis B longstrid) ==>
       eval_strexp (LONGSTRIDstrexp longstrid) s B s (ENVep E)) /\
     (!B B' E E' i funid strexp strexp' strid s1 s2 s3.
       (lift (FUNCLOS strid i strexp' NONE B') =
        lookup_funid_basis B funid) /\
       eval_strexp strexp s1 B s2 (ENVep E) /\
       eval_strexp strexp' s2
         (add_basis B' (strenv_in_basis (strenv_map strid (cut_env E i))))
         s3
         (ENVep E') ==>
       eval_strexp (APPstrexp funid strexp) s1 B s3 (ENVep E')) /\
     (!B B' i funid p strexp strexp' strid s1 s2.
       (lift (FUNCLOS strid i strexp' NONE B') =
        lookup_funid_basis B funid) /\
       eval_strexp strexp s1 B s2 (PACKep p) ==>
       eval_strexp (APPstrexp funid strexp) s1 B s2 (PACKep p)) /\
     (!B B' E i funid p strexp strexp' strid s1 s2 s3.
       (lift (FUNCLOS strid i strexp' NONE B') =
        lookup_funid_basis B funid) /\
       eval_strexp strexp s1 B s2 (ENVep E) /\
       eval_strexp strexp' s2
         (add_basis B' (strenv_in_basis (strenv_map strid (cut_env E i))))
         s3
         (PACKep p) ==>
       eval_strexp (APPstrexp funid strexp) s1 B s3 (PACKep p)) /\
     (!B B' E E' i i' funid strexp strexp' strid s1 s2 s3.
       (lift (FUNCLOS strid i strexp' (SOME i') B') =
        lookup_funid_basis B funid) /\
       eval_strexp strexp s1 B s2 (ENVep E) /\
       eval_strexp strexp' s2
         (add_basis B' (strenv_in_basis (strenv_map strid (cut_env E i))))
         s3
         (ENVep E') ==>
       eval_strexp (APPstrexp funid strexp) s1 B s3
         (ENVep (cut_env E' i'))) /\
     (!B B' i i' funid p strexp strexp' strid s1 s2.
       (lift (FUNCLOS strid i strexp' (SOME i') B') =
        lookup_funid_basis B funid) /\
       eval_strexp strexp s1 B s2 (PACKep p) ==>
       eval_strexp (APPstrexp funid strexp) s1 B s2 (PACKep p)) /\
     (!B B' E i i' funid p strexp strexp' strid s1 s2 s3.
       (lift (FUNCLOS strid i strexp' (SOME i') B') =
        lookup_funid_basis B funid) /\
       eval_strexp strexp s1 B s2 (ENVep E) /\
       eval_strexp strexp' s2
         (add_basis B' (strenv_in_basis (strenv_map strid (cut_env E i))))
         s3
         (PACKep p) ==>
       eval_strexp (APPstrexp funid strexp) s1 B s3 (PACKep p)) /\
     (!B E E' strdec strexp s1 s2 s3.
       eval_strdec strdec s1 B s2 (ENVep E) /\
       eval_strexp strexp s2 (add_env_to_basis B E) s3 (ENVep E') ==>
       eval_strexp (LETstrexp strdec strexp) s1 B s3 (ENVep E')) /\
     (!B p strdec strexp s1 s2.
       eval_strdec strdec s1 B s2 (PACKep p) ==>
       eval_strexp (LETstrexp strdec strexp) s1 B s2 (PACKep p)) /\
     (!B E p strdec strexp s1 s2 s3.
       eval_strdec strdec s1 B s2 (ENVep E) /\
       eval_strexp strexp s2 (add_env_to_basis B E) s3 (PACKep p) ==>
       eval_strexp (LETstrexp strdec strexp) s1 B s3 (PACKep p)) /\
     (!B E' dec s1 s2.
       eval_dec dec s1 (env_of_basis B) s2 (ENVep E') ==>
       eval_strdec (DECstrdec dec) s1 B s2 (ENVep E')) /\
     (!B dec p s1 s2.
       eval_dec dec s1 (env_of_basis B) s2 (PACKep p) ==>
       eval_strdec (DECstrdec dec) s1 B s2 (PACKep p)) /\
     (!B SE strbind s1 s2.
       eval_strbind strbind s1 B s2 (STRENVsp SE) ==>
       eval_strdec (STRUCTUREstrdec strbind) s1 B s2
         (ENVep (strenv_in_env SE))) /\
     (!B p strbind s1 s2.
       eval_strbind strbind s1 B s2 (PACKsp p) ==>
       eval_strdec (STRUCTUREstrdec strbind) s1 B s2 (PACKep p)) /\
     (!B E1 E2 strdec1 strdec2 s1 s2 s3.
       eval_strdec strdec1 s1 B s2 (ENVep E1) /\
       eval_strdec strdec2 s2 (add_env_to_basis B E1) s3 (ENVep E2) ==>
       eval_strdec (LOCALstrdec strdec1 strdec2) s1 B s3 (ENVep E2)) /\
     (!B p strdec1 strdec2 s1 s2.
       eval_strdec strdec1 s1 B s2 (PACKep p) ==>
       eval_strdec (LOCALstrdec strdec1 strdec2) s1 B s2 (PACKep p)) /\
     (!B E p strdec1 strdec2 s1 s2 s3.
       eval_strdec strdec1 s1 B s2 (ENVep E) /\
       eval_strdec strdec2 s2 (add_env_to_basis B E) s3 (PACKep p) ==>
       eval_strdec (LOCALstrdec strdec1 strdec2) s1 B s3 (PACKep p)) /\
     (!B s. eval_strdec EMPTYstrdec s B s (ENVep empty_env)) /\
     (!B E1 E2 strdec1 strdec2 s1 s2 s3.
       eval_strdec strdec1 s1 B s2 (ENVep E1) /\
       eval_strdec strdec2 s2 (add_env_to_basis B E1) s3 (ENVep E2) ==>
       eval_strdec (SEQstrdec strdec1 strdec2) s1 B s3
         (ENVep (add_env E1 E2))) /\
     (!B p strdec1 strdec2 s1 s2.
       eval_strdec strdec1 s1 B s2 (PACKep p) ==>
       eval_strdec (SEQstrdec strdec1 strdec2) s1 B s2 (PACKep p)) /\
     (!B E p strdec1 strdec2 s1 s2 s3.
       eval_strdec strdec1 s1 B s2 (ENVep E) /\
       eval_strdec strdec2 s2 (add_env_to_basis B E) s3 (PACKep p) ==>
       eval_strdec (SEQstrdec strdec1 strdec2) s1 B s3 (PACKep p)) /\
     (!B E strexp strid s1 s2.
       eval_strexp strexp s1 B s2 (ENVep E) ==>
       eval_strbind (BINDstrbind strid NONE strexp NONE) s1 B s2
         (STRENVsp (strenv_map strid E))) /\
     (!B p strexp strid s1 s2.
       eval_strexp strexp s1 B s2 (PACKep p) ==>
       eval_strbind (BINDstrbind strid NONE strexp NONE) s1 B s2
         (PACKsp p)) /\
     (!B E i sigexp strexp strid s1 s2 s3.
       eval_strexp strexp s1 B s2 (ENVep E) /\
       eval_sigexp sigexp s2 (Inter_basis B) s3 i ==>
       eval_strbind (BINDstrbind strid (SOME sigexp) strexp NONE) s1 B s3
         (STRENVsp (strenv_map strid (cut_env E i)))) /\
     (!B p sigexp strexp strid s1 s2.
       eval_strexp strexp s1 B s2 (PACKep p) ==>
       eval_strbind (BINDstrbind strid (SOME sigexp) strexp NONE) s1 B s2
         (PACKsp p)) /\
     (!B E SE strbind strexp strid s1 s2 s3.
       eval_strexp strexp s1 B s2 (ENVep E) /\
       eval_strbind strbind s2 B s3 (STRENVsp SE) ==>
       eval_strbind (BINDstrbind strid NONE strexp (SOME strbind)) s1 B s3
         (STRENVsp (add_strenv (strenv_map strid E) SE))) /\
     (!B p strbind strexp strid s1 s2.
       eval_strexp strexp s1 B s2 (PACKep p) ==>
       eval_strbind (BINDstrbind strid NONE strexp (SOME strbind)) s1 B s2
         (PACKsp p)) /\
     (!B E p strbind strexp strid s1 s2 s3.
       eval_strexp strexp s1 B s2 (ENVep E) /\
       eval_strbind strbind s2 B s3 (PACKsp p) ==>
       eval_strbind (BINDstrbind strid NONE strexp (SOME strbind)) s1 B s3
         (PACKsp p)) /\
     (!B E i SE sigexp strbind strexp strid s1 s2 s3 s4.
       eval_strexp strexp s1 B s2 (ENVep E) /\
       eval_sigexp sigexp s2 (Inter_basis B) s3 i /\
       eval_strbind strbind s3 B s4 (STRENVsp SE) ==>
       eval_strbind (BINDstrbind strid (SOME sigexp) strexp (SOME strbind)) s1
         B
         s4
         (STRENVsp (add_strenv (strenv_map strid (cut_env E i)) SE))) /\
     (!B p sigexp strbind strexp strid s1 s2.
       eval_strexp strexp s1 B s2 (PACKep p) ==>
       eval_strbind (BINDstrbind strid (SOME sigexp) strexp (SOME strbind)) s1
         B
         s2
         (PACKsp p)) /\
     (!B E i p sigexp strbind strexp strid s1 s2 s3 s4.
       eval_strexp strexp s1 B s2 (ENVep E) /\
       eval_sigexp sigexp s2 (Inter_basis B) s3 i /\
       eval_strbind strbind s3 B s4 (PACKsp p) ==>
       eval_strbind (BINDstrbind strid (SOME sigexp) strexp (SOME strbind)) s1
         B
         s4
         (PACKsp p))
eval_strexp_DEF
|- !strexp s1 B s2 ep.
     eval_strexp strexp s1 B s2 ep =
     (!poss_eval_strexp poss_eval_strdec poss_eval_strbind.
       ModML_eval_structures_pred poss_eval_strexp poss_eval_strdec
         poss_eval_strbind ==>
       poss_eval_strexp strexp s1 B s2 ep)
eval_strdec_DEF
|- !strdec s1 B s2 ep.
     eval_strdec strdec s1 B s2 ep =
     (!poss_eval_strexp poss_eval_strdec poss_eval_strbind.
       ModML_eval_structures_pred poss_eval_strexp poss_eval_strdec
         poss_eval_strbind ==>
       poss_eval_strdec strdec s1 B s2 ep)
eval_strbind_DEF
|- !strbind s1 B s2 sep.
     eval_strbind strbind s1 B s2 sep =
     (!poss_eval_strexp poss_eval_strdec poss_eval_strbind.
       ModML_eval_structures_pred poss_eval_strexp poss_eval_strdec
         poss_eval_strbind ==>
       poss_eval_strbind strbind s1 B s2 sep)
ModML_eval_funbind_pred_DEF
|- !eval_funbind.
     ModML_eval_funbind_pred eval_funbind =
     (!sigexp B i funid strid strexp s1 s2.
       eval_sigexp sigexp s1 (Inter_basis B) s2 i ==>
       eval_funbind (BINDfunbind funid strid sigexp NONE strexp NONE) s1 B s2
         (funenv_map funid (FUNCLOS strid i strexp NONE B))) /\
     (!sigexp sigexp' B i i' funid strid strexp s1 s2 s3.
       eval_sigexp sigexp s1 (Inter_basis B) s2 i /\
       eval_sigexp sigexp' s2
         (add_intenv_to_intbasis (Inter_basis B) (intenv_map strid i))
         s3
         i' ==>
       eval_funbind
         (BINDfunbind funid strid sigexp (SOME sigexp') strexp NONE)
         s1
         B
         s3
         (funenv_map funid (FUNCLOS strid i strexp (SOME i') B))) /\
     (!sigexp B i funbind f funid strid strexp s1 s2 s3.
       eval_sigexp sigexp s1 (Inter_basis B) s2 i /\
       eval_funbind funbind s2 B s3 f ==>
       eval_funbind
         (BINDfunbind funid strid sigexp NONE strexp (SOME funbind))
         s1
         B
         s3
         (add_funenv (funenv_map funid (FUNCLOS strid i strexp NONE B)) f)) /\
     (!sigexp sigexp' B i i' funbind f funid strid strexp s1 s2 s3 s4.
       eval_sigexp sigexp s1 (Inter_basis B) s2 i /\
       eval_sigexp sigexp' s2
         (add_intenv_to_intbasis (Inter_basis B) (intenv_map strid i))
         s3
         i' /\
       eval_funbind funbind s3 B s4 f ==>
       eval_funbind
         (BINDfunbind funid strid sigexp (SOME sigexp') strexp (SOME funbind))
         s1
         B
         s4
         (add_funenv (funenv_map funid (FUNCLOS strid i strexp (SOME i') B))
           f))
eval_funbind_DEF
|- !funbind s1 B s2 f.
     eval_funbind funbind s1 B s2 f =
     (!poss_eval_funbind.
       ModML_eval_funbind_pred poss_eval_funbind ==>
       poss_eval_funbind funbind s1 B s2 f)
eval_fundec_DEF
|- ((!funbind s1 B s2 f.
      eval_funbind funbind s1 B s2 f ==>
      eval_fundec (FUNCTORfundec funbind) s1 B s2 f) /\
    (!s B. eval_fundec EMPTYfundec s B s empty_funenv) /\
    (!fundec1 s1 B F1 fundec2 s3 F2.
      (?s2.
        eval_fundec fundec1 s1 B s2 F1 /\
        eval_fundec fundec2 s2 (add_funenv_to_basis B F1) s3 F2) ==>
      eval_fundec (SEQfundec fundec1 fundec2) s1 B s3 (add_funenv F1 F2))) /\
   (!P.
     (!funbind s1 B s2 f.
       eval_funbind funbind s1 B s2 f ==>
       P (FUNCTORfundec funbind) s1 B s2 f) /\
     (!s B. P EMPTYfundec s B s empty_funenv) /\
     (!fundec1 s1 B F1 fundec2 s3 F2.
       (?s2.
         P fundec1 s1 B s2 F1 /\
         P fundec2 s2 (add_funenv_to_basis B F1) s3 F2) ==>
       P (SEQfundec fundec1 fundec2) s1 B s3 (add_funenv F1 F2)) ==>
     (!fundec s1 B s2 f. eval_fundec fundec s1 B s2 f ==> P fundec s1 B s2 f))
eval_topdec_DEF
|- ((!strdec s1 B s2 E.
      eval_strdec strdec s1 B s2 (ENVep E) ==>
      eval_topdec (STRDEC strdec) s1 B s2 (BASISbp (env_in_basis E))) /\
    (!strdec s1 B s2 p.
      eval_strdec strdec s1 B s2 (PACKep p) ==>
      eval_topdec (STRDEC strdec) s1 B s2 (PACKbp p)) /\
    (!sigdec s1 B s2 G.
      eval_sigdec sigdec s1 (Inter_basis B) s2 G ==>
      eval_topdec (SIGDEC sigdec) s1 B s2 (BASISbp (sigenv_in_basis G))) /\
    (!fundec s1 B s2 f.
      eval_fundec fundec s1 B s2 f ==>
      eval_topdec (FUNDEC fundec) s1 B s2 (BASISbp (funenv_in_basis f)))) /\
   (!P.
     (!strdec s1 B s2 E.
       eval_strdec strdec s1 B s2 (ENVep E) ==>
       P (STRDEC strdec) s1 B s2 (BASISbp (env_in_basis E))) /\
     (!strdec s1 B s2 p.
       eval_strdec strdec s1 B s2 (PACKep p) ==>
       P (STRDEC strdec) s1 B s2 (PACKbp p)) /\
     (!sigdec s1 B s2 G.
       eval_sigdec sigdec s1 (Inter_basis B) s2 G ==>
       P (SIGDEC sigdec) s1 B s2 (BASISbp (sigenv_in_basis G))) /\
     (!fundec s1 B s2 f.
       eval_fundec fundec s1 B s2 f ==>
       P (FUNDEC fundec) s1 B s2 (BASISbp (funenv_in_basis f))) ==>
     (!topdec s1 B s2 bp.
       eval_topdec topdec s1 B s2 bp ==> P topdec s1 B s2 bp))

Theorems

joint_ty_sigexp_spec_strdesc_strdesc_option_sigexp_spec_strdesc_Axiom
|- !f0 f1 f2 f3 f4 f5 f6 f7 e0 f8 f9 e1 f10.
     ?!fn.
       (!j. fn (JOINT_int_SIGsigexp j) = f0 (fn j) j) /\
       (!s. fn (JOINT_int_SIGIDsigexp s) = f1 s) /\
       (!v'. fn (JOINT_int_VALspec v') = f2 v') /\
       (!e. fn (JOINT_int_EXCEPTIONspec e) = f3 e) /\
       (!j. fn (JOINT_int_STRUCTUREspec j) = f4 (fn j) j) /\
       (!j1 j2. fn (JOINT_int_LOCALspec j1 j2) = f5 (fn j1) (fn j2) j1 j2) /\
       (!n. fn (JOINT_int_OPENspec n) = f6 n) /\
       (!n. fn (JOINT_int_INCLUDEspec n) = f7 n) /\
       (fn JOINT_int_EMPTYspec = e0) /\
       (!j1 j2. fn (JOINT_int_SEQspec j1 j2) = f8 (fn j1) (fn j2) j1 j2) /\
       (!s j1 j2.
         fn (JOINT_int_STRIDstrdesc s j1 j2) = f9 (fn j1) (fn j2) s j1 j2) /\
       (fn JOINT_int_sigexp_spec_strdesc_NONE_strdesc = e1) /\
       (!j. fn (JOINT_int_sigexp_spec_strdesc_SOME_strdesc j) = f10 (fn j) j)
ModMLSignatures_rec_thm
|- !SIGsigexp_case SIGIDsigexp_case VALspec_case EXCEPTIONspec_case
    STRUCTUREspec_case LOCALspec_case OPENspec_case INCLUDEspec_case
    EMPTYspec_case SEQspec_case STRIDstrdesc_case
    sigexp_spec_strdesc_NONE_strdesc_case
    sigexp_spec_strdesc_SOME_strdesc_case.
     ?y y''' y'' y'.
       (!x1. y (SIGsigexp x1) = SIGsigexp_case (y''' x1) x1) /\
       (!x1. y (SIGIDsigexp x1) = SIGIDsigexp_case x1) /\
       (!x1. y''' (VALspec x1) = VALspec_case x1) /\
       (!x1. y''' (EXCEPTIONspec x1) = EXCEPTIONspec_case x1) /\
       (!x1. y''' (STRUCTUREspec x1) = STRUCTUREspec_case (y'' x1) x1) /\
       (!x1 x2.
         y''' (LOCALspec x1 x2) = LOCALspec_case (y''' x1) (y''' x2) x1 x2) /\
       (!x1. y''' (OPENspec x1) = OPENspec_case x1) /\
       (!x1. y''' (INCLUDEspec x1) = INCLUDEspec_case x1) /\
       (y''' EMPTYspec = EMPTYspec_case) /\
       (!x1 x2.
         y''' (SEQspec x1 x2) = SEQspec_case (y''' x1) (y''' x2) x1 x2) /\
       (!x1 x2 x3.
         y'' (STRIDstrdesc x1 x2 x3) =
         STRIDstrdesc_case (y x2) (y' x3) x1 x2 x3) /\
       (y' NONE = sigexp_spec_strdesc_NONE_strdesc_case) /\
       (!x1. y' (SOME x1) = sigexp_spec_strdesc_SOME_strdesc_case (y'' x1) x1)
ModMLSignatures_induction_thm
|- !sigexp_Prop spec_Prop strdesc_Prop
    strdesc_option_sigexp_spec_strdesc_Prop.
     (!y. spec_Prop y ==> sigexp_Prop (SIGsigexp y)) /\
     (!y. sigexp_Prop (SIGIDsigexp y)) /\
     (!y. spec_Prop (VALspec y)) /\
     (!y. spec_Prop (EXCEPTIONspec y)) /\
     (!y. strdesc_Prop y ==> spec_Prop (STRUCTUREspec y)) /\
     (!y y''''.
       spec_Prop y ==> spec_Prop y'''' ==> spec_Prop (LOCALspec y y'''')) /\
     (!y. spec_Prop (OPENspec y)) /\
     (!y. spec_Prop (INCLUDEspec y)) /\
     spec_Prop EMPTYspec /\
     (!y y'''.
       spec_Prop y ==> spec_Prop y''' ==> spec_Prop (SEQspec y y''')) /\
     (!y y'' y'.
       sigexp_Prop y'' ==>
       strdesc_option_sigexp_spec_strdesc_Prop y' ==>
       strdesc_Prop (STRIDstrdesc y y'' y')) /\
     strdesc_option_sigexp_spec_strdesc_Prop NONE /\
     (!y.
       strdesc_Prop y ==>
       strdesc_option_sigexp_spec_strdesc_Prop (SOME y)) ==>
     (!x1. sigexp_Prop x1) /\
     (!x2. spec_Prop x2) /\
     (!x3. strdesc_Prop x3) /\
     (!x4. strdesc_option_sigexp_spec_strdesc_Prop x4)
ModMLSignatures_unique_thm
|- !SIGsigexp_case SIGIDsigexp_case VALspec_case EXCEPTIONspec_case
    STRUCTUREspec_case LOCALspec_case OPENspec_case INCLUDEspec_case
    EMPTYspec_case SEQspec_case STRIDstrdesc_case
    sigexp_spec_strdesc_NONE_strdesc_case
    sigexp_spec_strdesc_SOME_strdesc_case fn1 fn2 fn3 fn4 fn1' fn2' fn3' fn4'.
     (!y. fn1 (SIGsigexp y) = SIGsigexp_case (fn2 y) y) /\
     (!y. fn1 (SIGIDsigexp y) = SIGIDsigexp_case y) /\
     (!y. fn2 (VALspec y) = VALspec_case y) /\
     (!y. fn2 (EXCEPTIONspec y) = EXCEPTIONspec_case y) /\
     (!y. fn2 (STRUCTUREspec y) = STRUCTUREspec_case (fn3 y) y) /\
     (!y y''''.
       fn2 (LOCALspec y y'''') =
       LOCALspec_case (fn2 y) (fn2 y'''') y y'''') /\
     (!y. fn2 (OPENspec y) = OPENspec_case y) /\
     (!y. fn2 (INCLUDEspec y) = INCLUDEspec_case y) /\
     (fn2 EMPTYspec = EMPTYspec_case) /\
     (!y y'''.
       fn2 (SEQspec y y''') = SEQspec_case (fn2 y) (fn2 y''') y y''') /\
     (!y y'' y'.
       fn3 (STRIDstrdesc y y'' y') =
       STRIDstrdesc_case (fn1 y'') (fn4 y') y y'' y') /\
     (fn4 NONE = sigexp_spec_strdesc_NONE_strdesc_case) /\
     (!y. fn4 (SOME y) = sigexp_spec_strdesc_SOME_strdesc_case (fn3 y) y) ==>
     (!y. fn1' (SIGsigexp y) = SIGsigexp_case (fn2' y) y) /\
     (!y. fn1' (SIGIDsigexp y) = SIGIDsigexp_case y) /\
     (!y. fn2' (VALspec y) = VALspec_case y) /\
     (!y. fn2' (EXCEPTIONspec y) = EXCEPTIONspec_case y) /\
     (!y. fn2' (STRUCTUREspec y) = STRUCTUREspec_case (fn3' y) y) /\
     (!y y''''.
       fn2' (LOCALspec y y'''') =
       LOCALspec_case (fn2' y) (fn2' y'''') y y'''') /\
     (!y. fn2' (OPENspec y) = OPENspec_case y) /\
     (!y. fn2' (INCLUDEspec y) = INCLUDEspec_case y) /\
     (fn2' EMPTYspec = EMPTYspec_case) /\
     (!y y'''.
       fn2' (SEQspec y y''') = SEQspec_case (fn2' y) (fn2' y''') y y''') /\
     (!y y'' y'.
       fn3' (STRIDstrdesc y y'' y') =
       STRIDstrdesc_case (fn1' y'') (fn4' y') y y'' y') /\
     (fn4' NONE = sigexp_spec_strdesc_NONE_strdesc_case) /\
     (!y.
       fn4' (SOME y) = sigexp_spec_strdesc_SOME_strdesc_case (fn3' y) y) ==>
     (fn1 = fn1') /\ (fn2 = fn2') /\ (fn3 = fn3') /\ (fn4 = fn4')
ModMLSignatures_constructors_distinct
|- (!x1 x1'. ~(SIGsigexp x1 = SIGIDsigexp x1')) /\
   ((!x1 x1'. ~(VALspec x1 = EXCEPTIONspec x1')) /\
    (!x1 x1'. ~(VALspec x1 = STRUCTUREspec x1')) /\
    (!x1 x1' x2'. ~(VALspec x1 = LOCALspec x1' x2')) /\
    (!x1 x1'. ~(VALspec x1 = OPENspec x1')) /\
    (!x1 x1'. ~(VALspec x1 = INCLUDEspec x1')) /\
    (!x1. ~(VALspec x1 = EMPTYspec)) /\
    (!x1 x1' x2'. ~(VALspec x1 = SEQspec x1' x2')) /\
    (!x1 x1'. ~(EXCEPTIONspec x1 = STRUCTUREspec x1')) /\
    (!x1 x1' x2'. ~(EXCEPTIONspec x1 = LOCALspec x1' x2')) /\
    (!x1 x1'. ~(EXCEPTIONspec x1 = OPENspec x1')) /\
    (!x1 x1'. ~(EXCEPTIONspec x1 = INCLUDEspec x1')) /\
    (!x1. ~(EXCEPTIONspec x1 = EMPTYspec)) /\
    (!x1 x1' x2'. ~(EXCEPTIONspec x1 = SEQspec x1' x2')) /\
    (!x1 x1' x2'. ~(STRUCTUREspec x1 = LOCALspec x1' x2')) /\
    (!x1 x1'. ~(STRUCTUREspec x1 = OPENspec x1')) /\
    (!x1 x1'. ~(STRUCTUREspec x1 = INCLUDEspec x1')) /\
    (!x1. ~(STRUCTUREspec x1 = EMPTYspec)) /\
    (!x1 x1' x2'. ~(STRUCTUREspec x1 = SEQspec x1' x2')) /\
    (!x1 x2 x1'. ~(LOCALspec x1 x2 = OPENspec x1')) /\
    (!x1 x2 x1'. ~(LOCALspec x1 x2 = INCLUDEspec x1')) /\
    (!x1 x2. ~(LOCALspec x1 x2 = EMPTYspec)) /\
    (!x1 x2 x1' x2'. ~(LOCALspec x1 x2 = SEQspec x1' x2')) /\
    (!x1 x1'. ~(OPENspec x1 = INCLUDEspec x1')) /\
    (!x1. ~(OPENspec x1 = EMPTYspec)) /\
    (!x1 x1' x2'. ~(OPENspec x1 = SEQspec x1' x2')) /\
    (!x1. ~(INCLUDEspec x1 = EMPTYspec)) /\
    (!x1 x1' x2'. ~(INCLUDEspec x1 = SEQspec x1' x2')) /\
    (!x1' x2'. ~(EMPTYspec = SEQspec x1' x2'))) /\
   (!x1'. ~(NONE = SOME x1'))
ModMLSignatures_constructors_one_one
|- ((!x1 x1'. (SIGsigexp x1 = SIGsigexp x1') = x1 = x1') /\
    (!x1 x1'. (SIGIDsigexp x1 = SIGIDsigexp x1') = x1 = x1')) /\
   ((!x1 x1'. (VALspec x1 = VALspec x1') = x1 = x1') /\
    (!x1 x1'. (EXCEPTIONspec x1 = EXCEPTIONspec x1') = x1 = x1') /\
    (!x1 x1'. (STRUCTUREspec x1 = STRUCTUREspec x1') = x1 = x1') /\
    (!x1 x2 x1' x2'.
      (LOCALspec x1 x2 = LOCALspec x1' x2') = (x1 = x1') /\ (x2 = x2')) /\
    (!x1 x1'. (OPENspec x1 = OPENspec x1') = x1 = x1') /\
    (!x1 x1'. (INCLUDEspec x1 = INCLUDEspec x1') = x1 = x1') /\
    (!x1 x2 x1' x2'.
      (SEQspec x1 x2 = SEQspec x1' x2') = (x1 = x1') /\ (x2 = x2'))) /\
   (!x1 x2 x3 x1' x2' x3'.
     (STRIDstrdesc x1 x2 x3 = STRIDstrdesc x1' x2' x3') =
     (x1 = x1') /\ (x2 = x2') /\ (x3 = x3')) /\
   (!x1 x1'. (SOME x1 = SOME x1') = x1 = x1')
ModMLSignatures_cases_thm
|- (!x1. (?y. x1 = SIGsigexp y) \/ (?y. x1 = SIGIDsigexp y)) /\
   (!x2.
     (?y. x2 = VALspec y) \/
     (?y. x2 = EXCEPTIONspec y) \/
     (?y. x2 = STRUCTUREspec y) \/
     (?y y'. x2 = LOCALspec y y') \/
     (?y. x2 = OPENspec y) \/
     (?y. x2 = INCLUDEspec y) \/
     (x2 = EMPTYspec) \/
     (?y y'. x2 = SEQspec y y')) /\
   (!x3. ?y y'' y'. x3 = STRIDstrdesc y y'' y') /\
   (!x4. (x4 = NONE) \/ (?y. x4 = SOME y))
joint_ty_sigbind_sigbind_option_sigbind_Axiom
|- !f0 e f1.
     ?!fn.
       (!s0 s1 j. fn (JOINT_int_BINDsigbind s0 s1 j) = f0 (fn j) s0 s1 j) /\
       (fn JOINT_int_sigbind_NONE_sigbind = e) /\
       (!j. fn (JOINT_int_sigbind_SOME_sigbind j) = f1 (fn j) j)
sigbind_rec_thm
|- !BINDsigbind_case sigbind_NONE_sigbind_case sigbind_SOME_sigbind_case.
     ?y y'.
       (!x1 x2 x3.
         y (BINDsigbind x1 x2 x3) = BINDsigbind_case (y' x3) x1 x2 x3) /\
       (y' NONE = sigbind_NONE_sigbind_case) /\
       (!x1. y' (SOME x1) = sigbind_SOME_sigbind_case (y x1) x1)
sigbind_induction_thm
|- !sigbind_Prop sigbind_option_sigbind_Prop.
     (!y y'' y'.
       sigbind_option_sigbind_Prop y' ==>
       sigbind_Prop (BINDsigbind y y'' y')) /\
     sigbind_option_sigbind_Prop NONE /\
     (!y. sigbind_Prop y ==> sigbind_option_sigbind_Prop (SOME y)) ==>
     (!x1. sigbind_Prop x1) /\ (!x2. sigbind_option_sigbind_Prop x2)
sigbind_unique_thm
|- !BINDsigbind_case sigbind_NONE_sigbind_case sigbind_SOME_sigbind_case fn1
    fn2 fn1' fn2'.
     (!y y'' y'.
       fn1 (BINDsigbind y y'' y') = BINDsigbind_case (fn2 y') y y'' y') /\
     (fn2 NONE = sigbind_NONE_sigbind_case) /\
     (!y. fn2 (SOME y) = sigbind_SOME_sigbind_case (fn1 y) y) ==>
     (!y y'' y'.
       fn1' (BINDsigbind y y'' y') = BINDsigbind_case (fn2' y') y y'' y') /\
     (fn2' NONE = sigbind_NONE_sigbind_case) /\
     (!y. fn2' (SOME y) = sigbind_SOME_sigbind_case (fn1' y) y) ==>
     (fn1 = fn1') /\ (fn2 = fn2')
sigbind_constructors_distinct
|- !x1'. ~(NONE = SOME x1')
sigbind_constructors_one_one
|- (!x1 x2 x3 x1' x2' x3'.
     (BINDsigbind x1 x2 x3 = BINDsigbind x1' x2' x3') =
     (x1 = x1') /\ (x2 = x2') /\ (x3 = x3')) /\
   (!x1 x1'. (SOME x1 = SOME x1') = x1 = x1')
sigbind_cases_thm
|- (!x1. ?y y'' y'. x1 = BINDsigbind y y'' y') /\
   (!x2. (x2 = NONE) \/ (?y. x2 = SOME y))
sigdec_Axiom
|- !f0 e f1.
     ?!fn.
       (!s. fn (SIGNATUREsigdec s) = f0 s) /\
       (fn EMPTYsigdec = e) /\
       (!s1 s2. fn (SEQsigdec s1 s2) = f1 (fn s1) (fn s2) s1 s2)
sigdec_induction_thm
|- !P.
     (!s. P (SIGNATUREsigdec s)) /\
     P EMPTYsigdec /\
     (!s1 s2. P s1 /\ P s2 ==> P (SEQsigdec s1 s2)) ==>
     (!s. P s)
sigdec_cases_thm
|- !s.
     (?s'. s = SIGNATUREsigdec s') \/
     (s = EMPTYsigdec) \/
     (?s1 s2. s = SEQsigdec s1 s2)
sigdec_constructors_one_one
|- (!s s'. (SIGNATUREsigdec s = SIGNATUREsigdec s') = s = s') /\
   (!s1 s2 s1' s2'.
     (SEQsigdec s1 s2 = SEQsigdec s1' s2') = (s1 = s1') /\ (s2 = s2'))
sigdec_constructors_distinct
|- (!s. ~(SIGNATUREsigdec s = EMPTYsigdec)) /\
   (!s2 s1 s. ~(SIGNATUREsigdec s = SEQsigdec s1 s2)) /\
   (!s2 s1. ~(EMPTYsigdec = SEQsigdec s1 s2))
joint_ty_sigexp_option_strbind_strdec_strexp_strbind_strbind_option_strbind_strdec_strexp_strdec_strexp_Axiom
|- !e0 f0 f1 e1 f2 f3 f4 f5 e2 f6 f7 f8 f9 f10.
     ?!fn.
       (fn JOINT_int_strbind_strdec_strexp_NONE_sigexp = e0) /\
       (!s. fn (JOINT_int_strbind_strdec_strexp_SOME_sigexp s) = f0 s) /\
       (!s j1 j2 j3.
         fn (JOINT_int_BINDstrbind s j1 j2 j3) =
         f1 (fn j1) (fn j2) (fn j3) s j1 j2 j3) /\
       (fn JOINT_int_strbind_strdec_strexp_NONE_strbind = e1) /\
       (!j.
         fn (JOINT_int_strbind_strdec_strexp_SOME_strbind j) = f2 (fn j) j) /\
       (!d. fn (JOINT_int_DECstrdec d) = f3 d) /\
       (!j. fn (JOINT_int_STRUCTUREstrdec j) = f4 (fn j) j) /\
       (!j1 j2.
         fn (JOINT_int_LOCALstrdec j1 j2) = f5 (fn j1) (fn j2) j1 j2) /\
       (fn JOINT_int_EMPTYstrdec = e2) /\
       (!j1 j2. fn (JOINT_int_SEQstrdec j1 j2) = f6 (fn j1) (fn j2) j1 j2) /\
       (!j. fn (JOINT_int_STRUCTstrexp j) = f7 (fn j) j) /\
       (!l. fn (JOINT_int_LONGSTRIDstrexp l) = f8 l) /\
       (!f' j. fn (JOINT_int_APPstrexp f' j) = f9 (fn j) f' j) /\
       (!j1 j2. fn (JOINT_int_LETstrexp j1 j2) = f10 (fn j1) (fn j2) j1 j2)
ModMLStructures_rec_thm
|- !strbind_strdec_strexp_NONE_sigexp_case
    strbind_strdec_strexp_SOME_sigexp_case BINDstrbind_case
    strbind_strdec_strexp_NONE_strbind_case
    strbind_strdec_strexp_SOME_strbind_case DECstrdec_case
    STRUCTUREstrdec_case LOCALstrdec_case EMPTYstrdec_case SEQstrdec_case
    STRUCTstrexp_case LONGSTRIDstrexp_case APPstrexp_case LETstrexp_case.
     ?y y'''' y''' y'' y'.
       (y NONE = strbind_strdec_strexp_NONE_sigexp_case) /\
       (!x1. y (SOME x1) = strbind_strdec_strexp_SOME_sigexp_case x1) /\
       (!x1 x2 x3 x4.
         y'''' (BINDstrbind x1 x2 x3 x4) =
         BINDstrbind_case (y x2) (y' x3) (y''' x4) x1 x2 x3 x4) /\
       (y''' NONE = strbind_strdec_strexp_NONE_strbind_case) /\
       (!x1.
         y''' (SOME x1) =
         strbind_strdec_strexp_SOME_strbind_case (y'''' x1) x1) /\
       (!x1. y'' (DECstrdec x1) = DECstrdec_case x1) /\
       (!x1. y'' (STRUCTUREstrdec x1) = STRUCTUREstrdec_case (y'''' x1) x1) /\
       (!x1 x2.
         y'' (LOCALstrdec x1 x2) =
         LOCALstrdec_case (y'' x1) (y'' x2) x1 x2) /\
       (y'' EMPTYstrdec = EMPTYstrdec_case) /\
       (!x1 x2.
         y'' (SEQstrdec x1 x2) = SEQstrdec_case (y'' x1) (y'' x2) x1 x2) /\
       (!x1. y' (STRUCTstrexp x1) = STRUCTstrexp_case (y'' x1) x1) /\
       (!x1. y' (LONGSTRIDstrexp x1) = LONGSTRIDstrexp_case x1) /\
       (!x1 x2. y' (APPstrexp x1 x2) = APPstrexp_case (y' x2) x1 x2) /\
       (!x1 x2. y' (LETstrexp x1 x2) = LETstrexp_case (y'' x1) (y' x2) x1 x2)
ModMLStructures_induction_thm
|- !sigexp_option_strbind_strdec_strexp_Prop strbind_Prop
    strbind_option_strbind_strdec_strexp_Prop strdec_Prop strexp_Prop.
     sigexp_option_strbind_strdec_strexp_Prop NONE /\
     (!y. sigexp_option_strbind_strdec_strexp_Prop (SOME y)) /\
     (!y y''''''' y'''''' y'''''.
       sigexp_option_strbind_strdec_strexp_Prop y''''''' ==>
       strexp_Prop y'''''' ==>
       strbind_option_strbind_strdec_strexp_Prop y''''' ==>
       strbind_Prop (BINDstrbind y y''''''' y'''''' y''''')) /\
     strbind_option_strbind_strdec_strexp_Prop NONE /\
     (!y.
       strbind_Prop y ==>
       strbind_option_strbind_strdec_strexp_Prop (SOME y)) /\
     (!y. strdec_Prop (DECstrdec y)) /\
     (!y. strbind_Prop y ==> strdec_Prop (STRUCTUREstrdec y)) /\
     (!y y''''.
       strdec_Prop y ==>
       strdec_Prop y'''' ==>
       strdec_Prop (LOCALstrdec y y'''')) /\
     strdec_Prop EMPTYstrdec /\
     (!y y'''.
       strdec_Prop y ==>
       strdec_Prop y''' ==>
       strdec_Prop (SEQstrdec y y''')) /\
     (!y. strdec_Prop y ==> strexp_Prop (STRUCTstrexp y)) /\
     (!y. strexp_Prop (LONGSTRIDstrexp y)) /\
     (!y y''. strexp_Prop y'' ==> strexp_Prop (APPstrexp y y'')) /\
     (!y y'.
       strdec_Prop y /\ strexp_Prop y' ==> strexp_Prop (LETstrexp y y')) ==>
     (!x1. sigexp_option_strbind_strdec_strexp_Prop x1) /\
     (!x2. strbind_Prop x2) /\
     (!x3. strbind_option_strbind_strdec_strexp_Prop x3) /\
     (!x4. strdec_Prop x4) /\
     (!x5. strexp_Prop x5)
ModMLStructures_unique_thm
|- !strbind_strdec_strexp_NONE_sigexp_case
    strbind_strdec_strexp_SOME_sigexp_case BINDstrbind_case
    strbind_strdec_strexp_NONE_strbind_case
    strbind_strdec_strexp_SOME_strbind_case DECstrdec_case
    STRUCTUREstrdec_case LOCALstrdec_case EMPTYstrdec_case SEQstrdec_case
    STRUCTstrexp_case LONGSTRIDstrexp_case APPstrexp_case LETstrexp_case fn1
    fn2 fn3 fn4 fn5 fn1' fn2' fn3' fn4' fn5'.
     (fn1 NONE = strbind_strdec_strexp_NONE_sigexp_case) /\
     (!y. fn1 (SOME y) = strbind_strdec_strexp_SOME_sigexp_case y) /\
     (!y y''''''' y'''''' y'''''.
       fn2 (BINDstrbind y y''''''' y'''''' y''''') =
       BINDstrbind_case (fn1 y''''''') (fn5 y'''''') (fn3 y''''') y y'''''''
         y''''''
         y''''') /\
     (fn3 NONE = strbind_strdec_strexp_NONE_strbind_case) /\
     (!y. fn3 (SOME y) = strbind_strdec_strexp_SOME_strbind_case (fn2 y) y) /\
     (!y. fn4 (DECstrdec y) = DECstrdec_case y) /\
     (!y. fn4 (STRUCTUREstrdec y) = STRUCTUREstrdec_case (fn2 y) y) /\
     (!y y''''.
       fn4 (LOCALstrdec y y'''') =
       LOCALstrdec_case (fn4 y) (fn4 y'''') y y'''') /\
     (fn4 EMPTYstrdec = EMPTYstrdec_case) /\
     (!y y'''.
       fn4 (SEQstrdec y y''') = SEQstrdec_case (fn4 y) (fn4 y''') y y''') /\
     (!y. fn5 (STRUCTstrexp y) = STRUCTstrexp_case (fn4 y) y) /\
     (!y. fn5 (LONGSTRIDstrexp y) = LONGSTRIDstrexp_case y) /\
     (!y y''. fn5 (APPstrexp y y'') = APPstrexp_case (fn5 y'') y y'') /\
     (!y y'. fn5 (LETstrexp y y') = LETstrexp_case (fn4 y) (fn5 y') y y') ==>
     (fn1' NONE = strbind_strdec_strexp_NONE_sigexp_case) /\
     (!y. fn1' (SOME y) = strbind_strdec_strexp_SOME_sigexp_case y) /\
     (!y y''''''' y'''''' y'''''.
       fn2' (BINDstrbind y y''''''' y'''''' y''''') =
       BINDstrbind_case (fn1' y''''''') (fn5' y'''''') (fn3' y''''') y
         y'''''''
         y''''''
         y''''') /\
     (fn3' NONE = strbind_strdec_strexp_NONE_strbind_case) /\
     (!y.
       fn3' (SOME y) = strbind_strdec_strexp_SOME_strbind_case (fn2' y) y) /\
     (!y. fn4' (DECstrdec y) = DECstrdec_case y) /\
     (!y. fn4' (STRUCTUREstrdec y) = STRUCTUREstrdec_case (fn2' y) y) /\
     (!y y''''.
       fn4' (LOCALstrdec y y'''') =
       LOCALstrdec_case (fn4' y) (fn4' y'''') y y'''') /\
     (fn4' EMPTYstrdec = EMPTYstrdec_case) /\
     (!y y'''.
       fn4' (SEQstrdec y y''') =
       SEQstrdec_case (fn4' y) (fn4' y''') y y''') /\
     (!y. fn5' (STRUCTstrexp y) = STRUCTstrexp_case (fn4' y) y) /\
     (!y. fn5' (LONGSTRIDstrexp y) = LONGSTRIDstrexp_case y) /\
     (!y y''. fn5' (APPstrexp y y'') = APPstrexp_case (fn5' y'') y y'') /\
     (!y y'.
       fn5' (LETstrexp y y') = LETstrexp_case (fn4' y) (fn5' y') y y') ==>
     (fn1 = fn1') /\
     (fn2 = fn2') /\
     (fn3 = fn3') /\
     (fn4 = fn4') /\
     (fn5 = fn5')
ModMLStructures_constructors_distinct
|- (!x1'. ~(NONE = SOME x1')) /\
   (!x1'. ~(NONE = SOME x1')) /\
   ((!x1 x1'. ~(DECstrdec x1 = STRUCTUREstrdec x1')) /\
    (!x1 x1' x2'. ~(DECstrdec x1 = LOCALstrdec x1' x2')) /\
    (!x1. ~(DECstrdec x1 = EMPTYstrdec)) /\
    (!x1 x1' x2'. ~(DECstrdec x1 = SEQstrdec x1' x2')) /\
    (!x1 x1' x2'. ~(STRUCTUREstrdec x1 = LOCALstrdec x1' x2')) /\
    (!x1. ~(STRUCTUREstrdec x1 = EMPTYstrdec)) /\
    (!x1 x1' x2'. ~(STRUCTUREstrdec x1 = SEQstrdec x1' x2')) /\
    (!x1 x2. ~(LOCALstrdec x1 x2 = EMPTYstrdec)) /\
    (!x1 x2 x1' x2'. ~(LOCALstrdec x1 x2 = SEQstrdec x1' x2')) /\
    (!x1' x2'. ~(EMPTYstrdec = SEQstrdec x1' x2'))) /\
   (!x1 x1'. ~(STRUCTstrexp x1 = LONGSTRIDstrexp x1')) /\
   (!x1 x1' x2'. ~(STRUCTstrexp x1 = APPstrexp x1' x2')) /\
   (!x1 x1' x2'. ~(STRUCTstrexp x1 = LETstrexp x1' x2')) /\
   (!x1 x1' x2'. ~(LONGSTRIDstrexp x1 = APPstrexp x1' x2')) /\
   (!x1 x1' x2'. ~(LONGSTRIDstrexp x1 = LETstrexp x1' x2')) /\
   (!x1 x2 x1' x2'. ~(APPstrexp x1 x2 = LETstrexp x1' x2'))
ModMLStructures_constructors_one_one
|- (!x1 x1'. (SOME x1 = SOME x1') = x1 = x1') /\
   (!x1 x2 x3 x4 x1' x2' x3' x4'.
     (BINDstrbind x1 x2 x3 x4 = BINDstrbind x1' x2' x3' x4') =
     (x1 = x1') /\ (x2 = x2') /\ (x3 = x3') /\ (x4 = x4')) /\
   (!x1 x1'. (SOME x1 = SOME x1') = x1 = x1') /\
   ((!x1 x1'. (DECstrdec x1 = DECstrdec x1') = x1 = x1') /\
    (!x1 x1'. (STRUCTUREstrdec x1 = STRUCTUREstrdec x1') = x1 = x1') /\
    (!x1 x2 x1' x2'.
      (LOCALstrdec x1 x2 = LOCALstrdec x1' x2') = (x1 = x1') /\ (x2 = x2')) /\
    (!x1 x2 x1' x2'.
      (SEQstrdec x1 x2 = SEQstrdec x1' x2') = (x1 = x1') /\ (x2 = x2'))) /\
   (!x1 x1'. (STRUCTstrexp x1 = STRUCTstrexp x1') = x1 = x1') /\
   (!x1 x1'. (LONGSTRIDstrexp x1 = LONGSTRIDstrexp x1') = x1 = x1') /\
   (!x1 x2 x1' x2'.
     (APPstrexp x1 x2 = APPstrexp x1' x2') = (x1 = x1') /\ (x2 = x2')) /\
   (!x1 x2 x1' x2'.
     (LETstrexp x1 x2 = LETstrexp x1' x2') = (x1 = x1') /\ (x2 = x2'))
ModMLStructures_cases_thm
|- (!x1. (x1 = NONE) \/ (?y. x1 = SOME y)) /\
   (!x2. ?y y''' y'' y'. x2 = BINDstrbind y y''' y'' y') /\
   (!x3. (x3 = NONE) \/ (?y. x3 = SOME y)) /\
   (!x4.
     (?y. x4 = DECstrdec y) \/
     (?y. x4 = STRUCTUREstrdec y) \/
     (?y y'. x4 = LOCALstrdec y y') \/
     (x4 = EMPTYstrdec) \/
     (?y y'. x4 = SEQstrdec y y')) /\
   (!x5.
     (?y. x5 = STRUCTstrexp y) \/
     (?y. x5 = LONGSTRIDstrexp y) \/
     (?y y'. x5 = APPstrexp y y') \/
     (?y y'. x5 = LETstrexp y y'))
joint_ty_funbind_funbind_option_funbind_sigexp_option_funbind_Axiom
|- !f0 e0 f1 e1 f2.
     ?!fn.
       (!f' s0 s1 j1 s2 j2.
         fn (JOINT_int_BINDfunbind f' s0 s1 j1 s2 j2) =
         f0 (fn j1) (fn j2) f' s0 s1 s2 j1 j2) /\
       (fn JOINT_int_funbind_NONE_funbind = e0) /\
       (!j. fn (JOINT_int_funbind_SOME_funbind j) = f1 (fn j) j) /\
       (fn JOINT_int_funbind_NONE_sigexp = e1) /\
       (!s. fn (JOINT_int_funbind_SOME_sigexp s) = f2 s)
funbind_rec_thm
|- !BINDfunbind_case funbind_NONE_funbind_case funbind_SOME_funbind_case
    funbind_NONE_sigexp_case funbind_SOME_sigexp_case.
     ?y y'' y'.
       (!x1 x2 x3 x4 x5 x6.
         y (BINDfunbind x1 x2 x3 x4 x5 x6) =
         BINDfunbind_case (y' x4) (y'' x6) x1 x2 x3 x5 x4 x6) /\
       (y'' NONE = funbind_NONE_funbind_case) /\
       (!x1. y'' (SOME x1) = funbind_SOME_funbind_case (y x1) x1) /\
       (y' NONE = funbind_NONE_sigexp_case) /\
       (!x1. y' (SOME x1) = funbind_SOME_sigexp_case x1)
funbind_induction_thm
|- !funbind_Prop funbind_option_funbind_Prop sigexp_option_funbind_Prop.
     (!y y''''' y'''' y''' y'' y'.
       sigexp_option_funbind_Prop y''' ==>
       funbind_option_funbind_Prop y' ==>
       funbind_Prop (BINDfunbind y y''''' y'''' y''' y'' y')) /\
     funbind_option_funbind_Prop NONE /\
     (!y. funbind_Prop y ==> funbind_option_funbind_Prop (SOME y)) /\
     sigexp_option_funbind_Prop NONE /\
     (!y. sigexp_option_funbind_Prop (SOME y)) ==>
     (!x1. funbind_Prop x1) /\
     (!x2. funbind_option_funbind_Prop x2) /\
     (!x3. sigexp_option_funbind_Prop x3)
funbind_unique_thm
|- !BINDfunbind_case funbind_NONE_funbind_case funbind_SOME_funbind_case
    funbind_NONE_sigexp_case funbind_SOME_sigexp_case fn1 fn2 fn3 fn1' fn2'
    fn3'.
     (!y y''''' y'''' y''' y'' y'.
       fn1 (BINDfunbind y y''''' y'''' y''' y'' y') =
       BINDfunbind_case (fn3 y''') (fn2 y') y y''''' y'''' y'' y''' y') /\
     (fn2 NONE = funbind_NONE_funbind_case) /\
     (!y. fn2 (SOME y) = funbind_SOME_funbind_case (fn1 y) y) /\
     (fn3 NONE = funbind_NONE_sigexp_case) /\
     (!y. fn3 (SOME y) = funbind_SOME_sigexp_case y) ==>
     (!y y''''' y'''' y''' y'' y'.
       fn1' (BINDfunbind y y''''' y'''' y''' y'' y') =
       BINDfunbind_case (fn3' y''') (fn2' y') y y''''' y'''' y'' y''' y') /\
     (fn2' NONE = funbind_NONE_funbind_case) /\
     (!y. fn2' (SOME y) = funbind_SOME_funbind_case (fn1' y) y) /\
     (fn3' NONE = funbind_NONE_sigexp_case) /\
     (!y. fn3' (SOME y) = funbind_SOME_sigexp_case y) ==>
     (fn1 = fn1') /\ (fn2 = fn2') /\ (fn3 = fn3')
funbind_constructors_distinct
|- (!x1'. ~(NONE = SOME x1')) /\ (!x1'. ~(NONE = SOME x1'))
funbind_constructors_one_one
|- (!x1 x2 x3 x4 x5 x6 x1' x2' x3' x4' x5' x6'.
     (BINDfunbind x1 x2 x3 x4 x5 x6 = BINDfunbind x1' x2' x3' x4' x5' x6') =
     (x1 = x1') /\
     (x2 = x2') /\
     (x3 = x3') /\
     (x4 = x4') /\
     (x5 = x5') /\
     (x6 = x6')) /\
   (!x1 x1'. (SOME x1 = SOME x1') = x1 = x1') /\
   (!x1 x1'. (SOME x1 = SOME x1') = x1 = x1')
funbind_cases_thm
|- (!x1.
     ?y y''''' y'''' y''' y'' y'.
       x1 = BINDfunbind y y''''' y'''' y''' y'' y') /\
   (!x2. (x2 = NONE) \/ (?y. x2 = SOME y)) /\
   (!x3. (x3 = NONE) \/ (?y. x3 = SOME y))
fundec_Axiom
|- !f0 e f1.
     ?!fn.
       (!f'. fn (FUNCTORfundec f') = f0 f') /\
       (fn EMPTYfundec = e) /\
       (!f1' f2. fn (SEQfundec f1' f2) = f1 (fn f1') (fn f2) f1' f2)
fundec_induction_thm
|- !P.
     (!f'. P (FUNCTORfundec f')) /\
     P EMPTYfundec /\
     (!f1' f2. P f1' /\ P f2 ==> P (SEQfundec f1' f2)) ==>
     (!f. P f)
fundec_cases_thm
|- !f.
     (?f'. f = FUNCTORfundec f') \/
     (f = EMPTYfundec) \/
     (?f1' f2. f = SEQfundec f1' f2)
fundec_constructors_one_one
|- (!f' f''. (FUNCTORfundec f' = FUNCTORfundec f'') = f' = f'') /\
   (!f1' f2 f1'' f2'.
     (SEQfundec f1' f2 = SEQfundec f1'' f2') = (f1' = f1'') /\ (f2 = f2'))
fundec_constructors_distinct
|- (!f'. ~(FUNCTORfundec f' = EMPTYfundec)) /\
   (!f2 f1' f'. ~(FUNCTORfundec f' = SEQfundec f1' f2)) /\
   (!f2 f1'. ~(EMPTYfundec = SEQfundec f1' f2))
topdec_Axiom
|- !f0 f1 f2.
     ?!fn.
       (!s. fn (STRDEC s) = f0 s) /\
       (!s. fn (SIGDEC s) = f1 s) /\
       (!f'. fn (FUNDEC f') = f2 f')
topdec_induction_thm
|- !P.
     (!s. P (STRDEC s)) /\ (!s. P (SIGDEC s)) /\ (!f'. P (FUNDEC f')) ==>
     (!t. P t)
topdec_cases_thm
|- !t. (?s. t = STRDEC s) \/ (?s. t = SIGDEC s) \/ (?f'. t = FUNDEC f')
topdec_constructors_one_one
|- (!s s'. (STRDEC s = STRDEC s') = s = s') /\
   (!s s'. (SIGDEC s = SIGDEC s') = s = s') /\
   (!f' f''. (FUNDEC f' = FUNDEC f'') = f' = f'')
topdec_constructors_distinct
|- (!s' s. ~(STRDEC s = SIGDEC s')) /\
   (!f' s. ~(STRDEC s = FUNDEC f')) /\
   (!f' s. ~(SIGDEC s = FUNDEC f'))
joint_ty_program_program_option_program_Axiom
|- !f0 e f1.
     ?!fn.
       (!t j. fn (JOINT_int_SEQprogram t j) = f0 (fn j) t j) /\
       (fn JOINT_int_program_NONE_program = e) /\
       (!j. fn (JOINT_int_program_SOME_program j) = f1 (fn j) j)
program_rec_thm
|- !SEQprogram_case program_NONE_program_case program_SOME_program_case.
     ?y y'.
       (!x1 x2. y (SEQprogram x1 x2) = SEQprogram_case (y' x2) x1 x2) /\
       (y' NONE = program_NONE_program_case) /\
       (!x1. y' (SOME x1) = program_SOME_program_case (y x1) x1)
program_induction_thm
|- !program_Prop program_option_program_Prop.
     (!y y'.
       program_option_program_Prop y' ==> program_Prop (SEQprogram y y')) /\
     program_option_program_Prop NONE /\
     (!y. program_Prop y ==> program_option_program_Prop (SOME y)) ==>
     (!x1. program_Prop x1) /\ (!x2. program_option_program_Prop x2)
program_unique_thm
|- !SEQprogram_case program_NONE_program_case program_SOME_program_case fn1
    fn2 fn1' fn2'.
     (!y y'. fn1 (SEQprogram y y') = SEQprogram_case (fn2 y') y y') /\
     (fn2 NONE = program_NONE_program_case) /\
     (!y. fn2 (SOME y) = program_SOME_program_case (fn1 y) y) ==>
     (!y y'. fn1' (SEQprogram y y') = SEQprogram_case (fn2' y') y y') /\
     (fn2' NONE = program_NONE_program_case) /\
     (!y. fn2' (SOME y) = program_SOME_program_case (fn1' y) y) ==>
     (fn1 = fn1') /\ (fn2 = fn2')
program_constructors_distinct
|- !x1'. ~(NONE = SOME x1')
program_constructors_one_one
|- (!x1 x2 x1' x2'.
     (SEQprogram x1 x2 = SEQprogram x1' x2') = (x1 = x1') /\ (x2 = x2')) /\
   (!x1 x1'. (SOME x1 = SOME x1') = x1 = x1')
program_cases_thm
|- (!x1. ?y y'. x1 = SEQprogram y y') /\
   (!x2. (x2 = NONE) \/ (?y. x2 = SOME y))
strenv_pack_Axiom
|- !f0 f1. ?!fn. (!s. fn (STRENVsp s) = f0 s) /\ (!p. fn (PACKsp p) = f1 p)
strenv_pack_induction_thm
|- !P. (!s. P (STRENVsp s)) /\ (!p. P (PACKsp p)) ==> (!s. P s)
strenv_pack_cases_thm
|- !s. (?s'. s = STRENVsp s') \/ (?p. s = PACKsp p)
strenv_pack_constructors_one_one
|- (!s s'. (STRENVsp s = STRENVsp s') = s = s') /\
   (!p p'. (PACKsp p = PACKsp p') = p = p')
strenv_pack_constructors_distinct
|- !p s. ~(STRENVsp s = PACKsp p)
joint_ty_int_intenv_strid_int_prod_int_intenv_strid_int_prod_int_intenv_list_int_intenv_strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_Axiom
|- !f0 f1 f2 e f3 f4.
     ?!fn.
       (!j s0 s1. fn (JOINT_int_BASICint j s0 s1) = f0 (fn j) s0 s1 j) /\
       (!j. fn (JOINT_int_INTENV j) = f1 (fn j) j) /\
       (!s j. fn (JOINT_int_int_intenv_ch44_strid_int s j) = f2 (fn j) s j) /\
       (fn JOINT_int_int_intenv_NIL_strid_int_prod_int_intenv = e) /\
       (!j1 j2.
         fn (JOINT_int_int_intenv_CONS_strid_int_prod_int_intenv j1 j2) =
         f3 (fn j1) (fn j2) j1 j2) /\
       (!j.
         fn
           (JOINT_int_int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv
             j) =
         f4 (fn j) j)
ModMLInterfaces_rec_thm
|- !BASICint_case INTENV_case int_intenv_ch44_strid_int_case
    int_intenv_NIL_strid_int_prod_int_intenv_case
    int_intenv_CONS_strid_int_prod_int_intenv_case
    int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv_case.
     ?y y'''' y''' y'' y'.
       (!x1 x2 x3.
         y (BASICint x1 x2 x3) = BASICint_case (y'''' x1) x2 x3 x1) /\
       (!x1. y'''' (INTENV x1) = INTENV_case (y' x1) x1) /\
       (!x1 x2. y''' (x1,x2) = int_intenv_ch44_strid_int_case (y x2) x1 x2) /\
       (y'' [] = int_intenv_NIL_strid_int_prod_int_intenv_case) /\
       (!x1 x2.
         y'' (CONS x1 x2) =
         int_intenv_CONS_strid_int_prod_int_intenv_case (y''' x1) (y'' x2) x1
           x2) /\
       (!x1.
         y' (FINMAP x1) =
         int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv_case
           (y'' x1)
           x1)
ModMLInterfaces_induction_thm
|- !Prop intenv_Prop strid_int_prod_int_intenv_Prop
    strid_int_prod_int_intenv_list_int_intenv_Prop
    strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_Prop.
     (!y y'''' y'''. intenv_Prop y ==> Prop (BASICint y y'''' y''')) /\
     (!y.
       strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_Prop y ==>
       intenv_Prop (INTENV y)) /\
     (!y y''. Prop y'' ==> strid_int_prod_int_intenv_Prop (y,y'')) /\
     strid_int_prod_int_intenv_list_int_intenv_Prop [] /\
     (!y y'.
       strid_int_prod_int_intenv_Prop y ==>
       strid_int_prod_int_intenv_list_int_intenv_Prop y' ==>
       strid_int_prod_int_intenv_list_int_intenv_Prop (CONS y y')) /\
     (!y.
       strid_int_prod_int_intenv_list_int_intenv_Prop y ==>
       strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_Prop
         (FINMAP y)) ==>
     (!x1. Prop x1) /\
     (!x2. intenv_Prop x2) /\
     (!x3. strid_int_prod_int_intenv_Prop x3) /\
     (!x4. strid_int_prod_int_intenv_list_int_intenv_Prop x4) /\
     (!x5.
       strid_int_prod_int_intenv_list_int_intenv_finmap_int_intenv_Prop x5)
ModMLInterfaces_unique_thm
|- !BASICint_case INTENV_case int_intenv_ch44_strid_int_case
    int_intenv_NIL_strid_int_prod_int_intenv_case
    int_intenv_CONS_strid_int_prod_int_intenv_case
    int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv_case fn1 fn2
    fn3 fn4 fn5 fn1' fn2' fn3' fn4' fn5'.
     (!y y'''' y'''.
       fn1 (BASICint y y'''' y''') = BASICint_case (fn2 y) y'''' y''' y) /\
     (!y. fn2 (INTENV y) = INTENV_case (fn5 y) y) /\
     (!y y''. fn3 (y,y'') = int_intenv_ch44_strid_int_case (fn1 y'') y y'') /\
     (fn4 [] = int_intenv_NIL_strid_int_prod_int_intenv_case) /\
     (!y y'.
       fn4 (CONS y y') =
       int_intenv_CONS_strid_int_prod_int_intenv_case (fn3 y) (fn4 y') y
         y') /\
     (!y.
       fn5 (FINMAP y) =
       int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv_case
         (fn4 y)
         y) ==>
     (!y y'''' y'''.
       fn1' (BASICint y y'''' y''') = BASICint_case (fn2' y) y'''' y''' y) /\
     (!y. fn2' (INTENV y) = INTENV_case (fn5' y) y) /\
     (!y y''.
       fn3' (y,y'') = int_intenv_ch44_strid_int_case (fn1' y'') y y'') /\
     (fn4' [] = int_intenv_NIL_strid_int_prod_int_intenv_case) /\
     (!y y'.
       fn4' (CONS y y') =
       int_intenv_CONS_strid_int_prod_int_intenv_case (fn3' y) (fn4' y') y
         y') /\
     (!y.
       fn5' (FINMAP y) =
       int_intenv_FINMAP_strid_int_prod_int_intenv_list_int_intenv_case
         (fn4' y)
         y) ==>
     (fn1 = fn1') /\
     (fn2 = fn2') /\
     (fn3 = fn3') /\
     (fn4 = fn4') /\
     (fn5 = fn5')
ModMLInterfaces_distinct_thm
|- !x1' x2'. ~([] = CONS x1' x2')
ModMLInterfaces_one_one_thm
|- (!x1 x2 x3 x1' x2' x3'.
     (BASICint x1 x2 x3 = BASICint x1' x2' x3') =
     (x1 = x1') /\ (x2 = x2') /\ (x3 = x3')) /\
   (!x1 x1'. (INTENV x1 = INTENV x1') = x1 = x1') /\
   (!x1 x2 x1' x2'. ((x1,x2) = (x1',x2')) = (x1 = x1') /\ (x2 = x2')) /\
   (!x1 x2 x1' x2'. (CONS x1 x2 = CONS x1' x2') = (x1 = x1') /\ (x2 = x2')) /\
   (!x1 x1'. (FINMAP x1 = FINMAP x1') = x1 = x1')
ModMLInterfaces_cases_thm
|- (!x1. ?y y'' y'. x1 = BASICint y y'' y') /\
   (!x2. ?y. x2 = INTENV y) /\
   (!x3. ?y y'. x3 = (y,y')) /\
   (!x4. (x4 = []) \/ (?y y'. x4 = CONS y y')) /\
   (!x5. ?y. x5 = FINMAP y)
sigenv
|- !f. ?!fn. !f'. fn (SIGENV f') = f f'
sigenv_induction_thm
|- !P. (!f'. P (SIGENV f')) ==> (!s. P s)
sigenv_cases_thm
|- !s. ?f'. s = SIGENV f'
sigenv_constructors_one_one
|- !f' f''. (SIGENV f' = SIGENV f'') = f' = f''
intbasis
|- !f. ?!fn. !s i. fn (INTBASIS s i) = f s i
intbasis_induction_thm
|- !P. (!s i. P (INTBASIS s i)) ==> (!i. P i)
intbasis_cases_thm
|- !i. ?s i'. i = INTBASIS s i'
intbasis_constructors_one_one
|- !s i s' i'. (INTBASIS s i = INTBASIS s' i') = (s = s') /\ (i = i')
joint_ty_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_int_option_basis_funclos_funenv_Axiom
|- !f0 f1 f2 f3 e0 f4 f5 e1 f6.
     ?!fn.
       (!j s e. fn (JOINT_int_BASIS j s e) = f0 (fn j) s e j) /\
       (!s0 i s1 j1 j2.
         fn (JOINT_int_FUNCLOS s0 i s1 j1 j2) =
         f1 (fn j1) (fn j2) s0 i s1 j1 j2) /\
       (!j. fn (JOINT_int_FUNENV j) = f2 (fn j) j) /\
       (!f' j.
         fn (JOINT_int_basis_funclos_funenv_ch44_funid_funclos f' j) =
         f3 (fn j) f' j) /\
       (fn
          JOINT_int_basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv =
        e0) /\
       (!j1 j2.
         fn
           (JOINT_int_basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv
              j1
             j2) =
         f4 (fn j1) (fn j2) j1 j2) /\
       (!j.
         fn
           (JOINT_int_basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv
             j) =
         f5 (fn j) j) /\
       (fn JOINT_int_basis_funclos_funenv_NONE_int = e1) /\
       (!i. fn (JOINT_int_basis_funclos_funenv_SOME_int i) = f6 i)
ModMLBases_rec_thm
|- !BASIS_case FUNCLOS_case FUNENV_case
    basis_funclos_funenv_ch44_funid_funclos_case
    basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv_case
    basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv_case
    basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_case
    basis_funclos_funenv_NONE_int_case basis_funclos_funenv_SOME_int_case.
     ?y y'''''' y''''' y'''' y''' y'' y'.
       (!x1 x2 x3. y (BASIS x1 x2 x3) = BASIS_case (y''''' x1) x2 x3 x1) /\
       (!x1 x2 x3 x4 x5.
         y'''''' (FUNCLOS x1 x2 x3 x4 x5) =
         FUNCLOS_case (y' x4) (y x5) x1 x2 x3 x4 x5) /\
       (!x1. y''''' (FUNENV x1) = FUNENV_case (y'' x1) x1) /\
       (!x1 x2.
         y'''' (x1,x2) =
         basis_funclos_funenv_ch44_funid_funclos_case (y'''''' x2) x1 x2) /\
       (y''' [] =
        basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv_case) /\
       (!x1 x2.
         y''' (CONS x1 x2) =
         basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv_case
           (y'''' x1)
           (y''' x2)
           x1
           x2) /\
       (!x1.
         y'' (FINMAP x1) =
         basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_case
           (y''' x1)
           x1) /\
       (y' NONE = basis_funclos_funenv_NONE_int_case) /\
       (!x1. y' (SOME x1) = basis_funclos_funenv_SOME_int_case x1)
ModMLBases_induction_thm
|- !basis_Prop funclos_Prop funenv_Prop
    funid_funclos_prod_basis_funclos_funenv_Prop
    funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_Prop
    funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_Prop
    option_basis_funclos_funenv_Prop.
     (!y y'''''''' y'''''''.
       funenv_Prop y ==> basis_Prop (BASIS y y'''''''' y''''''')) /\
     (!y y'''''' y''''' y'''' y'''.
       option_basis_funclos_funenv_Prop y'''' ==>
       basis_Prop y''' ==>
       funclos_Prop (FUNCLOS y y'''''' y''''' y'''' y''')) /\
     (!y.
       funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_Prop
         y ==>
       funenv_Prop (FUNENV y)) /\
     (!y y''.
       funclos_Prop y'' ==>
       funid_funclos_prod_basis_funclos_funenv_Prop (y,y'')) /\
     funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_Prop
       [] /\
     (!y y'.
       funid_funclos_prod_basis_funclos_funenv_Prop y ==>
       funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_Prop
         y' ==>
       funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_Prop
         (CONS y y')) /\
     (!y.
       funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_Prop
         y ==>
       funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_Prop
         (FINMAP y)) /\
     option_basis_funclos_funenv_Prop NONE /\
     (!y. option_basis_funclos_funenv_Prop (SOME y)) ==>
     (!x1. basis_Prop x1) /\
     (!x2. funclos_Prop x2) /\
     (!x3. funenv_Prop x3) /\
     (!x4. funid_funclos_prod_basis_funclos_funenv_Prop x4) /\
     (!x5.
       funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_Prop
         x5) /\
     (!x6.
       funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_finmap_basis_funclos_funenv_Prop
         x6) /\
     (!x7. option_basis_funclos_funenv_Prop x7)
ModMLBases_unique_thm
|- !BASIS_case FUNCLOS_case FUNENV_case
    basis_funclos_funenv_ch44_funid_funclos_case
    basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv_case
    basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv_case
    basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_case
    basis_funclos_funenv_NONE_int_case basis_funclos_funenv_SOME_int_case fn1
    fn2 fn3 fn4 fn5 fn6 fn7 fn1' fn2' fn3' fn4' fn5' fn6' fn7'.
     (!y y'''''''' y'''''''.
       fn1 (BASIS y y'''''''' y''''''') =
       BASIS_case (fn3 y) y'''''''' y''''''' y) /\
     (!y y'''''' y''''' y'''' y'''.
       fn2 (FUNCLOS y y'''''' y''''' y'''' y''') =
       FUNCLOS_case (fn7 y'''') (fn1 y''') y y'''''' y''''' y'''' y''') /\
     (!y. fn3 (FUNENV y) = FUNENV_case (fn6 y) y) /\
     (!y y''.
       fn4 (y,y'') =
       basis_funclos_funenv_ch44_funid_funclos_case (fn2 y'') y y'') /\
     (fn5 [] =
      basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv_case) /\
     (!y y'.
       fn5 (CONS y y') =
       basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv_case
         (fn4 y)
         (fn5 y')
         y
         y') /\
     (!y.
       fn6 (FINMAP y) =
       basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_case
         (fn5 y)
         y) /\
     (fn7 NONE = basis_funclos_funenv_NONE_int_case) /\
     (!y. fn7 (SOME y) = basis_funclos_funenv_SOME_int_case y) ==>
     (!y y'''''''' y'''''''.
       fn1' (BASIS y y'''''''' y''''''') =
       BASIS_case (fn3' y) y'''''''' y''''''' y) /\
     (!y y'''''' y''''' y'''' y'''.
       fn2' (FUNCLOS y y'''''' y''''' y'''' y''') =
       FUNCLOS_case (fn7' y'''') (fn1' y''') y y'''''' y''''' y'''' y''') /\
     (!y. fn3' (FUNENV y) = FUNENV_case (fn6' y) y) /\
     (!y y''.
       fn4' (y,y'') =
       basis_funclos_funenv_ch44_funid_funclos_case (fn2' y'') y y'') /\
     (fn5' [] =
      basis_funclos_funenv_NIL_funid_funclos_prod_basis_funclos_funenv_case) /\
     (!y y'.
       fn5' (CONS y y') =
       basis_funclos_funenv_CONS_funid_funclos_prod_basis_funclos_funenv_case
         (fn4' y)
         (fn5' y')
         y
         y') /\
     (!y.
       fn6' (FINMAP y) =
       basis_funclos_funenv_FINMAP_funid_funclos_prod_basis_funclos_funenv_list_basis_funclos_funenv_case
         (fn5' y)
         y) /\
     (fn7' NONE = basis_funclos_funenv_NONE_int_case) /\
     (!y. fn7' (SOME y) = basis_funclos_funenv_SOME_int_case y) ==>
     (fn1 = fn1') /\
     (fn2 = fn2') /\
     (fn3 = fn3') /\
     (fn4 = fn4') /\
     (fn5 = fn5') /\
     (fn6 = fn6') /\
     (fn7 = fn7')
ModMLBases_distinct_thm
|- (!x1' x2'. ~([] = CONS x1' x2')) /\ (!x1'. ~(NONE = SOME x1'))
ModMLBases_one_one_thm
|- (!x1 x2 x3 x1' x2' x3'.
     (BASIS x1 x2 x3 = BASIS x1' x2' x3') =
     (x1 = x1') /\ (x2 = x2') /\ (x3 = x3')) /\
   (!x1 x2 x3 x4 x5 x1' x2' x3' x4' x5'.
     (FUNCLOS x1 x2 x3 x4 x5 = FUNCLOS x1' x2' x3' x4' x5') =
     (x1 = x1') /\ (x2 = x2') /\ (x3 = x3') /\ (x4 = x4') /\ (x5 = x5')) /\
   (!x1 x1'. (FUNENV x1 = FUNENV x1') = x1 = x1') /\
   (!x1 x2 x1' x2'. ((x1,x2) = (x1',x2')) = (x1 = x1') /\ (x2 = x2')) /\
   (!x1 x2 x1' x2'. (CONS x1 x2 = CONS x1' x2') = (x1 = x1') /\ (x2 = x2')) /\
   (!x1 x1'. (FINMAP x1 = FINMAP x1') = x1 = x1') /\
   (!x1 x1'. (SOME x1 = SOME x1') = x1 = x1')
ModMLBases_cases_thm
|- (!x1. ?y y'' y'. x1 = BASIS y y'' y') /\
   (!x2. ?y y'''' y''' y'' y'. x2 = FUNCLOS y y'''' y''' y'' y') /\
   (!x3. ?y. x3 = FUNENV y) /\
   (!x4. ?y y'. x4 = (y,y')) /\
   (!x5. (x5 = []) \/ (?y y'. x5 = CONS y y')) /\
   (!x6. ?y. x6 = FINMAP y) /\
   (!x7. (x7 = NONE) \/ (?y. x7 = SOME y))
basis_pack_Axiom
|- !f0 f1. ?!fn. (!b. fn (BASISbp b) = f0 b) /\ (!p. fn (PACKbp p) = f1 p)
basis_pack_induction_thm
|- !P. (!b. P (BASISbp b)) /\ (!p. P (PACKbp p)) ==> (!b. P b)
basis_pack_cases_thm
|- !b. (?b'. b = BASISbp b') \/ (?p. b = PACKbp p)
basis_pack_constructors_one_one
|- (!b b'. (BASISbp b = BASISbp b') = b = b') /\
   (!p p'. (PACKbp p = PACKbp p') = p = p')
basis_pack_constructors_distinct
|- !p b. ~(BASISbp b = PACKbp p)
EVAL_SIG_RULES_SATISFIED
|- ModML_eval_signatures_pred eval_sigexp eval_spec eval_strdesc
ModML_eval_signatures_induction
|- !P_sigexp P_spec P_strdesc.
     (!i IB spec s1 s2.
       P_spec spec s1 IB s2 i ==> P_sigexp (SIGsigexp spec) s1 IB s2 i) /\
     (!i IB s sigid.
       (lookup_sigid_intbasis IB sigid = lift i) ==>
       P_sigexp (SIGIDsigexp sigid) s IB s i) /\
     (!IB valdesc vars s1 s2.
       eval_valdesc valdesc s1 s2 vars ==>
       P_spec (VALspec valdesc) s1 IB s2 (vars_in_int vars)) /\
     (!IB excons exdesc s1 s2.
       eval_exdesc exdesc s1 s2 excons ==>
       P_spec (EXCEPTIONspec exdesc) s1 IB s2 (excons_in_int excons)) /\
     (!IB IE strdesc s1 s2.
       P_strdesc strdesc s1 IB s2 IE ==>
       P_spec (STRUCTUREspec strdesc) s1 IB s2 (intenv_in_int IE)) /\
     (!IB I1 I2 spec1 spec2 s1 s2 s3.
       P_spec spec1 s1 IB s2 I1 /\
       P_spec spec2 s2 (add_intenv_to_intbasis IB (intenv_of_int I1)) s3
         I2 ==>
       P_spec (LOCALspec spec1 spec2) s1 IB s3 I2) /\
     (!IB nonempty_int_list nonempty_lift_int_list nonempty_longstrid_list s.
       (nonempty_MAP (lookup_longstrid_intbasis IB) nonempty_longstrid_list =
        nonempty_lift_int_list) /\
       (nonempty_MAP lift nonempty_int_list = nonempty_lift_int_list) ==>
       P_spec (OPENspec nonempty_longstrid_list) s IB s
         (nonempty_FOLDL_WITH_INIT add_int nonempty_int_list)) /\
     (!IB nonempty_int_list nonempty_lift_int_list nonempty_sigid_list s.
       (nonempty_MAP (lookup_sigid_intbasis IB) nonempty_sigid_list =
        nonempty_lift_int_list) /\
       (nonempty_MAP lift nonempty_int_list = nonempty_lift_int_list) ==>
       P_spec (INCLUDEspec nonempty_sigid_list) s IB s
         (nonempty_FOLDL_WITH_INIT add_int nonempty_int_list)) /\
     (!IB s. P_spec EMPTYspec s IB s empty_int) /\
     (!IB I1 I2 spec1 spec2 s1 s2 s3.
       P_spec spec1 s1 IB s2 I1 /\
       P_spec spec2 s2 (add_intenv_to_intbasis IB (intenv_of_int I1)) s3
         I2 ==>
       P_spec (SEQspec spec1 spec2) s1 IB s3 (add_int I1 I2)) /\
     (!i IB sigexp strid s1 s2.
       P_sigexp sigexp s1 IB s2 i ==>
       P_strdesc (STRIDstrdesc strid sigexp NONE) s1 IB s2
         (intenv_map strid i)) /\
     (!i IB IE sigexp strdesc strid s1 s2 s3.
       P_sigexp sigexp s1 IB s2 i /\ P_strdesc strdesc s2 IB s3 IE ==>
       P_strdesc (STRIDstrdesc strid sigexp (SOME strdesc)) s1 IB s3
         (add_intenv (intenv_map strid i) IE)) ==>
     (!sigexp s1 IB s2 i.
       eval_sigexp sigexp s1 IB s2 i ==> P_sigexp sigexp s1 IB s2 i) /\
     (!spec s1 IB s2 i.
       eval_spec spec s1 IB s2 i ==> P_spec spec s1 IB s2 i) /\
     (!strdesc s1 IB s2 int.
       eval_strdesc strdesc s1 IB s2 int ==> P_strdesc strdesc s1 IB s2 int)
EVAL_SIGBIND_RULES_SATISFIED
|- ModML_eval_sigbind_pred eval_sigbind
ModML_eval_sigbind_induction
|- !P_sigbind.
     (!sigexp IB i sigid s1 s2.
       eval_sigexp sigexp s1 IB s2 i ==>
       P_sigbind (BINDsigbind sigid sigexp NONE) s1 IB s2
         (sigenv_map sigid i)) /\
     (!sigbind IB G sigexp i sigid s1 s2 s3.
       P_sigbind sigbind s2 IB s3 G /\ eval_sigexp sigexp s1 IB s2 i ==>
       P_sigbind (BINDsigbind sigid sigexp (SOME sigbind)) s1 IB s3
         (add_sigenv (sigenv_map sigid i) G)) ==>
     (!sigbind s1 IB s2 G.
       eval_sigbind sigbind s1 IB s2 G ==> P_sigbind sigbind s1 IB s2 G)
Rule172
|- !sigbind s1 IB s2 G.
     eval_sigbind sigbind s1 IB s2 G ==>
     eval_sigdec (SIGNATUREsigdec sigbind) s1 IB s2 G
Rule173
|- !s IB. eval_sigdec EMPTYsigdec s IB s empty_sigenv
Rule174
|- !sigdec1 s1 IB G1 sigdec2 s3 G2.
     (?s2.
       eval_sigdec sigdec1 s1 IB s2 G1 /\
       eval_sigdec sigdec2 s2 (add_sigenv_to_intbasis IB G1) s3 G2) ==>
     eval_sigdec (SEQsigdec sigdec1 sigdec2) s1 IB s3 (add_sigenv G1 G2)
eval_sigdec_induction_thm
|- !P.
     (!sigbind s1 IB s2 G.
       eval_sigbind sigbind s1 IB s2 G ==>
       P (SIGNATUREsigdec sigbind) s1 IB s2 G) /\
     (!s IB. P EMPTYsigdec s IB s empty_sigenv) /\
     (!sigdec1 s1 IB G1 sigdec2 s3 G2.
       (?s2.
         P sigdec1 s1 IB s2 G1 /\
         P sigdec2 s2 (add_sigenv_to_intbasis IB G1) s3 G2) ==>
       P (SEQsigdec sigdec1 sigdec2) s1 IB s3 (add_sigenv G1 G2)) ==>
     (!sigdec s1 IB s2 G.
       eval_sigdec sigdec s1 IB s2 G ==> P sigdec s1 IB s2 G)
EVAL_STRUCT_RULES_SATISFIED
|- ModML_eval_structures_pred eval_strexp eval_strdec eval_strbind
ModML_eval_structures_induction
|- !P_strexp P_strdec P_strbind.
     (!B E strdec s1 s2.
       P_strdec strdec s1 B s2 (ENVep E) ==>
       P_strexp (STRUCTstrexp strdec) s1 B s2 (ENVep E)) /\
     (!B p strdec s1 s2.
       P_strdec strdec s1 B s2 (PACKep p) ==>
       P_strexp (STRUCTstrexp strdec) s1 B s2 (PACKep p)) /\
     (!B E longstrid s.
       (lift E = lookup_longstrid_basis B longstrid) ==>
       P_strexp (LONGSTRIDstrexp longstrid) s B s (ENVep E)) /\
     (!B B' E E' i funid strexp strexp' strid s1 s2 s3.
       (lift (FUNCLOS strid i strexp' NONE B') =
        lookup_funid_basis B funid) /\
       P_strexp strexp s1 B s2 (ENVep E) /\
       P_strexp strexp' s2
         (add_basis B' (strenv_in_basis (strenv_map strid (cut_env E i))))
         s3
         (ENVep E') ==>
       P_strexp (APPstrexp funid strexp) s1 B s3 (ENVep E')) /\
     (!B B' i funid p strexp strexp' strid s1 s2.
       (lift (FUNCLOS strid i strexp' NONE B') =
        lookup_funid_basis B funid) /\
       P_strexp strexp s1 B s2 (PACKep p) ==>
       P_strexp (APPstrexp funid strexp) s1 B s2 (PACKep p)) /\
     (!B B' E i funid p strexp strexp' strid s1 s2 s3.
       (lift (FUNCLOS strid i strexp' NONE B') =
        lookup_funid_basis B funid) /\
       P_strexp strexp s1 B s2 (ENVep E) /\
       P_strexp strexp' s2
         (add_basis B' (strenv_in_basis (strenv_map strid (cut_env E i))))
         s3
         (PACKep p) ==>
       P_strexp (APPstrexp funid strexp) s1 B s3 (PACKep p)) /\
     (!B B' E E' i i' funid strexp strexp' strid s1 s2 s3.
       (lift (FUNCLOS strid i strexp' (SOME i') B') =
        lookup_funid_basis B funid) /\
       P_strexp strexp s1 B s2 (ENVep E) /\
       P_strexp strexp' s2
         (add_basis B' (strenv_in_basis (strenv_map strid (cut_env E i))))
         s3
         (ENVep E') ==>
       P_strexp (APPstrexp funid strexp) s1 B s3 (ENVep (cut_env E' i'))) /\
     (!B B' i i' funid p strexp strexp' strid s1 s2.
       (lift (FUNCLOS strid i strexp' (SOME i') B') =
        lookup_funid_basis B funid) /\
       P_strexp strexp s1 B s2 (PACKep p) ==>
       P_strexp (APPstrexp funid strexp) s1 B s2 (PACKep p)) /\
     (!B B' E i i' funid p strexp strexp' strid s1 s2 s3.
       (lift (FUNCLOS strid i strexp' (SOME i') B') =
        lookup_funid_basis B funid) /\
       P_strexp strexp s1 B s2 (ENVep E) /\
       P_strexp strexp' s2
         (add_basis B' (strenv_in_basis (strenv_map strid (cut_env E i))))
         s3
         (PACKep p) ==>
       P_strexp (APPstrexp funid strexp) s1 B s3 (PACKep p)) /\
     (!B E E' strdec strexp s1 s2 s3.
       P_strdec strdec s1 B s2 (ENVep E) /\
       P_strexp strexp s2 (add_env_to_basis B E) s3 (ENVep E') ==>
       P_strexp (LETstrexp strdec strexp) s1 B s3 (ENVep E')) /\
     (!B p strdec strexp s1 s2.
       P_strdec strdec s1 B s2 (PACKep p) ==>
       P_strexp (LETstrexp strdec strexp) s1 B s2 (PACKep p)) /\
     (!B E p strdec strexp s1 s2 s3.
       P_strdec strdec s1 B s2 (ENVep E) /\
       P_strexp strexp s2 (add_env_to_basis B E) s3 (PACKep p) ==>
       P_strexp (LETstrexp strdec strexp) s1 B s3 (PACKep p)) /\
     (!B E' dec s1 s2.
       eval_dec dec s1 (env_of_basis B) s2 (ENVep E') ==>
       P_strdec (DECstrdec dec) s1 B s2 (ENVep E')) /\
     (!B dec p s1 s2.
       eval_dec dec s1 (env_of_basis B) s2 (PACKep p) ==>
       P_strdec (DECstrdec dec) s1 B s2 (PACKep p)) /\
     (!B SE strbind s1 s2.
       P_strbind strbind s1 B s2 (STRENVsp SE) ==>
       P_strdec (STRUCTUREstrdec strbind) s1 B s2
         (ENVep (strenv_in_env SE))) /\
     (!B p strbind s1 s2.
       P_strbind strbind s1 B s2 (PACKsp p) ==>
       P_strdec (STRUCTUREstrdec strbind) s1 B s2 (PACKep p)) /\
     (!B E1 E2 strdec1 strdec2 s1 s2 s3.
       P_strdec strdec1 s1 B s2 (ENVep E1) /\
       P_strdec strdec2 s2 (add_env_to_basis B E1) s3 (ENVep E2) ==>
       P_strdec (LOCALstrdec strdec1 strdec2) s1 B s3 (ENVep E2)) /\
     (!B p strdec1 strdec2 s1 s2.
       P_strdec strdec1 s1 B s2 (PACKep p) ==>
       P_strdec (LOCALstrdec strdec1 strdec2) s1 B s2 (PACKep p)) /\
     (!B E p strdec1 strdec2 s1 s2 s3.
       P_strdec strdec1 s1 B s2 (ENVep E) /\
       P_strdec strdec2 s2 (add_env_to_basis B E) s3 (PACKep p) ==>
       P_strdec (LOCALstrdec strdec1 strdec2) s1 B s3 (PACKep p)) /\
     (!B s. P_strdec EMPTYstrdec s B s (ENVep empty_env)) /\
     (!B E1 E2 strdec1 strdec2 s1 s2 s3.
       P_strdec strdec1 s1 B s2 (ENVep E1) /\
       P_strdec strdec2 s2 (add_env_to_basis B E1) s3 (ENVep E2) ==>
       P_strdec (SEQstrdec strdec1 strdec2) s1 B s3
         (ENVep (add_env E1 E2))) /\
     (!B p strdec1 strdec2 s1 s2.
       P_strdec strdec1 s1 B s2 (PACKep p) ==>
       P_strdec (SEQstrdec strdec1 strdec2) s1 B s2 (PACKep p)) /\
     (!B E p strdec1 strdec2 s1 s2 s3.
       P_strdec strdec1 s1 B s2 (ENVep E) /\
       P_strdec strdec2 s2 (add_env_to_basis B E) s3 (PACKep p) ==>
       P_strdec (SEQstrdec strdec1 strdec2) s1 B s3 (PACKep p)) /\
     (!B E strexp strid s1 s2.
       P_strexp strexp s1 B s2 (ENVep E) ==>
       P_strbind (BINDstrbind strid NONE strexp NONE) s1 B s2
         (STRENVsp (strenv_map strid E))) /\
     (!B p strexp strid s1 s2.
       P_strexp strexp s1 B s2 (PACKep p) ==>
       P_strbind (BINDstrbind strid NONE strexp NONE) s1 B s2 (PACKsp p)) /\
     (!B E i sigexp strexp strid s1 s2 s3.
       P_strexp strexp s1 B s2 (ENVep E) /\
       eval_sigexp sigexp s2 (Inter_basis B) s3 i ==>
       P_strbind (BINDstrbind strid (SOME sigexp) strexp NONE) s1 B s3
         (STRENVsp (strenv_map strid (cut_env E i)))) /\
     (!B p sigexp strexp strid s1 s2.
       P_strexp strexp s1 B s2 (PACKep p) ==>
       P_strbind (BINDstrbind strid (SOME sigexp) strexp NONE) s1 B s2
         (PACKsp p)) /\
     (!B E SE strbind strexp strid s1 s2 s3.
       P_strexp strexp s1 B s2 (ENVep E) /\
       P_strbind strbind s2 B s3 (STRENVsp SE) ==>
       P_strbind (BINDstrbind strid NONE strexp (SOME strbind)) s1 B s3
         (STRENVsp (add_strenv (strenv_map strid E) SE))) /\
     (!B p strbind strexp strid s1 s2.
       P_strexp strexp s1 B s2 (PACKep p) ==>
       P_strbind (BINDstrbind strid NONE strexp (SOME strbind)) s1 B s2
         (PACKsp p)) /\
     (!B E p strbind strexp strid s1 s2 s3.
       P_strexp strexp s1 B s2 (ENVep E) /\
       P_strbind strbind s2 B s3 (PACKsp p) ==>
       P_strbind (BINDstrbind strid NONE strexp (SOME strbind)) s1 B s3
         (PACKsp p)) /\
     (!B E i SE sigexp strbind strexp strid s1 s2 s3 s4.
       P_strexp strexp s1 B s2 (ENVep E) /\
       eval_sigexp sigexp s2 (Inter_basis B) s3 i /\
       P_strbind strbind s3 B s4 (STRENVsp SE) ==>
       P_strbind (BINDstrbind strid (SOME sigexp) strexp (SOME strbind)) s1 B
         s4
         (STRENVsp (add_strenv (strenv_map strid (cut_env E i)) SE))) /\
     (!B p sigexp strbind strexp strid s1 s2.
       P_strexp strexp s1 B s2 (PACKep p) ==>
       P_strbind (BINDstrbind strid (SOME sigexp) strexp (SOME strbind)) s1 B
         s2
         (PACKsp p)) /\
     (!B E i p sigexp strbind strexp strid s1 s2 s3 s4.
       P_strexp strexp s1 B s2 (ENVep E) /\
       eval_sigexp sigexp s2 (Inter_basis B) s3 i /\
       P_strbind strbind s3 B s4 (PACKsp p) ==>
       P_strbind (BINDstrbind strid (SOME sigexp) strexp (SOME strbind)) s1 B
         s4
         (PACKsp p)) ==>
     (!strexp s1 B s2 ep.
       eval_strexp strexp s1 B s2 ep ==> P_strexp strexp s1 B s2 ep) /\
     (!strdec s1 B s2 ep.
       eval_strdec strdec s1 B s2 ep ==> P_strdec strdec s1 B s2 ep) /\
     (!strbind s1 B s2 sep.
       eval_strbind strbind s1 B s2 sep ==> P_strbind strbind s1 B s2 sep)
EVAL_FUNBIND_RULES_SATISFIED
|- ModML_eval_funbind_pred eval_funbind
ModML_eval_funbind_induction
|- !P_funbind.
     (!sigexp B i funid strid strexp s1 s2.
       eval_sigexp sigexp s1 (Inter_basis B) s2 i ==>
       P_funbind (BINDfunbind funid strid sigexp NONE strexp NONE) s1 B s2
         (funenv_map funid (FUNCLOS strid i strexp NONE B))) /\
     (!sigexp sigexp' B i i' funid strid strexp s1 s2 s3.
       eval_sigexp sigexp s1 (Inter_basis B) s2 i /\
       eval_sigexp sigexp' s2
         (add_intenv_to_intbasis (Inter_basis B) (intenv_map strid i))
         s3
         i' ==>
       P_funbind (BINDfunbind funid strid sigexp (SOME sigexp') strexp NONE)
         s1
         B
         s3
         (funenv_map funid (FUNCLOS strid i strexp (SOME i') B))) /\
     (!sigexp B i funbind f funid strid strexp s1 s2 s3.
       eval_sigexp sigexp s1 (Inter_basis B) s2 i /\
       P_funbind funbind s2 B s3 f ==>
       P_funbind (BINDfunbind funid strid sigexp NONE strexp (SOME funbind))
         s1
         B
         s3
         (add_funenv (funenv_map funid (FUNCLOS strid i strexp NONE B)) f)) /\
     (!sigexp sigexp' B i i' funbind f funid strid strexp s1 s2 s3 s4.
       eval_sigexp sigexp s1 (Inter_basis B) s2 i /\
       eval_sigexp sigexp' s2
         (add_intenv_to_intbasis (Inter_basis B) (intenv_map strid i))
         s3
         i' /\
       P_funbind funbind s3 B s4 f ==>
       P_funbind
         (BINDfunbind funid strid sigexp (SOME sigexp') strexp (SOME funbind))
         s1
         B
         s4
         (add_funenv (funenv_map funid (FUNCLOS strid i strexp (SOME i') B))
           f)) ==>
     (!funbind s1 B s2 f.
       eval_funbind funbind s1 B s2 f ==> P_funbind funbind s1 B s2 f)
Rule188
|- !funbind s1 B s2 f.
     eval_funbind funbind s1 B s2 f ==>
     eval_fundec (FUNCTORfundec funbind) s1 B s2 f
Rule189
|- !s B. eval_fundec EMPTYfundec s B s empty_funenv
Rule190
|- !fundec1 s1 B F1 fundec2 s3 F2.
     (?s2.
       eval_fundec fundec1 s1 B s2 F1 /\
       eval_fundec fundec2 s2 (add_funenv_to_basis B F1) s3 F2) ==>
     eval_fundec (SEQfundec fundec1 fundec2) s1 B s3 (add_funenv F1 F2)
eval_fundec_induction_thm
|- !P.
     (!funbind s1 B s2 f.
       eval_funbind funbind s1 B s2 f ==>
       P (FUNCTORfundec funbind) s1 B s2 f) /\
     (!s B. P EMPTYfundec s B s empty_funenv) /\
     (!fundec1 s1 B F1 fundec2 s3 F2.
       (?s2.
         P fundec1 s1 B s2 F1 /\
         P fundec2 s2 (add_funenv_to_basis B F1) s3 F2) ==>
       P (SEQfundec fundec1 fundec2) s1 B s3 (add_funenv F1 F2)) ==>
     (!fundec s1 B s2 f. eval_fundec fundec s1 B s2 f ==> P fundec s1 B s2 f)
Rule191
|- !strdec s1 B s2 E.
     eval_strdec strdec s1 B s2 (ENVep E) ==>
     eval_topdec (STRDEC strdec) s1 B s2 (BASISbp (env_in_basis E))
Rule192
|- !strdec s1 B s2 p.
     eval_strdec strdec s1 B s2 (PACKep p) ==>
     eval_topdec (STRDEC strdec) s1 B s2 (PACKbp p)
Rule192b
|- !sigdec s1 B s2 G.
     eval_sigdec sigdec s1 (Inter_basis B) s2 G ==>
     eval_topdec (SIGDEC sigdec) s1 B s2 (BASISbp (sigenv_in_basis G))
Rule193
|- !fundec s1 B s2 f.
     eval_fundec fundec s1 B s2 f ==>
     eval_topdec (FUNDEC fundec) s1 B s2 (BASISbp (funenv_in_basis f))
eval_topdec_induction_thm
|- !P.
     (!strdec s1 B s2 E.
       eval_strdec strdec s1 B s2 (ENVep E) ==>
       P (STRDEC strdec) s1 B s2 (BASISbp (env_in_basis E))) /\
     (!strdec s1 B s2 p.
       eval_strdec strdec s1 B s2 (PACKep p) ==>
       P (STRDEC strdec) s1 B s2 (PACKbp p)) /\
     (!sigdec s1 B s2 G.
       eval_sigdec sigdec s1 (Inter_basis B) s2 G ==>
       P (SIGDEC sigdec) s1 B s2 (BASISbp (sigenv_in_basis G))) /\
     (!fundec s1 B s2 f.
       eval_fundec fundec s1 B s2 f ==>
       P (FUNDEC fundec) s1 B s2 (BASISbp (funenv_in_basis f))) ==>
     (!topdec s1 B s2 bp.
       eval_topdec topdec s1 B s2 bp ==> P topdec s1 B s2 bp)