src/LCF/ex/Ex2.thy
author wenzelm
Sun Nov 02 18:21:45 2014 +0100 (2014-11-02)
changeset 58889 5b7a9633cfa8
parent 47025 b2b8ae61d6ad
child 58973 2a683fb686fd
permissions -rw-r--r--
modernized header uniformly as section;
wenzelm@58889
     1
section {* Example 3.8 *}
wenzelm@4905
     2
wenzelm@17248
     3
theory Ex2
wenzelm@17248
     4
imports LCF
wenzelm@17248
     5
begin
wenzelm@4905
     6
wenzelm@47025
     7
axiomatization
wenzelm@47025
     8
  P     :: "'a => tr" and
wenzelm@47025
     9
  F     :: "'b => 'b" and
wenzelm@47025
    10
  G     :: "'a => 'a" and
wenzelm@47025
    11
  H     :: "'a => 'b => 'b" and
wenzelm@17248
    12
  K     :: "('a => 'b => 'b) => ('a => 'b => 'b)"
wenzelm@47025
    13
where
wenzelm@47025
    14
  F_strict:     "F(UU) = UU" and
wenzelm@47025
    15
  K:            "K = (%h x y. P(x) => y | F(h(G(x),y)))" and
wenzelm@17248
    16
  H:            "H = FIX(K)"
wenzelm@17248
    17
wenzelm@19755
    18
declare F_strict [simp] K [simp]
wenzelm@19755
    19
wenzelm@19755
    20
lemma example: "ALL x. F(H(x::'a,y::'b)) = H(x,F(y))"
wenzelm@19755
    21
  apply (simplesubst H)
wenzelm@27208
    22
  apply (tactic {* induct_tac @{context} "K:: ('a=>'b=>'b) => ('a=>'b=>'b)" 1 *})
wenzelm@47025
    23
  apply simp
wenzelm@47025
    24
  apply (simp split: COND_cases_iff)
wenzelm@19755
    25
  done
wenzelm@4905
    26
wenzelm@4905
    27
end