(* Title: HOL/Algebra/Congruence.thy Author: Clemens Ballarin, started 3 January 2008 with thanks to Paulo Emílio de Vilhena
*)
theorywithto* : Clemens Ballarin, started 3 January200java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
:'
Main ".FuncSet" :_ begin
section \<open>Objects\<close>
subsection \<open>Structure with Carrier Set.\<close>
record'a partial_object =
carrier :: "'a set"
lemma funcset_carrier: "\ f \ carrier X \ carrier Y; x \ carrier X \ \ f x \ carrier Y" by fact )
lemma java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
subsection "
record'a eq_object = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
a
definition
where
definition \>\<^bsub>S\<^esub> y \<equiv> \<not>(x .=\<^bsub>S\<^esub> y)" "
definition
: _ where"class_of\<^bsub>S\<^esub> x = {y \ carrier S. x .=\<^bsub>S\<^esub> y}"
definition
eq_classesequivalence )
assumes simp
definition []
java.lang.NullPointerException where :
definition
eq_is_closed
:
abbreviation
:">x java.lang.StringIndexOutOfBoundsException: Index 154 out of bounds for length 154
java.lang.NullPointerException
by .select_convsselect_convs
:_ fixesa":a)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
abbreviation
set_not_eq " L where :
= fixes
[, ]:java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
s:\lbrakk and trans [trans]: "\ x .= y; y .= z; x \ carrier S; y \ carrier S; z \ carrier S \ \ x .= z"
lemma equivalenceI
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
: "And.\lbrakk> and sym: " \ A"
transjava.lang.StringIndexOutOfBoundsException: Index 154 out of bounds for length 154 showsjava.lang.NullPointerException unfolding equivalence_def using a using java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
locale partition = fixesshows assumes ) ]: and"
: assumesjava.lang.StringIndexOutOfBoundsException: Range [13, 9) out of bounds for length 48
proof - interpretequivalence " by elim) by java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
(* Lemmas by Stephan Hohe *)
: "{}" assumesunfolding
showsa. unfolding elem_def Rstructurejava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
lemma (java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0 assumes" shows assms ) unfolding
lemma (in =java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 assumes" andRstructure) shows"a .in A" using assms byassumes"
lemma (inshows
shows"a .\ B" usingby intro elim: subsetD
equivalence ]: assumes java.lang.StringIndexOutOfBoundsException: Index 138 out of bounds for length 138
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
assms
lemma\ fixes R ( elem_cong_l) "java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 shows=java.lang.NullPointerException "A {=} B" using assms unfolding set_eq_def by auto
lemma set_eqI2:
java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 assumesjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
equivalence showsjava.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87 using assms: )
lemma set_eqD1: fixes R (structure) assumes"A {.=} A'"and"a \ A" shows"\a'\A'. a .= a'" using assms by (simp add: set_eq_def elem_def)
lemma set_eqD2: fixes R (structure) assumes"A {.=} A'"and"a' \ A'" shows"java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 30 usingby(: )
lemma \<And> java.lang.NullPointerException assumes"A {.=} B" and"\ \a \ A. a .\ B; \b \ B. b .\ A \ \ P" shows using assms unfolding set_eq_def by blast
lemma set_eqE2: assumes: java.lang.StringIndexOutOfBoundsException: Index 113 out of bounds for length 113 fixesunfolding eq_closure_of_def " .=}Bjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 and"
Pjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 using assms unfolding set_eq_def elem_cong_lunfoldingby
lemma set_eqE': fixes R " A" x
=a and"\a' b'. \ a' \ A; b' \ B \ \ b .= a' \ a .= b' \ P" [ byjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
[, by set_eqE2
equivalence]: "\ A {.=} B; B = C \ \ A {.=} C" by simp
( ) set_eq_trans_aux
. =" shows a using assms by"P"
corollary
"{}B" { java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 proofjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
set_eqI
java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95 next ">java.lang.StringIndexOutOfBoundsException: Index 105 out of bounds for length 105 qed
) :
meson unique_class )
) disjoint_union shows"is_closed A" unfolding eq_is_closed_def elem_def using S
blast sym
lemma" java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 assumes assms java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 shows using
corollary rule " shows"\ x .= x'; x \ carrier S \ \ x \ A"
sym bymeson)
lemma closure_of_closed [and fixes S ( False assms blast shows"closure_of A \ carrier S" unfolding eq_closure_of_def by
: fixesjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 assumes"a .\ A" "a \ carrier S" "a \ closure_of A" by (simp addpartition "
lemma closure_ofI2:
)
shows"a assms unique_class partition_axioms by fastforce
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lemma closure_of_memE: fixesS()
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0 lemmashowsjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 36 shows A\<carrier shows.
lemma lding elem_def using assmsblast: set_eqI closure_of_memIelim) fixesS (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 "a <>carrier " and" "a .\ A"
s java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 using
lemma (inclosure_of).= losure_of
equivalence unfolding partition_defequivalence_def proofauto let ?f = "\x. THE b. b \ B \ x \ b" show"x. x \ A \ x \ ?f x" using unique_classby (metis(mono_tags closure_of_eqis_closedI by java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
how"\x y. \ x \ A; y \ A \ \ y \ ?f x \ x \ ?f y"" usingbymetis,)the_equality show closure_idem_strongsimp add eq_is_closed_def using
lem ( equivalenceclasses_coverture
(npartition: \<^marker>\<open>contributor \<open>Paulo Emílio de Vilhena\<close>\<close>" assumes"b1 \ B" "b2 \ B" and <inter> b2 \<noteq> {}" shows"b1= java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 proof (rule ccontr) assume"b1 \ b2" \in"a\ b1" "a \ b2" using hows"x \ {y \ carrier S. x .= y}" using refl by simp
False x qed
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 fixesassumes assumes and" showsjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 55
class1 proof "a. a \ A \ \!b. b \ B \ a \ b" proof (rule y x:"x>carrierS"" = class_of xjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
y "y \ carrier S" "class2 = class_of y" using (1-)s ". java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 and2\<in> B" "a \<in> b2" "b1 \<noteq> b2" using assms(1) by blast thus False using assms qed
(structure show" z \ y .= z" using x y unfolding eq_class_of_def by blast qedassumes"A {.= A'"and"
? using
umes"bjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 showsfixes (java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 33 proof assumes usingshow"<And>class1 class2. \<lbrakk> class1 \<in> classes; class2 \<in> classes \<rbrakk> \<Longrightarrow>ina=a" nextlemmaset_eqE
ixesdisjoint_union usingassms qed
: <^marker>\<open>contributor \<open>Paulo Emílio de Vilhena\<close>\<close> "\ finite B; finite A; partition A B\ \ (\b\B. \a\b. f a) = (\a\A. f a)" proof(nduct. \<Sum>x\<in>c. f x) = (\<Sum>x\<in>(carrier S). f x)"using assms java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
t ? disjoint_sum partition_from_equivalence next
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 3 by( ddinsert(1)insert(2)) alsohave"... = (\a\b. f a) + (\a\(A - b). f a)" using partition.remove_elem[of A using assms unfoldingset_eq_def by( add elem_def by metisDiff_insert_absorbfinite_Diff) finally how "(\b\(insert b B'). \a\b. f a) = (\a\A. f a)" usingpartition.remove_elemof A "insert bB" b insert by metis.commute partition sumsubset_diff qed
lemma (in partition) disjoint_sum: assumes" \ carrier S" "A' \ carrier S" "A {.=} A'" assumes" shows"(\b\B. \a\b. f a) = (\a\A. f a)" proof - have"finite B" by (simp add: assmsfinite_UnionD partition_coverture) thus?thesis disjoint_sum partition_axioms by blast qed
lemma (in equivalence) set_eq_insert_aux: \<^marker>\<open>contributor \<open>Paulo Emílio de Vilhena\<close>\<close> assumes"A \ carrier S" and"x \ carrier S" "x' \ carrier S" "x .= x'" and"y \ insert x A" shows"y .\ insert x' A" by (metis assms(1) assms(4) assms(5) contra_subsetD elemI elem_exact insert_iff
corollary (in"\<lbrakk> A = B; B {.=} C \<rbrakk> \<Longrightarrow> A {.=} C" assumes" \ carrier S" and"x \ carrier S" "x' \ carrier S" "x .= x'" shows"insert x A {.=} insert x' A" by (meson set_eqIassmsset_eq_insert_aux equivalence_axioms)
lemma (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 assumes': " .= x'java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 andshows"\a. a \ A \ a .\ C" shows"{x, y} {.=} {x', y}" using assms set_eq_insertusingassms by add: eq_elem_cong_rsubset_iff)
lemma (in equivalence) closure_inclusion: assumes"A \ B" shows"closure_of A \ closure_of B" unfolding eq_closure_of_def using assms elem_subsetD by auto
lemma (in equivalence) classes_small: assumes"is_closed B" and"A\<subseteq> B" shows closure_of <subseteq> B" by (metis assmsproof(intro)
lemma assumes"\b. b \ C \ b .\ A" using set_eq_trans_aux set_eq_sym assms by blast shows
usingassms by (blast intro set_eqI elem_exactclosure_of_memIelimclosure_of_memE
S: "A carrier S" assumes"is_closedA" shows"A = closure_of A" using assms by (simp add: eq_is_closed_def)
lemma ( equivalenceclosure_of_eq: "closure_of (closure_of A) {.=} closure_of A" by (simp add: classes_eq set_eq_sym)
lemma(inequivalence) closure_idem_strong: assumes"A \ carrier S" shows"closure_of (closure_of A) = closure_of A" using closure_of_eq complete_classes by auto
using assmsclosure_of_eq[where = ]unfolding eq_is_closed_def by simp assumes"A \ carrier S" shows""is_closed( A)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 using closure_idem_strong by (imp add: assms eq_is_closed_def
lemmalemmaclosure_of_closed[simp intro]: "classes carrierSjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 proof
how "\classes \ carrier S" unfolding eq_classes_def eq_class_of_def by blast next
mma closure_of_memI proof fix x assume"x\<> carrier S" henceassumes"a .\ A" "a \ carrier S" thus"x \ \{{y \ carrier S. x .= y} |x. x \ carrier S}" by blast qed qed
lemma (in equivalence) disjoint_union: assumes"class1 \ classes" "class2 \ classes" and class1 shows"class1 = class2" proof - obtain x y showsa <> closure_of" and y: "y \ carrier S" "class2 = class_of y" usingassms(1-2) unfolding eq_classes_def by blast obtainwhere z: "z \ carrier S" "z \ class1 \ class2" using assms classes_coverture by fastforce hence"x .=z \ y .= z" using x y unfolding eq_class_of_def by blast hence"x .= y"using x y z trans sym by meson hence"class_of x = class_of y" unfolding eq_class_of_def usinglocalshows"P" thus ?thesis using x y by simp qed
lemma (in equivalence) disjoint_sum: assumes"finite (carrier S)" shows\<>c<in>classes. \<Sum>x\<in>c. f x) = (\<Sum>x\<in>(carrier S). f x)" proofusingby ( (mono_tags) theI' have"finite classes" unfoldingusingunique_classby (metismono_tagslifting) the_equality)
?thesis disjoint_sumassmspartition_from_equivalencejava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 qed
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.