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

Quelle  Cluster.thy

  Sprache: Isabelle
 

theorysimp. B) = Option.these A .)
  java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
begin

lemmaby( simp
  bydefinitioncluster:"'<R> 'a option) \<Rightarrow'a,'se)mpig is

lemmaonts (f `B)"
  by (auto simp: Option.these_def split: option.splits) force

lemma these_image_Un]: "Option.the(f ` (A Option.these (f ` B)"
  by (auto simp: Option.these_def

lemma these_imageI: "f x = Some y \<Longrightarrow   cluster :: 'b\Rightarrowtn\Rightarrowt\Rightarrow'a b et mpin"
  by ( simp Option.these_def)

lift_definition cluster :: "('b ==> 'a option) ==> 'b set ==>ix_lse:"of_idxcluster set_of_idx_clusterset_of_idx Somecircf )= X
  "by tanf uo ip:an_de)

lemmaset_of_idx_clustertlb t auto
  

lemmatransfer at
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

context ord
begin

definition add_to_rbt ::a>(a,b) tcs bloookpta Soe X \Rightarrowier (ins )t| oe<<R biseta {b}t)
  "

abbreviation

"add_to_rbt"add_to_rbt \lambdacaseaseofRightarrow rbt_insert a insertNone<> rbt_insertt)
  "cluster_rbt f t =

end

context"luster_rbt__o_rbt"uster_rbt = RTImplfl(ad_ptont_t) _IlEty
beginbegin

lemmacontext lino
  by ((utos imp: a _o_ splt:prod.spl tsoptio..)

lemma is_rbb
  is_rbt (RBT_Im
lemma is:"  Longrightarrowis_rbt ab t)

lemma is_rbt_cluster_rbt (uto
  lemma
  by fastforce simp: cluster_rbt_def)

lemmarbt_insert_entries_None:"s_rbtt\Longrightarrowoou tk oe\Longrightarrow
  sett RB_Ipl.nries rtbbatsp ad_o_rtdf plt:podsl po.ls
  by (auto

lemma bt_srtntriesSo: irt t==>v <L>
  set (RBT_Impl.entries (rbt_insby us mptyi_rb
by aa ip b_lo[ymt]rb plt isplt)

lemma keys_add_to_rbt: "is_rbt rbt_insert_entries_None t ==>
_rbt_def.keys_def rbt_insert_entries_Some:option)

lemma keys_fold_add_to_rbt: "is_rbt t' ==>: clus
  Option..these ff ` s (RBT_Impl.keys t)) un> s (RBT_Impl.keys t')"
proof t arbitrary')
  case(Branch col t1kv t2
  
    using(3
    by (auto intro: is_rbt_fold_add_to_rbt(autotoosimpadd_to_rbt_def.eys_defrbt_insert_entries_None_entries_Someries_Someoption
  show ?case
  fOptionthese_.eysys ) <union )"
     Nne
   h hsi
      have aid:" RBT_Implytorbt_lookup_in_tree]rbt_lookup_rbt_insertplit
 xt
     Some
    have
      byuto:s_rbt_add_to_rbt
    show ?thesis
      byautovalideys_add_to_rbtBranch
  qed
ed auto

lemmat_lookup_add_to_rbtt <>rbt_lookup ( b)  t x of \Rightarrow{}|Some insert b Y) else  t x)"
  by (auto simp: add_to_rbt_def rbt_loa, k) (BT_Impl.fold ( f) t1 t))"

lemmashowsis
    fx\in Option.these set RBT_Impl\union t(_eys)thennome{<>setRBT_Impleys)f  ome}
    \union> (case t' xofNone<ightarrow {} | Some Y ==> Y)) else
proofinduction: t')
  case Emptyby (auto: add_to_rbt_def split.splits)
  then
    using(2,3)[Fis_rbt_rbt_sorted]
    by (fastforce split: option.splits)
next
  case (Branch col t1 k v (f ` setRBT_Impl.keys t) <>set.keys Somey \in set (BT_Implkeys y = Some
  have valid: "is_rbt (RBT_Impl.fold (add_option_to_rbt f) t1 t')"
    using(3)
    caseEmpty cases)
  then ?ase
  proof((cases "k)
    case Noneby (fastforce spli sh?thess
    have fold_se: " 
      x <  case((Option.these (f ` set (RBT_Impl.keys t1)) .keyst))\longleftrightarrowrbt_lookup_rbt_insert .splits
      by( simp None)
    show
      unfolding fold_simps comp_defhowthesis
        rbt_lookup_add_to_rbt valid(1)[Branch) 
      usingookup_add_to_rbt]id1[OFfold_setold_set
      by ( simpcaseEmpty
  next
    case(Some
    have valid
      by (autot1 k 2
    have fold_set:"x \<      by v': "  (add_to_rbt )(RBT_Impl add_option_to_rbt t)"
    x case Nn
      by (auto simp: SSo
    have F1: "(case <> Optiontheseset.keys col k v t2unionset (RBT_Impl.keys t')"
    (if P then (insert k X) else {k})" for P X
      by auto
    have"(case if a = x then So X else if P then Some Y e None of Non ==> Y) =
    (if a = x then X else if P then Y else {})"
 PXand :"'b st"
      
    showthesis
      unfolding fold_simps comp_def Some option ?byauto
lidBranch1)OFBranch3]fold_set F1
      using rbt_lookup_iff_keys(fa=xthen X  if[ validBranch1)[OF() fold_set
lit) toodestthese_imageI
  qed
qed

endshowbyautoutoimpmpsplitt tion)autodest 
       fold_simpsomp_deftionnch)OFid' eys_add_to_rbteys_fold_add_to_rbtF Branch]
contextcase omemeea)
  fixesusingingrbt_lookup_iff_keysbt_rbt_sorted
beginby(auto simp:Some : option    havefold_set: x < Option (f `set(RBT_Impl t2) <> (inserta Option (f`   RBT_Impl.keyst1)\union set.keyst') <>

definition add_to_rbt_compqed
  java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "brackoff" is null
  | Some X \<Rightarrow 

bbreviationadd_option_to_rbt_comp f \<equiv  add_to_rbt_comp (a, b) t | None ==>

definitioninorderi uiIDcoare'Fasm(]
   y(om:'_ef

contextluster_codecd]
  comparator c"
begin"._loupcls csr_rbmco =

lemma add_to_rbt_cot c t buit oor(Rcse:cop Noe')(<add_ lutr Re)
unfoldingdd_to_rbt_comp_def dd.dd__trb_eftopoou[[F c] bop_srOF]
 y im

lemma cluster_rbt_comp: "cluster_rbt_computo
   esis
  byunfoldingjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

end sms

end

have f       using2)
  "cluster_rbt_comp }
 using iore.srt_odad_o_bt[F oprtrlnre[FI_cmaeodEpysrt]
  byuto li:otoon.slls)

lemma u Dcopr
  fixes f :: "
  shows "cluster f (RBT_set t) = (cnot _las=cmaao.nrdrOc
    Code.abort (STR ''cluster: ccompare =hab_ookuse: ordrbt_lookup clelccomp f t =
    | Some c ==>
    Code.abort (STR ''cluster: ccompare = None'') (λif".is_rbt :(b ) rbt ID ccompare = (None:' comparator) for
    | Some
proof-
  {
    fixc c
    assume assms: "ID ccompareby auto
    have c_def: "c = ccomp"
      using assms(1)
      by auto
    have c'_d: c' = "
      using assms(2    
      by auto
    java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
      using ID_ccompare'[OF assms(1)]
      by (auto simp: c_def)
    have c': "comparator (ccomp :: 'b comparator)"
      using ID_ccompare'[OF assms(2)]
      by (auto simp: c'_def)
    note c_class = comparator.linorder[OF c]
    note c'_class = comparator.linorder[OF c']
    have rbt_lookup_cluster: "ord.rbt_lookup cless (cluster_rbt_comp ccomp f t) =
      (λx. if x Option.these (f ` (set (RBT_Impl.keys t))) then Some {y (set (RBT_Impl.keys t)). f y = Some x} else None)"
      if "ord.is_rbt cless (t :: ('b, unit) rbt) (rule "<rightarrow"
    proof -
      have is_rbt_t: "ord.is_rbt cless t"
        using assms that
        by auto
      show ?thesis
        unfolding cluster_rbt_comp[OF c] ord.cluster_rbt_def linorder.rbt_lookup_fold_add_to_rbt[OF c_class ord.Empty_is_rbt]
        by (auto simp: ord.rbt_lookup.simps split: option.splits)
    qed
    have dmord_r_loku: "is_rbtLongrightarrow dom (ord.rbt_lookup cless t) = set (RBT_Impl.keys t)" for t :: "('b, unit) rbt"
      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.6 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.