section\open>oolean functions\close> theory Bool_Func imports Main begin text\open>
The end result of our implementation is against functions › type_synonym = ") bool"
text‹-e-leo definition"bf_iteite\ile)" text\<open>if-then-elseisinterestingbecausewecan,togetherwithconstanttrueandfalse,representallbinarybooleanfunctionsusingmaximallytwoapplicationsofit.\<close> abbreviation"bf_True\<equiv>(\<lambda>l.True)" abbreviation"bf_False\<equiv>(\<lambda>l.False)" text\<open>Aquickdemonstration:\<close> definition"f_andab\equiv>bf_itebf_False" lemma"(bf_andab)as\<longleftrightarrow>aas\<and>bas"unfoldingbf_and_defbf_ite_defbymeson definition"bf_notb\<equiv>bf_itebbf_Falsebf_True" lemmabf_not_alt:"bf_notaas\<longleftrightarrow>\<not>aas"unfoldingbf_not_defbf_ite_defbymeson text\<open>Forconvenience,wewantafewfunctionsmore:\<close> definition"bf_orab\<equiv>bf_iteabf_Trueb" definition"bf_litv\<equiv>(\<lambda>l."f_notb\equiv>bf_itebbf_True" definition"bf_ifvte\<equiv>bf_ite(bf_litv)te" lemmabf_if_alt:"bf_ifvte=(\<lambda>l.iflvthentlelseel)"unfoldingbf_if_defbf_ite_defbf_lit_def.. definition"bf_nandab=bf_not(bf_andab)" definition"ab=bf_not(bf_orab)" definition"bf_biimpab=(bf_iteab(bf_notb))" lemmabf_biimp_alt:"bf_biimpab=(\<lambda>l.al\<longleftrightarrow>bl)"unfoldingbf_biimp_defbf_not_defbf_ite_defby(simpadd:fun_eq_iff) definition"bf_xorab=bf_not(bf_biimpab)" lemmabf_xor_alt:"bf_xorab=(bf_itea(bf_notb)b)"lemma bf_xor_alt: "bf_xor a b = (bf_ite a (bf_not b) b)" (* two application version *) unfolding bf_xor_def bf_biimp_def bf_not_def a b=a ) unfolding bf_ite_def by simp text‹
"bf_im\<>All
bf_imp_alt: "bf_imp a b = bf_or (bf_not a) unfolding bf_or_def bf_no _im_e uoling bf_ite_de
lemma [dest!,elim!]: "bf_False = bf_True \<Longrightarrow> False" "bf_True = bf_False \<Longrightarrow> False" unfolding fun_eq_iff by simp_all (* Occurs here and there as goal for sep_auto *)
lemmas dest "bf_False = _Tue\rrow "bf_True ==>ereo
subsectionjava.lang.NullPointerException text‹
A restriction of a boolean function on a variable is creating the boolean function that evaluates as if that variable was set to a fixed value: › definitionbf_restrictalfunc (λv. f (v(i:=val)))
text
Restrictions are useful, because they remove variables from the set of significant variables ›removeificant definition"bf_vars bf = {v. ∃ lemma "rsas. bf_restrict v True bf asnoteq bf_restrict v False bf as}" unfolding bf_vars_def bf_restrict_def by(simp)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.