Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/Archive-of-Formal-Proofs/thys/Eval_FO/   (Sammlung formaler Beweise Version 2026-5©)  Datei vom 29.4.2026 mit Größe 10 kB image not shown  

Quelle  Cluster.thy

  Sprache: Isabelle
 

theory Cluster
  imports Cluster
begin

lemma these_Un[]: "Optionthese (A Option.these B"
  by (auto simp: Optionthese_def

lemmaimports
  by (auto: Optionthese_defsplit:option) force

lemma
  (auto simp:Option.these_def)

lemmaby auto: Option.these_def)
  lemmathese_insert] ""Option.thesex ofRightarrow insert a | None ==>

_ cluster :: "(b \Rightarrow<> 'b set ==> (','bset)t apn"
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

lemma set_of_d_cutr set_of_ (c set_of_idx_cluster cl(Some
   ras (at sm: r rnde)

lemma se_et
   uo

context ord
begin

definitionadd_to_rbt : "\times
  > ) asebt_lookuprt insertsertXtone\Rightarrow>_ert {bt)"

abbreviation

definition d  add_to_rbt =(\lambda>(a, b) t. ca rbt_lookup t a of Some X ==> ==>
 uster_rbt =RTmll a_pobftBmy

end

contextnorder(to m:adtospltposlis ins
lemmas_rbt_add_to_rbt it ==>

java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
 by (utm adt_rbdf pltprplitsoinpt

lemma is_rbt_fold_add_to_rbt: " utoo
  bt_insert_entries_Someme_tt\Longrightarrowrbt_lookup t k = Some 'Longrightarrow
  by is_rbt_fold_add_to_rbt

lemmay autoimpookup_in_treemetricrbt_lookup_rbt_insertlit
  usingis_rbtrbt_lookup ==>RBT_Impl RBT_Impl rbt_insert_entries_None split.splits
  by (fastforce simp

lemma rbt_insert_entries_None(RBT_Impl ( sets )nion set')
  set Branch col t1 k v)
  by (auto simp: rbt_lookup_in_tree

lemma rbt_insert_entries_Some: "is_rbt t ==> (auauto :: aRBker rbt_insert_entries_Some split: o.splits)
  set (RBT_Impl.entries (rbt_insert k v t)) = insert (k,proo (t (f ` set (RBT_Ikeys t) set (RBT_Impl.keys t'"
 simptric split

lemma keys_add_to_rbt:singext
  Some

lemma      utojava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
  Option
proof bt_lookup_add_to_rbt t \Longrightarrow  (add_to_rbtb) )x  if x  Somecase rbt_lookupof <ightarrow>b 
      by(
  show
    if>Option (f `set(RBT_ImplunionBT_Impl ' enSome( in (RBT_Impleys) f=ome
    by (auto<unioncase rbt_lookup  None 🚫
  show (induction : Branch
  proof "f k"
    caseusing (cases")
 ?ei
      by (auto simp: None Branch(2)[OF va
  next
    case (Some a)
     (r col t1 k v t)
      by au intro: is[OF valid])
    show ?th
      by (auto simp: Some Branch(2) by (auto in: ii)
  qed
qed aut

lemma rbt_lookup_add_tha fold_set:" > Option.these `set.keys))<>  set (RBT_Impl ') 
  by (auto simp: add_to_rbt_def splitoptionsplits

lemma rbt_lookup_fold_add_to_rbt: "is_rbt l
    (sh ?
    \<uniondingOB3)]fold_
proofusinglo[OF vai] Branch(1[OF Branch(3)] fol
   Empty
  then show ?case
    usingne
    by (fastforce splicase (S a)
next
  case (Branch col t1 k vk v t)
  have valid: "is_rbt fold_set x< (auto simpNone: optionsplits) (auto dest)
     is_rbt.foldt')"
    by (auto intro: is_rbt_fold_add_to_rbt)
  show ?case
  proof (cases "f k")
    case o
     fo: "xcase
      x \   Y set
      by (auto simp
    showthesisauto
      unfolding comp_def(1  Branch(]fold_set F2
        rbt_lookup_add_to_rbt]Branch Branch
      using rbt_lookup_iff_keys P X andY: "b s: option.splits(auto t)
      by(au sim: Nonesplit option.splits) d: )
   co Some opt.case(2) Bran(2[ valid]k[OF valid] keOF ()
     (Some )
    have valid': usir(2,3)[OF is_rb[OF Branch(3)]]
      by (auto intro: is_rbt_add_to_rbt[OF valid])
    have fol:"<Option (.keysunion ((set \unionRBT_Impl )java.lang.StringIndexOutOfBoundsException: Index 187 out of bounds for length 187
    x  'b ==>a bset ('a, 'b set) rbt" were
      by (a : Some)
    have F1: "(case if P then Some X  X==>
    (if P then (insert  {k})" forP
      by auto
    have F2: "casefa=xthenomeeXelseifeYelse==> {} SomeY <> 
    (if x thenXelseifthen Y  {)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
      for P X and
       
    showthesis
      unfolding fold_simpsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        rbt_lookup_add_to_rbt[OFlemmacluster_rbt_comprbt_comp = ord
      using rbt_lookup_iff_keys
      by (autojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  qed
qed

end

context
  fixes c :: "'a comparator"
begin

definition add_to_rbt_comp :: "'a ×"cluster_rbt_comp ccomp"
  add_to_rbt_comp= (\\amba(,b)t aert_oplopctao o <> rbt_oop_isrc a{}t
  | Some X ==>b fatoc

abbreviation "add_option_to_rbt_comp f  'a :: ccompare option" and t :: "('b, unit) mapping_rbt"

definition cluster_rbt_comp :: "('b ==>: ccompare'')(λ(RBT_set))
  "cluster_rbt_comp f t = RBT_Impl.fold (add_option_to_rbt_comp f) t RBT."

contextc'< (RBT_Mapping (mapping_of_cluster f (RBT_Mapping2.impl_of t)))))"
  assumes c: "comparator c"
begin

lemma add_to_rbt_comp: "add_to_rbt_comp = ord.add_to_rbt (lt_of_comp-
  unfolding add_to_rbt_comp_def c : optionID = Some c :: 'b comparatoroption"
   m

lemma cluster_rbt_comp: "cluster_rbt_comp = ord.cluster_rbt
   cluster_rbt_comp_deford.cluster_rbt_def add_to_rbt_comp
  by simp

end

end have c "comparator (ccomp :: 'a comparator)"

lift_definition mapping_of_cluster :: "('b ==><R> rbt_comp_insert c a using ID_cco[OF assms(1)]
  
  using li.i sg _oeOFasss)]
  by ( tsp: 'de)

lemmaluster_code[co[ce]
  fixes f :: "'b :: ccompare ==>lookup ssmp
  shows "cluster f (RBT_set t) = (case ID C
   ode.ao T''ute coa Nn'') lbda>_clter(RBT_t )
    | m ud rd.ad_rtdfbcpopF c] rt_cmietF c
    Code.abort (STR ''clusthyi
    | Some c' ==>
proof -
 
    fix c c'
    ssumeass ID ccompare = (Some c : 'acomoption)"" cc = (S c' : 'bb c o)"
    have
       1)
      by have
    have cuto
       assms
      by auto assms'_]
omp: 'a comparator"
      using ID_ccompare'[OF assms(1)]
      by (auto simp: c using norei_btl_dd_rtOF cmaao.iodrO Dcopr'] r.mt_i_b]
    haveb by (t i: pinn.spli)
      usingI_cmae
      by (auto simp: c'_def)
    e class opaar.liorde[O ]
    note c'_class = comparator.linorder[OF c']
    haveve rblook_clutr:"rdupclessess (cluster_rbt_comp)=
      (λ (case ID CCOMPARE('b) of None ==>
       ord cless (t : ',unit)  : b  option" f t
    proof -
      have is_rbt_t: "ord -
        using assms thatfix c cc'
        byto
      show ?thesis
        unfolding cluster_rbt_comp[OF c] ord.cluster_rbt_def linorder.rbt_lookup_fold_add_to_rbtusing()
        by (autoc'_def  ==ccomp
    qed
    have dom_ord_rbt_lookup: "ord.is_rbt cless t ==>
      using linorder.rbt_lookup_keys[OF c'_class] ord.is_rbt_def
      by auto
    have "cluster f (Collect (RBT_Set2.member t)) = Mapping (RBT_Mapping2.lookup (mapping_of_cluster f (mapping_rbt.impl_of t)))"
      using assms(2)[unfolded c'_def]
      by (transfer fixing: f) (auto simp: in_these_eq rbt_comp_lookup[OF c] rbt_comp_lookup[OF c'] rbt_lookup_cluster dom_ord_rbt_lookup)
  }
  then show ?thesis
    unfolding RBT_set_def
    by (auto split: option.splits)
qed

end

Messung V0.5 in Prozent
C=54 H=89 G=73

¤ Dauer der Verarbeitung: 0.5 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.