src/LCF/ex/Ex2.thy
author wenzelm
Wed, 14 May 2014 12:00:18 +0200
changeset 56958 b2c2f74d1c93
parent 47025 b2b8ae61d6ad
child 58889 5b7a9633cfa8
permissions -rw-r--r--
updated to polyml-5.5.2;

header {* Example 3.8 *}

theory Ex2
imports LCF
begin

axiomatization
  P     :: "'a => tr" and
  F     :: "'b => 'b" and
  G     :: "'a => 'a" and
  H     :: "'a => 'b => 'b" and
  K     :: "('a => 'b => 'b) => ('a => 'b => 'b)"
where
  F_strict:     "F(UU) = UU" and
  K:            "K = (%h x y. P(x) => y | F(h(G(x),y)))" and
  H:            "H = FIX(K)"

declare F_strict [simp] K [simp]

lemma example: "ALL x. F(H(x::'a,y::'b)) = H(x,F(y))"
  apply (simplesubst H)
  apply (tactic {* induct_tac @{context} "K:: ('a=>'b=>'b) => ('a=>'b=>'b)" 1 *})
  apply simp
  apply (simp split: COND_cases_iff)
  done

end