src/HOL/Bali/Term.thy
changeset 13690 ac335b2f4a39
parent 13688 a0b16d42d489
child 14981 e73f8140af78
equal deleted inserted replaced
13689:3d4ad560b2ff 13690:ac335b2f4a39
   381 lemma var_elist_inj_term [iff]: "\<langle>t::var\<rangle> \<noteq> \<langle>w::expr list\<rangle>"
   381 lemma var_elist_inj_term [iff]: "\<langle>t::var\<rangle> \<noteq> \<langle>w::expr list\<rangle>"
   382   by (simp add: inj_term_simps)
   382   by (simp add: inj_term_simps)
   383 lemma elist_var_inj_term [iff]: "\<langle>t::expr list\<rangle> \<noteq> \<langle>w::var\<rangle>"
   383 lemma elist_var_inj_term [iff]: "\<langle>t::expr list\<rangle> \<noteq> \<langle>w::var\<rangle>"
   384   by (simp add: inj_term_simps)
   384   by (simp add: inj_term_simps)
   385 
   385 
       
   386 lemma term_cases: "
       
   387   \<lbrakk>\<And> v. P \<langle>v\<rangle>\<^sub>v; \<And> e. P \<langle>e\<rangle>\<^sub>e;\<And> c. P \<langle>c\<rangle>\<^sub>s;\<And> l. P \<langle>l\<rangle>\<^sub>l\<rbrakk>
       
   388   \<Longrightarrow> P t"
       
   389   apply (cases t)
       
   390   apply (case_tac a)
       
   391   apply auto
       
   392   done
       
   393 
   386 section {* Evaluation of unary operations *}
   394 section {* Evaluation of unary operations *}
   387 consts eval_unop :: "unop \<Rightarrow> val \<Rightarrow> val"
   395 consts eval_unop :: "unop \<Rightarrow> val \<Rightarrow> val"
   388 primrec
   396 primrec
   389 "eval_unop UPlus   v = Intg (the_Intg v)"
   397 "eval_unop UPlus   v = Intg (the_Intg v)"
   390 "eval_unop UMinus  v = Intg (- (the_Intg v))"
   398 "eval_unop UMinus  v = Intg (- (the_Intg v))"