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