src/HOL/BNF_Examples/IsaFoR_Datatypes.thy
changeset 58139 e4c69c0985f5
parent 57634 efc00b9b8680
equal deleted inserted replaced
58138:3bfd12e456f4 58139:e4c69c0985f5
     9 
     9 
    10 theory IsaFoR_Datatypes
    10 theory IsaFoR_Datatypes
    11 imports Real
    11 imports Real
    12 begin
    12 begin
    13 
    13 
    14 datatype_new ('f, 'l) lab =
    14 datatype_new (discs_sels) ('f, 'l) lab =
    15     Lab "('f, 'l) lab" 'l
    15     Lab "('f, 'l) lab" 'l
    16   | FunLab "('f, 'l) lab" "('f, 'l) lab list"
    16   | FunLab "('f, 'l) lab" "('f, 'l) lab list"
    17   | UnLab 'f
    17   | UnLab 'f
    18   | Sharp "('f, 'l) lab"
    18   | Sharp "('f, 'l) lab"
    19 
    19 
    20 datatype_new 'f projL = Projection "(('f \<times> nat) \<times> nat) list"
    20 datatype_new (discs_sels) 'f projL = Projection "(('f \<times> nat) \<times> nat) list"
    21 
    21 
    22 datatype_new ('f, 'v) "term" = Var 'v | Fun 'f "('f, 'v) term list"
    22 datatype_new (discs_sels) ('f, 'v) "term" = Var 'v | Fun 'f "('f, 'v) term list"
    23 datatype_new ('f, 'v) ctxt =
    23 datatype_new (discs_sels) ('f, 'v) ctxt =
    24     Hole ("\<box>")
    24     Hole ("\<box>")
    25   | More 'f "('f, 'v) term list" "('f, 'v) ctxt" "('f, 'v) term list"
    25   | More 'f "('f, 'v) term list" "('f, 'v) ctxt" "('f, 'v) term list"
    26 
    26 
    27 type_synonym ('f, 'v) rule = "('f, 'v) term \<times> ('f, 'v) term"
    27 type_synonym ('f, 'v) rule = "('f, 'v) term \<times> ('f, 'v) term"
    28 type_synonym ('f, 'v) trs  = "('f, 'v) rule set"
    28 type_synonym ('f, 'v) trs  = "('f, 'v) rule set"
    30 type_synonym ('f, 'v) rules = "('f, 'v) rule list"
    30 type_synonym ('f, 'v) rules = "('f, 'v) rule list"
    31 type_synonym ('f, 'l, 'v) ruleLL  = "(('f, 'l) lab, 'v) rule"
    31 type_synonym ('f, 'l, 'v) ruleLL  = "(('f, 'l) lab, 'v) rule"
    32 type_synonym ('f, 'l, 'v) trsLL   = "(('f, 'l) lab, 'v) rules"
    32 type_synonym ('f, 'l, 'v) trsLL   = "(('f, 'l) lab, 'v) rules"
    33 type_synonym ('f, 'l, 'v) termsLL = "(('f, 'l) lab, 'v) term list"
    33 type_synonym ('f, 'l, 'v) termsLL = "(('f, 'l) lab, 'v) term list"
    34 
    34 
    35 datatype_new pos = Empty ("\<epsilon>") | PCons "nat" "pos" (infixr "<#" 70)
    35 datatype_new (discs_sels) pos = Empty ("\<epsilon>") | PCons "nat" "pos" (infixr "<#" 70)
    36 
    36 
    37 type_synonym  ('f, 'v) prseq = "(pos \<times> ('f, 'v) rule \<times> bool \<times> ('f, 'v) term) list"
    37 type_synonym  ('f, 'v) prseq = "(pos \<times> ('f, 'v) rule \<times> bool \<times> ('f, 'v) term) list"
    38 type_synonym  ('f, 'v) rseq = "(pos \<times> ('f, 'v) rule \<times> ('f, 'v) term) list"
    38 type_synonym  ('f, 'v) rseq = "(pos \<times> ('f, 'v) rule \<times> ('f, 'v) term) list"
    39 
    39 
    40 type_synonym ('f, 'l, 'v) rseqL   = "((('f, 'l) lab, 'v) rule \<times> (('f, 'l) lab, 'v) rseq) list"
    40 type_synonym ('f, 'l, 'v) rseqL   = "((('f, 'l) lab, 'v) rule \<times> (('f, 'l) lab, 'v) rseq) list"
    47   "bool \<times> ('f, 'l, 'v) termsLL \<times> ('f, 'l, 'v) trsLL \<times> ('f, 'l, 'v) trsLL"
    47   "bool \<times> ('f, 'l, 'v) termsLL \<times> ('f, 'l, 'v) trsLL \<times> ('f, 'l, 'v) trsLL"
    48 
    48 
    49 type_synonym ('f, 'l, 'v) qtrsLL =
    49 type_synonym ('f, 'l, 'v) qtrsLL =
    50   "bool \<times> ('f, 'l, 'v) termsLL \<times> ('f, 'l, 'v) trsLL"
    50   "bool \<times> ('f, 'l, 'v) termsLL \<times> ('f, 'l, 'v) trsLL"
    51 
    51 
    52 datatype_new location = H | A | B | R
    52 datatype_new (discs_sels) location = H | A | B | R
    53 
    53 
    54 type_synonym ('f, 'v) forb_pattern = "('f, 'v) ctxt \<times> ('f, 'v) term \<times> location"
    54 type_synonym ('f, 'v) forb_pattern = "('f, 'v) ctxt \<times> ('f, 'v) term \<times> location"
    55 type_synonym ('f, 'v) forb_patterns = "('f, 'v) forb_pattern set"
    55 type_synonym ('f, 'v) forb_patterns = "('f, 'v) forb_pattern set"
    56 
    56 
    57 type_synonym ('f, 'l, 'v) fptrsLL =
    57 type_synonym ('f, 'l, 'v) fptrsLL =
    66 type_synonym ('v, 'a) poly = "('v monom \<times> 'a) list"
    66 type_synonym ('v, 'a) poly = "('v monom \<times> 'a) list"
    67 type_synonym ('f, 'a) poly_inter_list = "(('f \<times> nat) \<times> (nat, 'a) poly) list"
    67 type_synonym ('f, 'a) poly_inter_list = "(('f \<times> nat) \<times> (nat, 'a) poly) list"
    68 type_synonym 'a vec = "'a list"
    68 type_synonym 'a vec = "'a list"
    69 type_synonym 'a mat = "'a vec list"
    69 type_synonym 'a mat = "'a vec list"
    70 
    70 
    71 datatype_new arctic = MinInfty | Num_arc int
    71 datatype_new (discs_sels) arctic = MinInfty | Num_arc int
    72 datatype_new 'a arctic_delta = MinInfty_delta | Num_arc_delta 'a
    72 datatype_new (discs_sels) 'a arctic_delta = MinInfty_delta | Num_arc_delta 'a
    73 datatype_new order_tag = Lex | Mul
    73 datatype_new (discs_sels) order_tag = Lex | Mul
    74 
    74 
    75 type_synonym 'f status_prec_repr = "(('f \<times> nat) \<times> (nat \<times> order_tag)) list"
    75 type_synonym 'f status_prec_repr = "(('f \<times> nat) \<times> (nat \<times> order_tag)) list"
    76 
    76 
    77 datatype_new af_entry =
    77 datatype_new (discs_sels) af_entry =
    78     Collapse nat
    78     Collapse nat
    79   | AFList "nat list"
    79   | AFList "nat list"
    80 
    80 
    81 type_synonym 'f afs_list = "(('f \<times> nat) \<times> af_entry) list"
    81 type_synonym 'f afs_list = "(('f \<times> nat) \<times> af_entry) list"
    82 type_synonym 'f prec_weight_repr = "(('f \<times> nat) \<times> (nat \<times> nat \<times> (nat list option))) list \<times> nat"
    82 type_synonym 'f prec_weight_repr = "(('f \<times> nat) \<times> (nat \<times> nat \<times> (nat list option))) list \<times> nat"
    83 
    83 
    84 datatype_new 'f redtriple_impl =
    84 datatype_new (discs_sels) 'f redtriple_impl =
    85     Int_carrier "('f, int) lpoly_interL"
    85     Int_carrier "('f, int) lpoly_interL"
    86   | Int_nl_carrier "('f, int) poly_inter_list"
    86   | Int_nl_carrier "('f, int) poly_inter_list"
    87   | Rat_carrier "('f, rat) lpoly_interL"
    87   | Rat_carrier "('f, rat) lpoly_interL"
    88   | Rat_nl_carrier rat "('f, rat) poly_inter_list"
    88   | Rat_nl_carrier rat "('f, rat) poly_inter_list"
    89   | Real_carrier "('f, real) lpoly_interL"
    89   | Real_carrier "('f, real) lpoly_interL"
    96   | Arctic_mat_carrier nat "('f, arctic mat) lpoly_interL"
    96   | Arctic_mat_carrier nat "('f, arctic mat) lpoly_interL"
    97   | Arctic_rat_mat_carrier nat "('f, rat arctic_delta mat) lpoly_interL"
    97   | Arctic_rat_mat_carrier nat "('f, rat arctic_delta mat) lpoly_interL"
    98   | RPO "'f status_prec_repr" "'f afs_list"
    98   | RPO "'f status_prec_repr" "'f afs_list"
    99   | KBO "'f prec_weight_repr" "'f afs_list"
    99   | KBO "'f prec_weight_repr" "'f afs_list"
   100 
   100 
   101 datatype_new list_order_type = MS_Ext | Max_Ext | Min_Ext  | Dms_Ext
   101 datatype_new (discs_sels) list_order_type = MS_Ext | Max_Ext | Min_Ext  | Dms_Ext
   102 type_synonym 'f scnp_af = "(('f \<times> nat) \<times> (nat \<times> nat) list) list"
   102 type_synonym 'f scnp_af = "(('f \<times> nat) \<times> (nat \<times> nat) list) list"
   103 
   103 
   104 datatype_new 'f root_redtriple_impl = SCNP list_order_type "'f scnp_af" "'f redtriple_impl"
   104 datatype_new (discs_sels) 'f root_redtriple_impl = SCNP list_order_type "'f scnp_af" "'f redtriple_impl"
   105 
   105 
   106 type_synonym 'f sig_map_list = "(('f \<times> nat) \<times> 'f list) list"
   106 type_synonym 'f sig_map_list = "(('f \<times> nat) \<times> 'f list) list"
   107 type_synonym ('f, 'v) uncurry_info = "'f \<times> 'f sig_map_list \<times> ('f, 'v) rules \<times> ('f, 'v) rules"
   107 type_synonym ('f, 'v) uncurry_info = "'f \<times> 'f sig_map_list \<times> ('f, 'v) rules \<times> ('f, 'v) rules"
   108 
   108 
   109 datatype_new arithFun =
   109 datatype_new (discs_sels) arithFun =
   110     Arg nat
   110     Arg nat
   111   | Const nat
   111   | Const nat
   112   | Sum "arithFun list"
   112   | Sum "arithFun list"
   113   | Max "arithFun list"
   113   | Max "arithFun list"
   114   | Min "arithFun list"
   114   | Min "arithFun list"
   115   | Prod "arithFun list"
   115   | Prod "arithFun list"
   116   | IfEqual arithFun arithFun arithFun arithFun
   116   | IfEqual arithFun arithFun arithFun arithFun
   117 
   117 
   118 datatype_new 'f sl_inter = SL_Inter nat "(('f \<times> nat) \<times> arithFun) list"
   118 datatype_new (discs_sels) 'f sl_inter = SL_Inter nat "(('f \<times> nat) \<times> arithFun) list"
   119 datatype_new ('f, 'v) sl_variant =
   119 datatype_new (discs_sels) ('f, 'v) sl_variant =
   120     Rootlab "('f \<times> nat) option"
   120     Rootlab "('f \<times> nat) option"
   121   | Finitelab "'f sl_inter"
   121   | Finitelab "'f sl_inter"
   122   | QuasiFinitelab "'f sl_inter" 'v
   122   | QuasiFinitelab "'f sl_inter" 'v
   123 
   123 
   124 type_synonym ('f, 'v) crit_pair_joins = "(('f, 'v) term \<times> ('f, 'v) rseq \<times> ('f, 'v) term \<times> ('f, 'v) rseq) list"
   124 type_synonym ('f, 'v) crit_pair_joins = "(('f, 'v) term \<times> ('f, 'v) rseq \<times> ('f, 'v) term \<times> ('f, 'v) rseq) list"
   125 
   125 
   126 datatype_new 'f join_info = Guided "('f, string) crit_pair_joins" | Join_NF | Join_BFS nat
   126 datatype_new (discs_sels) 'f join_info = Guided "('f, string) crit_pair_joins" | Join_NF | Join_BFS nat
   127 
   127 
   128 type_synonym unknown_info = string
   128 type_synonym unknown_info = string
   129 
   129 
   130 type_synonym dummy_prf = unit
   130 type_synonym dummy_prf = unit
   131 
   131 
   132 datatype_new ('f, 'v) complex_constant_removal_prf = Complex_Constant_Removal_Proof
   132 datatype_new (discs_sels) ('f, 'v) complex_constant_removal_prf = Complex_Constant_Removal_Proof
   133   "('f, 'v) term"
   133   "('f, 'v) term"
   134   "(('f, 'v) rule \<times> ('f, 'v) rule) list"
   134   "(('f, 'v) rule \<times> ('f, 'v) rule) list"
   135 
   135 
   136 datatype_new ('f, 'v) cond_constraint =
   136 datatype_new (discs_sels) ('f, 'v) cond_constraint =
   137     CC_cond bool "('f, 'v) rule"
   137     CC_cond bool "('f, 'v) rule"
   138   | CC_rewr "('f, 'v) term" "('f, 'v) term"
   138   | CC_rewr "('f, 'v) term" "('f, 'v) term"
   139   | CC_impl "('f, 'v) cond_constraint list" "('f, 'v) cond_constraint"
   139   | CC_impl "('f, 'v) cond_constraint list" "('f, 'v) cond_constraint"
   140   | CC_all 'v "('f, 'v) cond_constraint"
   140   | CC_all 'v "('f, 'v) cond_constraint"
   141 
   141 
   142 type_synonym ('f, 'v, 'w) gsubstL = "('v \<times> ('f, 'w) term) list"
   142 type_synonym ('f, 'v, 'w) gsubstL = "('v \<times> ('f, 'w) term) list"
   143 type_synonym ('f, 'v) substL = "('f, 'v, 'v) gsubstL"
   143 type_synonym ('f, 'v) substL = "('f, 'v, 'v) gsubstL"
   144 
   144 
   145 datatype_new ('f, 'v) cond_constraint_prf =
   145 datatype_new (discs_sels) ('f, 'v) cond_constraint_prf =
   146     Final
   146     Final
   147   | Delete_Condition "('f, 'v) cond_constraint" "('f, 'v) cond_constraint_prf"
   147   | Delete_Condition "('f, 'v) cond_constraint" "('f, 'v) cond_constraint_prf"
   148   | Different_Constructor "('f, 'v) cond_constraint"
   148   | Different_Constructor "('f, 'v) cond_constraint"
   149   | Same_Constructor "('f, 'v) cond_constraint" "('f, 'v) cond_constraint" "('f, 'v) cond_constraint_prf"
   149   | Same_Constructor "('f, 'v) cond_constraint" "('f, 'v) cond_constraint" "('f, 'v) cond_constraint_prf"
   150   | Variable_Equation 'v "('f, 'v) term" "('f, 'v) cond_constraint" "('f, 'v) cond_constraint_prf"
   150   | Variable_Equation 'v "('f, 'v) term" "('f, 'v) cond_constraint" "('f, 'v) cond_constraint_prf"
   151   | Funarg_Into_Var "('f, 'v) cond_constraint" nat 'v "('f, 'v) cond_constraint" "('f, 'v) cond_constraint_prf"
   151   | Funarg_Into_Var "('f, 'v) cond_constraint" nat 'v "('f, 'v) cond_constraint" "('f, 'v) cond_constraint_prf"
   152   | Simplify_Condition "('f, 'v) cond_constraint" "('f, 'v) substL" "('f, 'v) cond_constraint" "('f, 'v) cond_constraint_prf"
   152   | Simplify_Condition "('f, 'v) cond_constraint" "('f, 'v) substL" "('f, 'v) cond_constraint" "('f, 'v) cond_constraint_prf"
   153   | Induction "('f, 'v) cond_constraint" "('f, 'v) cond_constraint list" "(('f, 'v) rule \<times> (('f, 'v) term \<times> 'v list) list \<times> ('f, 'v) cond_constraint \<times> ('f, 'v) cond_constraint_prf) list"
   153   | Induction "('f, 'v) cond_constraint" "('f, 'v) cond_constraint list" "(('f, 'v) rule \<times> (('f, 'v) term \<times> 'v list) list \<times> ('f, 'v) cond_constraint \<times> ('f, 'v) cond_constraint_prf) list"
   154 
   154 
   155 datatype_new ('f, 'v) cond_red_pair_prf =
   155 datatype_new (discs_sels) ('f, 'v) cond_red_pair_prf =
   156   Cond_Red_Pair_Prf
   156   Cond_Red_Pair_Prf
   157     'f "(('f, 'v) cond_constraint \<times> ('f, 'v) rules \<times> ('f, 'v) cond_constraint_prf) list" nat nat
   157     'f "(('f, 'v) cond_constraint \<times> ('f, 'v) rules \<times> ('f, 'v) cond_constraint_prf) list" nat nat
   158 
   158 
   159 datatype_new ('q, 'f) ta_rule = TA_rule 'f "'q list" 'q ("_ _ \<rightarrow> _")
   159 datatype_new (discs_sels) ('q, 'f) ta_rule = TA_rule 'f "'q list" 'q ("_ _ \<rightarrow> _")
   160 datatype_new ('q, 'f) tree_automaton = Tree_Automaton "'q list" "('q, 'f) ta_rule list" "('q \<times> 'q) list"
   160 datatype_new (discs_sels) ('q, 'f) tree_automaton = Tree_Automaton "'q list" "('q, 'f) ta_rule list" "('q \<times> 'q) list"
   161 datatype_new 'q ta_relation =
   161 datatype_new (discs_sels) 'q ta_relation =
   162     Decision_Proc
   162     Decision_Proc
   163   | Id_Relation
   163   | Id_Relation
   164   | Some_Relation "('q \<times> 'q) list"
   164   | Some_Relation "('q \<times> 'q) list"
   165 
   165 
   166 datatype_new boundstype = Roof | Match
   166 datatype_new (discs_sels) boundstype = Roof | Match
   167 datatype_new ('f, 'q) bounds_info = Bounds_Info boundstype nat "'q list" "('q, 'f \<times> nat) tree_automaton" "'q ta_relation"
   167 datatype_new (discs_sels) ('f, 'q) bounds_info = Bounds_Info boundstype nat "'q list" "('q, 'f \<times> nat) tree_automaton" "'q ta_relation"
   168 
   168 
   169 datatype_new ('f, 'v) pat_eqv_prf =
   169 datatype_new (discs_sels) ('f, 'v) pat_eqv_prf =
   170     Pat_Dom_Renaming "('f, 'v) substL"
   170     Pat_Dom_Renaming "('f, 'v) substL"
   171   | Pat_Irrelevant "('f, 'v) substL" "('f, 'v) substL"
   171   | Pat_Irrelevant "('f, 'v) substL" "('f, 'v) substL"
   172   | Pat_Simplify "('f, 'v) substL" "('f, 'v) substL"
   172   | Pat_Simplify "('f, 'v) substL" "('f, 'v) substL"
   173 
   173 
   174 datatype_new pat_rule_pos = Pat_Base | Pat_Pump | Pat_Close
   174 datatype_new (discs_sels) pat_rule_pos = Pat_Base | Pat_Pump | Pat_Close
   175 
   175 
   176 datatype_new ('f, 'v) pat_rule_prf =
   176 datatype_new (discs_sels) ('f, 'v) pat_rule_prf =
   177     Pat_OrigRule "('f, 'v) rule" bool
   177     Pat_OrigRule "('f, 'v) rule" bool
   178   | Pat_InitPump "('f, 'v) pat_rule_prf" "('f, 'v) substL" "('f, 'v) substL"
   178   | Pat_InitPump "('f, 'v) pat_rule_prf" "('f, 'v) substL" "('f, 'v) substL"
   179   | Pat_InitPumpCtxt "('f, 'v) pat_rule_prf" "('f, 'v) substL" pos 'v
   179   | Pat_InitPumpCtxt "('f, 'v) pat_rule_prf" "('f, 'v) substL" pos 'v
   180   | Pat_Equiv "('f, 'v) pat_rule_prf" bool "('f, 'v) pat_eqv_prf"
   180   | Pat_Equiv "('f, 'v) pat_rule_prf" bool "('f, 'v) pat_eqv_prf"
   181   | Pat_Narrow "('f, 'v) pat_rule_prf" "('f, 'v) pat_rule_prf" pos
   181   | Pat_Narrow "('f, 'v) pat_rule_prf" "('f, 'v) pat_rule_prf" pos
   182   | Pat_Inst "('f, 'v) pat_rule_prf" "('f, 'v) substL" pat_rule_pos
   182   | Pat_Inst "('f, 'v) pat_rule_prf" "('f, 'v) substL" pat_rule_pos
   183   | Pat_Rewr "('f, 'v) pat_rule_prf" "('f, 'v) term \<times> ('f, 'v) rseq" pat_rule_pos 'v
   183   | Pat_Rewr "('f, 'v) pat_rule_prf" "('f, 'v) term \<times> ('f, 'v) rseq" pat_rule_pos 'v
   184   | Pat_Exp_Sigma "('f, 'v) pat_rule_prf" nat
   184   | Pat_Exp_Sigma "('f, 'v) pat_rule_prf" nat
   185 
   185 
   186 datatype_new ('f, 'v) non_loop_prf =
   186 datatype_new (discs_sels) ('f, 'v) non_loop_prf =
   187     Non_Loop_Prf "('f, 'v) pat_rule_prf" "('f, 'v) substL" "('f, 'v) substL" nat nat pos
   187     Non_Loop_Prf "('f, 'v) pat_rule_prf" "('f, 'v) substL" "('f, 'v) substL" nat nat pos
   188 
   188 
   189 datatype_new ('f, 'l, 'v) problem =
   189 datatype_new (discs_sels) ('f, 'l, 'v) problem =
   190     SN_TRS "('f, 'l, 'v) qreltrsLL"
   190     SN_TRS "('f, 'l, 'v) qreltrsLL"
   191   | SN_FP_TRS "('f, 'l, 'v) fptrsLL"
   191   | SN_FP_TRS "('f, 'l, 'v) fptrsLL"
   192   | Finite_DPP "('f, 'l, 'v) dppLL"
   192   | Finite_DPP "('f, 'l, 'v) dppLL"
   193   | Unknown_Problem unknown_info
   193   | Unknown_Problem unknown_info
   194   | Not_SN_TRS "('f, 'l, 'v) qtrsLL"
   194   | Not_SN_TRS "('f, 'l, 'v) qtrsLL"
   196   | Infinite_DPP "('f, 'l, 'v) dppLL"
   196   | Infinite_DPP "('f, 'l, 'v) dppLL"
   197   | Not_SN_FP_TRS "('f, 'l, 'v) fptrsLL"
   197   | Not_SN_FP_TRS "('f, 'l, 'v) fptrsLL"
   198 
   198 
   199 declare [[bnf_timing]]
   199 declare [[bnf_timing]]
   200 
   200 
   201 datatype_new ('f, 'l, 'v, 'a, 'b, 'c, 'd, 'e) generic_assm_proof =
   201 datatype_new (discs_sels) ('f, 'l, 'v, 'a, 'b, 'c, 'd, 'e) generic_assm_proof =
   202     SN_assm_proof "('f, 'l, 'v) qreltrsLL" 'a
   202     SN_assm_proof "('f, 'l, 'v) qreltrsLL" 'a
   203   | Finite_assm_proof "('f, 'l, 'v) dppLL" 'b
   203   | Finite_assm_proof "('f, 'l, 'v) dppLL" 'b
   204   | SN_FP_assm_proof "('f, 'l, 'v) fptrsLL" 'c
   204   | SN_FP_assm_proof "('f, 'l, 'v) fptrsLL" 'c
   205   | Not_SN_assm_proof "('f, 'l, 'v) qtrsLL" 'a
   205   | Not_SN_assm_proof "('f, 'l, 'v) qtrsLL" 'a
   206   | Infinite_assm_proof "('f, 'l, 'v) dppLL" 'b
   206   | Infinite_assm_proof "('f, 'l, 'v) dppLL" 'b
   208   | Not_SN_FP_assm_proof "('f, 'l, 'v) fptrsLL" 'd
   208   | Not_SN_FP_assm_proof "('f, 'l, 'v) fptrsLL" 'd
   209   | Unknown_assm_proof unknown_info 'e
   209   | Unknown_assm_proof unknown_info 'e
   210 
   210 
   211 type_synonym ('f, 'l, 'v, 'a, 'b, 'c, 'd) assm_proof = "('f, 'l, 'v, 'a, 'b, 'c, dummy_prf, 'd) generic_assm_proof"
   211 type_synonym ('f, 'l, 'v, 'a, 'b, 'c, 'd) assm_proof = "('f, 'l, 'v, 'a, 'b, 'c, dummy_prf, 'd) generic_assm_proof"
   212 
   212 
   213 datatype_new ('f, 'l, 'v) assm =
   213 datatype_new (discs_sels) ('f, 'l, 'v) assm =
   214     SN_assm "('f, 'l, 'v) problem list" "('f, 'l, 'v) qreltrsLL"
   214     SN_assm "('f, 'l, 'v) problem list" "('f, 'l, 'v) qreltrsLL"
   215   | SN_FP_assm "('f, 'l, 'v) problem list" "('f, 'l, 'v) fptrsLL"
   215   | SN_FP_assm "('f, 'l, 'v) problem list" "('f, 'l, 'v) fptrsLL"
   216   | Finite_assm "('f, 'l, 'v) problem list" "('f, 'l, 'v) dppLL"
   216   | Finite_assm "('f, 'l, 'v) problem list" "('f, 'l, 'v) dppLL"
   217   | Unknown_assm "('f, 'l, 'v) problem list" unknown_info
   217   | Unknown_assm "('f, 'l, 'v) problem list" unknown_info
   218   | Not_SN_assm "('f, 'l, 'v) problem list" "('f, 'l, 'v) qtrsLL"
   218   | Not_SN_assm "('f, 'l, 'v) problem list" "('f, 'l, 'v) qtrsLL"
   252 | "collect_neg_assms tp dpp rtp fptp unk (Not_RelSN_assm_proof t prf) = rtp prf"
   252 | "collect_neg_assms tp dpp rtp fptp unk (Not_RelSN_assm_proof t prf) = rtp prf"
   253 | "collect_neg_assms tp dpp rtp fptp unk (Not_SN_FP_assm_proof t prf) = fptp prf"
   253 | "collect_neg_assms tp dpp rtp fptp unk (Not_SN_FP_assm_proof t prf) = fptp prf"
   254 | "collect_neg_assms tp dpp rtp fptp unk (Unknown_assm_proof p prf) = unk prf"
   254 | "collect_neg_assms tp dpp rtp fptp unk (Unknown_assm_proof p prf) = unk prf"
   255 | "collect_neg_assms tp dpp rtp fptp unk _ = []"
   255 | "collect_neg_assms tp dpp rtp fptp unk _ = []"
   256 
   256 
   257 datatype_new ('f, 'l, 'v) dp_nontermination_proof =
   257 datatype_new (discs_sels) ('f, 'l, 'v) dp_nontermination_proof =
   258     DP_Loop "(('f, 'l) lab, 'v) term" "(('f, 'l) lab, 'v) prseq" "(('f, 'l) lab, 'v) substL" "(('f, 'l) lab, 'v) ctxt"
   258     DP_Loop "(('f, 'l) lab, 'v) term" "(('f, 'l) lab, 'v) prseq" "(('f, 'l) lab, 'v) substL" "(('f, 'l) lab, 'v) ctxt"
   259   | DP_Nonloop "(('f, 'l) lab, 'v) non_loop_prf"
   259   | DP_Nonloop "(('f, 'l) lab, 'v) non_loop_prf"
   260   | DP_Rule_Removal "('f, 'l, 'v) trsLL option" "('f, 'l, 'v) trsLL option" "('f, 'l, 'v) dp_nontermination_proof"
   260   | DP_Rule_Removal "('f, 'l, 'v) trsLL option" "('f, 'l, 'v) trsLL option" "('f, 'l, 'v) dp_nontermination_proof"
   261   | DP_Q_Increase "('f, 'l, 'v) termsLL" "('f, 'l, 'v) dp_nontermination_proof"
   261   | DP_Q_Increase "('f, 'l, 'v) termsLL" "('f, 'l, 'v) dp_nontermination_proof"
   262   | DP_Q_Reduction "('f, 'l, 'v) termsLL" "('f, 'l, 'v) dp_nontermination_proof"
   262   | DP_Q_Reduction "('f, 'l, 'v) termsLL" "('f, 'l, 'v) dp_nontermination_proof"
   310        ('f, 'l, 'v) dp_nontermination_proof,
   310        ('f, 'l, 'v) dp_nontermination_proof,
   311        ('f, 'l, 'v) reltrs_nontermination_proof,
   311        ('f, 'l, 'v) reltrs_nontermination_proof,
   312        ('f, 'l, 'v) fp_nontermination_proof,
   312        ('f, 'l, 'v) fp_nontermination_proof,
   313        ('f, 'l, 'v) neg_unknown_proof) generic_assm_proof list"
   313        ('f, 'l, 'v) neg_unknown_proof) generic_assm_proof list"
   314 
   314 
   315 datatype_new ('f, 'l, 'v) dp_termination_proof =
   315 datatype_new (discs_sels) ('f, 'l, 'v) dp_termination_proof =
   316     P_is_Empty
   316     P_is_Empty
   317   | Subterm_Criterion_Proc "('f, 'l) lab projL" "('f, 'l, 'v) rseqL"
   317   | Subterm_Criterion_Proc "('f, 'l) lab projL" "('f, 'l, 'v) rseqL"
   318       "('f, 'l, 'v) trsLL" "('f, 'l, 'v) dp_termination_proof"
   318       "('f, 'l, 'v) trsLL" "('f, 'l, 'v) dp_termination_proof"
   319   | Redpair_Proc "('f, 'l) lab root_redtriple_impl + ('f, 'l) lab redtriple_impl" "('f, 'l, 'v) trsLL"  "('f, 'l, 'v) dp_termination_proof"
   319   | Redpair_Proc "('f, 'l) lab root_redtriple_impl + ('f, 'l) lab redtriple_impl" "('f, 'l, 'v) trsLL"  "('f, 'l, 'v) dp_termination_proof"
   320   | Redpair_UR_Proc "('f, 'l) lab root_redtriple_impl + ('f, 'l) lab redtriple_impl"
   320   | Redpair_UR_Proc "('f, 'l) lab root_redtriple_impl + ('f, 'l) lab redtriple_impl"