src/HOL/Library/Extended_Nat.thy
changeset 59582 0fbed69ff081
parent 59115 f65ac77f7e07
child 60500 903bb1495239
equal deleted inserted replaced
59580:cbc38731d42f 59582:0fbed69ff081
   559 )
   559 )
   560 *}
   560 *}
   561 
   561 
   562 simproc_setup enat_eq_cancel
   562 simproc_setup enat_eq_cancel
   563   ("(l::enat) + m = n" | "(l::enat) = m + n") =
   563   ("(l::enat) + m = n" | "(l::enat) = m + n") =
   564   {* fn phi => fn ctxt => fn ct => Eq_Enat_Cancel.proc ctxt (term_of ct) *}
   564   {* fn phi => fn ctxt => fn ct => Eq_Enat_Cancel.proc ctxt (Thm.term_of ct) *}
   565 
   565 
   566 simproc_setup enat_le_cancel
   566 simproc_setup enat_le_cancel
   567   ("(l::enat) + m \<le> n" | "(l::enat) \<le> m + n") =
   567   ("(l::enat) + m \<le> n" | "(l::enat) \<le> m + n") =
   568   {* fn phi => fn ctxt => fn ct => Le_Enat_Cancel.proc ctxt (term_of ct) *}
   568   {* fn phi => fn ctxt => fn ct => Le_Enat_Cancel.proc ctxt (Thm.term_of ct) *}
   569 
   569 
   570 simproc_setup enat_less_cancel
   570 simproc_setup enat_less_cancel
   571   ("(l::enat) + m < n" | "(l::enat) < m + n") =
   571   ("(l::enat) + m < n" | "(l::enat) < m + n") =
   572   {* fn phi => fn ctxt => fn ct => Less_Enat_Cancel.proc ctxt (term_of ct) *}
   572   {* fn phi => fn ctxt => fn ct => Less_Enat_Cancel.proc ctxt (Thm.term_of ct) *}
   573 
   573 
   574 text {* TODO: add regression tests for these simprocs *}
   574 text {* TODO: add regression tests for these simprocs *}
   575 
   575 
   576 text {* TODO: add simprocs for combining and cancelling numerals *}
   576 text {* TODO: add simprocs for combining and cancelling numerals *}
   577 
   577