src/LCF/ex/Ex1.thy
author wenzelm
Sat, 07 Apr 2012 16:41:59 +0200
changeset 47389 e8552cba702d
parent 47025 b2b8ae61d6ad
child 58889 5b7a9633cfa8
permissions -rw-r--r--
explicit checks stable_finished_theory/stable_command allow parallel asynchronous command transactions; tuned;

header {*  Section 10.4 *}

theory Ex1
imports LCF
begin

axiomatization
  P     :: "'a => tr" and
  G     :: "'a => 'a" and
  H     :: "'a => 'a" and
  K     :: "('a => 'a) => ('a => 'a)"
where
  P_strict:     "P(UU) = UU" and
  K:            "K = (%h x. P(x) => x | h(h(G(x))))" and
  H:            "H = FIX(K)"


declare P_strict [simp] K [simp]

lemma H_unfold: "H = K(H)"
  apply (simplesubst H)
  apply (rule FIX_eq [symmetric])
  done

lemma H_strict [simp]: "H(UU)=UU"
  apply (simplesubst H_unfold)
  apply simp
  done

lemma H_idemp_lemma: "ALL x. H(FIX(K,x)) = FIX(K,x)"
  apply (tactic {* induct_tac @{context} "K" 1 *})
  apply simp
  apply (simp split: COND_cases_iff)
  apply (intro strip)
  apply (subst H_unfold)
  apply simp
  done

lemma H_idemp: "ALL x. H(H(x)) = H(x)"
  apply (rule H_idemp_lemma [folded H])
  done

end