src/HOL/Tools/groebner.ML
changeset 52086 fcb40cadc173
parent 51930 52fd62618631
child 52467 24c6ddb48cb8
equal deleted inserted replaced
52085:5534ec8b90a9 52086:fcb40cadc173
  1000  fun lhs t = case term_of t of
  1000  fun lhs t = case term_of t of
  1001   Const(@{const_name HOL.eq},_)$_$_ => Thm.dest_arg1 t
  1001   Const(@{const_name HOL.eq},_)$_$_ => Thm.dest_arg1 t
  1002  | _=> raise CTERM ("ideal_tac - lhs",[t])
  1002  | _=> raise CTERM ("ideal_tac - lhs",[t])
  1003  fun exitac NONE = no_tac
  1003  fun exitac NONE = no_tac
  1004    | exitac (SOME y) = rtac (instantiate' [SOME (ctyp_of_term y)] [NONE,SOME y] exI) 1
  1004    | exitac (SOME y) = rtac (instantiate' [SOME (ctyp_of_term y)] [NONE,SOME y] exI) 1
       
  1005 
       
  1006  val claset = claset_of @{context}
  1005 in
  1007 in
  1006 fun ideal_tac add_ths del_ths ctxt =
  1008 fun ideal_tac add_ths del_ths ctxt =
  1007   presimplify ctxt add_ths del_ths
  1009   presimplify ctxt add_ths del_ths
  1008  THEN'
  1010  THEN'
  1009  CSUBGOAL (fn (p, i) =>
  1011  CSUBGOAL (fn (p, i) =>
  1021      val ws = map (exitac o AList.lookup op aconvc cfs) evs
  1023      val ws = map (exitac o AList.lookup op aconvc cfs) evs
  1022     in EVERY (rev ws) THEN Method.insert_tac prems 1
  1024     in EVERY (rev ws) THEN Method.insert_tac prems 1
  1023         THEN ring_tac add_ths del_ths ctxt 1
  1025         THEN ring_tac add_ths del_ths ctxt 1
  1024    end
  1026    end
  1025   in
  1027   in
  1026      clarify_tac @{context} i
  1028      clarify_tac (put_claset claset ctxt) i
  1027      THEN Object_Logic.full_atomize_tac i
  1029      THEN Object_Logic.full_atomize_tac i
  1028      THEN asm_full_simp_tac (put_simpset (#poly_eq_ss thy) ctxt) i
  1030      THEN asm_full_simp_tac (put_simpset (#poly_eq_ss thy) ctxt) i
  1029      THEN clarify_tac @{context} i
  1031      THEN clarify_tac (put_claset claset ctxt) i
  1030      THEN (REPEAT (CONVERSION (#unwind_conv thy ctxt) i))
  1032      THEN (REPEAT (CONVERSION (#unwind_conv thy ctxt) i))
  1031      THEN SUBPROOF poly_exists_tac ctxt i
  1033      THEN SUBPROOF poly_exists_tac ctxt i
  1032   end
  1034   end
  1033  handle TERM _ => no_tac
  1035  handle TERM _ => no_tac
  1034      | CTERM _ => no_tac
  1036      | CTERM _ => no_tac