src/HOL/Tools/split_rule.ML
changeset 18708 4b3dadb4fe33
parent 18629 bdf01da93ed4
child 18728 6790126ab5f6
equal deleted inserted replaced
18707:9d6154f76476 18708:4b3dadb4fe33
    14 signature SPLIT_RULE =
    14 signature SPLIT_RULE =
    15 sig
    15 sig
    16   include BASIC_SPLIT_RULE
    16   include BASIC_SPLIT_RULE
    17   val split_rule_var: term * thm -> thm
    17   val split_rule_var: term * thm -> thm
    18   val split_rule_goal: string list list -> thm -> thm
    18   val split_rule_goal: string list list -> thm -> thm
    19   val setup: (theory -> theory) list
    19   val setup: theory -> theory
    20 end;
    20 end;
    21 
    21 
    22 structure SplitRule: SPLIT_RULE =
    22 structure SplitRule: SPLIT_RULE =
    23 struct
    23 struct
    24 
    24 
   139     >> K (Attrib.rule (K complete_split_rule)) ||
   139     >> K (Attrib.rule (K complete_split_rule)) ||
   140   Args.and_list1 (Scan.lift (Scan.repeat Args.name))
   140   Args.and_list1 (Scan.lift (Scan.repeat Args.name))
   141     >> (fn xss => Attrib.rule (K (split_rule_goal xss)))) x;
   141     >> (fn xss => Attrib.rule (K (split_rule_goal xss)))) x;
   142 
   142 
   143 val setup =
   143 val setup =
   144  [Attrib.add_attributes
   144   Attrib.add_attributes
   145   [("split_format", (split_format, split_format),
   145     [("split_format", (split_format, split_format),
   146     "split pair-typed subterms in premises, or function arguments")]];
   146       "split pair-typed subterms in premises, or function arguments")];
   147 
   147 
   148 end;
   148 end;
   149 
   149 
   150 structure BasicSplitRule: BASIC_SPLIT_RULE = SplitRule;
   150 structure BasicSplitRule: BASIC_SPLIT_RULE = SplitRule;
   151 open BasicSplitRule;
   151 open BasicSplitRule;