fact
stringlengths
5
2k
type
stringclasses
22 values
library
stringclasses
1 value
imports
listlengths
0
15.1k
filename
stringlengths
13
83
symbolic_name
stringlengths
1
82
docstring
stringclasses
1 value
HTTgenXH : "t : HTTgen(A) \<longleftrightarrow> t=true | t=false | (EX a b. t=<a,b> \<and> a : A \<and> b : A) | (EX f. t=lam x. f(x) \<and> (ALL x. f(x) : A))" apply (unfold HTTgen_def) apply blast done
lemma
src
[ "Type" ]
src/CCL/Hered.thy
HTTgenXH
HTTXH : "t : HTT \<longleftrightarrow> t=true | t=false | (EX a b. t=<a,b> \<and> a : HTT \<and> b : HTT) | (EX f. t=lam x. f(x) \<and> (ALL x. f(x) : HTT))" apply (rule HTTgen_mono [THEN HTT_def [THEN def_gfp_Tarski], THEN XHlemma1, unfolded HTTgen_def]) apply blast done
lemma
src
[ "Type" ]
src/CCL/Hered.thy
HTTXH
HTT_bot : "\<not> bot : HTT" by (blast dest: HTTXH [THEN iffD1])
lemma
src
[ "Type" ]
src/CCL/Hered.thy
HTT_bot
HTT_true : "true : HTT" by (blast intro: HTTXH [THEN iffD2])
lemma
src
[ "Type" ]
src/CCL/Hered.thy
HTT_true
HTT_false : "false : HTT" by (blast intro: HTTXH [THEN iffD2])
lemma
src
[ "Type" ]
src/CCL/Hered.thy
HTT_false
HTT_pair : "<a,b> : HTT \<longleftrightarrow> a : HTT \<and> b : HTT" apply (rule HTTXH [THEN iff_trans]) apply blast done
lemma
src
[ "Type" ]
src/CCL/Hered.thy
HTT_pair
HTT_lam : "lam x. f(x) : HTT \<longleftrightarrow> (ALL x. f(x) : HTT)" apply (rule HTTXH [THEN iff_trans]) apply auto done lemmas HTT_rews1 = HTT_bot HTT_true HTT_false HTT_pair HTT_lam
lemma
src
[ "Type" ]
src/CCL/Hered.thy
HTT_lam
HTT_rews2 : "one : HTT" "inl(a) : HTT \<longleftrightarrow> a : HTT" "inr(b) : HTT \<longleftrightarrow> b : HTT" "zero : HTT" "succ(n) : HTT \<longleftrightarrow> n : HTT" "[] : HTT" "x$xs : HTT \<longleftrightarrow> x : HTT \<and> xs : HTT" by (simp_all add: data_defs HTT_rews1) lemmas HTT_rews = HTT_rews1 HTT_rews2
lemma
src
[ "Type" ]
src/CCL/Hered.thy
HTT_rews2
HTT_coinduct : "\<lbrakk>t : R; R <= HTTgen(R)\<rbrakk> \<Longrightarrow> t : HTT" apply (erule HTT_def [THEN def_coinduct]) apply assumption done
lemma
src
[ "Type" ]
src/CCL/Hered.thy
HTT_coinduct
HTT_coinduct3 : "\<lbrakk>t : R; R <= HTTgen(lfp(\<lambda>x. HTTgen(x) Un R Un HTT))\<rbrakk> \<Longrightarrow> t : HTT" apply (erule HTTgen_mono [THEN [3] HTT_def [THEN def_coinduct3]]) apply assumption done
lemma
src
[ "Type" ]
src/CCL/Hered.thy
HTT_coinduct3
HTTgenIs : "true : HTTgen(R)" "false : HTTgen(R)" "\<lbrakk>a : R; b : R\<rbrakk> \<Longrightarrow> <a,b> : HTTgen(R)" "\<And>b. (\<And>x. b(x) : R) \<Longrightarrow> lam x. b(x) : HTTgen(R)" "one : HTTgen(R)" "a : lfp(\<lambda>x. HTTgen(x) Un R Un HTT) \<Longrightarrow> inl(a) : HTTgen(lfp(\<lambda>x. HTTgen(x) Un R U...
lemma
src
[ "Type" ]
src/CCL/Hered.thy
HTTgenIs
UnitF : "Unit <= HTT" by (simp add: subsetXH UnitXH HTT_rews)
lemma
src
[ "Type" ]
src/CCL/Hered.thy
UnitF
BoolF : "Bool <= HTT" by (fastforce simp: subsetXH BoolXH iff: HTT_rews)
lemma
src
[ "Type" ]
src/CCL/Hered.thy
BoolF
PlusF : "\<lbrakk>A <= HTT; B <= HTT\<rbrakk> \<Longrightarrow> A + B <= HTT" by (fastforce simp: subsetXH PlusXH iff: HTT_rews)
lemma
src
[ "Type" ]
src/CCL/Hered.thy
PlusF
SigmaF : "\<lbrakk>A <= HTT; \<And>x. x:A \<Longrightarrow> B(x) <= HTT\<rbrakk> \<Longrightarrow> SUM x:A. B(x) <= HTT" by (fastforce simp: subsetXH SgXH HTT_rews) (*** Formation Rules for Recursive types - using coinduction these only need ***) (*** exhaution rule for type-former ***) (*Proof by induction - needs ind...
lemma
src
[ "Type" ]
src/CCL/Hered.thy
SigmaF
NatF : "Nat <= HTT" apply clarify apply (erule HTT_coinduct3) apply (fast intro: HTTgenIs elim!: HTTgen_mono [THEN ci3_RI] dest: NatXH [THEN iffD1]) done
lemma
src
[ "Type" ]
src/CCL/Hered.thy
NatF
ListF : "A <= HTT \<Longrightarrow> List(A) <= HTT" apply clarify apply (erule HTT_coinduct3) apply (fast intro!: HTTgenIs elim!: HTTgen_mono [THEN ci3_RI] subsetD [THEN HTTgen_mono [THEN ci3_AI]] dest: ListXH [THEN iffD1]) done
lemma
src
[ "Type" ]
src/CCL/Hered.thy
ListF
ListsF : "A <= HTT \<Longrightarrow> Lists(A) <= HTT" apply clarify apply (erule HTT_coinduct3) apply (fast intro!: HTTgenIs elim!: HTTgen_mono [THEN ci3_RI] subsetD [THEN HTTgen_mono [THEN ci3_AI]] dest: ListsXH [THEN iffD1]) done
lemma
src
[ "Type" ]
src/CCL/Hered.thy
ListsF
IListsF : "A <= HTT \<Longrightarrow> ILists(A) <= HTT" apply clarify apply (erule HTT_coinduct3) apply (fast intro!: HTTgenIs elim!: HTTgen_mono [THEN ci3_RI] subsetD [THEN HTTgen_mono [THEN ci3_AI]] dest: IListsXH [THEN iffD1]) done
lemma
src
[ "Type" ]
src/CCL/Hered.thy
IListsF
lfp :: "['a set\<Rightarrow>'a set] \<Rightarrow> 'a set" where \<comment> \<open>least fixed point\<close> "lfp(f) == Inter({u. f(u) <= u})" (* lfp(f) is the greatest lower bound of {u. f(u) <= u} *)
definition
src
[ "Set" ]
src/CCL/Lfp.thy
lfp
lfp_lowerbound : "f(A) <= A \<Longrightarrow> lfp(f) <= A" unfolding lfp_def by blast
lemma
src
[ "Set" ]
src/CCL/Lfp.thy
lfp_lowerbound
lfp_greatest : "(\<And>u. f(u) <= u \<Longrightarrow> A<=u) \<Longrightarrow> A <= lfp(f)" unfolding lfp_def by blast
lemma
src
[ "Set" ]
src/CCL/Lfp.thy
lfp_greatest
lfp_lemma2 : "mono(f) \<Longrightarrow> f(lfp(f)) <= lfp(f)" by (rule lfp_greatest, rule subset_trans, drule monoD, rule lfp_lowerbound, assumption+)
lemma
src
[ "Set" ]
src/CCL/Lfp.thy
lfp_lemma2
lfp_lemma3 : "mono(f) \<Longrightarrow> lfp(f) <= f(lfp(f))" by (rule lfp_lowerbound, frule monoD, drule lfp_lemma2, assumption+)
lemma
src
[ "Set" ]
src/CCL/Lfp.thy
lfp_lemma3
lfp_Tarski : "mono(f) \<Longrightarrow> lfp(f) = f(lfp(f))" by (rule equalityI lfp_lemma2 lfp_lemma3 | assumption)+ (*** General induction rule for least fixed points ***)
lemma
src
[ "Set" ]
src/CCL/Lfp.thy
lfp_Tarski
induct : assumes lfp: "a: lfp(f)" and mono: "mono(f)" and indhyp: "\<And>x. \<lbrakk>x: f(lfp(f) Int {x. P(x)})\<rbrakk> \<Longrightarrow> P(x)" shows "P(a)" apply (rule_tac a = a in Int_lower2 [THEN subsetD, THEN CollectD]) apply (rule lfp [THEN [2] lfp_lowerbound [THEN subsetD]]) apply (rule Int_greatest, rule subset...
lemma
src
[ "Set" ]
src/CCL/Lfp.thy
induct
def_lfp_Tarski : "\<lbrakk>h == lfp(f); mono(f)\<rbrakk> \<Longrightarrow> h = f(h)" apply unfold apply (drule lfp_Tarski) apply assumption done
lemma
src
[ "Set" ]
src/CCL/Lfp.thy
def_lfp_Tarski
def_induct : "\<lbrakk>A == lfp(f); a:A; mono(f); \<And>x. x: f(A Int {x. P(x)}) \<Longrightarrow> P(x)\<rbrakk> \<Longrightarrow> P(a)" apply (rule induct [of concl: P a]) apply simp apply assumption apply blast done (*Monotonicity of lfp!*)
lemma
src
[ "Set" ]
src/CCL/Lfp.thy
def_induct
lfp_mono : "\<lbrakk>mono(g); \<And>Z. f(Z) <= g(Z)\<rbrakk> \<Longrightarrow> lfp(f) <= lfp(g)" apply (rule lfp_lowerbound) apply (rule subset_trans) apply (erule meta_spec) apply (erule lfp_lemma2) done
lemma
src
[ "Set" ]
src/CCL/Lfp.thy
lfp_mono
set :: ("term") "term" ..
instance
src
[ "FOL" ]
src/CCL/Set.thy
set
Collect :: "['a \<Rightarrow> o] \<Rightarrow> 'a set" and mem :: "['a, 'a set] \<Rightarrow> o" (infixl \<open>:\<close> 50) where mem_Collect_iff: "(a : Collect(P)) \<longleftrightarrow> P(a)" and set_extension: "A = B \<longleftrightarrow> (ALL x. x:A \<longleftrightarrow> x:B)" syntax "_Coll" :: "[idt, o] \<Rightar...
axiomatization
src
[ "FOL" ]
src/CCL/Set.thy
Collect
CollectI : "P(a) \<Longrightarrow> a : {x. P(x)}" apply (rule mem_Collect_iff [THEN iffD2]) apply assumption done
lemma
src
[ "FOL" ]
src/CCL/Set.thy
CollectI
CollectD : "a : {x. P(x)} \<Longrightarrow> P(a)" apply (erule mem_Collect_iff [THEN iffD1]) done lemmas CollectE = CollectD [elim_format]
lemma
src
[ "FOL" ]
src/CCL/Set.thy
CollectD
set_ext : "(\<And>x. x:A \<longleftrightarrow> x:B) \<Longrightarrow> A = B" apply (rule set_extension [THEN iffD2]) apply simp done
lemma
src
[ "FOL" ]
src/CCL/Set.thy
set_ext
Ball :: "['a set, 'a \<Rightarrow> o] \<Rightarrow> o" where "Ball(A, P) == ALL x. x:A \<longrightarrow> P(x)"
definition
src
[ "FOL" ]
src/CCL/Set.thy
Ball
Bex :: "['a set, 'a \<Rightarrow> o] \<Rightarrow> o" where "Bex(A, P) == EX x. x:A \<and> P(x)" syntax "_Ball" :: "[idt, 'a set, o] \<Rightarrow> o" (\<open>(\<open>notation=\<open>binder ALL:\<close>\<close>ALL _:_./ _)\<close> [0, 0, 0] 10) "_Bex" :: "[idt, 'a set, o] \<Rightarrow> o" (\<open>(\<open>notation=\<open...
definition
src
[ "FOL" ]
src/CCL/Set.thy
Bex
ballI : "(\<And>x. x:A \<Longrightarrow> P(x)) \<Longrightarrow> ALL x:A. P(x)" by (simp add: Ball_def)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
ballI
bspec : "\<lbrakk>ALL x:A. P(x); x:A\<rbrakk> \<Longrightarrow> P(x)" by (simp add: Ball_def)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
bspec
ballE : "\<lbrakk>ALL x:A. P(x); P(x) \<Longrightarrow> Q; \<not> x:A \<Longrightarrow> Q\<rbrakk> \<Longrightarrow> Q" unfolding Ball_def by blast
lemma
src
[ "FOL" ]
src/CCL/Set.thy
ballE
bexI : "\<lbrakk>P(x); x:A\<rbrakk> \<Longrightarrow> EX x:A. P(x)" unfolding Bex_def by blast
lemma
src
[ "FOL" ]
src/CCL/Set.thy
bexI
bexCI : "\<lbrakk>EX x:A. \<not>P(x) \<Longrightarrow> P(a); a:A\<rbrakk> \<Longrightarrow> EX x:A. P(x)" unfolding Bex_def by blast
lemma
src
[ "FOL" ]
src/CCL/Set.thy
bexCI
bexE : "\<lbrakk>EX x:A. P(x); \<And>x. \<lbrakk>x:A; P(x)\<rbrakk> \<Longrightarrow> Q\<rbrakk> \<Longrightarrow> Q" unfolding Bex_def by blast (*Trival rewrite rule; (! x:A.P)=P holds only if A is nonempty!*)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
bexE
ball_rew : "(ALL x:A. True) \<longleftrightarrow> True" by (blast intro: ballI) subsubsection \<open>Congruence rules\<close>
lemma
src
[ "FOL" ]
src/CCL/Set.thy
ball_rew
ball_cong : "\<lbrakk>A = A'; \<And>x. x:A' \<Longrightarrow> P(x) \<longleftrightarrow> P'(x)\<rbrakk> \<Longrightarrow> (ALL x:A. P(x)) \<longleftrightarrow> (ALL x:A'. P'(x))" by (blast intro: ballI elim: ballE)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
ball_cong
bex_cong : "\<lbrakk>A = A'; \<And>x. x:A' \<Longrightarrow> P(x) \<longleftrightarrow> P'(x)\<rbrakk> \<Longrightarrow> (EX x:A. P(x)) \<longleftrightarrow> (EX x:A'. P'(x))" by (blast intro: bexI elim: bexE)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
bex_cong
subset :: "['a set, 'a set] \<Rightarrow> o" (infixl \<open><=\<close> 50) where "A <= B == ALL x:A. x:B"
definition
src
[ "FOL" ]
src/CCL/Set.thy
subset
mono :: "['a set \<Rightarrow> 'b set] \<Rightarrow> o" where "mono(f) == (ALL A B. A <= B \<longrightarrow> f(A) <= f(B))"
definition
src
[ "FOL" ]
src/CCL/Set.thy
mono
singleton :: "'a \<Rightarrow> 'a set" (\<open>(\<open>open_block notation=\<open>mixfix singleton\<close>\<close>{_})\<close>) where "{a} == {x. x=a}"
definition
src
[ "FOL" ]
src/CCL/Set.thy
singleton
empty :: "'a set" (\<open>{}\<close>) where "{} == {x. False}"
definition
src
[ "FOL" ]
src/CCL/Set.thy
empty
Un :: "['a set, 'a set] \<Rightarrow> 'a set" (infixl \<open>Un\<close> 65) where "A Un B == {x. x:A | x:B}"
definition
src
[ "FOL" ]
src/CCL/Set.thy
Un
Int :: "['a set, 'a set] \<Rightarrow> 'a set" (infixl \<open>Int\<close> 70) where "A Int B == {x. x:A \<and> x:B}"
definition
src
[ "FOL" ]
src/CCL/Set.thy
Int
Compl :: "('a set) \<Rightarrow> 'a set" where "Compl(A) == {x. \<not>x:A}"
definition
src
[ "FOL" ]
src/CCL/Set.thy
Compl
INTER :: "['a set, 'a \<Rightarrow> 'b set] \<Rightarrow> 'b set" where "INTER(A, B) == {y. ALL x:A. y: B(x)}"
definition
src
[ "FOL" ]
src/CCL/Set.thy
INTER
UNION :: "['a set, 'a \<Rightarrow> 'b set] \<Rightarrow> 'b set" where "UNION(A, B) == {y. EX x:A. y: B(x)}" syntax "_INTER" :: "[idt, 'a set, 'b set] \<Rightarrow> 'b set" (\<open>(\<open>notation=\<open>binder INT:\<close>\<close>INT _:_./ _)\<close> [0, 0, 0] 10) "_UNION" :: "[idt, 'a set, 'b set] \<Rightarrow> 'b ...
definition
src
[ "FOL" ]
src/CCL/Set.thy
UNION
Inter :: "(('a set)set) \<Rightarrow> 'a set" where "Inter(S) == (INT x:S. x)"
definition
src
[ "FOL" ]
src/CCL/Set.thy
Inter
Union :: "(('a set)set) \<Rightarrow> 'a set" where "Union(S) == (UN x:S. x)"
definition
src
[ "FOL" ]
src/CCL/Set.thy
Union
subsetI : "(\<And>x. x:A \<Longrightarrow> x:B) \<Longrightarrow> A <= B" unfolding subset_def by (blast intro: ballI) (*Rule in Modus Ponens style*)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
subsetI
subsetD : "\<lbrakk>A <= B; c:A\<rbrakk> \<Longrightarrow> c:B" unfolding subset_def by (blast elim: ballE) (*Classical elimination rule*)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
subsetD
subsetCE : "\<lbrakk>A <= B; \<not>(c:A) \<Longrightarrow> P; c:B \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P" by (blast dest: subsetD)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
subsetCE
subset_refl : "A <= A" by (blast intro: subsetI)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
subset_refl
subset_trans : "\<lbrakk>A <= B; B <= C\<rbrakk> \<Longrightarrow> A <= C" by (blast intro: subsetI dest: subsetD)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
subset_trans
subset_antisym : "\<lbrakk>A <= B; B <= A\<rbrakk> \<Longrightarrow> A = B" by (blast intro: set_ext dest: subsetD) lemmas equalityI = subset_antisym (* Equality rules from ZF set theory -- are they appropriate here? *)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
subset_antisym
equalityD1 : "A = B \<Longrightarrow> A<=B" and equalityD2: "A = B \<Longrightarrow> B<=A" by (simp_all add: subset_refl)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
equalityD1
equalityE : "\<lbrakk>A = B; \<lbrakk>A <= B; B <= A\<rbrakk> \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P" by (simp add: subset_refl)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
equalityE
equalityCE : "\<lbrakk>A = B; \<lbrakk>c:A; c:B\<rbrakk> \<Longrightarrow> P; \<lbrakk>\<not> c:A; \<not> c:B\<rbrakk> \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P" by (blast elim: equalityE subsetCE)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
equalityCE
trivial_set : "{x. x:A} = A" by (blast intro: equalityI subsetI CollectI dest: CollectD)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
trivial_set
UnI1 : "c:A \<Longrightarrow> c : A Un B" and UnI2: "c:B \<Longrightarrow> c : A Un B" unfolding Un_def by (blast intro: CollectI)+ (*Classical introduction rule: no commitment to A vs B*)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
UnI1
UnCI : "(\<not>c:B \<Longrightarrow> c:A) \<Longrightarrow> c : A Un B" by (blast intro: UnI1 UnI2)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
UnCI
UnE : "\<lbrakk>c : A Un B; c:A \<Longrightarrow> P; c:B \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P" unfolding Un_def by (blast dest: CollectD)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
UnE
IntI : "\<lbrakk>c:A; c:B\<rbrakk> \<Longrightarrow> c : A Int B" unfolding Int_def by (blast intro: CollectI)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
IntI
IntD1 : "c : A Int B \<Longrightarrow> c:A" and IntD2: "c : A Int B \<Longrightarrow> c:B" unfolding Int_def by (blast dest: CollectD)+
lemma
src
[ "FOL" ]
src/CCL/Set.thy
IntD1
IntE : "\<lbrakk>c : A Int B; \<lbrakk>c:A; c:B\<rbrakk> \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P" by (blast dest: IntD1 IntD2)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
IntE
ComplI : "(c:A \<Longrightarrow> False) \<Longrightarrow> c : Compl(A)" unfolding Compl_def by (blast intro: CollectI) (*This form, with negated conclusion, works well with the Classical prover. Negated assumptions behave like formulae on the right side of the notional turnstile...*)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
ComplI
ComplD : "c : Compl(A) \<Longrightarrow> \<not>c:A" unfolding Compl_def by (blast dest: CollectD) lemmas ComplE = ComplD [elim_format]
lemma
src
[ "FOL" ]
src/CCL/Set.thy
ComplD
empty_eq : "{x. False} = {}" by (simp add: empty_def)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
empty_eq
emptyD : "a : {} \<Longrightarrow> P" unfolding empty_def by (blast dest: CollectD) lemmas emptyE = emptyD [elim_format]
lemma
src
[ "FOL" ]
src/CCL/Set.thy
emptyD
not_emptyD : assumes "\<not> A={}" shows "EX x. x:A" proof - have "\<not> (EX x. x:A) \<Longrightarrow> A = {}" by (rule equalityI) (blast intro!: subsetI elim!: emptyD)+ with assms show ?thesis by blast qed
lemma
src
[ "FOL" ]
src/CCL/Set.thy
not_emptyD
singletonI : "a : {a}" unfolding singleton_def by (blast intro: CollectI)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
singletonI
singletonD : "b : {a} \<Longrightarrow> b=a" unfolding singleton_def by (blast dest: CollectD) lemmas singletonE = singletonD [elim_format]
lemma
src
[ "FOL" ]
src/CCL/Set.thy
singletonD
UN_I : "\<lbrakk>a:A; b: B(a)\<rbrakk> \<Longrightarrow> b: (UN x:A. B(x))" unfolding UNION_def by (blast intro: bexI CollectI)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
UN_I
UN_E : "\<lbrakk>b : (UN x:A. B(x)); \<And>x. \<lbrakk>x:A; b: B(x)\<rbrakk> \<Longrightarrow> R\<rbrakk> \<Longrightarrow> R" unfolding UNION_def by (blast dest: CollectD elim: bexE)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
UN_E
UN_cong : "\<lbrakk>A = B; \<And>x. x:B \<Longrightarrow> C(x) = D(x)\<rbrakk> \<Longrightarrow> (UN x:A. C(x)) = (UN x:B. D(x))" by (simp add: UNION_def cong: bex_cong)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
UN_cong
INT_I : "(\<And>x. x:A \<Longrightarrow> b: B(x)) \<Longrightarrow> b : (INT x:A. B(x))" unfolding INTER_def by (blast intro: CollectI ballI)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
INT_I
INT_D : "\<lbrakk>b : (INT x:A. B(x)); a:A\<rbrakk> \<Longrightarrow> b: B(a)" unfolding INTER_def by (blast dest: CollectD bspec) (*"Classical" elimination rule -- does not require proving X:C *)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
INT_D
INT_E : "\<lbrakk>b : (INT x:A. B(x)); b: B(a) \<Longrightarrow> R; \<not> a:A \<Longrightarrow> R\<rbrakk> \<Longrightarrow> R" unfolding INTER_def by (blast dest: CollectD bspec)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
INT_E
INT_cong : "\<lbrakk>A = B; \<And>x. x:B \<Longrightarrow> C(x) = D(x)\<rbrakk> \<Longrightarrow> (INT x:A. C(x)) = (INT x:B. D(x))" by (simp add: INTER_def cong: ball_cong)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
INT_cong
UnionI : "\<lbrakk>X:C; A:X\<rbrakk> \<Longrightarrow> A : Union(C)" unfolding Union_def by (blast intro: UN_I)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
UnionI
UnionE : "\<lbrakk>A : Union(C); \<And>X. \<lbrakk> A:X; X:C\<rbrakk> \<Longrightarrow> R\<rbrakk> \<Longrightarrow> R" unfolding Union_def by (blast elim: UN_E)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
UnionE
InterI : "(\<And>X. X:C \<Longrightarrow> A:X) \<Longrightarrow> A : Inter(C)" unfolding Inter_def by (blast intro: INT_I) (*A "destruct" rule -- every X in C contains A as an element, but A:X can hold when X:C does not! This rule is analogous to "spec". *)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
InterI
InterD : "\<lbrakk>A : Inter(C); X:C\<rbrakk> \<Longrightarrow> A:X" unfolding Inter_def by (blast dest: INT_D) (*"Classical" elimination rule -- does not require proving X:C *)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
InterD
InterE : "\<lbrakk>A : Inter(C); A:X \<Longrightarrow> R; \<not> X:C \<Longrightarrow> R\<rbrakk> \<Longrightarrow> R" unfolding Inter_def by (blast elim: INT_E)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
InterE
Union_upper : "B:A \<Longrightarrow> B <= Union(A)" by (blast intro: subsetI UnionI)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
Union_upper
Union_least : "(\<And>X. X:A \<Longrightarrow> X<=C) \<Longrightarrow> Union(A) <= C" by (blast intro: subsetI dest: subsetD elim: UnionE)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
Union_least
Inter_lower : "B:A \<Longrightarrow> Inter(A) <= B" by (blast intro: subsetI dest: InterD)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
Inter_lower
Inter_greatest : "(\<And>X. X:A \<Longrightarrow> C<=X) \<Longrightarrow> C <= Inter(A)" by (blast intro: subsetI InterI dest: subsetD)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
Inter_greatest
Un_upper1 : "A <= A Un B" by (blast intro: subsetI UnI1)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
Un_upper1
Un_upper2 : "B <= A Un B" by (blast intro: subsetI UnI2)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
Un_upper2
Un_least : "\<lbrakk>A<=C; B<=C\<rbrakk> \<Longrightarrow> A Un B <= C" by (blast intro: subsetI elim: UnE dest: subsetD)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
Un_least
Int_lower1 : "A Int B <= A" by (blast intro: subsetI elim: IntE)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
Int_lower1
Int_lower2 : "A Int B <= B" by (blast intro: subsetI elim: IntE)
lemma
src
[ "FOL" ]
src/CCL/Set.thy
Int_lower2