Nominal/Ex/TypeVarsTest.thy
author Christian Urban <urbanc@in.tum.de>
Wed, 22 Dec 2010 09:13:25 +0000
changeset 2617 e44551d067e6
parent 2571 f0252365936c
child 2622 e6e6a3da81aa
permissions -rw-r--r--
properly exported strong exhaust theorem; cleaned up some examples

theory TypeVarsTest
imports "../Nominal2" 
begin

(* a nominal datatype with type variables and sorts *)


(* the sort constraints need to be attached to the  *)
(* first occurence of the type variables on the     *)
(* left-hand side                                   *)

atom_decl name

class s1
class s2

instance nat :: s1 ..
instance int :: s2 .. 

nominal_datatype ('a, 'b, 'c) lam =
  Var "name"
| App "('a::s1, 'b::s2, 'c::at) lam" "('a, 'b, 'c) lam"
| Lam x::"name" l::"('a, 'b, 'c) lam"  bind x in l
| Foo "'a" "'b"
| Bar x::"'c" l::"('a, 'b, 'c) lam"  bind x in l

term Foo
term Bar

thm lam.distinct
thm lam.induct
thm lam.exhaust 
thm lam.strong_exhaust
thm lam.fv_defs
thm lam.bn_defs
thm lam.perm_simps
thm lam.eq_iff
thm lam.fv_bn_eqvt
thm lam.size_eqvt


end