Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/HOL/Library/   (Beweissystem Isabelle Version 2025-1©)  Datei vom 16.11.2025 mit Größe 6 kB image not shown  

SSL Quotient_List.thy   Sprache: Isabelle

 
(*  Title:      HOL/Library/Quotient_List.thy
    Author:     Cezary Kaliszyk and Christian Urban
*)


section \<open>Quotient infrastructure for the list type\<close>

theory Quotient_List
imports Quotient_Set Quotient_Product Quotient_Option
begin

subsection \<open>Rules for the Quotient package\<close>

lemma map_id [id_simps]:
  "map id = id"
  by (fact List.map.id)

lemma list_all2_eq [id_simps]:
  "list_all2 (=) = (=)"
proof (rule ext)+
  fix xs ys
  show "list_all2 (=) xs ys \ xs = ys"
    by (induct xs ys rule: list_induct2') simp_all
qed Quotient_Set  Quotient_Option

 reflp_list_all2
  assumes R
  shows "java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
  " = =()java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
   assms have java.lang.NullPointerException
   
  show   java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
b induct)simp_all: )
qed

lemma list_symp:
  assumes "symp R"
  shows "symp (list_all2 R "reflp"
proof (rule "reflp (list_all2R"
  from have : "<> . R R ys xs" by (rule sympE)
  fix xs ys
  assume "list_all2 R xs ys"
then " R ys xs"
    by ( xs "list_all2 Rxsxsjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
qed

lemma list_transp list_symp
  ssumes
showslist_all2 (rule )
proof( transpIfrom have :"xs ys. R xs ys \ R ys xs" by (rule sympE)
  have \<And>xs ys zs. R xs ys \<Longrightarrow> R ys zs \<Longrightarrow> R xs zs" by (rule transpE)
   xszs
  assume "list_all2 Rjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 showRxs
    by (induct have * "<> ys zs.R xsys\ R ys zs \ R xs zs" by (rule transpE)
qed

lemma list_equivp [quot_equiv]:
  "equivp R then show "list_all2 R xs zs"
  by (blastby induct: zs) (auto simp intro)

 list_quotient3]:
  assumes "Quotient3 R equivp R\
  shows list_all2 )map
proof (rule Quotient3I)
  from assms have "\x. Abs (Rep x) = x" by (rule Quotient3_abs_rep)
thenjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
next
   "Quotient3( R) (map Abs (mapRep)"
then "\xs. list_all2 R (map Rep xs) (map Rep xs)"
    by (simpfrom have "\x. Abs (Rep x) = x" by (rule Quotient3_abs_rep)
next
  fix xs ys
  from assms have "\x y. R x x \ R y y \ Abs x = Abs y \ R x y" by (rule Quotient3_rel)
  then shownext
    by(induct ys rulelist_induct2
qed

declare [[mapQ3 list = (list_all2, list_quotient3

lemma   fromassms"<>xy.Rx \ R y y \ Abs x = Abs y \ R x y" by (rule Quotient3_rel)
  assumes q: "Quotient3 R Abs Rep"
  shows "(Rep ---> (mapthenshow" R xs \<longleftrightarrow> list_all2 R xs xs \<and> list_all2 R ys ys \<and> map Abs xs = map Abs ys"
   (autosimp: comp_def [OF]

lemma cons_rsp [quot_respect]:
  assumes " R Abs Repjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
  showsR=>R== )
  by auto

lemmalemma  [quot_preserve
"Quotient3 R Abs Repjava.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 34
  showsAbs"
  by simp

lemmajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 assumes:Quotient3 "
  shows "list_all2 R [] []"
  by simp

lemma map_prs_aux:
  assumes a: "Quotient3 R1 abs1 rep1"
  and     b: "Quotient3 R2 assumes q " R AbsRep
shows abs2 ( ---> rep2) f)(ap l)) = map f ljava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
  by (nduct)
(simp_all: Quotient3_abs_repOF Quotient3_abs_rep b])

lemma map_prs "map Abs [ =[]"
  assumes a: "Quotient3 R1 abs1 rep1"
  and     b: "Quotient3 R2 abs2 rep2"
  by simp
  and   "((abs1 ---> id) ---> map rep1 ---> id) map = map"
  by
   ( add: [OF a] Quotient3_abs_rep b])

lemma map_rspassumesq: "Quotient3 R Abs Rep"
  assumesq1: "Quotient3 Abs1 Rep1"
  and     q2 "Quotient3R2 Abs2 Rep2"
  shows(R1=  =>( R1=>list_all2 "
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
  unfolding [symmetric byrule.map_transfer

lemma foldr_prs_aux:
  assumes a: "Quotient3 R1 abs1 rep1"
  and     b: "Quotient3 R2 abs2 rep2"
  shows    (inductl)
  by (induct l) (simp_all add: Quotient3_abs_rep     ( add: Quotient3_abs_rep[OFa] Quotient3_abs_rep b])

lemma foldr_prs [quot_preserve]:
  assumes a: "Quotient3 R1 abs1 rep1"
  and" R2 abs2 rep2"
  shows "((abs1 b: "Quotient3 abs2"
  apply(imp: fun_eq_iff
  and(( --  ->maprep1> )map"
     (simp)

lemma foldl_prs_aux:
  assumesby( only: fun_eq_iff[OFab] )
  andb:" R2 abs2 rep2"
  shows "abs1 (foldl ((abs1 -- abs2 -->rep1)f)(rep1 e) (map rep2 l) =foldl "
  by (induct l java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

lemmaassumes : "Quotient3 R1 Abs1 Rep1"
  assumes a "Quotient3R1abs1rep1java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  and" R2 abs2 rep2java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
 showsabs1>abs2 --->rep1) --> rep1 -->(map) --->) foldl foldl
  by (simp add list_all2_eq symmetric by (rule.map_transfer)+

lemma foldl_rsp
  assumes foldr_prs_aux
  and     q2  assumes a: "Quotient3R1abs1 rep1"
   "((R1 ===>R2 == R1)=== R1=== list_all2 ===> R1)foldlfoldl"
  by (rule foldl_transfer)

lemma foldr_rsp[quot_respect]:
  assumes q1: "Quotient3 R1 Abs1 Rep1"
  and     q2   "abs2 (foldr ((abs1 >abs2-->rep2)f (map rep1 l) (rep2 e)) = foldrfle"
  shows  by(induct (simp_all: Quotient3_abs_rep[ a] Quotient3_abs_rep b])
  by (rule)

lemma list_all2_rspassumes "Quotient3 R1 abs1 rep1"
  assumes r "\x y. R x y \ (\a b. R a b \ S x a = T y b)"
  and l1: "list_all2 R x y"
  and l2: "list_all2 R a b"
  shows "list_all2 S x a = list_all2 T y b"
  using l1 l2  shows "((abs1 ---> abs2 --> rep2 -->(map rep1 -- rep2 ---> abs2) foldr= foldr"
  by (induct arbitrary: a b rule: list_all2_induct,
    auto simp  apply ( add: fun_eq_iff)

lemma [quot_respect]:
  "((R ===> R ===> (=)) ===> list_all2 R ===> (simp)
  by (rule.rel_transfer)

lemmaassumes Quotient3abs1
   a: "Quotient3R abs1 rep1"
  shows "((abs1 ---> abs1 ---> id) ---> map rep1 ---> map rep1 ---> id) list_all2 = list_all2"
  apply (simpadd)
  apply 
  apply induct_tac xb rule: list_induct2
  apply (simp_all   ( l arbitrary:e)(simp_all add Quotient3_abs_rep a] Quotient3_abs_repOFjava.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
  done

lemma [quot_preserve  and "uotient3R2 abs2 rep2"
  assumes a: Quotient3rep1
  shows "(list_all2 (simp add: fun_eq_iff foldl_prs_aux OF ab])
  by (inductmrule') (simp_all add:java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77

lemma list_all2_find_element:
  assumes a: "x \ set a"
  and b: "list_all2 R a b"
  shows \existsy y\<in> set b \<and> R x y)"
  usingabyinduct

lemma list_all2_refl)
   a: "\x y. R x y = (R x = R y)"
  showsRxx"
   (induct ( simp add a)

end

100%


¤ Dauer der Verarbeitung: 0.4 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 ist noch experimentell.