Theory Base_FDS

theory Base_FDS
imports Pattern_Aliases
section "Common Basis Theory"

theory Base_FDS
imports "HOL-Library.Pattern_Aliases"

declare Let_def [simp]

text ‹Lemma ‹size_prod_measure›, when declared with the ‹measure_function› attribute,
enables ‹fun› to prove termination of a larger class of functions automatically.
By default, ‹fun› only tries lexicographic combinations of the sizes of the parameters.
With ‹size_prod_measure› enabled it also tries measures based on the sum of the sizes
of different parameters.

To alert the reader whenever such a more subtle termination proof is taking place
the lemma is not enabled all the time but only when it is needed.

lemma size_prod_measure: 
  "is_measure f ⟹ is_measure g ⟹ is_measure (size_prod f g)"
by (rule is_measure_trivial)