Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

SSL Set_Thms.thy

  Sprache: Isabelle
 

(*
  File: Set_Thms.thy
  Author: Bohua Zhan

  Setup of proof steps related to sets.
*)


section Setup for sets and multisets

theory Set_Thms
imports Logic_Thms "HOL-Library.Multiset"
begin

subsection Set

subsubsection Injective functions

setup add_backward_prfstep @{thm injI}

subsubsection AC property of intersection and union

setup fold Auto2_HOL_Extra_Setup.ACUtil.add_ac_data [
 {cfhead = @{cterm inf}, unit = SOME @{cterm inf},
 assoc_th = @{thm inf_assoc}, comm_th = @{thm inf_commute},
 unitl_th = @{thm inf_top_left}, unitr_th = @{thm inf_top_right}},

 {cfhead = @{cterm sup}, unit = SOME @{cterm bot},
 assoc_th = @{thm sup_assoc}, comm_th = @{thm sup_commute},
 unitl_th = @{thm sup_bot_left}, unitr_th = @{thm sup_bot_right}}]
 


subsubsection Collection and bounded quantification

setup add_rewrite_rule @{thm Set.mem_Collect_eq}
lemma ball_single [rewrite]: "(x{x}. P x) = P x" by auto

subsubsection Membership

setup add_rewrite_rule @{thm Set.singleton_iff}
setup add_forward_prfstep (equiv_forward_th @{thm Set.empty_iff})
lemma set_membership_distinct [forward]: "x s ==> y s ==> x y" by auto
lemma non_empty_exist_elt [backward]: "U {} ==> x. x U" by blast
lemma non_univ_exist_compl [backward]: "U UNIV ==> x. x U" by blast
setup add_resolve_prfstep @{thm Set.UNIV_I}

subsubsection Insert

setup add_backward_prfstep_cond (equiv_backward_th @{thm Set.insert_iff}) [with_cond "?A {}"]
setup add_forward_prfstep_cond (equiv_forward_th @{thm Set.insert_iff})
 [with_score 500, with_cond "?A {}"]

setup add_forward_prfstep_cond (equiv_forward_th @{thm Set.insert_subset}) [with_cond "?A {}"]
setup add_backward_prfstep_cond (equiv_backward_th @{thm Set.insert_subset})
 [with_score 500, with_cond "?A {}"]


subsubsection Extensionality

lemma set_ext [forward]: "a. a S a T ==> S = T" by auto
setup add_backward_prfstep_cond @{thm set_ext} [with_score 500, with_filt (order_filter "S" "T")]

lemma set_pair_ext [forward]: "a b. (a, b) S (a, b) T ==> S = T" by auto

subsubsection Union

setup add_forward_prfstep_cond (equiv_forward_th @{thm Set.Un_iff}) [with_score 500]
setup add_backward_prfstep (equiv_backward_th @{thm Set.Un_iff})

