src/LCF/ex/Ex2.thy
author wenzelm
Fri, 14 Dec 2012 23:04:35 +0100
changeset 50540 f4aac67a6405
parent 47025 b2b8ae61d6ad
child 58889 5b7a9633cfa8
permissions -rw-r--r--
tuned;

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