src/HOL/Algebra/ringsimp.ML
changeset 67560 0fa87bd86566
parent 58811 19382bbfa93a
child 67561 f0b11413f1c9
equal deleted inserted replaced
67559:833d154ab189 67560:0fa87bd86566
    45 fun struct_tac ctxt ((s, ts), simps) =
    45 fun struct_tac ctxt ((s, ts), simps) =
    46   let
    46   let
    47     val ops = map (fst o Term.strip_comb) ts;
    47     val ops = map (fst o Term.strip_comb) ts;
    48     fun ord (Const (a, _)) = find_index (fn (Const (b, _)) => a=b | _ => false) ops
    48     fun ord (Const (a, _)) = find_index (fn (Const (b, _)) => a=b | _ => false) ops
    49       | ord (Free (a, _)) = find_index (fn (Free (b, _)) => a=b | _ => false) ops;
    49       | ord (Free (a, _)) = find_index (fn (Free (b, _)) => a=b | _ => false) ops;
    50     fun less (a, b) = (Term_Ord.term_lpo ord (a, b) = LESS);
    50     val less = is_less o Term_Ord.term_lpo ord;
    51   in asm_full_simp_tac (put_simpset HOL_ss ctxt addsimps simps |> Simplifier.set_termless less) end;
    51   in asm_full_simp_tac (put_simpset HOL_ss ctxt addsimps simps |> Simplifier.set_termless less) end;
    52 
    52 
    53 fun algebra_tac ctxt =
    53 fun algebra_tac ctxt =
    54   EVERY' (map (fn s => TRY o struct_tac ctxt s) (Data.get (Context.Proof ctxt)));
    54   EVERY' (map (fn s => TRY o struct_tac ctxt s) (Data.get (Context.Proof ctxt)));
    55 
    55