1theory Base_FDS
2imports "HOL-Library.Pattern_Aliases"
3begin
4
5declare Let_def [simp]
6
7text \<open>Lemma \<open>size_prod_measure\<close>, when declared with the \<open>measure_function\<close> attribute,
8enables \<open>fun\<close> to prove termination of a larger class of functions automatically.
9By default, \<open>fun\<close> only tries lexicographic combinations of the sizes of the parameters.
10With \<open>size_prod_measure\<close> enabled it also tries measures based on the sum of the sizes
11of different parameters.
12
13To alert the reader whenever such a more subtle termination proof is taking place
14the lemma is not enabled all the time but only when it is needed.
15\<close>
16
17lemma size_prod_measure: 
18  "is_measure f \<Longrightarrow> is_measure g \<Longrightarrow> is_measure (size_prod f g)"
19by (rule is_measure_trivial)
20
21end
22