src/HOL/Tools/Datatype/datatype_codegen.ML
changeset 43324 2b47822868e4
parent 42411 ff997038e8eb
child 44121 44adaa6db327
equal deleted inserted replaced
43323:28e71a685c84 43324:2b47822868e4
    45       |> Logic.dest_equals
    45       |> Logic.dest_equals
    46       |> fst
    46       |> fst
    47       |> Term.strip_comb
    47       |> Term.strip_comb
    48       |> apsnd (fst o split_last)
    48       |> apsnd (fst o split_last)
    49       |> list_comb;
    49       |> list_comb;
    50     val lhs = Free (Name.variant params "case", Term.fastype_of rhs);
    50     val lhs = Free (singleton (Name.variant_list params) "case", Term.fastype_of rhs);
    51     val asm = (Thm.cterm_of thy o Logic.mk_equals) (lhs, rhs);
    51     val asm = (Thm.cterm_of thy o Logic.mk_equals) (lhs, rhs);
    52   in
    52   in
    53     thms
    53     thms
    54     |> Conjunction.intr_balanced
    54     |> Conjunction.intr_balanced
    55     |> Raw_Simplifier.rewrite_rule [(Thm.symmetric o Thm.assume) asm]
    55     |> Raw_Simplifier.rewrite_rule [(Thm.symmetric o Thm.assume) asm]