doc-src/Functions/Thy/Functions.thy
changeset 43042 0f9534b7ea75
parent 41847 b0d6acf73588
equal deleted inserted replaced
43041:218e3943d504 43042:0f9534b7ea75
   556   subgoal. Usually this needs injectivity of the constructors, which
   556   subgoal. Usually this needs injectivity of the constructors, which
   557   is used automatically by @{text "auto"}.
   557   is used automatically by @{text "auto"}.
   558 *}
   558 *}
   559 
   559 
   560 by auto
   560 by auto
       
   561 termination by (relation "{}") simp
   561 
   562 
   562 
   563 
   563 subsection {* Non-constructor patterns *}
   564 subsection {* Non-constructor patterns *}
   564 
   565 
   565 text {*
   566 text {*
   683 function check :: "string \<Rightarrow> bool"
   684 function check :: "string \<Rightarrow> bool"
   684 where
   685 where
   685   "check (''good'') = True"
   686   "check (''good'') = True"
   686 | "s \<noteq> ''good'' \<Longrightarrow> check s = False"
   687 | "s \<noteq> ''good'' \<Longrightarrow> check s = False"
   687 by auto
   688 by auto
       
   689 termination by (relation "{}") simp
   688 
   690 
   689 
   691 
   690 section {* Partiality *}
   692 section {* Partiality *}
   691 
   693 
   692 text {* 
   694 text {*