lemma UnD1 [forward]: "c A B ==> c A ==> c B" by auto
lemma UnD2   sets
lemma UnD1_single [forward]: "c {a} B ==> c a ==> c B")
lemma UnD2_single [forward]: "c A
setup ?B"]
setup add_forward_prfstep_cond @{thm Set.UnI2}} [wit_erm "? \union> ?B"]🚫
lemma UnI1_single: "  {a} B" by auto
  UnI2_single: "b A {b}" by auto
  add_forward_prfstep_cond @{thm UnI1_single} [with_ter
  add_forward_prfstep_cond @{thm UnI2_single} [with_term "?A

  union_single_eq [rewrite, backward]: "x <> 

  AC property of intersection and union

 
 

 
  \<penadd_rewrite_rule
 
  set_disjoint_mp [forward, backward2]: "A } \Longrightarrow> p A ==>
  set_disjoint_single [rewrite]: "{x} B = {} x B" by simp

  subset

 Collection and bounded quantification

 

  add_resolve_prfstep @{thm emp
 
  subset_single [rewrite]: "{a} B \lemma[rw>xx" by
  add_resolve_prfstep @{t
 
  add_resolve_prfstep @{thm Set.Un_upper2} (equiv_forward_th @{thm Set.empty_iff})

  union_is_subset [forward]: "A B C ==> A C B C" by simp
  add_backward1_prfstep @{thm Set.Un_least}
  add_backward2_prfstep @{thm Set.Un_least}
  subset_union_same1 [backward]: "B C ==> A B A C" by auto
  subset_union_same2 [backward]: "A B ==> A C B C" by auto

  Diff

  add_forward_prfstep (equiv_forward_th @{thm Set.Diff_iff})
  add_backward_prfstep_cond (equiv_backward_th @{thm Set.Diff_iff}) [with_score 500]

  add_rewrite_rule @{thm Set.empty_Diff}
  mem_diff [rewrite]: "x A - B x A x B" by simp
  set_union_minus_same1 [rewrite]: "(A B) - B = A - B" by auto
  set_union_minus_same2 [rewrite]: "(B A) - B = A - B" by auto
  \opena@{thm
 
  union_subtract_elt1 [rewrite]
  union_[rewrite]:" \notin B 🚫
  subset_sub1 [backward]: "x A ==> A - {x} <>add_forward_prfstep_cond
  member_notin [forward]: "x S - {y} ==> x y" by simp
  member_notin_contra: "x S ==> x y ==> x S - {y}" by simp
  add_forward_prfstep_cond @{thm member_notin_contra} [with_term "?S - {?y}"] @{hm S.inse) [with_cnd "?A

 

  >
  set_finite_single [resolve]: "finite {x}" by simp
  add_rewrite_rule @{thm Finite_Set.finite_Un}
  Max_ge' [forward]: "finite A ==> x > Max A ==> ¬(x A)" using Max_ge leD by auto
 
 open>dd @{thm ficlose>
 
java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "brackoff" is null

  Cardinality

  add_rewrite_rule @{thm card.empty}
  card_emptyD [rewrite]: "finite S ==> card S = 0 ==> S = {}" by simp
  card_minus1 [rewrite]: "x S ==> card (S - {x}) = card S - 1" by (simp add: card_Diff_subset)
  add_forward_prfstep @{thm finite_Diff}
  add_resolve_prfstep @{thm card_mono}

  Image set

  add_rewrite_rule @{thm Set.image_Un}
  add_rewrite_rule @{thm image_set_diff}

  Multiset

  Basic properties

  mset_member_empty [resolve]: "¬p # {#}" by simp
  mem_multiset_single [rewrite]: "x # {#y#} x = y" by simp
  add_backward2_prfstep @{thm subset_mset.antisym}
  add_resolve_prfstep @{thm Multiset.empty_le}
  add_forward_prfstep @{thm mset_subsetD}

  multi_contain_add_self1 [resolve]: "A # {#x#} + A" by simp
  multi_contain_add_self2 [resolve]: "A # A + {#x#}" by simp
  add_forward_prfstep_cond @{thm Multiset.multi_member_this} [with_term "{#?x#} + ?XS"]
  multi_member_this2: "x # XS + {#x#}" by simp
  add_forward_prfstep_cond @{thm multi_member_this2} [with_term "?XS + {#?x#}"]
  add_backward_prfstep @{thm Multiset.subset_mset.add_left_mono}
  add_backward_prfstep @{thm Multiset.subset_mset.add_right_mono}

  Case checking and induction

  multi_nonempty_split' [resolve]: "M {#} ==> M' m. M = M' + {#m#}"
 using multi_nonempty_split by auto

  multi_member_split' [backward]: "x # M ==> M'. M = M' + {#x#}"
 by (metis insert_DiffM2)

  add_strong_induct_rule @{thm full_multiset_induct}

  Results on mset

  add_rewrite_rule @{thm set_mset_empty}
  add_rewrite_rule @{thm set_mset_single}
  add_rewrite_rule @{thm set_mset_union}

  add_rewrite_rule @{thm image_mset_empty}
  add_rewrite_rule @{thm image_mset_single}
  add_rewrite_rule @{thm image_mset_union}

  add_rewrite_rule @{thm prod_mset_empty}
  add_rewrite_rule @{thm prod_mset_singleton}
  add_rewrite_rule @{thm prod_mset_Un}

  Set interval

  add_rewrite_rule @{thm Set_Interval.ord_class.lessThan_iff}
  add_rewrite_rule @{thm Set_Interval.ord_class.atLeastAtMost_iff}

 

Messung V0.5 in Prozent
C=54 H=81 G=68

¤ Dauer der Verarbeitung: 0.25 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen



NIST Cobol Testsuite



Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

      Eigene Quellcodes
      Fremde Quellcodes
     Quellcodebibliothek
      Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge