equal
deleted
inserted
replaced
100 |
100 |
101 abbreviation not_equal :: \<open>['a, 'a] \<Rightarrow> o\<close> (infixl \<open>\<noteq>\<close> 50) |
101 abbreviation not_equal :: \<open>['a, 'a] \<Rightarrow> o\<close> (infixl \<open>\<noteq>\<close> 50) |
102 where \<open>x \<noteq> y \<equiv> \<not> (x = y)\<close> |
102 where \<open>x \<noteq> y \<equiv> \<not> (x = y)\<close> |
103 |
103 |
104 syntax "_Uniq" :: "pttrn \<Rightarrow> o \<Rightarrow> o" ("(2\<exists>\<^sub>\<le>\<^sub>1 _./ _)" [0, 10] 10) |
104 syntax "_Uniq" :: "pttrn \<Rightarrow> o \<Rightarrow> o" ("(2\<exists>\<^sub>\<le>\<^sub>1 _./ _)" [0, 10] 10) |
|
105 syntax_consts "_Uniq" \<rightleftharpoons> Uniq |
105 translations "\<exists>\<^sub>\<le>\<^sub>1x. P" \<rightleftharpoons> "CONST Uniq (\<lambda>x. P)" |
106 translations "\<exists>\<^sub>\<le>\<^sub>1x. P" \<rightleftharpoons> "CONST Uniq (\<lambda>x. P)" |
106 syntax_consts "_Uniq" \<rightleftharpoons> Uniq |
|
107 |
107 |
108 print_translation \<open> |
108 print_translation \<open> |
109 [Syntax_Trans.preserve_binder_abs_tr' \<^const_syntax>\<open>Uniq\<close> \<^syntax_const>\<open>_Uniq\<close>] |
109 [Syntax_Trans.preserve_binder_abs_tr' \<^const_syntax>\<open>Uniq\<close> \<^syntax_const>\<open>_Uniq\<close>] |
110 \<close> \<comment> \<open>to avoid eta-contraction of body\<close> |
110 \<close> \<comment> \<open>to avoid eta-contraction of body\<close> |
111 |
111 |
745 syntax |
745 syntax |
746 "_bind" :: \<open>[pttrn, 'a] => letbind\<close> (\<open>(2_ =/ _)\<close> 10) |
746 "_bind" :: \<open>[pttrn, 'a] => letbind\<close> (\<open>(2_ =/ _)\<close> 10) |
747 "" :: \<open>letbind => letbinds\<close> (\<open>_\<close>) |
747 "" :: \<open>letbind => letbinds\<close> (\<open>_\<close>) |
748 "_binds" :: \<open>[letbind, letbinds] => letbinds\<close> (\<open>_;/ _\<close>) |
748 "_binds" :: \<open>[letbind, letbinds] => letbinds\<close> (\<open>_;/ _\<close>) |
749 "_Let" :: \<open>[letbinds, 'a] => 'a\<close> (\<open>(let (_)/ in (_))\<close> 10) |
749 "_Let" :: \<open>[letbinds, 'a] => 'a\<close> (\<open>(let (_)/ in (_))\<close> 10) |
|
750 syntax_consts "_Let" \<rightleftharpoons> Let |
750 translations |
751 translations |
751 "_Let(_binds(b, bs), e)" == "_Let(b, _Let(bs, e))" |
752 "_Let(_binds(b, bs), e)" == "_Let(b, _Let(bs, e))" |
752 "let x = a in e" == "CONST Let(a, \<lambda>x. e)" |
753 "let x = a in e" == "CONST Let(a, \<lambda>x. e)" |
753 syntax_consts "_Let" \<rightleftharpoons> Let |
|
754 |
754 |
755 lemma LetI: |
755 lemma LetI: |
756 assumes \<open>\<And>x. x = t \<Longrightarrow> P(u(x))\<close> |
756 assumes \<open>\<And>x. x = t \<Longrightarrow> P(u(x))\<close> |
757 shows \<open>P(let x = t in u(x))\<close> |
757 shows \<open>P(let x = t in u(x))\<close> |
758 unfolding Let_def |
758 unfolding Let_def |