theory_file
stringclasses 970
values | lemma_name
stringlengths 6
108
| lemma_command
stringlengths 15
14.6k
⌀ | lemma_object
stringlengths 6
17.2k
| template
stringlengths 7
16.1k
| symbols
listlengths 0
101
| types
listlengths 0
101
| defs
listlengths 0
83
| output_key
stringclasses 1
value | input
stringlengths 37
79.6k
| output
stringlengths 24
16.1k
|
|---|---|---|---|---|---|---|---|---|---|---|
TLA/Memory/MemoryImplementation
|
MemoryImplementation.S1Hist
|
lemma S1Hist: "\<turnstile> [HNext rmhist p]_(c p,r p,m p,rmhist!p) \<and> $(S1 rmhist p)
\<longrightarrow> unchanged (rmhist!p)"
|
\<turnstile> [HNext ?rmhist ?p]_(c ?p, r ?p, m ?p, ?rmhist! ?p) \<and> $S1 ?rmhist ?p \<longrightarrow> unchanged (?rmhist! ?p)
|
?H1 (?H2 (\<longrightarrow>) (?H2 (\<and>) (?H3 (?H4 x_1 x_2) (?H2 Pair (?H5 x_2) (?H2 Pair (?H6 x_2) (?H2 Pair (?H7 x_2) (?H8 x_1 x_2))))) (?H9 (?H10 x_1 x_2))) (?H11 (?H8 x_1 x_2)))
|
[
"Action.unch",
"MemoryImplementation.S1",
"Action.before",
"ProcedureInterface.slice",
"MemoryImplementation.m",
"MemoryImplementation.r",
"MemoryImplementation.c",
"MemoryImplementation.HNext",
"Action.SqAct",
"Intensional.lift2",
"Intensional.Valid"
] |
[
"(state \\<Rightarrow> 'a) \\<Rightarrow> state \\<times> state \\<Rightarrow> bool",
"(state \\<Rightarrow> PrIds \\<Rightarrow> histState) \\<Rightarrow> PrIds \\<Rightarrow> state \\<Rightarrow> bool",
"(state \\<Rightarrow> 'a) \\<Rightarrow> state \\<times> state \\<Rightarrow> 'a",
"(state \\<Rightarrow> 'a \\<Rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> state \\<Rightarrow> 'b",
"PrIds \\<Rightarrow> state \\<Rightarrow> (bool \\<times> Vals) \\<times> Vals",
"PrIds \\<Rightarrow> state \\<Rightarrow> rpcState \\<times> (bool \\<times> Vals) \\<times> bool \\<times> memOp",
"PrIds \\<Rightarrow> state \\<Rightarrow> mClkState \\<times> (bool \\<times> Vals) \\<times> bool \\<times> rpcOp",
"(state \\<Rightarrow> PrIds \\<Rightarrow> histState) \\<Rightarrow> PrIds \\<Rightarrow> state \\<times> state \\<Rightarrow> bool",
"(state \\<times> state \\<Rightarrow> bool) \\<Rightarrow> (state \\<Rightarrow> 'a) \\<Rightarrow> state \\<times> state \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> 'c) \\<Rightarrow> ('d \\<Rightarrow> 'a) \\<Rightarrow> ('d \\<Rightarrow> 'b) \\<Rightarrow> 'd \\<Rightarrow> 'c",
"('a \\<Rightarrow> bool) \\<Rightarrow> bool"
] |
[
"consts\n before :: \"'a stfun \\<Rightarrow> 'a trfun\"\n after :: \"'a stfun \\<Rightarrow> 'a trfun\"\n unch :: \"'a stfun \\<Rightarrow> action\"",
"definition SqAct :: \"[action, 'a stfun] \\<Rightarrow> action\"\n where square_def: \"SqAct A v \\<equiv> ACT (A \\<or> unchanged v)\"",
"definition lift2 :: \"['a \\<Rightarrow> 'b \\<Rightarrow> 'c, ('w::world,'a) expr, ('w,'b) expr] \\<Rightarrow> ('w,'c) expr\"\n where unl_lift2: \"lift2 f x y w \\<equiv> f (x w) (y w)\"",
"definition Valid :: \"('w::world) form \\<Rightarrow> bool\"\n where \"Valid A \\<equiv> \\<forall>w. A w\""
] |
template
|
###lemma
\<turnstile> [HNext ?rmhist ?p]_(c ?p, r ?p, m ?p, ?rmhist! ?p) \<and> $S1 ?rmhist ?p \<longrightarrow> unchanged (?rmhist! ?p)
###symbols
Action.unch :::: (state \<Rightarrow> 'a) \<Rightarrow> state \<times> state \<Rightarrow> bool
MemoryImplementation.S1 :::: (state \<Rightarrow> PrIds \<Rightarrow> histState) \<Rightarrow> PrIds \<Rightarrow> state \<Rightarrow> bool
Action.before :::: (state \<Rightarrow> 'a) \<Rightarrow> state \<times> state \<Rightarrow> 'a
ProcedureInterface.slice :::: (state \<Rightarrow> 'a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> state \<Rightarrow> 'b
MemoryImplementation.m :::: PrIds \<Rightarrow> state \<Rightarrow> (bool \<times> Vals) \<times> Vals
MemoryImplementation.r :::: PrIds \<Rightarrow> state \<Rightarrow> rpcState \<times> (bool \<times> Vals) \<times> bool \<times> memOp
MemoryImplementation.c :::: PrIds \<Rightarrow> state \<Rightarrow> mClkState \<times> (bool \<times> Vals) \<times> bool \<times> rpcOp
MemoryImplementation.HNext :::: (state \<Rightarrow> PrIds \<Rightarrow> histState) \<Rightarrow> PrIds \<Rightarrow> state \<times> state \<Rightarrow> bool
Action.SqAct :::: (state \<times> state \<Rightarrow> bool) \<Rightarrow> (state \<Rightarrow> 'a) \<Rightarrow> state \<times> state \<Rightarrow> bool
Intensional.lift2 :::: ('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> ('d \<Rightarrow> 'a) \<Rightarrow> ('d \<Rightarrow> 'b) \<Rightarrow> 'd \<Rightarrow> 'c
Intensional.Valid :::: ('a \<Rightarrow> bool) \<Rightarrow> bool
###defs
consts
before :: "'a stfun \<Rightarrow> 'a trfun"
after :: "'a stfun \<Rightarrow> 'a trfun"
unch :: "'a stfun \<Rightarrow> action"
definition SqAct :: "[action, 'a stfun] \<Rightarrow> action"
where square_def: "SqAct A v \<equiv> ACT (A \<or> unchanged v)"
definition lift2 :: "['a \<Rightarrow> 'b \<Rightarrow> 'c, ('w::world,'a) expr, ('w,'b) expr] \<Rightarrow> ('w,'c) expr"
where unl_lift2: "lift2 f x y w \<equiv> f (x w) (y w)"
definition Valid :: "('w::world) form \<Rightarrow> bool"
where "Valid A \<equiv> \<forall>w. A w"
|
###output
?H1 (?H2 (\<longrightarrow>) (?H2 (\<and>) (?H3 (?H4 x_1 x_2) (?H2 Pair (?H5 x_2) (?H2 Pair (?H6 x_2) (?H2 Pair (?H7 x_2) (?H8 x_1 x_2))))) (?H9 (?H10 x_1 x_2))) (?H11 (?H8 x_1 x_2)))###end
|
Matrix_LP/ComputeNumeral
|
ComputeNumeral.compute_div_mod(11)
| null |
1 div - numeral ?n = - Parity.adjust_div (divmod num.One ?n)
|
?H1 ?H2 (?H3 (?H4 x_1)) = ?H3 (?H5 (?H6 ?H7 x_1))
|
[
"Num.num.One",
"Parity.linordered_euclidean_semiring_division_class.divmod",
"Parity.adjust_div",
"Num.numeral_class.numeral",
"Groups.uminus_class.uminus",
"Groups.one_class.one",
"Rings.divide_class.divide"
] |
[
"num",
"num \\<Rightarrow> num \\<Rightarrow> 'a \\<times> 'a",
"int \\<times> int \\<Rightarrow> int",
"num \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a",
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a"
] |
[
"datatype num = One | Bit0 num | Bit1 num",
"class linordered_euclidean_semiring_division = linordered_euclidean_semiring +\n fixes divmod :: \\<open>num \\<Rightarrow> num \\<Rightarrow> 'a \\<times> 'a\\<close>\n and divmod_step :: \\<open>'a \\<Rightarrow> 'a \\<times> 'a \\<Rightarrow> 'a \\<times> 'a\\<close> \\<comment> \\<open>\n These are conceptually definitions but force generated code\n to be monomorphic wrt. particular instances of this class which\n yields a significant speedup.\\<close>\n assumes divmod_def: \\<open>divmod m n = (numeral m div numeral n, numeral m mod numeral n)\\<close>\n and divmod_step_def [simp]: \\<open>divmod_step l (q, r) =\n (if euclidean_size l \\<le> euclidean_size r then (2 * q + 1, r - l)\n else (2 * q, r))\\<close> \\<comment> \\<open>\n This is a formulation of one step (referring to one digit position)\n in school-method division: compare the dividend at the current\n digit position with the remainder from previous division steps\n and evaluate accordingly.\\<close>\nbegin",
"definition adjust_div :: \"int \\<times> int \\<Rightarrow> int\"\nwhere\n \"adjust_div qr = (let (q, r) = qr in q + of_bool (r \\<noteq> 0))\"",
"primrec numeral :: \"num \\<Rightarrow> 'a\"\n where\n numeral_One: \"numeral One = 1\"\n | numeral_Bit0: \"numeral (Bit0 n) = numeral n + numeral n\"\n | numeral_Bit1: \"numeral (Bit1 n) = numeral n + numeral n + 1\"",
"class uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)",
"class one =\n fixes one :: 'a (\"1\")",
"class divide =\n fixes divide :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"div\" 70)"
] |
template
|
###lemma
1 div - numeral ?n = - Parity.adjust_div (divmod num.One ?n)
###symbols
Num.num.One :::: num
Parity.linordered_euclidean_semiring_division_class.divmod :::: num \<Rightarrow> num \<Rightarrow> 'a \<times> 'a
Parity.adjust_div :::: int \<times> int \<Rightarrow> int
Num.numeral_class.numeral :::: num \<Rightarrow> 'a
Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a
Groups.one_class.one :::: 'a
Rings.divide_class.divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
###defs
datatype num = One | Bit0 num | Bit1 num
class linordered_euclidean_semiring_division = linordered_euclidean_semiring +
fixes divmod :: \<open>num \<Rightarrow> num \<Rightarrow> 'a \<times> 'a\<close>
and divmod_step :: \<open>'a \<Rightarrow> 'a \<times> 'a \<Rightarrow> 'a \<times> 'a\<close> \<comment> \<open>
These are conceptually definitions but force generated code
to be monomorphic wrt. particular instances of this class which
yields a significant speedup.\<close>
assumes divmod_def: \<open>divmod m n = (numeral m div numeral n, numeral m mod numeral n)\<close>
and divmod_step_def [simp]: \<open>divmod_step l (q, r) =
(if euclidean_size l \<le> euclidean_size r then (2 * q + 1, r - l)
else (2 * q, r))\<close> \<comment> \<open>
This is a formulation of one step (referring to one digit position)
in school-method division: compare the dividend at the current
digit position with the remainder from previous division steps
and evaluate accordingly.\<close>
begin
definition adjust_div :: "int \<times> int \<Rightarrow> int"
where
"adjust_div qr = (let (q, r) = qr in q + of_bool (r \<noteq> 0))"
primrec numeral :: "num \<Rightarrow> 'a"
where
numeral_One: "numeral One = 1"
| numeral_Bit0: "numeral (Bit0 n) = numeral n + numeral n"
| numeral_Bit1: "numeral (Bit1 n) = numeral n + numeral n + 1"
class uminus =
fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80)
class one =
fixes one :: 'a ("1")
class divide =
fixes divide :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "div" 70)
|
###output
?H1 ?H2 (?H3 (?H4 x_1)) = ?H3 (?H5 (?H6 ?H7 x_1))###end
|
Relation
|
Relation.reflI
|
lemma reflI: "(\<And>x. (x, x) \<in> r) \<Longrightarrow> refl r"
|
(\<And>x. (x, x) \<in> ?r) \<Longrightarrow> refl ?r
|
(\<And>y_0. (y_0, y_0) \<in> x_1) \<Longrightarrow> ?H1 x_1
|
[
"Relation.refl"
] |
[
"('a \\<times> 'a) set \\<Rightarrow> bool"
] |
[
"abbreviation refl :: \"'a rel \\<Rightarrow> bool\" \\<comment> \\<open>reflexivity over a type\\<close>\n where \"refl \\<equiv> refl_on UNIV\""
] |
template
|
###lemma
(\<And>x. (x, x) \<in> ?r) \<Longrightarrow> refl ?r
###symbols
Relation.refl :::: ('a \<times> 'a) set \<Rightarrow> bool
###defs
abbreviation refl :: "'a rel \<Rightarrow> bool" \<comment> \<open>reflexivity over a type\<close>
where "refl \<equiv> refl_on UNIV"
|
###output
(\<And>y_0. (y_0, y_0) \<in> x_1) \<Longrightarrow> ?H1 x_1###end
|
Predicate_Compile_Examples/Predicate_Compile_Tests
|
Predicate_Compile_Tests.detect_switches6_PFioBiiI
| null |
detect_switches6 (?x1.0, ?xa) \<Longrightarrow> (\<lambda>xa. pred.eval (?x xa)) = ?x1.0 \<Longrightarrow> pred.eval (detect_switches6_PFioBii (?x, ?xa)) ()
|
\<lbrakk> ?H1 (x_1, x_2); (\<lambda>y_0. ?H2 (x_3 y_0)) = x_1\<rbrakk> \<Longrightarrow> ?H2 (?H3 (x_3, x_2)) ?H4
|
[
"Product_Type.Unity",
"Predicate_Compile_Tests.detect_switches6_PFioBii",
"Predicate.pred.eval",
"Predicate_Compile_Tests.detect_switches6"
] |
[
"unit",
"('a \\<Rightarrow> 'b Predicate.pred) \\<times> 'a list \\<times> 'b list \\<Rightarrow> unit Predicate.pred",
"'a Predicate.pred \\<Rightarrow> 'a \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<times> 'a list \\<times> 'b list \\<Rightarrow> bool"
] |
[
"definition Unity :: unit (\"'(')\")\n where \"() = Abs_unit True\"",
"datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: \"'a \\<Rightarrow> bool\")",
"inductive detect_switches6 :: \"(('a => 'b => bool) * 'a list * 'b list) => bool\"\nwhere\n \"detect_switches6 (P, [], [])\"\n| \"detect_switches6 (P, xs, ys) ==> P x y ==> detect_switches6 (P, x # xs, y # ys)\""
] |
template
|
###lemma
detect_switches6 (?x1.0, ?xa) \<Longrightarrow> (\<lambda>xa. pred.eval (?x xa)) = ?x1.0 \<Longrightarrow> pred.eval (detect_switches6_PFioBii (?x, ?xa)) ()
###symbols
Product_Type.Unity :::: unit
Predicate_Compile_Tests.detect_switches6_PFioBii :::: ('a \<Rightarrow> 'b Predicate.pred) \<times> 'a list \<times> 'b list \<Rightarrow> unit Predicate.pred
Predicate.pred.eval :::: 'a Predicate.pred \<Rightarrow> 'a \<Rightarrow> bool
Predicate_Compile_Tests.detect_switches6 :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<times> 'a list \<times> 'b list \<Rightarrow> bool
###defs
definition Unity :: unit ("'(')")
where "() = Abs_unit True"
datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: "'a \<Rightarrow> bool")
inductive detect_switches6 :: "(('a => 'b => bool) * 'a list * 'b list) => bool"
where
"detect_switches6 (P, [], [])"
| "detect_switches6 (P, xs, ys) ==> P x y ==> detect_switches6 (P, x # xs, y # ys)"
|
###output
\<lbrakk> ?H1 (x_1, x_2); (\<lambda>y_0. ?H2 (x_3 y_0)) = x_1\<rbrakk> \<Longrightarrow> ?H2 (?H3 (x_3, x_2)) ?H4###end
|
Analysis/Linear_Algebra
|
Linear_Algebra.orthogonal_to_subspace_exists_gen
| null |
span ?S \<subset> span ?T \<Longrightarrow> (\<And>x. x \<noteq> (0:: ?'a) \<Longrightarrow> x \<in> span ?T \<Longrightarrow> (\<And>y. y \<in> span ?S \<Longrightarrow> orthogonal x y) \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
|
\<lbrakk> ?H1 (?H2 x_1) (?H2 x_2); \<And>y_0. \<lbrakk>y_0 \<noteq> ?H3; y_0 \<in> ?H2 x_2; \<And>y_1. y_1 \<in> ?H2 x_1 \<Longrightarrow> ?H4 y_0 y_1\<rbrakk> \<Longrightarrow> x_3\<rbrakk> \<Longrightarrow> x_3
|
[
"Linear_Algebra.real_inner_class.orthogonal",
"Groups.zero_class.zero",
"Real_Vector_Spaces.span",
"Set.subset"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> bool",
"'a",
"'a set \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"abbreviation subset :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset \\<equiv> less\""
] |
template
|
###lemma
span ?S \<subset> span ?T \<Longrightarrow> (\<And>x. x \<noteq> (0:: ?'a) \<Longrightarrow> x \<in> span ?T \<Longrightarrow> (\<And>y. y \<in> span ?S \<Longrightarrow> orthogonal x y) \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
###symbols
Linear_Algebra.real_inner_class.orthogonal :::: 'a \<Rightarrow> 'a \<Rightarrow> bool
Groups.zero_class.zero :::: 'a
Real_Vector_Spaces.span :::: 'a set \<Rightarrow> 'a set
Set.subset :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
###defs
class zero =
fixes zero :: 'a ("0")
abbreviation subset :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset \<equiv> less"
|
###output
\<lbrakk> ?H1 (?H2 x_1) (?H2 x_2); \<And>y_0. \<lbrakk>y_0 \<noteq> ?H3; y_0 \<in> ?H2 x_2; \<And>y_1. y_1 \<in> ?H2 x_1 \<Longrightarrow> ?H4 y_0 y_1\<rbrakk> \<Longrightarrow> x_3\<rbrakk> \<Longrightarrow> x_3###end
|
Auth/KerberosIV
|
KerberosIV.authK_not_AKcryptSK
|
lemma authK_not_AKcryptSK:
"\<lbrakk> Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, tk\<rbrace>
\<in> parts (spies evs); evs \<in> kerbIV \<rbrakk>
\<Longrightarrow> \<not> AKcryptSK K authK evs"
|
Crypt (shrK Tgs) \<lbrace>Agent ?A, Agent Tgs, Key ?authK, ?tk\<rbrace> \<in> parts (knows Spy ?evs) \<Longrightarrow> ?evs \<in> kerbIV \<Longrightarrow> \<not> AKcryptSK ?K ?authK ?evs
|
\<lbrakk> ?H1 (?H2 ?H3) (?H4 (?H5 x_1) (?H4 (?H5 ?H3) (?H4 (?H6 x_2) x_3))) \<in> ?H7 (?H8 ?H9 x_4); x_4 \<in> ?H10\<rbrakk> \<Longrightarrow> \<not> ?H11 x_5 x_2 x_4
|
[
"KerberosIV.AKcryptSK",
"KerberosIV.kerbIV",
"Message.agent.Spy",
"Event.knows",
"Message.parts",
"Message.msg.Key",
"Message.msg.Agent",
"Message.msg.MPair",
"KerberosIV.Tgs",
"Public.shrK",
"Message.msg.Crypt"
] |
[
"nat \\<Rightarrow> nat \\<Rightarrow> event list \\<Rightarrow> bool",
"event list set",
"agent",
"agent \\<Rightarrow> event list \\<Rightarrow> msg set",
"msg set \\<Rightarrow> msg set",
"nat \\<Rightarrow> msg",
"agent \\<Rightarrow> msg",
"msg \\<Rightarrow> msg \\<Rightarrow> msg",
"agent",
"agent \\<Rightarrow> nat",
"nat \\<Rightarrow> msg \\<Rightarrow> msg"
] |
[
"definition AKcryptSK :: \"[key, key, event list] \\<Rightarrow> bool\" where\n \"AKcryptSK authK servK evs ==\n \\<exists>A B Ts.\n Says Tgs A (Crypt authK\n \\<lbrace>Key servK, Agent B, Number Ts,\n Crypt (shrK B) \\<lbrace>Agent A, Agent B, Key servK, Number Ts\\<rbrace> \\<rbrace>)\n \\<in> set evs\"",
"inductive_set kerbIV :: \"event list set\"\n where\n\n Nil: \"[] \\<in> kerbIV\"\n\n | Fake: \"\\<lbrakk> evsf \\<in> kerbIV; X \\<in> synth (analz (spies evsf)) \\<rbrakk>\n \\<Longrightarrow> Says Spy B X # evsf \\<in> kerbIV\"\n\n(* FROM the initiator *)\n | K1: \"\\<lbrakk> evs1 \\<in> kerbIV \\<rbrakk>\n \\<Longrightarrow> Says A Kas \\<lbrace>Agent A, Agent Tgs, Number (CT evs1)\\<rbrace> # evs1\n \\<in> kerbIV\"\n\n(* Adding the timestamp serves to A in K3 to check that\n she doesn't get a reply too late. This kind of timeouts are ordinary.\n If a server's reply is late, then it is likely to be fake. *)\n\n(*---------------------------------------------------------------------*)\n\n(*FROM Kas *)\n | K2: \"\\<lbrakk> evs2 \\<in> kerbIV; Key authK \\<notin> used evs2; authK \\<in> symKeys;\n Says A' Kas \\<lbrace>Agent A, Agent Tgs, Number T1\\<rbrace> \\<in> set evs2 \\<rbrakk>\n \\<Longrightarrow> Says Kas A\n (Crypt (shrK A) \\<lbrace>Key authK, Agent Tgs, Number (CT evs2),\n (Crypt (shrK Tgs) \\<lbrace>Agent A, Agent Tgs, Key authK,\n Number (CT evs2)\\<rbrace>)\\<rbrace>) # evs2 \\<in> kerbIV\"\n(*\n The internal encryption builds the authTicket.\n The timestamp doesn't change inside the two encryptions: the external copy\n will be used by the initiator in K3; the one inside the\n authTicket by Tgs in K4.\n*)\n\n(*---------------------------------------------------------------------*)\n\n(* FROM the initiator *)\n | K3: \"\\<lbrakk> evs3 \\<in> kerbIV;\n Says A Kas \\<lbrace>Agent A, Agent Tgs, Number T1\\<rbrace> \\<in> set evs3;\n Says Kas' A (Crypt (shrK A) \\<lbrace>Key authK, Agent Tgs, Number Ta,\n authTicket\\<rbrace>) \\<in> set evs3;\n valid Ta wrt T1\n \\<rbrakk>\n \\<Longrightarrow> Says A Tgs \\<lbrace>authTicket,\n (Crypt authK \\<lbrace>Agent A, Number (CT evs3)\\<rbrace>),\n Agent B\\<rbrace> # evs3 \\<in> kerbIV\"\n(*The two events amongst the premises allow A to accept only those authKeys\n that are not issued late. *)\n\n(*---------------------------------------------------------------------*)\n\n(* FROM Tgs *)\n(* Note that the last temporal check is not mentioned in the original MIT\n specification. Adding it makes many goals \"available\" to the peers. \n Theorems that exploit it have the suffix `_u', which stands for updated \n protocol.\n*)\n | K4: \"\\<lbrakk> evs4 \\<in> kerbIV; Key servK \\<notin> used evs4; servK \\<in> symKeys;\n B \\<noteq> Tgs; authK \\<in> symKeys;\n Says A' Tgs \\<lbrace>\n (Crypt (shrK Tgs) \\<lbrace>Agent A, Agent Tgs, Key authK,\n Number Ta\\<rbrace>),\n (Crypt authK \\<lbrace>Agent A, Number T2\\<rbrace>), Agent B\\<rbrace>\n \\<in> set evs4;\n \\<not> expiredAK Ta evs4;\n \\<not> expiredA T2 evs4;\n servKlife + (CT evs4) \\<le> authKlife + Ta\n \\<rbrakk>\n \\<Longrightarrow> Says Tgs A\n (Crypt authK \\<lbrace>Key servK, Agent B, Number (CT evs4),\n Crypt (shrK B) \\<lbrace>Agent A, Agent B, Key servK,\n Number (CT evs4)\\<rbrace> \\<rbrace>)\n # evs4 \\<in> kerbIV\"\n(* Tgs creates a new session key per each request for a service, without\n checking if there is still a fresh one for that service.\n The cipher under Tgs' key is the authTicket, the cipher under B's key\n is the servTicket, which is built now.\n NOTE that the last temporal check is not present in the MIT specification.\n\n*)\n\n(*---------------------------------------------------------------------*)\n\n(* FROM the initiator *)\n | K5: \"\\<lbrakk> evs5 \\<in> kerbIV; authK \\<in> symKeys; servK \\<in> symKeys;\n Says A Tgs\n \\<lbrace>authTicket, Crypt authK \\<lbrace>Agent A, Number T2\\<rbrace>,\n Agent B\\<rbrace>\n \\<in> set evs5;\n Says Tgs' A\n (Crypt authK \\<lbrace>Key servK, Agent B, Number Ts, servTicket\\<rbrace>)\n \\<in> set evs5;\n valid Ts wrt T2 \\<rbrakk>\n \\<Longrightarrow> Says A B \\<lbrace>servTicket,\n Crypt servK \\<lbrace>Agent A, Number (CT evs5)\\<rbrace> \\<rbrace>\n # evs5 \\<in> kerbIV\"\n(* Checks similar to those in K3. *)\n\n(*---------------------------------------------------------------------*)\n\n(* FROM the responder*)\n | K6: \"\\<lbrakk> evs6 \\<in> kerbIV;\n Says A' B \\<lbrace>\n (Crypt (shrK B) \\<lbrace>Agent A, Agent B, Key servK, Number Ts\\<rbrace>),\n (Crypt servK \\<lbrace>Agent A, Number T3\\<rbrace>)\\<rbrace>\n \\<in> set evs6;\n \\<not> expiredSK Ts evs6;\n \\<not> expiredA T3 evs6\n \\<rbrakk>\n \\<Longrightarrow> Says B A (Crypt servK (Number T3))\n # evs6 \\<in> kerbIV\"\n(* Checks similar to those in K4. *)\n\n(*---------------------------------------------------------------------*)\n\n(* Leaking an authK... *)\n | Oops1: \"\\<lbrakk> evsO1 \\<in> kerbIV; A \\<noteq> Spy;\n Says Kas A\n (Crypt (shrK A) \\<lbrace>Key authK, Agent Tgs, Number Ta,\n authTicket\\<rbrace>) \\<in> set evsO1;\n expiredAK Ta evsO1 \\<rbrakk>\n \\<Longrightarrow> Says A Spy \\<lbrace>Agent A, Agent Tgs, Number Ta, Key authK\\<rbrace>\n # evsO1 \\<in> kerbIV\"\n\n(*---------------------------------------------------------------------*)\n\n(*Leaking a servK... *)\n | Oops2: \"\\<lbrakk> evsO2 \\<in> kerbIV; A \\<noteq> Spy;\n Says Tgs A\n (Crypt authK \\<lbrace>Key servK, Agent B, Number Ts, servTicket\\<rbrace>)\n \\<in> set evsO2;\n expiredSK Ts evsO2 \\<rbrakk>\n \\<Longrightarrow> Says A Spy \\<lbrace>Agent A, Agent B, Number Ts, Key servK\\<rbrace>\n # evsO2 \\<in> kerbIV\"",
"primrec knows :: \"agent \\<Rightarrow> event list \\<Rightarrow> msg set\"\nwhere\n knows_Nil: \"knows A [] = initState A\"\n| knows_Cons:\n \"knows A (ev # evs) =\n (if A = Spy then \n (case ev of\n Says A' B X \\<Rightarrow> insert X (knows Spy evs)\n | Gets A' X \\<Rightarrow> knows Spy evs\n | Notes A' X \\<Rightarrow> \n if A' \\<in> bad then insert X (knows Spy evs) else knows Spy evs)\n else\n (case ev of\n Says A' B X \\<Rightarrow> \n if A'=A then insert X (knows A evs) else knows A evs\n | Gets A' X \\<Rightarrow> \n if A'=A then insert X (knows A evs) else knows A evs\n | Notes A' X \\<Rightarrow> \n if A'=A then insert X (knows A evs) else knows A evs))\"",
"inductive_set\n parts :: \"msg set \\<Rightarrow> msg set\"\n for H :: \"msg set\"\n where\n Inj [intro]: \"X \\<in> H \\<Longrightarrow> X \\<in> parts H\"\n | Fst: \"\\<lbrace>X,Y\\<rbrace> \\<in> parts H \\<Longrightarrow> X \\<in> parts H\"\n | Snd: \"\\<lbrace>X,Y\\<rbrace> \\<in> parts H \\<Longrightarrow> Y \\<in> parts H\"\n | Body: \"Crypt K X \\<in> parts H \\<Longrightarrow> X \\<in> parts H\"",
"datatype\n msg = Agent agent \\<comment> \\<open>Agent names\\<close>\n | Number nat \\<comment> \\<open>Ordinary integers, timestamps, ...\\<close>\n | Nonce nat \\<comment> \\<open>Unguessable nonces\\<close>\n | Key key \\<comment> \\<open>Crypto keys\\<close>\n | Hash msg \\<comment> \\<open>Hashing\\<close>\n | MPair msg msg \\<comment> \\<open>Compound messages\\<close>\n | Crypt key msg \\<comment> \\<open>Encryption, public- or shared-key\\<close>",
"datatype\n msg = Agent agent \\<comment> \\<open>Agent names\\<close>\n | Number nat \\<comment> \\<open>Ordinary integers, timestamps, ...\\<close>\n | Nonce nat \\<comment> \\<open>Unguessable nonces\\<close>\n | Key key \\<comment> \\<open>Crypto keys\\<close>\n | Hash msg \\<comment> \\<open>Hashing\\<close>\n | MPair msg msg \\<comment> \\<open>Compound messages\\<close>\n | Crypt key msg \\<comment> \\<open>Encryption, public- or shared-key\\<close>",
"datatype\n msg = Agent agent \\<comment> \\<open>Agent names\\<close>\n | Number nat \\<comment> \\<open>Ordinary integers, timestamps, ...\\<close>\n | Nonce nat \\<comment> \\<open>Unguessable nonces\\<close>\n | Key key \\<comment> \\<open>Crypto keys\\<close>\n | Hash msg \\<comment> \\<open>Hashing\\<close>\n | MPair msg msg \\<comment> \\<open>Compound messages\\<close>\n | Crypt key msg \\<comment> \\<open>Encryption, public- or shared-key\\<close>",
"abbreviation\n Tgs :: agent where \"Tgs == Friend 0\"",
"consts\n shrK :: \"agent => key\" \\<comment> \\<open>long-term shared keys\\<close>",
"datatype\n msg = Agent agent \\<comment> \\<open>Agent names\\<close>\n | Number nat \\<comment> \\<open>Ordinary integers, timestamps, ...\\<close>\n | Nonce nat \\<comment> \\<open>Unguessable nonces\\<close>\n | Key key \\<comment> \\<open>Crypto keys\\<close>\n | Hash msg \\<comment> \\<open>Hashing\\<close>\n | MPair msg msg \\<comment> \\<open>Compound messages\\<close>\n | Crypt key msg \\<comment> \\<open>Encryption, public- or shared-key\\<close>"
] |
template
|
###lemma
Crypt (shrK Tgs) \<lbrace>Agent ?A, Agent Tgs, Key ?authK, ?tk\<rbrace> \<in> parts (knows Spy ?evs) \<Longrightarrow> ?evs \<in> kerbIV \<Longrightarrow> \<not> AKcryptSK ?K ?authK ?evs
###symbols
KerberosIV.AKcryptSK :::: nat \<Rightarrow> nat \<Rightarrow> event list \<Rightarrow> bool
KerberosIV.kerbIV :::: event list set
Message.agent.Spy :::: agent
Event.knows :::: agent \<Rightarrow> event list \<Rightarrow> msg set
Message.parts :::: msg set \<Rightarrow> msg set
Message.msg.Key :::: nat \<Rightarrow> msg
Message.msg.Agent :::: agent \<Rightarrow> msg
Message.msg.MPair :::: msg \<Rightarrow> msg \<Rightarrow> msg
KerberosIV.Tgs :::: agent
Public.shrK :::: agent \<Rightarrow> nat
Message.msg.Crypt :::: nat \<Rightarrow> msg \<Rightarrow> msg
###defs
definition AKcryptSK :: "[key, key, event list] \<Rightarrow> bool" where
"AKcryptSK authK servK evs ==
\<exists>A B Ts.
Says Tgs A (Crypt authK
\<lbrace>Key servK, Agent B, Number Ts,
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace> \<rbrace>)
\<in> set evs"
inductive_set kerbIV :: "event list set"
where
Nil: "[] \<in> kerbIV"
| Fake: "\<lbrakk> evsf \<in> kerbIV; X \<in> synth (analz (spies evsf)) \<rbrakk>
\<Longrightarrow> Says Spy B X # evsf \<in> kerbIV"
(* FROM the initiator *)
| K1: "\<lbrakk> evs1 \<in> kerbIV \<rbrakk>
\<Longrightarrow> Says A Kas \<lbrace>Agent A, Agent Tgs, Number (CT evs1)\<rbrace> # evs1
\<in> kerbIV"
(* Adding the timestamp serves to A in K3 to check that
she doesn't get a reply too late. This kind of timeouts are ordinary.
If a server's reply is late, then it is likely to be fake. *)
(*---------------------------------------------------------------------*)
(*FROM Kas *)
| K2: "\<lbrakk> evs2 \<in> kerbIV; Key authK \<notin> used evs2; authK \<in> symKeys;
Says A' Kas \<lbrace>Agent A, Agent Tgs, Number T1\<rbrace> \<in> set evs2 \<rbrakk>
\<Longrightarrow> Says Kas A
(Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number (CT evs2),
(Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK,
Number (CT evs2)\<rbrace>)\<rbrace>) # evs2 \<in> kerbIV"
(*
The internal encryption builds the authTicket.
The timestamp doesn't change inside the two encryptions: the external copy
will be used by the initiator in K3; the one inside the
authTicket by Tgs in K4.
*)
(*---------------------------------------------------------------------*)
(* FROM the initiator *)
| K3: "\<lbrakk> evs3 \<in> kerbIV;
Says A Kas \<lbrace>Agent A, Agent Tgs, Number T1\<rbrace> \<in> set evs3;
Says Kas' A (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,
authTicket\<rbrace>) \<in> set evs3;
valid Ta wrt T1
\<rbrakk>
\<Longrightarrow> Says A Tgs \<lbrace>authTicket,
(Crypt authK \<lbrace>Agent A, Number (CT evs3)\<rbrace>),
Agent B\<rbrace> # evs3 \<in> kerbIV"
(*The two events amongst the premises allow A to accept only those authKeys
that are not issued late. *)
(*---------------------------------------------------------------------*)
(* FROM Tgs *)
(* Note that the last temporal check is not mentioned in the original MIT
specification. Adding it makes many goals "available" to the peers.
Theorems that exploit it have the suffix `_u', which stands for updated
protocol.
*)
| K4: "\<lbrakk> evs4 \<in> kerbIV; Key servK \<notin> used evs4; servK \<in> symKeys;
B \<noteq> Tgs; authK \<in> symKeys;
Says A' Tgs \<lbrace>
(Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK,
Number Ta\<rbrace>),
(Crypt authK \<lbrace>Agent A, Number T2\<rbrace>), Agent B\<rbrace>
\<in> set evs4;
\<not> expiredAK Ta evs4;
\<not> expiredA T2 evs4;
servKlife + (CT evs4) \<le> authKlife + Ta
\<rbrakk>
\<Longrightarrow> Says Tgs A
(Crypt authK \<lbrace>Key servK, Agent B, Number (CT evs4),
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK,
Number (CT evs4)\<rbrace> \<rbrace>)
# evs4 \<in> kerbIV"
(* Tgs creates a new session key per each request for a service, without
checking if there is still a fresh one for that service.
The cipher under Tgs' key is the authTicket, the cipher under B's key
is the servTicket, which is built now.
NOTE that the last temporal check is not present in the MIT specification.
*)
(*---------------------------------------------------------------------*)
(* FROM the initiator *)
| K5: "\<lbrakk> evs5 \<in> kerbIV; authK \<in> symKeys; servK \<in> symKeys;
Says A Tgs
\<lbrace>authTicket, Crypt authK \<lbrace>Agent A, Number T2\<rbrace>,
Agent B\<rbrace>
\<in> set evs5;
Says Tgs' A
(Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
\<in> set evs5;
valid Ts wrt T2 \<rbrakk>
\<Longrightarrow> Says A B \<lbrace>servTicket,
Crypt servK \<lbrace>Agent A, Number (CT evs5)\<rbrace> \<rbrace>
# evs5 \<in> kerbIV"
(* Checks similar to those in K3. *)
(*---------------------------------------------------------------------*)
(* FROM the responder*)
| K6: "\<lbrakk> evs6 \<in> kerbIV;
Says A' B \<lbrace>
(Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>),
(Crypt servK \<lbrace>Agent A, Number T3\<rbrace>)\<rbrace>
\<in> set evs6;
\<not> expiredSK Ts evs6;
\<not> expiredA T3 evs6
\<rbrakk>
\<Longrightarrow> Says B A (Crypt servK (Number T3))
# evs6 \<in> kerbIV"
(* Checks similar to those in K4. *)
(*---------------------------------------------------------------------*)
(* Leaking an authK... *)
| Oops1: "\<lbrakk> evsO1 \<in> kerbIV; A \<noteq> Spy;
Says Kas A
(Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,
authTicket\<rbrace>) \<in> set evsO1;
expiredAK Ta evsO1 \<rbrakk>
\<Longrightarrow> Says A Spy \<lbrace>Agent A, Agent Tgs, Number Ta, Key authK\<rbrace>
# evsO1 \<in> kerbIV"
(*---------------------------------------------------------------------*)
(*Leaking a servK... *)
| Oops2: "\<lbrakk> evsO2 \<in> kerbIV; A \<noteq> Spy;
Says Tgs A
(Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
\<in> set evsO2;
expiredSK Ts evsO2 \<rbrakk>
\<Longrightarrow> Says A Spy \<lbrace>Agent A, Agent B, Number Ts, Key servK\<rbrace>
# evsO2 \<in> kerbIV"
primrec knows :: "agent \<Rightarrow> event list \<Rightarrow> msg set"
where
knows_Nil: "knows A [] = initState A"
| knows_Cons:
"knows A (ev # evs) =
(if A = Spy then
(case ev of
Says A' B X \<Rightarrow> insert X (knows Spy evs)
| Gets A' X \<Rightarrow> knows Spy evs
| Notes A' X \<Rightarrow>
if A' \<in> bad then insert X (knows Spy evs) else knows Spy evs)
else
(case ev of
Says A' B X \<Rightarrow>
if A'=A then insert X (knows A evs) else knows A evs
| Gets A' X \<Rightarrow>
if A'=A then insert X (knows A evs) else knows A evs
| Notes A' X \<Rightarrow>
if A'=A then insert X (knows A evs) else knows A evs))"
inductive_set
parts :: "msg set \<Rightarrow> msg set"
for H :: "msg set"
where
Inj [intro]: "X \<in> H \<Longrightarrow> X \<in> parts H"
| Fst: "\<lbrace>X,Y\<rbrace> \<in> parts H \<Longrightarrow> X \<in> parts H"
| Snd: "\<lbrace>X,Y\<rbrace> \<in> parts H \<Longrightarrow> Y \<in> parts H"
| Body: "Crypt K X \<in> parts H \<Longrightarrow> X \<in> parts H"
datatype
msg = Agent agent \<comment> \<open>Agent names\<close>
| Number nat \<comment> \<open>Ordinary integers, timestamps, ...\<close>
| Nonce nat \<comment> \<open>Unguessable nonces\<close>
| Key key \<comment> \<open>Crypto keys\<close>
| Hash msg \<comment> \<open>Hashing\<close>
| MPair msg msg \<comment> \<open>Compound messages\<close>
| Crypt key msg \<comment> \<open>Encryption, public- or shared-key\<close>
datatype
msg = Agent agent \<comment> \<open>Agent names\<close>
| Number nat \<comment> \<open>Ordinary integers, timestamps, ...\<close>
| Nonce nat \<comment> \<open>Unguessable nonces\<close>
| Key key \<comment> \<open>Crypto keys\<close>
| Hash msg \<comment> \<open>Hashing\<close>
| MPair msg msg \<comment> \<open>Compound messages\<close>
| Crypt key msg \<comment> \<open>Encryption, public- or shared-key\<close>
datatype
msg = Agent agent \<comment> \<open>Agent names\<close>
| Number nat \<comment> \<open>Ordinary integers, timestamps, ...\<close>
| Nonce nat \<comment> \<open>Unguessable nonces\<close>
| Key key \<comment> \<open>Crypto keys\<close>
| Hash msg \<comment> \<open>Hashing\<close>
| MPair msg msg \<comment> \<open>Compound messages\<close>
| Crypt key msg \<comment> \<open>Encryption, public- or shared-key\<close>
abbreviation
Tgs :: agent where "Tgs == Friend 0"
consts
shrK :: "agent => key" \<comment> \<open>long-term shared keys\<close>
datatype
msg = Agent agent \<comment> \<open>Agent names\<close>
| Number nat \<comment> \<open>Ordinary integers, timestamps, ...\<close>
| Nonce nat \<comment> \<open>Unguessable nonces\<close>
| Key key \<comment> \<open>Crypto keys\<close>
| Hash msg \<comment> \<open>Hashing\<close>
| MPair msg msg \<comment> \<open>Compound messages\<close>
| Crypt key msg \<comment> \<open>Encryption, public- or shared-key\<close>
|
###output
\<lbrakk> ?H1 (?H2 ?H3) (?H4 (?H5 x_1) (?H4 (?H5 ?H3) (?H4 (?H6 x_2) x_3))) \<in> ?H7 (?H8 ?H9 x_4); x_4 \<in> ?H10\<rbrakk> \<Longrightarrow> \<not> ?H11 x_5 x_2 x_4###end
|
Analysis/Weierstrass_Theorems
|
Weierstrass_Theorems.Stone_Weierstrass_polynomial_function
|
theorem Stone_Weierstrass_polynomial_function:
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
assumes S: "compact S"
and f: "continuous_on S f"
and e: "0 < e"
shows "\<exists>g. polynomial_function g \<and> (\<forall>x \<in> S. norm(f x - g x) < e)"
|
compact ?S \<Longrightarrow> continuous_on ?S ?f \<Longrightarrow> 0 < ?e \<Longrightarrow> \<exists>g. polynomial_function g \<and> (\<forall>x\<in> ?S. norm (?f x - g x) < ?e)
|
\<lbrakk> ?H1 x_1; ?H2 x_1 x_2; ?H3 < x_3\<rbrakk> \<Longrightarrow> \<exists>y_0. ?H4 y_0 \<and> (\<forall>y_1\<in>x_1. ?H5 (?H6 (x_2 y_1) (y_0 y_1)) < x_3)
|
[
"Groups.minus_class.minus",
"Real_Vector_Spaces.norm_class.norm",
"Weierstrass_Theorems.polynomial_function",
"Groups.zero_class.zero",
"Topological_Spaces.continuous_on",
"Topological_Spaces.topological_space_class.compact"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> real",
"('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"'a",
"'a set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"'a set \\<Rightarrow> bool"
] |
[
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)",
"class norm =\n fixes norm :: \"'a \\<Rightarrow> real\"",
"class zero =\n fixes zero :: 'a (\"0\")",
"definition continuous_on :: \"'a set \\<Rightarrow> ('a::topological_space \\<Rightarrow> 'b::topological_space) \\<Rightarrow> bool\"\n where \"continuous_on s f \\<longleftrightarrow> (\\<forall>x\\<in>s. (f \\<longlongrightarrow> f x) (at x within s))\"",
"class topological_space = \"open\" +\n assumes open_UNIV [simp, intro]: \"open UNIV\"\n assumes open_Int [intro]: \"open S \\<Longrightarrow> open T \\<Longrightarrow> open (S \\<inter> T)\"\n assumes open_Union [intro]: \"\\<forall>S\\<in>K. open S \\<Longrightarrow> open (\\<Union>K)\"\nbegin"
] |
template
|
###lemma
compact ?S \<Longrightarrow> continuous_on ?S ?f \<Longrightarrow> 0 < ?e \<Longrightarrow> \<exists>g. polynomial_function g \<and> (\<forall>x\<in> ?S. norm (?f x - g x) < ?e)
###symbols
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Real_Vector_Spaces.norm_class.norm :::: 'a \<Rightarrow> real
Weierstrass_Theorems.polynomial_function :::: ('a \<Rightarrow> 'b) \<Rightarrow> bool
Groups.zero_class.zero :::: 'a
Topological_Spaces.continuous_on :::: 'a set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
Topological_Spaces.topological_space_class.compact :::: 'a set \<Rightarrow> bool
###defs
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
class norm =
fixes norm :: "'a \<Rightarrow> real"
class zero =
fixes zero :: 'a ("0")
definition continuous_on :: "'a set \<Rightarrow> ('a::topological_space \<Rightarrow> 'b::topological_space) \<Rightarrow> bool"
where "continuous_on s f \<longleftrightarrow> (\<forall>x\<in>s. (f \<longlongrightarrow> f x) (at x within s))"
class topological_space = "open" +
assumes open_UNIV [simp, intro]: "open UNIV"
assumes open_Int [intro]: "open S \<Longrightarrow> open T \<Longrightarrow> open (S \<inter> T)"
assumes open_Union [intro]: "\<forall>S\<in>K. open S \<Longrightarrow> open (\<Union>K)"
begin
|
###output
\<lbrakk> ?H1 x_1; ?H2 x_1 x_2; ?H3 < x_3\<rbrakk> \<Longrightarrow> \<exists>y_0. ?H4 y_0 \<and> (\<forall>y_1\<in>x_1. ?H5 (?H6 (x_2 y_1) (y_0 y_1)) < x_3)###end
|
Complex_Analysis/Winding_Numbers
|
Winding_Numbers.winding_number_lt_half
|
lemma winding_number_lt_half:
assumes "valid_path \<gamma>" "a \<bullet> z \<le> b" "path_image \<gamma> \<subseteq> {w. a \<bullet> w > b}"
shows "\<bar>Re (winding_number \<gamma> z)\<bar> < 1/2"
|
valid_path ?\<gamma> \<Longrightarrow> ?a \<bullet> ?z \<le> ?b \<Longrightarrow> path_image ?\<gamma> \<subseteq> {w. ?b < ?a \<bullet> w} \<Longrightarrow> \<bar>Re (winding_number ?\<gamma> ?z)\<bar> < 1 / 2
|
\<lbrakk> ?H1 x_1; ?H2 x_2 x_3 \<le> x_4; ?H3 (?H4 x_1) (?H5 (\<lambda>y_0. x_4 < ?H2 x_2 y_0))\<rbrakk> \<Longrightarrow> ?H6 (?H7 (?H8 x_1 x_3)) < ?H9 ?H10 (?H11 (?H12 ?H13))
|
[
"Num.num.One",
"Num.num.Bit0",
"Num.numeral_class.numeral",
"Groups.one_class.one",
"Fields.inverse_class.inverse_divide",
"Winding_Numbers.winding_number",
"Complex.complex.Re",
"Groups.abs_class.abs",
"Set.Collect",
"Path_Connected.path_image",
"Set.subset_eq",
"Inner_Product.real_inner_class.inner",
"Smooth_Paths.valid_path"
] |
[
"num",
"num \\<Rightarrow> num",
"num \\<Rightarrow> 'a",
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(real \\<Rightarrow> complex) \\<Rightarrow> complex \\<Rightarrow> complex",
"complex \\<Rightarrow> real",
"'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"(real \\<Rightarrow> 'a) \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool",
"'a \\<Rightarrow> 'a \\<Rightarrow> real",
"(real \\<Rightarrow> 'a) \\<Rightarrow> bool"
] |
[
"datatype num = One | Bit0 num | Bit1 num",
"datatype num = One | Bit0 num | Bit1 num",
"primrec numeral :: \"num \\<Rightarrow> 'a\"\n where\n numeral_One: \"numeral One = 1\"\n | numeral_Bit0: \"numeral (Bit0 n) = numeral n + numeral n\"\n | numeral_Bit1: \"numeral (Bit1 n) = numeral n + numeral n + 1\"",
"class one =\n fixes one :: 'a (\"1\")",
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"codatatype complex = Complex (Re: real) (Im: real)",
"class abs =\n fixes abs :: \"'a \\<Rightarrow> 'a\" (\"\\<bar>_\\<bar>\")",
"abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\"",
"class real_inner = real_vector + sgn_div_norm + dist_norm + uniformity_dist + open_uniformity +\n fixes inner :: \"'a \\<Rightarrow> 'a \\<Rightarrow> real\"\n assumes inner_commute: \"inner x y = inner y x\"\n and inner_add_left: \"inner (x + y) z = inner x z + inner y z\"\n and inner_scaleR_left [simp]: \"inner (scaleR r x) y = r * (inner x y)\"\n and inner_ge_zero [simp]: \"0 \\<le> inner x x\"\n and inner_eq_zero_iff [simp]: \"inner x x = 0 \\<longleftrightarrow> x = 0\"\n and norm_eq_sqrt_inner: \"norm x = sqrt (inner x x)\"\nbegin"
] |
template
|
###lemma
valid_path ?\<gamma> \<Longrightarrow> ?a \<bullet> ?z \<le> ?b \<Longrightarrow> path_image ?\<gamma> \<subseteq> {w. ?b < ?a \<bullet> w} \<Longrightarrow> \<bar>Re (winding_number ?\<gamma> ?z)\<bar> < 1 / 2
###symbols
Num.num.One :::: num
Num.num.Bit0 :::: num \<Rightarrow> num
Num.numeral_class.numeral :::: num \<Rightarrow> 'a
Groups.one_class.one :::: 'a
Fields.inverse_class.inverse_divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Winding_Numbers.winding_number :::: (real \<Rightarrow> complex) \<Rightarrow> complex \<Rightarrow> complex
Complex.complex.Re :::: complex \<Rightarrow> real
Groups.abs_class.abs :::: 'a \<Rightarrow> 'a
Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set
Path_Connected.path_image :::: (real \<Rightarrow> 'a) \<Rightarrow> 'a set
Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
Inner_Product.real_inner_class.inner :::: 'a \<Rightarrow> 'a \<Rightarrow> real
Smooth_Paths.valid_path :::: (real \<Rightarrow> 'a) \<Rightarrow> bool
###defs
datatype num = One | Bit0 num | Bit1 num
datatype num = One | Bit0 num | Bit1 num
primrec numeral :: "num \<Rightarrow> 'a"
where
numeral_One: "numeral One = 1"
| numeral_Bit0: "numeral (Bit0 n) = numeral n + numeral n"
| numeral_Bit1: "numeral (Bit1 n) = numeral n + numeral n + 1"
class one =
fixes one :: 'a ("1")
class inverse = divide +
fixes inverse :: "'a \<Rightarrow> 'a"
begin
codatatype complex = Complex (Re: real) (Im: real)
class abs =
fixes abs :: "'a \<Rightarrow> 'a" ("\<bar>_\<bar>")
abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset_eq \<equiv> less_eq"
class real_inner = real_vector + sgn_div_norm + dist_norm + uniformity_dist + open_uniformity +
fixes inner :: "'a \<Rightarrow> 'a \<Rightarrow> real"
assumes inner_commute: "inner x y = inner y x"
and inner_add_left: "inner (x + y) z = inner x z + inner y z"
and inner_scaleR_left [simp]: "inner (scaleR r x) y = r * (inner x y)"
and inner_ge_zero [simp]: "0 \<le> inner x x"
and inner_eq_zero_iff [simp]: "inner x x = 0 \<longleftrightarrow> x = 0"
and norm_eq_sqrt_inner: "norm x = sqrt (inner x x)"
begin
|
###output
\<lbrakk> ?H1 x_1; ?H2 x_2 x_3 \<le> x_4; ?H3 (?H4 x_1) (?H5 (\<lambda>y_0. x_4 < ?H2 x_2 y_0))\<rbrakk> \<Longrightarrow> ?H6 (?H7 (?H8 x_1 x_3)) < ?H9 ?H10 (?H11 (?H12 ?H13))###end
|
Analysis/Path_Connected
|
Path_Connected.simple_path_join3I
|
lemma simple_path_join3I:
assumes "arc p1" "arc p2" "arc p3"
assumes "path_image p1 \<inter> path_image p2 \<subseteq> {pathstart p2}"
assumes "path_image p2 \<inter> path_image p3 \<subseteq> {pathstart p3}"
assumes "path_image p1 \<inter> path_image p3 \<subseteq> {pathstart p1} \<inter> {pathfinish p3}"
assumes "pathfinish p1 = pathstart p2" "pathfinish p2 = pathstart p3"
shows "simple_path (p1 +++ p2 +++ p3)"
|
arc ?p1.0 \<Longrightarrow> arc ?p2.0 \<Longrightarrow> arc ?p3.0 \<Longrightarrow> path_image ?p1.0 \<inter> path_image ?p2.0 \<subseteq> {pathstart ?p2.0} \<Longrightarrow> path_image ?p2.0 \<inter> path_image ?p3.0 \<subseteq> {pathstart ?p3.0} \<Longrightarrow> path_image ?p1.0 \<inter> path_image ?p3.0 \<subseteq> {pathstart ?p1.0} \<inter> {pathfinish ?p3.0} \<Longrightarrow> pathfinish ?p1.0 = pathstart ?p2.0 \<Longrightarrow> pathfinish ?p2.0 = pathstart ?p3.0 \<Longrightarrow> simple_path (?p1.0 +++ ?p2.0 +++ ?p3.0)
|
\<lbrakk> ?H1 x_1; ?H1 x_2; ?H1 x_3; ?H2 (?H3 (?H4 x_1) (?H4 x_2)) (?H5 (?H6 x_2) ?H7); ?H2 (?H3 (?H4 x_2) (?H4 x_3)) (?H5 (?H6 x_3) ?H7); ?H2 (?H3 (?H4 x_1) (?H4 x_3)) (?H3 (?H5 (?H6 x_1) ?H7) (?H5 (?H8 x_3) ?H7)); ?H8 x_1 = ?H6 x_2; ?H8 x_2 = ?H6 x_3\<rbrakk> \<Longrightarrow> ?H9 (?H10 x_1 (?H10 x_2 x_3))
|
[
"Path_Connected.joinpaths",
"Path_Connected.simple_path",
"Path_Connected.pathfinish",
"Set.empty",
"Path_Connected.pathstart",
"Set.insert",
"Path_Connected.path_image",
"Set.inter",
"Set.subset_eq",
"Path_Connected.arc"
] |
[
"(real \\<Rightarrow> 'a) \\<Rightarrow> (real \\<Rightarrow> 'a) \\<Rightarrow> real \\<Rightarrow> 'a",
"(real \\<Rightarrow> 'a) \\<Rightarrow> bool",
"(real \\<Rightarrow> 'a) \\<Rightarrow> 'a",
"'a set",
"(real \\<Rightarrow> 'a) \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"(real \\<Rightarrow> 'a) \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool",
"(real \\<Rightarrow> 'a) \\<Rightarrow> bool"
] |
[
"abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"",
"definition insert :: \"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set\"\n where insert_compr: \"insert a B = {x. x = a \\<or> x \\<in> B}\"",
"abbreviation inter :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<inter>\" 70)\n where \"(\\<inter>) \\<equiv> inf\"",
"abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\""
] |
template
|
###lemma
arc ?p1.0 \<Longrightarrow> arc ?p2.0 \<Longrightarrow> arc ?p3.0 \<Longrightarrow> path_image ?p1.0 \<inter> path_image ?p2.0 \<subseteq> {pathstart ?p2.0} \<Longrightarrow> path_image ?p2.0 \<inter> path_image ?p3.0 \<subseteq> {pathstart ?p3.0} \<Longrightarrow> path_image ?p1.0 \<inter> path_image ?p3.0 \<subseteq> {pathstart ?p1.0} \<inter> {pathfinish ?p3.0} \<Longrightarrow> pathfinish ?p1.0 = pathstart ?p2.0 \<Longrightarrow> pathfinish ?p2.0 = pathstart ?p3.0 \<Longrightarrow> simple_path (?p1.0 +++ ?p2.0 +++ ?p3.0)
###symbols
Path_Connected.joinpaths :::: (real \<Rightarrow> 'a) \<Rightarrow> (real \<Rightarrow> 'a) \<Rightarrow> real \<Rightarrow> 'a
Path_Connected.simple_path :::: (real \<Rightarrow> 'a) \<Rightarrow> bool
Path_Connected.pathfinish :::: (real \<Rightarrow> 'a) \<Rightarrow> 'a
Set.empty :::: 'a set
Path_Connected.pathstart :::: (real \<Rightarrow> 'a) \<Rightarrow> 'a
Set.insert :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a set
Path_Connected.path_image :::: (real \<Rightarrow> 'a) \<Rightarrow> 'a set
Set.inter :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set
Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
Path_Connected.arc :::: (real \<Rightarrow> 'a) \<Rightarrow> bool
###defs
abbreviation empty :: "'a set" ("{}")
where "{} \<equiv> bot"
definition insert :: "'a \<Rightarrow> 'a set \<Rightarrow> 'a set"
where insert_compr: "insert a B = {x. x = a \<or> x \<in> B}"
abbreviation inter :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<inter>" 70)
where "(\<inter>) \<equiv> inf"
abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset_eq \<equiv> less_eq"
|
###output
\<lbrakk> ?H1 x_1; ?H1 x_2; ?H1 x_3; ?H2 (?H3 (?H4 x_1) (?H4 x_2)) (?H5 (?H6 x_2) ?H7); ?H2 (?H3 (?H4 x_2) (?H4 x_3)) (?H5 (?H6 x_3) ?H7); ?H2 (?H3 (?H4 x_1) (?H4 x_3)) (?H3 (?H5 (?H6 x_1) ?H7) (?H5 (?H8 x_3) ?H7)); ?H8 x_1 = ?H6 x_2; ?H8 x_2 = ?H6 x_3\<rbrakk> \<Longrightarrow> ?H9 (?H10 x_1 (?H10 x_2 x_3))###end
|
GCD
|
GCD.gcd_0_int
|
lemma gcd_0_int [simp]: "gcd x 0 = \<bar>x\<bar>"
for x :: int
|
gcd ?x 0 = \<bar> ?x\<bar>
|
?H1 x_1 ?H2 = ?H3 x_1
|
[
"Groups.abs_class.abs",
"Groups.zero_class.zero",
"GCD.gcd_class.gcd"
] |
[
"'a \\<Rightarrow> 'a",
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a"
] |
[
"class abs =\n fixes abs :: \"'a \\<Rightarrow> 'a\" (\"\\<bar>_\\<bar>\")",
"class zero =\n fixes zero :: 'a (\"0\")",
"class gcd = zero + one + dvd +\n fixes gcd :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\"\n and lcm :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\""
] |
template
|
###lemma
gcd ?x 0 = \<bar> ?x\<bar>
###symbols
Groups.abs_class.abs :::: 'a \<Rightarrow> 'a
Groups.zero_class.zero :::: 'a
GCD.gcd_class.gcd :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
###defs
class abs =
fixes abs :: "'a \<Rightarrow> 'a" ("\<bar>_\<bar>")
class zero =
fixes zero :: 'a ("0")
class gcd = zero + one + dvd +
fixes gcd :: "'a \<Rightarrow> 'a \<Rightarrow> 'a"
and lcm :: "'a \<Rightarrow> 'a \<Rightarrow> 'a"
|
###output
?H1 x_1 ?H2 = ?H3 x_1###end
|
Set_Interval
|
Set_Interval.sum_natinterval_diff
|
lemma sum_natinterval_diff:
fixes f:: "nat \<Rightarrow> ('a::ab_group_add)"
shows "sum (\<lambda>k. f k - f(k + 1)) {(m::nat) .. n} =
(if m \<le> n then f m - f(n + 1) else 0)"
|
(\<Sum>k = ?m.. ?n. ?f k - ?f (k + 1)) = (if ?m \<le> ?n then ?f ?m - ?f (?n + 1) else (0:: ?'a))
|
?H1 (\<lambda>y_0. ?H2 (x_1 y_0) (x_1 (?H3 y_0 ?H4))) (?H5 x_2 x_3) = (if x_2 \<le> x_3 then ?H2 (x_1 x_2) (x_1 (?H3 x_3 ?H4)) else ?H6)
|
[
"Groups.zero_class.zero",
"Set_Interval.ord_class.atLeastAtMost",
"Groups.one_class.one",
"Groups.plus_class.plus",
"Groups.minus_class.minus",
"Groups_Big.comm_monoid_add_class.sum"
] |
[
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a set",
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"class one =\n fixes one :: 'a (\"1\")",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)"
] |
template
|
###lemma
(\<Sum>k = ?m.. ?n. ?f k - ?f (k + 1)) = (if ?m \<le> ?n then ?f ?m - ?f (?n + 1) else (0:: ?'a))
###symbols
Groups.zero_class.zero :::: 'a
Set_Interval.ord_class.atLeastAtMost :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a set
Groups.one_class.one :::: 'a
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups_Big.comm_monoid_add_class.sum :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b
###defs
class zero =
fixes zero :: 'a ("0")
class one =
fixes one :: 'a ("1")
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
|
###output
?H1 (\<lambda>y_0. ?H2 (x_1 y_0) (x_1 (?H3 y_0 ?H4))) (?H5 x_2 x_3) = (if x_2 \<le> x_3 then ?H2 (x_1 x_2) (x_1 (?H3 x_3 ?H4)) else ?H6)###end
|
Transfer
|
Transfer.transfer_raw(157)
| null |
bi_total ?A \<Longrightarrow> bi_total ?B \<Longrightarrow> Transfer.Rel (rel_fun (rel_fun ?A (rel_fun ?B (=))) (=)) right_total right_total
|
\<lbrakk> ?H1 x_1; ?H1 x_2\<rbrakk> \<Longrightarrow> ?H2 (?H3 (?H3 x_1 (?H3 x_2 (=))) (=)) ?H4 ?H4
|
[
"Transfer.right_total",
"BNF_Def.rel_fun",
"Transfer.Rel",
"Transfer.bi_total"
] |
[
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'c) \\<Rightarrow> ('b \\<Rightarrow> 'd) \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'b \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool"
] |
[
"definition right_total :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool\"\n where \"right_total R \\<longleftrightarrow> (\\<forall>y. \\<exists>x. R x y)\"",
"definition\n rel_fun :: \"('a \\<Rightarrow> 'c \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'd) \\<Rightarrow> bool\"\nwhere\n \"rel_fun A B = (\\<lambda>f g. \\<forall>x y. A x y \\<longrightarrow> B (f x) (g y))\"",
"definition Rel :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'b \\<Rightarrow> bool\"\n where \"Rel r \\<equiv> r\"",
"definition bi_total :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool\"\n where \"bi_total R \\<longleftrightarrow> (\\<forall>x. \\<exists>y. R x y) \\<and> (\\<forall>y. \\<exists>x. R x y)\""
] |
template
|
###lemma
bi_total ?A \<Longrightarrow> bi_total ?B \<Longrightarrow> Transfer.Rel (rel_fun (rel_fun ?A (rel_fun ?B (=))) (=)) right_total right_total
###symbols
Transfer.right_total :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool
BNF_Def.rel_fun :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'c) \<Rightarrow> ('b \<Rightarrow> 'd) \<Rightarrow> bool
Transfer.Rel :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool
Transfer.bi_total :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool
###defs
definition right_total :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool"
where "right_total R \<longleftrightarrow> (\<forall>y. \<exists>x. R x y)"
definition
rel_fun :: "('a \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'd) \<Rightarrow> bool"
where
"rel_fun A B = (\<lambda>f g. \<forall>x y. A x y \<longrightarrow> B (f x) (g y))"
definition Rel :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool"
where "Rel r \<equiv> r"
definition bi_total :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool"
where "bi_total R \<longleftrightarrow> (\<forall>x. \<exists>y. R x y) \<and> (\<forall>y. \<exists>x. R x y)"
|
###output
\<lbrakk> ?H1 x_1; ?H1 x_2\<rbrakk> \<Longrightarrow> ?H2 (?H3 (?H3 x_1 (?H3 x_2 (=))) (=)) ?H4 ?H4###end
|
HOL
|
HOL.no_atp(67)
| null |
?P (case ?prod of (x, xa) \<Rightarrow> ?f x xa) = (\<nexists>x1 x2. ?prod = (x1, x2) \<and> \<not> ?P (?f x1 x2))
|
x_1 (?H1 x_2 x_3) = (\<nexists>y_0 y_1. x_3 = (y_0, y_1) \<and> \<not> x_1 (x_2 y_0 y_1))
|
[
"Product_Type.prod.case_prod"
] |
[
"('a \\<Rightarrow> 'b \\<Rightarrow> 'c) \\<Rightarrow> 'a \\<times> 'b \\<Rightarrow> 'c"
] |
[
"definition \"prod = {f. \\<exists>a b. f = Pair_Rep (a::'a) (b::'b)}\""
] |
template
|
###lemma
?P (case ?prod of (x, xa) \<Rightarrow> ?f x xa) = (\<nexists>x1 x2. ?prod = (x1, x2) \<and> \<not> ?P (?f x1 x2))
###symbols
Product_Type.prod.case_prod :::: ('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'a \<times> 'b \<Rightarrow> 'c
###defs
definition "prod = {f. \<exists>a b. f = Pair_Rep (a::'a) (b::'b)}"
|
###output
x_1 (?H1 x_2 x_3) = (\<nexists>y_0 y_1. x_3 = (y_0, y_1) \<and> \<not> x_1 (x_2 y_0 y_1))###end
|
Analysis/Elementary_Topology
|
Elementary_Topology.seq_compact_Int_closed
|
lemma seq_compact_Int_closed:
assumes "seq_compact S" and "closed T"
shows "seq_compact (S \<inter> T)"
|
seq_compact ?S \<Longrightarrow> closed ?T \<Longrightarrow> seq_compact (?S \<inter> ?T)
|
\<lbrakk> ?H1 x_1; ?H2 x_2\<rbrakk> \<Longrightarrow> ?H1 (?H3 x_1 x_2)
|
[
"Set.inter",
"Topological_Spaces.topological_space_class.closed",
"Elementary_Topology.seq_compact"
] |
[
"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> bool",
"'a set \\<Rightarrow> bool"
] |
[
"abbreviation inter :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<inter>\" 70)\n where \"(\\<inter>) \\<equiv> inf\"",
"class topological_space = \"open\" +\n assumes open_UNIV [simp, intro]: \"open UNIV\"\n assumes open_Int [intro]: \"open S \\<Longrightarrow> open T \\<Longrightarrow> open (S \\<inter> T)\"\n assumes open_Union [intro]: \"\\<forall>S\\<in>K. open S \\<Longrightarrow> open (\\<Union>K)\"\nbegin"
] |
template
|
###lemma
seq_compact ?S \<Longrightarrow> closed ?T \<Longrightarrow> seq_compact (?S \<inter> ?T)
###symbols
Set.inter :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set
Topological_Spaces.topological_space_class.closed :::: 'a set \<Rightarrow> bool
Elementary_Topology.seq_compact :::: 'a set \<Rightarrow> bool
###defs
abbreviation inter :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<inter>" 70)
where "(\<inter>) \<equiv> inf"
class topological_space = "open" +
assumes open_UNIV [simp, intro]: "open UNIV"
assumes open_Int [intro]: "open S \<Longrightarrow> open T \<Longrightarrow> open (S \<inter> T)"
assumes open_Union [intro]: "\<forall>S\<in>K. open S \<Longrightarrow> open (\<Union>K)"
begin
|
###output
\<lbrakk> ?H1 x_1; ?H2 x_2\<rbrakk> \<Longrightarrow> ?H1 (?H3 x_1 x_2)###end
|
UNITY/Comp/Progress
|
Progress.atLeast_ensures
|
lemma atLeast_ensures: "FF \<in> atLeast (k - 1) ensures atLeast (k::int)"
|
FF \<in> { ?k - 1..} ensures { ?k..}
|
?H1 \<in> ?H2 (?H3 (?H4 x_1 ?H5)) (?H3 x_1)
|
[
"Groups.one_class.one",
"Groups.minus_class.minus",
"Set_Interval.ord_class.atLeast",
"WFair.ensures",
"Progress.FF"
] |
[
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a program set",
"int program"
] |
[
"class one =\n fixes one :: 'a (\"1\")",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)",
"definition\n ensures :: \"['a set, 'a set] => 'a program set\" (infixl \"ensures\" 60) where\n \"A ensures B == (A-B co A \\<union> B) \\<inter> transient (A-B)\""
] |
template
|
###lemma
FF \<in> { ?k - 1..} ensures { ?k..}
###symbols
Groups.one_class.one :::: 'a
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Set_Interval.ord_class.atLeast :::: 'a \<Rightarrow> 'a set
WFair.ensures :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a program set
Progress.FF :::: int program
###defs
class one =
fixes one :: 'a ("1")
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
definition
ensures :: "['a set, 'a set] => 'a program set" (infixl "ensures" 60) where
"A ensures B == (A-B co A \<union> B) \<inter> transient (A-B)"
|
###output
?H1 \<in> ?H2 (?H3 (?H4 x_1 ?H5)) (?H3 x_1)###end
|
Bali/DefiniteAssignmentCorrect
|
DefiniteAssignmentCorrect.union_subseteqIl
|
lemma union_subseteqIl: "\<lbrakk>A \<union> B \<subseteq> C; A' \<subseteq> A\<rbrakk> \<Longrightarrow> A' \<union> B \<subseteq> C"
|
?A \<union> ?B \<subseteq> ?C \<Longrightarrow> ?A' \<subseteq> ?A \<Longrightarrow> ?A' \<union> ?B \<subseteq> ?C
|
\<lbrakk> ?H1 (?H2 x_1 x_2) x_3; ?H1 x_4 x_1\<rbrakk> \<Longrightarrow> ?H1 (?H2 x_4 x_2) x_3
|
[
"Set.union",
"Set.subset_eq"
] |
[
"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"abbreviation union :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<union>\" 65)\n where \"union \\<equiv> sup\"",
"abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\""
] |
template
|
###lemma
?A \<union> ?B \<subseteq> ?C \<Longrightarrow> ?A' \<subseteq> ?A \<Longrightarrow> ?A' \<union> ?B \<subseteq> ?C
###symbols
Set.union :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set
Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
###defs
abbreviation union :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<union>" 65)
where "union \<equiv> sup"
abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset_eq \<equiv> less_eq"
|
###output
\<lbrakk> ?H1 (?H2 x_1 x_2) x_3; ?H1 x_4 x_1\<rbrakk> \<Longrightarrow> ?H1 (?H2 x_4 x_2) x_3###end
|
Transitive_Closure
|
Transitive_Closure.finite_trancl_ntranl
|
lemma finite_trancl_ntranl: "finite R \<Longrightarrow> trancl R = ntrancl (card R - 1) R"
|
finite ?R \<Longrightarrow> ?R\<^sup>+ = ntrancl (card ?R - 1) ?R
|
?H1 x_1 \<Longrightarrow> ?H2 x_1 = ?H3 (?H4 (?H5 x_1) ?H6) x_1
|
[
"Groups.one_class.one",
"Finite_Set.card",
"Groups.minus_class.minus",
"Transitive_Closure.ntrancl",
"Transitive_Closure.trancl",
"Finite_Set.finite"
] |
[
"'a",
"'a set \\<Rightarrow> nat",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"nat \\<Rightarrow> ('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set",
"('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set",
"'a set \\<Rightarrow> bool"
] |
[
"class one =\n fixes one :: 'a (\"1\")",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)",
"definition ntrancl :: \"nat \\<Rightarrow> ('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set\"\n where \"ntrancl n R = (\\<Union>i\\<in>{i. 0 < i \\<and> i \\<le> Suc n}. R ^^ i)\"",
"inductive_set trancl :: \"('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set\" (\"(_\\<^sup>+)\" [1000] 999)\n for r :: \"('a \\<times> 'a) set\"\n where\n r_into_trancl [intro, Pure.intro]: \"(a, b) \\<in> r \\<Longrightarrow> (a, b) \\<in> r\\<^sup>+\"\n | trancl_into_trancl [Pure.intro]: \"(a, b) \\<in> r\\<^sup>+ \\<Longrightarrow> (b, c) \\<in> r \\<Longrightarrow> (a, c) \\<in> r\\<^sup>+\"",
"class finite =\n assumes finite_UNIV: \"finite (UNIV :: 'a set)\"\nbegin"
] |
template
|
###lemma
finite ?R \<Longrightarrow> ?R\<^sup>+ = ntrancl (card ?R - 1) ?R
###symbols
Groups.one_class.one :::: 'a
Finite_Set.card :::: 'a set \<Rightarrow> nat
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Transitive_Closure.ntrancl :::: nat \<Rightarrow> ('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set
Transitive_Closure.trancl :::: ('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set
Finite_Set.finite :::: 'a set \<Rightarrow> bool
###defs
class one =
fixes one :: 'a ("1")
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
definition ntrancl :: "nat \<Rightarrow> ('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set"
where "ntrancl n R = (\<Union>i\<in>{i. 0 < i \<and> i \<le> Suc n}. R ^^ i)"
inductive_set trancl :: "('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set" ("(_\<^sup>+)" [1000] 999)
for r :: "('a \<times> 'a) set"
where
r_into_trancl [intro, Pure.intro]: "(a, b) \<in> r \<Longrightarrow> (a, b) \<in> r\<^sup>+"
| trancl_into_trancl [Pure.intro]: "(a, b) \<in> r\<^sup>+ \<Longrightarrow> (b, c) \<in> r \<Longrightarrow> (a, c) \<in> r\<^sup>+"
class finite =
assumes finite_UNIV: "finite (UNIV :: 'a set)"
begin
|
###output
?H1 x_1 \<Longrightarrow> ?H2 x_1 = ?H3 (?H4 (?H5 x_1) ?H6) x_1###end
|
HOLCF/IOA/Pred
|
Predicate.not_is_empty_single
| null |
\<not> Predicate.is_empty (Predicate.single ?x)
|
\<not> ?H1 (?H2 x_1)
|
[
"Predicate.single",
"Predicate.is_empty"
] |
[
"'a \\<Rightarrow> 'a Predicate.pred",
"'a Predicate.pred \\<Rightarrow> bool"
] |
[
"definition single :: \"'a \\<Rightarrow> 'a pred\" where\n \"single x = Pred ((=) x)\"",
"definition is_empty :: \"'a pred \\<Rightarrow> bool\" where\n \"is_empty A \\<longleftrightarrow> A = \\<bottom>\""
] |
template
|
###lemma
\<not> Predicate.is_empty (Predicate.single ?x)
###symbols
Predicate.single :::: 'a \<Rightarrow> 'a Predicate.pred
Predicate.is_empty :::: 'a Predicate.pred \<Rightarrow> bool
###defs
definition single :: "'a \<Rightarrow> 'a pred" where
"single x = Pred ((=) x)"
definition is_empty :: "'a pred \<Rightarrow> bool" where
"is_empty A \<longleftrightarrow> A = \<bottom>"
|
###output
\<not> ?H1 (?H2 x_1)###end
|
Library/Extended_Nat
|
Extended_Nat.idiff_infinity_right
|
lemma idiff_infinity_right [simp, code]: "enat a - \<infinity> = 0"
|
enat ?a - \<infinity> = 0
|
?H1 (?H2 x_1) ?H3 = ?H4
|
[
"Groups.zero_class.zero",
"Extended_Nat.infinity_class.infinity",
"Extended_Nat.enat",
"Groups.minus_class.minus"
] |
[
"'a",
"'a",
"nat \\<Rightarrow> enat",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"class infinity =\n fixes infinity :: \"'a\" (\"\\<infinity>\")",
"definition enat :: \"nat \\<Rightarrow> enat\" where\n \"enat n = Abs_enat (Some n)\"",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)"
] |
template
|
###lemma
enat ?a - \<infinity> = 0
###symbols
Groups.zero_class.zero :::: 'a
Extended_Nat.infinity_class.infinity :::: 'a
Extended_Nat.enat :::: nat \<Rightarrow> enat
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
###defs
class zero =
fixes zero :: 'a ("0")
class infinity =
fixes infinity :: "'a" ("\<infinity>")
definition enat :: "nat \<Rightarrow> enat" where
"enat n = Abs_enat (Some n)"
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
|
###output
?H1 (?H2 x_1) ?H3 = ?H4###end
|
Library/Word
|
Word.unat_drop_bit_eq
|
lemma unat_drop_bit_eq:
\<open>unat (drop_bit n w) = drop_bit n (unat w)\<close>
|
unat (drop_bit ?n ?w) = drop_bit ?n (unat ?w)
|
?H1 (?H2 x_1 x_2) = ?H2 x_1 (?H1 x_2)
|
[
"Bit_Operations.semiring_bit_operations_class.drop_bit",
"Word.unat"
] |
[
"nat \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a word \\<Rightarrow> nat"
] |
[
"class semiring_bit_operations = semiring_bits +\n fixes \"and\" :: \\<open>'a \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close> (infixr \\<open>AND\\<close> 64)\n and or :: \\<open>'a \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close> (infixr \\<open>OR\\<close> 59)\n and xor :: \\<open>'a \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close> (infixr \\<open>XOR\\<close> 59)\n and mask :: \\<open>nat \\<Rightarrow> 'a\\<close>\n and set_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and unset_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and flip_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and push_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and drop_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and take_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n assumes and_rec: \\<open>a AND b = of_bool (odd a \\<and> odd b) + 2 * ((a div 2) AND (b div 2))\\<close>\n and or_rec: \\<open>a OR b = of_bool (odd a \\<or> odd b) + 2 * ((a div 2) OR (b div 2))\\<close>\n and xor_rec: \\<open>a XOR b = of_bool (odd a \\<noteq> odd b) + 2 * ((a div 2) XOR (b div 2))\\<close>\n and mask_eq_exp_minus_1: \\<open>mask n = 2 ^ n - 1\\<close>\n and set_bit_eq_or: \\<open>set_bit n a = a OR push_bit n 1\\<close>\n and unset_bit_eq_or_xor: \\<open>unset_bit n a = (a OR push_bit n 1) XOR push_bit n 1\\<close>\n and flip_bit_eq_xor: \\<open>flip_bit n a = a XOR push_bit n 1\\<close>\n and push_bit_eq_mult: \\<open>push_bit n a = a * 2 ^ n\\<close>\n and drop_bit_eq_div: \\<open>drop_bit n a = a div 2 ^ n\\<close>\n and take_bit_eq_mod: \\<open>take_bit n a = a mod 2 ^ n\\<close>\nbegin",
"abbreviation unat :: \\<open>'a::len word \\<Rightarrow> nat\\<close>\n where \\<open>unat \\<equiv> unsigned\\<close>"
] |
template
|
###lemma
unat (drop_bit ?n ?w) = drop_bit ?n (unat ?w)
###symbols
Bit_Operations.semiring_bit_operations_class.drop_bit :::: nat \<Rightarrow> 'a \<Rightarrow> 'a
Word.unat :::: 'a word \<Rightarrow> nat
###defs
class semiring_bit_operations = semiring_bits +
fixes "and" :: \<open>'a \<Rightarrow> 'a \<Rightarrow> 'a\<close> (infixr \<open>AND\<close> 64)
and or :: \<open>'a \<Rightarrow> 'a \<Rightarrow> 'a\<close> (infixr \<open>OR\<close> 59)
and xor :: \<open>'a \<Rightarrow> 'a \<Rightarrow> 'a\<close> (infixr \<open>XOR\<close> 59)
and mask :: \<open>nat \<Rightarrow> 'a\<close>
and set_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close>
and unset_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close>
and flip_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close>
and push_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close>
and drop_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close>
and take_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close>
assumes and_rec: \<open>a AND b = of_bool (odd a \<and> odd b) + 2 * ((a div 2) AND (b div 2))\<close>
and or_rec: \<open>a OR b = of_bool (odd a \<or> odd b) + 2 * ((a div 2) OR (b div 2))\<close>
and xor_rec: \<open>a XOR b = of_bool (odd a \<noteq> odd b) + 2 * ((a div 2) XOR (b div 2))\<close>
and mask_eq_exp_minus_1: \<open>mask n = 2 ^ n - 1\<close>
and set_bit_eq_or: \<open>set_bit n a = a OR push_bit n 1\<close>
and unset_bit_eq_or_xor: \<open>unset_bit n a = (a OR push_bit n 1) XOR push_bit n 1\<close>
and flip_bit_eq_xor: \<open>flip_bit n a = a XOR push_bit n 1\<close>
and push_bit_eq_mult: \<open>push_bit n a = a * 2 ^ n\<close>
and drop_bit_eq_div: \<open>drop_bit n a = a div 2 ^ n\<close>
and take_bit_eq_mod: \<open>take_bit n a = a mod 2 ^ n\<close>
begin
abbreviation unat :: \<open>'a::len word \<Rightarrow> nat\<close>
where \<open>unat \<equiv> unsigned\<close>
|
###output
?H1 (?H2 x_1 x_2) = ?H2 x_1 (?H1 x_2)###end
|
Library/Extended_Real
|
Extended_Real.sums_ereal_positive
|
lemma sums_ereal_positive:
fixes f :: "nat \<Rightarrow> ereal"
assumes "\<And>i. 0 \<le> f i"
shows "f sums (SUP n. \<Sum>i<n. f i)"
|
(\<And>i. 0 \<le> ?f i) \<Longrightarrow> ?f sums (SUP n. sum ?f {..<n})
|
(\<And>y_0. ?H1 \<le> x_1 y_0) \<Longrightarrow> ?H2 x_1 (?H3 (?H4 (\<lambda>y_1. ?H5 x_1 (?H6 y_1))))
|
[
"Set_Interval.ord_class.lessThan",
"Groups_Big.comm_monoid_add_class.sum",
"Set.range",
"Complete_Lattices.Sup_class.Sup",
"Series.sums",
"Groups.zero_class.zero"
] |
[
"'a \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set",
"'a set \\<Rightarrow> 'a",
"(nat \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> bool",
"'a"
] |
[
"abbreviation range :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set\" \\<comment> \\<open>of function\\<close>\n where \"range f \\<equiv> f ` UNIV\"",
"class Sup =\n fixes Sup :: \"'a set \\<Rightarrow> 'a\" (\"\\<Squnion> _\" [900] 900)",
"definition sums :: \"(nat \\<Rightarrow> 'a::{topological_space, comm_monoid_add}) \\<Rightarrow> 'a \\<Rightarrow> bool\"\n (infixr \"sums\" 80)\n where \"f sums s \\<longleftrightarrow> (\\<lambda>n. \\<Sum>i<n. f i) \\<longlonglongrightarrow> s\"",
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
(\<And>i. 0 \<le> ?f i) \<Longrightarrow> ?f sums (SUP n. sum ?f {..<n})
###symbols
Set_Interval.ord_class.lessThan :::: 'a \<Rightarrow> 'a set
Groups_Big.comm_monoid_add_class.sum :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b
Set.range :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b set
Complete_Lattices.Sup_class.Sup :::: 'a set \<Rightarrow> 'a
Series.sums :::: (nat \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> bool
Groups.zero_class.zero :::: 'a
###defs
abbreviation range :: "('a \<Rightarrow> 'b) \<Rightarrow> 'b set" \<comment> \<open>of function\<close>
where "range f \<equiv> f ` UNIV"
class Sup =
fixes Sup :: "'a set \<Rightarrow> 'a" ("\<Squnion> _" [900] 900)
definition sums :: "(nat \<Rightarrow> 'a::{topological_space, comm_monoid_add}) \<Rightarrow> 'a \<Rightarrow> bool"
(infixr "sums" 80)
where "f sums s \<longleftrightarrow> (\<lambda>n. \<Sum>i<n. f i) \<longlonglongrightarrow> s"
class zero =
fixes zero :: 'a ("0")
|
###output
(\<And>y_0. ?H1 \<le> x_1 y_0) \<Longrightarrow> ?H2 x_1 (?H3 (?H4 (\<lambda>y_1. ?H5 x_1 (?H6 y_1))))###end
|
Matrix_LP/SparseMatrix
|
SparseMatrix.sorted_sp_simps(4)
| null |
sorted_spmat (?a # ?as) = (sorted_spvec (snd ?a) \<and> sorted_spmat ?as)
|
?H1 (?H2 x_1 x_2) = (?H3 (?H4 x_1) \<and> ?H1 x_2)
|
[
"Product_Type.prod.snd",
"SparseMatrix.sorted_spvec",
"List.list.Cons",
"SparseMatrix.sorted_spmat"
] |
[
"'a \\<times> 'b \\<Rightarrow> 'b",
"(nat \\<times> 'a) list \\<Rightarrow> bool",
"'a \\<Rightarrow> 'a list \\<Rightarrow> 'a list",
"(nat \\<times> (nat \\<times> 'a) list) list \\<Rightarrow> bool"
] |
[
"definition \"prod = {f. \\<exists>a b. f = Pair_Rep (a::'a) (b::'b)}\"",
"primrec sorted_spvec :: \"'a spvec \\<Rightarrow> bool\"\nwhere\n \"sorted_spvec [] = True\"\n| sorted_spvec_step: \"sorted_spvec (a#as) = (case as of [] \\<Rightarrow> True | b#bs \\<Rightarrow> ((fst a < fst b) & (sorted_spvec as)))\"",
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"",
"primrec sorted_spmat :: \"'a spmat \\<Rightarrow> bool\"\nwhere\n \"sorted_spmat [] = True\"\n| \"sorted_spmat (a#as) = ((sorted_spvec (snd a)) & (sorted_spmat as))\""
] |
template
|
###lemma
sorted_spmat (?a # ?as) = (sorted_spvec (snd ?a) \<and> sorted_spmat ?as)
###symbols
Product_Type.prod.snd :::: 'a \<times> 'b \<Rightarrow> 'b
SparseMatrix.sorted_spvec :::: (nat \<times> 'a) list \<Rightarrow> bool
List.list.Cons :::: 'a \<Rightarrow> 'a list \<Rightarrow> 'a list
SparseMatrix.sorted_spmat :::: (nat \<times> (nat \<times> 'a) list) list \<Rightarrow> bool
###defs
definition "prod = {f. \<exists>a b. f = Pair_Rep (a::'a) (b::'b)}"
primrec sorted_spvec :: "'a spvec \<Rightarrow> bool"
where
"sorted_spvec [] = True"
| sorted_spvec_step: "sorted_spvec (a#as) = (case as of [] \<Rightarrow> True | b#bs \<Rightarrow> ((fst a < fst b) & (sorted_spvec as)))"
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
primrec sorted_spmat :: "'a spmat \<Rightarrow> bool"
where
"sorted_spmat [] = True"
| "sorted_spmat (a#as) = ((sorted_spvec (snd a)) & (sorted_spmat as))"
|
###output
?H1 (?H2 x_1 x_2) = (?H3 (?H4 x_1) \<and> ?H1 x_2)###end
|
Groups
|
Groups_List.prod_list_transfer
| null |
?A (1:: ?'a) (1:: ?'b) \<Longrightarrow> rel_fun ?A (rel_fun ?A ?A) (*) (*) \<Longrightarrow> rel_fun (list_all2 ?A) ?A prod_list prod_list
|
\<lbrakk>x_1 ?H1 ?H1; ?H2 x_1 (?H2 x_1 x_1) ?H3 ?H3\<rbrakk> \<Longrightarrow> ?H2 (?H4 x_1) x_1 ?H5 ?H5
|
[
"Groups_List.monoid_mult_class.prod_list",
"List.list.list_all2",
"Groups.times_class.times",
"BNF_Def.rel_fun",
"Groups.one_class.one"
] |
[
"'a list \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> 'b list \\<Rightarrow> bool",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'c) \\<Rightarrow> ('b \\<Rightarrow> 'd) \\<Rightarrow> bool",
"'a"
] |
[
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"definition\n rel_fun :: \"('a \\<Rightarrow> 'c \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'd) \\<Rightarrow> bool\"\nwhere\n \"rel_fun A B = (\\<lambda>f g. \\<forall>x y. A x y \\<longrightarrow> B (f x) (g y))\"",
"class one =\n fixes one :: 'a (\"1\")"
] |
template
|
###lemma
?A (1:: ?'a) (1:: ?'b) \<Longrightarrow> rel_fun ?A (rel_fun ?A ?A) (*) (*) \<Longrightarrow> rel_fun (list_all2 ?A) ?A prod_list prod_list
###symbols
Groups_List.monoid_mult_class.prod_list :::: 'a list \<Rightarrow> 'a
List.list.list_all2 :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> 'b list \<Rightarrow> bool
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
BNF_Def.rel_fun :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'c) \<Rightarrow> ('b \<Rightarrow> 'd) \<Rightarrow> bool
Groups.one_class.one :::: 'a
###defs
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
definition
rel_fun :: "('a \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'd) \<Rightarrow> bool"
where
"rel_fun A B = (\<lambda>f g. \<forall>x y. A x y \<longrightarrow> B (f x) (g y))"
class one =
fixes one :: 'a ("1")
|
###output
\<lbrakk>x_1 ?H1 ?H1; ?H2 x_1 (?H2 x_1 x_1) ?H3 ?H3\<rbrakk> \<Longrightarrow> ?H2 (?H4 x_1) x_1 ?H5 ?H5###end
|
Analysis/Product_Vector
|
Product_Vector.norm_commute
|
lemma norm_commute: "norm (x,y) = norm (y,x)"
|
norm (?x, ?y) = norm (?y, ?x)
|
?H1 (x_1, x_2) = ?H1 (x_2, x_1)
|
[
"Real_Vector_Spaces.norm_class.norm"
] |
[
"'a \\<Rightarrow> real"
] |
[
"class norm =\n fixes norm :: \"'a \\<Rightarrow> real\""
] |
template
|
###lemma
norm (?x, ?y) = norm (?y, ?x)
###symbols
Real_Vector_Spaces.norm_class.norm :::: 'a \<Rightarrow> real
###defs
class norm =
fixes norm :: "'a \<Rightarrow> real"
|
###output
?H1 (x_1, x_2) = ?H1 (x_2, x_1)###end
|
Computational_Algebra/Nth_Powers
|
Nth_Powers.nth_root_nat_aux2(1)
|
lemma nth_root_nat_aux2:
assumes "k > 0"
shows "finite {m::nat. m ^ k \<le> n}" "{m::nat. m ^ k \<le> n} \<noteq> {}"
|
0 < ?k \<Longrightarrow> finite {m. m ^ ?k \<le> ?n}
|
?H1 < x_1 \<Longrightarrow> ?H2 (?H3 (\<lambda>y_0. ?H4 y_0 x_1 \<le> x_2))
|
[
"Power.power_class.power",
"Set.Collect",
"Finite_Set.finite",
"Groups.zero_class.zero"
] |
[
"'a \\<Rightarrow> nat \\<Rightarrow> 'a",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> bool",
"'a"
] |
[
"primrec power :: \"'a \\<Rightarrow> nat \\<Rightarrow> 'a\" (infixr \"^\" 80)\n where\n power_0: \"a ^ 0 = 1\"\n | power_Suc: \"a ^ Suc n = a * a ^ n\"",
"class finite =\n assumes finite_UNIV: \"finite (UNIV :: 'a set)\"\nbegin",
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
0 < ?k \<Longrightarrow> finite {m. m ^ ?k \<le> ?n}
###symbols
Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a
Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set
Finite_Set.finite :::: 'a set \<Rightarrow> bool
Groups.zero_class.zero :::: 'a
###defs
primrec power :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^" 80)
where
power_0: "a ^ 0 = 1"
| power_Suc: "a ^ Suc n = a * a ^ n"
class finite =
assumes finite_UNIV: "finite (UNIV :: 'a set)"
begin
class zero =
fixes zero :: 'a ("0")
|
###output
?H1 < x_1 \<Longrightarrow> ?H2 (?H3 (\<lambda>y_0. ?H4 y_0 x_1 \<le> x_2))###end
|
Complex_Analysis/Complex_Analysis
|
Complex_Analysis_Basics.holomorphic_on_prod
| null |
(\<And>i. i \<in> ?I \<Longrightarrow> ?f i holomorphic_on ?A) \<Longrightarrow> (\<lambda>x. \<Prod>i\<in> ?I. ?f i x) holomorphic_on ?A
|
(\<And>y_0. y_0 \<in> x_1 \<Longrightarrow> ?H1 (x_2 y_0) x_3) \<Longrightarrow> ?H1 (\<lambda>y_1. ?H2 (\<lambda>y_2. x_2 y_2 y_1) x_1) x_3
|
[
"Groups_Big.comm_monoid_mult_class.prod",
"Complex_Analysis_Basics.holomorphic_on"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b",
"(complex \\<Rightarrow> complex) \\<Rightarrow> complex set \\<Rightarrow> bool"
] |
[] |
template
|
###lemma
(\<And>i. i \<in> ?I \<Longrightarrow> ?f i holomorphic_on ?A) \<Longrightarrow> (\<lambda>x. \<Prod>i\<in> ?I. ?f i x) holomorphic_on ?A
###symbols
Groups_Big.comm_monoid_mult_class.prod :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b
Complex_Analysis_Basics.holomorphic_on :::: (complex \<Rightarrow> complex) \<Rightarrow> complex set \<Rightarrow> bool
###defs
|
###output
(\<And>y_0. y_0 \<in> x_1 \<Longrightarrow> ?H1 (x_2 y_0) x_3) \<Longrightarrow> ?H1 (\<lambda>y_1. ?H2 (\<lambda>y_2. x_2 y_2 y_1) x_1) x_3###end
|
Nonstandard_Analysis/NSA
|
NSA.HFinite_Infinitesimal_not_zero
|
lemma HFinite_Infinitesimal_not_zero: "x \<in> HFinite-Infinitesimal \<Longrightarrow> x \<noteq> 0"
|
?x \<in> HFinite - Infinitesimal \<Longrightarrow> ?x \<noteq> 0
|
x_1 \<in> ?H1 ?H2 ?H3 \<Longrightarrow> x_1 \<noteq> ?H4
|
[
"Groups.zero_class.zero",
"NSA.Infinitesimal",
"NSA.HFinite",
"Groups.minus_class.minus"
] |
[
"'a",
"'a star set",
"'a star set",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"definition Infinitesimal :: \"('a::real_normed_vector) star set\"\n where \"Infinitesimal = {x. \\<forall>r \\<in> Reals. 0 < r \\<longrightarrow> hnorm x < r}\"",
"definition HFinite :: \"('a::real_normed_vector) star set\"\n where \"HFinite = {x. \\<exists>r \\<in> Reals. hnorm x < r}\"",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)"
] |
template
|
###lemma
?x \<in> HFinite - Infinitesimal \<Longrightarrow> ?x \<noteq> 0
###symbols
Groups.zero_class.zero :::: 'a
NSA.Infinitesimal :::: 'a star set
NSA.HFinite :::: 'a star set
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
###defs
class zero =
fixes zero :: 'a ("0")
definition Infinitesimal :: "('a::real_normed_vector) star set"
where "Infinitesimal = {x. \<forall>r \<in> Reals. 0 < r \<longrightarrow> hnorm x < r}"
definition HFinite :: "('a::real_normed_vector) star set"
where "HFinite = {x. \<exists>r \<in> Reals. hnorm x < r}"
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
|
###output
x_1 \<in> ?H1 ?H2 ?H3 \<Longrightarrow> x_1 \<noteq> ?H4###end
|
List
|
List.split_list_last
|
lemma split_list_last: "x \<in> set xs \<Longrightarrow> \<exists>ys zs. xs = ys @ x # zs \<and> x \<notin> set zs"
|
?x \<in> set ?xs \<Longrightarrow> \<exists>ys zs. ?xs = ys @ ?x # zs \<and> ?x \<notin> set zs
|
x_1 \<in> ?H1 x_2 \<Longrightarrow> \<exists>y_0 y_1. x_2 = ?H2 y_0 (?H3 x_1 y_1) \<and> ?H4 x_1 (?H1 y_1)
|
[
"Set.not_member",
"List.list.Cons",
"List.append",
"List.list.set"
] |
[
"'a \\<Rightarrow> 'a set \\<Rightarrow> bool",
"'a \\<Rightarrow> 'a list \\<Rightarrow> 'a list",
"'a list \\<Rightarrow> 'a list \\<Rightarrow> 'a list",
"'a list \\<Rightarrow> 'a set"
] |
[
"abbreviation not_member\n where \"not_member x A \\<equiv> \\<not> (x \\<in> A)\" \\<comment> \\<open>non-membership\\<close>",
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"",
"primrec append :: \"'a list \\<Rightarrow> 'a list \\<Rightarrow> 'a list\" (infixr \"@\" 65) where\nappend_Nil: \"[] @ ys = ys\" |\nappend_Cons: \"(x#xs) @ ys = x # xs @ ys\"",
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\""
] |
template
|
###lemma
?x \<in> set ?xs \<Longrightarrow> \<exists>ys zs. ?xs = ys @ ?x # zs \<and> ?x \<notin> set zs
###symbols
Set.not_member :::: 'a \<Rightarrow> 'a set \<Rightarrow> bool
List.list.Cons :::: 'a \<Rightarrow> 'a list \<Rightarrow> 'a list
List.append :::: 'a list \<Rightarrow> 'a list \<Rightarrow> 'a list
List.list.set :::: 'a list \<Rightarrow> 'a set
###defs
abbreviation not_member
where "not_member x A \<equiv> \<not> (x \<in> A)" \<comment> \<open>non-membership\<close>
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
primrec append :: "'a list \<Rightarrow> 'a list \<Rightarrow> 'a list" (infixr "@" 65) where
append_Nil: "[] @ ys = ys" |
append_Cons: "(x#xs) @ ys = x # xs @ ys"
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
|
###output
x_1 \<in> ?H1 x_2 \<Longrightarrow> \<exists>y_0 y_1. x_2 = ?H2 y_0 (?H3 x_1 y_1) \<and> ?H4 x_1 (?H1 y_1)###end
|
IMP/Sec_Type_Expr
|
Sec_Type_Expr.bval_eq_if_eq_le
|
lemma bval_eq_if_eq_le:
"\<lbrakk> s\<^sub>1 = s\<^sub>2 (\<le> l); sec b \<le> l \<rbrakk> \<Longrightarrow> bval b s\<^sub>1 = bval b s\<^sub>2"
|
?s\<^sub>1 = ?s\<^sub>2 (\<le> ?l) \<Longrightarrow> sec ?b \<le> ?l \<Longrightarrow> bval ?b ?s\<^sub>1 = bval ?b ?s\<^sub>2
|
\<lbrakk> ?H1 x_1 x_2 x_3; ?H2 x_4 \<le> x_3\<rbrakk> \<Longrightarrow> ?H3 x_4 x_1 = ?H3 x_4 x_2
|
[
"BExp.bval",
"Sec_Type_Expr.sec_class.sec",
"Sec_Type_Expr.eq_le"
] |
[
"bexp \\<Rightarrow> (char list \\<Rightarrow> int) \\<Rightarrow> bool",
"'a \\<Rightarrow> nat",
"(char list \\<Rightarrow> int) \\<Rightarrow> (char list \\<Rightarrow> int) \\<Rightarrow> nat \\<Rightarrow> bool"
] |
[
"fun bval :: \"bexp \\<Rightarrow> state \\<Rightarrow> bool\" where\n\"bval (Bc v) s = v\" |\n\"bval (Not b) s = (\\<not> bval b s)\" |\n\"bval (And b\\<^sub>1 b\\<^sub>2) s = (bval b\\<^sub>1 s \\<and> bval b\\<^sub>2 s)\" |\n\"bval (Less a\\<^sub>1 a\\<^sub>2) s = (aval a\\<^sub>1 s < aval a\\<^sub>2 s)\"",
"class sec =\nfixes sec :: \"'a \\<Rightarrow> nat\"",
"abbreviation eq_le :: \"state \\<Rightarrow> state \\<Rightarrow> level \\<Rightarrow> bool\"\n (\"(_ = _ '(\\<le> _'))\" [51,51,0] 50) where\n\"s = s' (\\<le> l) == (\\<forall> x. sec x \\<le> l \\<longrightarrow> s x = s' x)\""
] |
template
|
###lemma
?s\<^sub>1 = ?s\<^sub>2 (\<le> ?l) \<Longrightarrow> sec ?b \<le> ?l \<Longrightarrow> bval ?b ?s\<^sub>1 = bval ?b ?s\<^sub>2
###symbols
BExp.bval :::: bexp \<Rightarrow> (char list \<Rightarrow> int) \<Rightarrow> bool
Sec_Type_Expr.sec_class.sec :::: 'a \<Rightarrow> nat
Sec_Type_Expr.eq_le :::: (char list \<Rightarrow> int) \<Rightarrow> (char list \<Rightarrow> int) \<Rightarrow> nat \<Rightarrow> bool
###defs
fun bval :: "bexp \<Rightarrow> state \<Rightarrow> bool" where
"bval (Bc v) s = v" |
"bval (Not b) s = (\<not> bval b s)" |
"bval (And b\<^sub>1 b\<^sub>2) s = (bval b\<^sub>1 s \<and> bval b\<^sub>2 s)" |
"bval (Less a\<^sub>1 a\<^sub>2) s = (aval a\<^sub>1 s < aval a\<^sub>2 s)"
class sec =
fixes sec :: "'a \<Rightarrow> nat"
abbreviation eq_le :: "state \<Rightarrow> state \<Rightarrow> level \<Rightarrow> bool"
("(_ = _ '(\<le> _'))" [51,51,0] 50) where
"s = s' (\<le> l) == (\<forall> x. sec x \<le> l \<longrightarrow> s x = s' x)"
|
###output
\<lbrakk> ?H1 x_1 x_2 x_3; ?H2 x_4 \<le> x_3\<rbrakk> \<Longrightarrow> ?H3 x_4 x_1 = ?H3 x_4 x_2###end
|
Fun_Def
|
Fun_Def.nat_descend_induct
|
lemma nat_descend_induct [case_names base descend]:
fixes P :: "nat \<Rightarrow> bool"
assumes H1: "\<And>k. k > n \<Longrightarrow> P k"
assumes H2: "\<And>k. k \<le> n \<Longrightarrow> (\<And>i. i > k \<Longrightarrow> P i) \<Longrightarrow> P k"
shows "P m"
|
(\<And>k. ?n < k \<Longrightarrow> ?P k) \<Longrightarrow> (\<And>k. k \<le> ?n \<Longrightarrow> (\<And>i. k < i \<Longrightarrow> ?P i) \<Longrightarrow> ?P k) \<Longrightarrow> ?P ?m
|
\<lbrakk>\<And>y_0. x_1 < y_0 \<Longrightarrow> x_2 y_0; \<And>y_1. \<lbrakk>y_1 \<le> x_1; \<And>y_2. y_1 < y_2 \<Longrightarrow> x_2 y_2\<rbrakk> \<Longrightarrow> x_2 y_1\<rbrakk> \<Longrightarrow> x_2 x_3
|
[] |
[] |
[] |
template
|
###lemma
(\<And>k. ?n < k \<Longrightarrow> ?P k) \<Longrightarrow> (\<And>k. k \<le> ?n \<Longrightarrow> (\<And>i. k < i \<Longrightarrow> ?P i) \<Longrightarrow> ?P k) \<Longrightarrow> ?P ?m
###symbols
###defs
|
###output
\<lbrakk>\<And>y_0. x_1 < y_0 \<Longrightarrow> x_2 y_0; \<And>y_1. \<lbrakk>y_1 \<le> x_1; \<And>y_2. y_1 < y_2 \<Longrightarrow> x_2 y_2\<rbrakk> \<Longrightarrow> x_2 y_1\<rbrakk> \<Longrightarrow> x_2 x_3###end
|
Meson
|
Meson.conj_forward
|
lemma conj_forward: "\<lbrakk>P'\<and>Q'; P' \<Longrightarrow> P; Q' \<Longrightarrow> Q \<rbrakk> \<Longrightarrow> P\<and>Q"
|
?P' \<and> ?Q' \<Longrightarrow> (?P' \<Longrightarrow> ?P) \<Longrightarrow> (?Q' \<Longrightarrow> ?Q) \<Longrightarrow> ?P \<and> ?Q
|
\<lbrakk>x_1 \<and> x_2; x_1 \<Longrightarrow> x_3; x_2 \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_3 \<and> x_4
|
[] |
[] |
[] |
template
|
###lemma
?P' \<and> ?Q' \<Longrightarrow> (?P' \<Longrightarrow> ?P) \<Longrightarrow> (?Q' \<Longrightarrow> ?Q) \<Longrightarrow> ?P \<and> ?Q
###symbols
###defs
|
###output
\<lbrakk>x_1 \<and> x_2; x_1 \<Longrightarrow> x_3; x_2 \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_3 \<and> x_4###end
|
Complex_Analysis/Complex_Residues
|
Complex_Residues.residue_lmul
|
lemma residue_lmul:
assumes "open s" "z \<in> s" and f_holo: "f holomorphic_on s - {z}"
shows "residue (\<lambda>z. c * (f z)) z= c * residue f z"
|
open ?s \<Longrightarrow> ?z \<in> ?s \<Longrightarrow> ?f holomorphic_on ?s - { ?z} \<Longrightarrow> residue (\<lambda>z. ?c * ?f z) ?z = ?c * residue ?f ?z
|
\<lbrakk> ?H1 x_1; x_2 \<in> x_1; ?H2 x_3 (?H3 x_1 (?H4 x_2 ?H5))\<rbrakk> \<Longrightarrow> ?H6 (\<lambda>y_0. ?H7 x_4 (x_3 y_0)) x_2 = ?H7 x_4 (?H6 x_3 x_2)
|
[
"Groups.times_class.times",
"Complex_Residues.residue",
"Set.empty",
"Set.insert",
"Groups.minus_class.minus",
"Complex_Analysis_Basics.holomorphic_on",
"Topological_Spaces.open_class.open"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(complex \\<Rightarrow> complex) \\<Rightarrow> complex \\<Rightarrow> complex",
"'a set",
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(complex \\<Rightarrow> complex) \\<Rightarrow> complex set \\<Rightarrow> bool",
"'a set \\<Rightarrow> bool"
] |
[
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"",
"definition insert :: \"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set\"\n where insert_compr: \"insert a B = {x. x = a \\<or> x \\<in> B}\"",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)",
"class \"open\" =\n fixes \"open\" :: \"'a set \\<Rightarrow> bool\""
] |
template
|
###lemma
open ?s \<Longrightarrow> ?z \<in> ?s \<Longrightarrow> ?f holomorphic_on ?s - { ?z} \<Longrightarrow> residue (\<lambda>z. ?c * ?f z) ?z = ?c * residue ?f ?z
###symbols
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Complex_Residues.residue :::: (complex \<Rightarrow> complex) \<Rightarrow> complex \<Rightarrow> complex
Set.empty :::: 'a set
Set.insert :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a set
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Complex_Analysis_Basics.holomorphic_on :::: (complex \<Rightarrow> complex) \<Rightarrow> complex set \<Rightarrow> bool
Topological_Spaces.open_class.open :::: 'a set \<Rightarrow> bool
###defs
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
abbreviation empty :: "'a set" ("{}")
where "{} \<equiv> bot"
definition insert :: "'a \<Rightarrow> 'a set \<Rightarrow> 'a set"
where insert_compr: "insert a B = {x. x = a \<or> x \<in> B}"
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
class "open" =
fixes "open" :: "'a set \<Rightarrow> bool"
|
###output
\<lbrakk> ?H1 x_1; x_2 \<in> x_1; ?H2 x_3 (?H3 x_1 (?H4 x_2 ?H5))\<rbrakk> \<Longrightarrow> ?H6 (\<lambda>y_0. ?H7 x_4 (x_3 y_0)) x_2 = ?H7 x_4 (?H6 x_3 x_2)###end
|
Imperative_HOL/Array
|
Array.execute_map_entry(1)
|
lemma execute_map_entry [execute_simps]:
"i < length h a \<Longrightarrow>
execute (map_entry i f a) h =
Some (a, update a i (f (get h a ! i)) h)"
"i \<ge> length h a \<Longrightarrow> execute (map_entry i f a) h = None"
|
?i < Array.length ?h ?a \<Longrightarrow> execute (Array.map_entry ?i ?f ?a) ?h = Some (?a, Array.update ?a ?i (?f (Array.get ?h ?a ! ?i)) ?h)
|
x_1 < ?H1 x_2 x_3 \<Longrightarrow> ?H2 (?H3 x_1 x_4 x_3) x_2 = ?H4 (x_3, ?H5 x_3 x_1 (x_4 (?H6 (?H7 x_2 x_3) x_1)) x_2)
|
[
"Array.get",
"List.nth",
"Array.update",
"Option.option.Some",
"Array.map_entry",
"Heap_Monad.execute",
"Array.length"
] |
[
"heap \\<Rightarrow> 'a array \\<Rightarrow> 'a list",
"'a list \\<Rightarrow> nat \\<Rightarrow> 'a",
"'a array \\<Rightarrow> nat \\<Rightarrow> 'a \\<Rightarrow> heap \\<Rightarrow> heap",
"'a \\<Rightarrow> 'a option",
"nat \\<Rightarrow> ('a \\<Rightarrow> 'a) \\<Rightarrow> 'a array \\<Rightarrow> 'a array Heap",
"'a Heap \\<Rightarrow> heap \\<Rightarrow> ('a \\<times> heap) option",
"heap \\<Rightarrow> 'a array \\<Rightarrow> nat"
] |
[
"definition get :: \"heap \\<Rightarrow> 'a::heap array \\<Rightarrow> 'a list\" where\n \"get h a = map from_nat (arrays h (TYPEREP('a)) (addr_of_array a))\"",
"primrec (nonexhaustive) nth :: \"'a list => nat => 'a\" (infixl \"!\" 100) where\nnth_Cons: \"(x # xs) ! n = (case n of 0 \\<Rightarrow> x | Suc k \\<Rightarrow> xs ! k)\"\n \\<comment> \\<open>Warning: simpset does not contain this definition, but separate\n theorems for \\<open>n = 0\\<close> and \\<open>n = Suc k\\<close>\\<close>",
"definition update :: \"'a::heap array \\<Rightarrow> nat \\<Rightarrow> 'a \\<Rightarrow> heap \\<Rightarrow> heap\" where\n \"update a i x h = set a ((get h a)[i:=x]) h\"",
"datatype 'a option =\n None\n | Some (the: 'a)",
"definition map_entry :: \"nat \\<Rightarrow> ('a::heap \\<Rightarrow> 'a) \\<Rightarrow> 'a array \\<Rightarrow> 'a array Heap\" where\n [code del]: \"map_entry i f a = Heap_Monad.guard (\\<lambda>h. i < length h a)\n (\\<lambda>h. (a, update a i (f (get h a ! i)) h))\"",
"primrec execute :: \"'a Heap \\<Rightarrow> heap \\<Rightarrow> ('a \\<times> heap) option\" where\n [code del]: \"execute (Heap f) = f\"",
"definition length :: \"heap \\<Rightarrow> 'a::heap array \\<Rightarrow> nat\" where\n \"length h a = List.length (get h a)\""
] |
template
|
###lemma
?i < Array.length ?h ?a \<Longrightarrow> execute (Array.map_entry ?i ?f ?a) ?h = Some (?a, Array.update ?a ?i (?f (Array.get ?h ?a ! ?i)) ?h)
###symbols
Array.get :::: heap \<Rightarrow> 'a array \<Rightarrow> 'a list
List.nth :::: 'a list \<Rightarrow> nat \<Rightarrow> 'a
Array.update :::: 'a array \<Rightarrow> nat \<Rightarrow> 'a \<Rightarrow> heap \<Rightarrow> heap
Option.option.Some :::: 'a \<Rightarrow> 'a option
Array.map_entry :::: nat \<Rightarrow> ('a \<Rightarrow> 'a) \<Rightarrow> 'a array \<Rightarrow> 'a array Heap
Heap_Monad.execute :::: 'a Heap \<Rightarrow> heap \<Rightarrow> ('a \<times> heap) option
Array.length :::: heap \<Rightarrow> 'a array \<Rightarrow> nat
###defs
definition get :: "heap \<Rightarrow> 'a::heap array \<Rightarrow> 'a list" where
"get h a = map from_nat (arrays h (TYPEREP('a)) (addr_of_array a))"
primrec (nonexhaustive) nth :: "'a list => nat => 'a" (infixl "!" 100) where
nth_Cons: "(x # xs) ! n = (case n of 0 \<Rightarrow> x | Suc k \<Rightarrow> xs ! k)"
\<comment> \<open>Warning: simpset does not contain this definition, but separate
theorems for \<open>n = 0\<close> and \<open>n = Suc k\<close>\<close>
definition update :: "'a::heap array \<Rightarrow> nat \<Rightarrow> 'a \<Rightarrow> heap \<Rightarrow> heap" where
"update a i x h = set a ((get h a)[i:=x]) h"
datatype 'a option =
None
| Some (the: 'a)
definition map_entry :: "nat \<Rightarrow> ('a::heap \<Rightarrow> 'a) \<Rightarrow> 'a array \<Rightarrow> 'a array Heap" where
[code del]: "map_entry i f a = Heap_Monad.guard (\<lambda>h. i < length h a)
(\<lambda>h. (a, update a i (f (get h a ! i)) h))"
primrec execute :: "'a Heap \<Rightarrow> heap \<Rightarrow> ('a \<times> heap) option" where
[code del]: "execute (Heap f) = f"
definition length :: "heap \<Rightarrow> 'a::heap array \<Rightarrow> nat" where
"length h a = List.length (get h a)"
|
###output
x_1 < ?H1 x_2 x_3 \<Longrightarrow> ?H2 (?H3 x_1 x_4 x_3) x_2 = ?H4 (x_3, ?H5 x_3 x_1 (x_4 (?H6 (?H7 x_2 x_3) x_1)) x_2)###end
|
Bali/Trans
|
Transfer.transfer_raw(38)
| null |
Transfer.Rel ?A (1:: ?'a) (1:: ?'b) \<Longrightarrow> Transfer.Rel (rel_fun ?A (rel_fun ?A ?A)) (*) (*) \<Longrightarrow> Transfer.Rel (rel_fun (list_all2 ?A) ?A) prod_list prod_list
|
\<lbrakk> ?H1 x_1 ?H2 ?H2; ?H1 (?H3 x_1 (?H3 x_1 x_1)) ?H4 ?H4\<rbrakk> \<Longrightarrow> ?H1 (?H3 (?H5 x_1) x_1) ?H6 ?H6
|
[
"Groups_List.monoid_mult_class.prod_list",
"List.list.list_all2",
"Groups.times_class.times",
"BNF_Def.rel_fun",
"Groups.one_class.one",
"Transfer.Rel"
] |
[
"'a list \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> 'b list \\<Rightarrow> bool",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'c) \\<Rightarrow> ('b \\<Rightarrow> 'd) \\<Rightarrow> bool",
"'a",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'b \\<Rightarrow> bool"
] |
[
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"definition\n rel_fun :: \"('a \\<Rightarrow> 'c \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'd) \\<Rightarrow> bool\"\nwhere\n \"rel_fun A B = (\\<lambda>f g. \\<forall>x y. A x y \\<longrightarrow> B (f x) (g y))\"",
"class one =\n fixes one :: 'a (\"1\")",
"definition Rel :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'b \\<Rightarrow> bool\"\n where \"Rel r \\<equiv> r\""
] |
template
|
###lemma
Transfer.Rel ?A (1:: ?'a) (1:: ?'b) \<Longrightarrow> Transfer.Rel (rel_fun ?A (rel_fun ?A ?A)) (*) (*) \<Longrightarrow> Transfer.Rel (rel_fun (list_all2 ?A) ?A) prod_list prod_list
###symbols
Groups_List.monoid_mult_class.prod_list :::: 'a list \<Rightarrow> 'a
List.list.list_all2 :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> 'b list \<Rightarrow> bool
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
BNF_Def.rel_fun :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'c) \<Rightarrow> ('b \<Rightarrow> 'd) \<Rightarrow> bool
Groups.one_class.one :::: 'a
Transfer.Rel :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool
###defs
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
definition
rel_fun :: "('a \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'd) \<Rightarrow> bool"
where
"rel_fun A B = (\<lambda>f g. \<forall>x y. A x y \<longrightarrow> B (f x) (g y))"
class one =
fixes one :: 'a ("1")
definition Rel :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool"
where "Rel r \<equiv> r"
|
###output
\<lbrakk> ?H1 x_1 ?H2 ?H2; ?H1 (?H3 x_1 (?H3 x_1 x_1)) ?H4 ?H4\<rbrakk> \<Longrightarrow> ?H1 (?H3 (?H5 x_1) x_1) ?H6 ?H6###end
|
Library/Multiset_Order
|
Multiset_Order.mset_le_single_iff
|
lemma mset_le_single_iff[iff]: "{#x#} \<le> {#y#} \<longleftrightarrow> x \<le> y" for x y :: "'a::order"
|
({# ?x#} \<le> {# ?y#}) = (?x \<le> ?y)
|
(?H1 x_1 ?H2 \<le> ?H1 x_2 ?H2) = (x_1 \<le> x_2)
|
[
"Multiset.empty_mset",
"Multiset.add_mset"
] |
[
"'a multiset",
"'a \\<Rightarrow> 'a multiset \\<Rightarrow> 'a multiset"
] |
[
"abbreviation empty_mset :: \\<open>'a multiset\\<close> (\\<open>{#}\\<close>)\n where \\<open>empty_mset \\<equiv> 0\\<close>"
] |
template
|
###lemma
({# ?x#} \<le> {# ?y#}) = (?x \<le> ?y)
###symbols
Multiset.empty_mset :::: 'a multiset
Multiset.add_mset :::: 'a \<Rightarrow> 'a multiset \<Rightarrow> 'a multiset
###defs
abbreviation empty_mset :: \<open>'a multiset\<close> (\<open>{#}\<close>)
where \<open>empty_mset \<equiv> 0\<close>
|
###output
(?H1 x_1 ?H2 \<le> ?H1 x_2 ?H2) = (x_1 \<le> x_2)###end
|
Combinatorics/Transposition
|
Transposition.inj_on_transpose
|
lemma inj_on_transpose [simp]:
\<open>inj_on (transpose a b) A\<close>
|
inj_on (Transposition.transpose ?a ?b) ?A
|
?H1 (?H2 x_1 x_2) x_3
|
[
"Transposition.transpose",
"Fun.inj_on"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"definition transpose :: \\<open>'a \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n where \\<open>transpose a b c = (if c = a then b else if c = b then a else c)\\<close>",
"definition inj_on :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> bool\" \\<comment> \\<open>injective\\<close>\n where \"inj_on f A \\<longleftrightarrow> (\\<forall>x\\<in>A. \\<forall>y\\<in>A. f x = f y \\<longrightarrow> x = y)\""
] |
template
|
###lemma
inj_on (Transposition.transpose ?a ?b) ?A
###symbols
Transposition.transpose :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> 'a
Fun.inj_on :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> bool
###defs
definition transpose :: \<open>'a \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> 'a\<close>
where \<open>transpose a b c = (if c = a then b else if c = b then a else c)\<close>
definition inj_on :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> bool" \<comment> \<open>injective\<close>
where "inj_on f A \<longleftrightarrow> (\<forall>x\<in>A. \<forall>y\<in>A. f x = f y \<longrightarrow> x = y)"
|
###output
?H1 (?H2 x_1 x_2) x_3###end
|
Analysis/Further_Topology
|
Further_Topology.extend_map_UNIV_to_sphere_cofinite
| null |
DIM(?'a) \<le> DIM(?'b) \<Longrightarrow> 0 \<le> ?r \<Longrightarrow> compact ?S \<Longrightarrow> continuous_on ?S ?f \<Longrightarrow> ?f \<in> ?S \<rightarrow> sphere ?a ?r \<Longrightarrow> (\<And>C. C \<in> components (- ?S) \<Longrightarrow> bounded C \<Longrightarrow> C \<inter> ?L \<noteq> {}) \<Longrightarrow> (\<And>K g. finite K \<Longrightarrow> K \<subseteq> ?L \<Longrightarrow> disjnt K ?S \<Longrightarrow> continuous_on (- K) g \<Longrightarrow> g \<in> - K \<rightarrow> sphere ?a ?r \<Longrightarrow> (\<And>x. x \<in> ?S \<Longrightarrow> g x = ?f x) \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
|
\<lbrakk> ?H1 ?H2 \<le> ?H1 ?H2; ?H3 \<le> x_1; ?H4 x_2; ?H5 x_2 x_3; x_3 \<in> ?H6 x_2 (?H7 x_4 x_1); \<And>y_0. \<lbrakk>y_0 \<in> ?H8 (?H9 x_2); ?H10 y_0\<rbrakk> \<Longrightarrow> ?H11 y_0 x_5 \<noteq> ?H12; \<And>y_1 y_2. \<lbrakk> ?H13 y_1; ?H14 y_1 x_5; ?H15 y_1 x_2; ?H5 (?H9 y_1) y_2; y_2 \<in> ?H6 (?H9 y_1) (?H7 x_4 x_1); \<And>y_3. y_3 \<in> x_2 \<Longrightarrow> y_2 y_3 = x_3 y_3\<rbrakk> \<Longrightarrow> x_6\<rbrakk> \<Longrightarrow> x_6
|
[
"Set.disjnt",
"Set.subset_eq",
"Finite_Set.finite",
"Set.empty",
"Set.inter",
"Elementary_Metric_Spaces.metric_space_class.bounded",
"Groups.uminus_class.uminus",
"Connected.components",
"Elementary_Metric_Spaces.sphere",
"FuncSet.funcset",
"Topological_Spaces.continuous_on",
"Topological_Spaces.topological_space_class.compact",
"Groups.zero_class.zero",
"Euclidean_Space.euclidean_space_class.Basis",
"Finite_Set.card"
] |
[
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool",
"'a set \\<Rightarrow> bool",
"'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> bool",
"'a \\<Rightarrow> 'a",
"'a set \\<Rightarrow> 'a set set",
"'a \\<Rightarrow> real \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'b set \\<Rightarrow> ('a \\<Rightarrow> 'b) set",
"'a set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"'a set \\<Rightarrow> bool",
"'a",
"'a set",
"'a set \\<Rightarrow> nat"
] |
[
"definition disjnt :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"disjnt A B \\<longleftrightarrow> A \\<inter> B = {}\"",
"abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\"",
"class finite =\n assumes finite_UNIV: \"finite (UNIV :: 'a set)\"\nbegin",
"abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"",
"abbreviation inter :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<inter>\" 70)\n where \"(\\<inter>) \\<equiv> inf\"",
"class uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)",
"abbreviation funcset :: \"'a set \\<Rightarrow> 'b set \\<Rightarrow> ('a \\<Rightarrow> 'b) set\" (infixr \"\\<rightarrow>\" 60)\n where \"A \\<rightarrow> B \\<equiv> Pi A (\\<lambda>_. B)\"",
"definition continuous_on :: \"'a set \\<Rightarrow> ('a::topological_space \\<Rightarrow> 'b::topological_space) \\<Rightarrow> bool\"\n where \"continuous_on s f \\<longleftrightarrow> (\\<forall>x\\<in>s. (f \\<longlongrightarrow> f x) (at x within s))\"",
"class topological_space = \"open\" +\n assumes open_UNIV [simp, intro]: \"open UNIV\"\n assumes open_Int [intro]: \"open S \\<Longrightarrow> open T \\<Longrightarrow> open (S \\<inter> T)\"\n assumes open_Union [intro]: \"\\<forall>S\\<in>K. open S \\<Longrightarrow> open (\\<Union>K)\"\nbegin",
"class zero =\n fixes zero :: 'a (\"0\")",
"class euclidean_space = real_inner +\n fixes Basis :: \"'a set\"\n assumes nonempty_Basis [simp]: \"Basis \\<noteq> {}\"\n assumes finite_Basis [simp]: \"finite Basis\"\n assumes inner_Basis:\n \"\\<lbrakk>u \\<in> Basis; v \\<in> Basis\\<rbrakk> \\<Longrightarrow> inner u v = (if u = v then 1 else 0)\"\n assumes euclidean_all_zero_iff:\n \"(\\<forall>u\\<in>Basis. inner x u = 0) \\<longleftrightarrow> (x = 0)\""
] |
template
|
###lemma
DIM(?'a) \<le> DIM(?'b) \<Longrightarrow> 0 \<le> ?r \<Longrightarrow> compact ?S \<Longrightarrow> continuous_on ?S ?f \<Longrightarrow> ?f \<in> ?S \<rightarrow> sphere ?a ?r \<Longrightarrow> (\<And>C. C \<in> components (- ?S) \<Longrightarrow> bounded C \<Longrightarrow> C \<inter> ?L \<noteq> {}) \<Longrightarrow> (\<And>K g. finite K \<Longrightarrow> K \<subseteq> ?L \<Longrightarrow> disjnt K ?S \<Longrightarrow> continuous_on (- K) g \<Longrightarrow> g \<in> - K \<rightarrow> sphere ?a ?r \<Longrightarrow> (\<And>x. x \<in> ?S \<Longrightarrow> g x = ?f x) \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
###symbols
Set.disjnt :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
Finite_Set.finite :::: 'a set \<Rightarrow> bool
Set.empty :::: 'a set
Set.inter :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set
Elementary_Metric_Spaces.metric_space_class.bounded :::: 'a set \<Rightarrow> bool
Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a
Connected.components :::: 'a set \<Rightarrow> 'a set set
Elementary_Metric_Spaces.sphere :::: 'a \<Rightarrow> real \<Rightarrow> 'a set
FuncSet.funcset :::: 'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<Rightarrow> 'b) set
Topological_Spaces.continuous_on :::: 'a set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
Topological_Spaces.topological_space_class.compact :::: 'a set \<Rightarrow> bool
Groups.zero_class.zero :::: 'a
Euclidean_Space.euclidean_space_class.Basis :::: 'a set
Finite_Set.card :::: 'a set \<Rightarrow> nat
###defs
definition disjnt :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "disjnt A B \<longleftrightarrow> A \<inter> B = {}"
abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset_eq \<equiv> less_eq"
class finite =
assumes finite_UNIV: "finite (UNIV :: 'a set)"
begin
abbreviation empty :: "'a set" ("{}")
where "{} \<equiv> bot"
abbreviation inter :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<inter>" 70)
where "(\<inter>) \<equiv> inf"
class uminus =
fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80)
abbreviation funcset :: "'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<Rightarrow> 'b) set" (infixr "\<rightarrow>" 60)
where "A \<rightarrow> B \<equiv> Pi A (\<lambda>_. B)"
definition continuous_on :: "'a set \<Rightarrow> ('a::topological_space \<Rightarrow> 'b::topological_space) \<Rightarrow> bool"
where "continuous_on s f \<longleftrightarrow> (\<forall>x\<in>s. (f \<longlongrightarrow> f x) (at x within s))"
class topological_space = "open" +
assumes open_UNIV [simp, intro]: "open UNIV"
assumes open_Int [intro]: "open S \<Longrightarrow> open T \<Longrightarrow> open (S \<inter> T)"
assumes open_Union [intro]: "\<forall>S\<in>K. open S \<Longrightarrow> open (\<Union>K)"
begin
class zero =
fixes zero :: 'a ("0")
class euclidean_space = real_inner +
fixes Basis :: "'a set"
assumes nonempty_Basis [simp]: "Basis \<noteq> {}"
assumes finite_Basis [simp]: "finite Basis"
assumes inner_Basis:
"\<lbrakk>u \<in> Basis; v \<in> Basis\<rbrakk> \<Longrightarrow> inner u v = (if u = v then 1 else 0)"
assumes euclidean_all_zero_iff:
"(\<forall>u\<in>Basis. inner x u = 0) \<longleftrightarrow> (x = 0)"
|
###output
\<lbrakk> ?H1 ?H2 \<le> ?H1 ?H2; ?H3 \<le> x_1; ?H4 x_2; ?H5 x_2 x_3; x_3 \<in> ?H6 x_2 (?H7 x_4 x_1); \<And>y_0. \<lbrakk>y_0 \<in> ?H8 (?H9 x_2); ?H10 y_0\<rbrakk> \<Longrightarrow> ?H11 y_0 x_5 \<noteq> ?H12; \<And>y_1 y_2. \<lbrakk> ?H13 y_1; ?H14 y_1 x_5; ?H15 y_1 x_2; ?H5 (?H9 y_1) y_2; y_2 \<in> ?H6 (?H9 y_1) (?H7 x_4 x_1); \<And>y_3. y_3 \<in> x_2 \<Longrightarrow> y_2 y_3 = x_3 y_3\<rbrakk> \<Longrightarrow> x_6\<rbrakk> \<Longrightarrow> x_6###end
|
HOL
|
HOL.no_atp(11)
| null |
?y \<le> ?x \<Longrightarrow> ?z \<le> ?y \<Longrightarrow> ?z \<le> ?x
|
\<lbrakk>x_1 \<le> x_2; x_3 \<le> x_1\<rbrakk> \<Longrightarrow> x_3 \<le> x_2
|
[] |
[] |
[] |
template
|
###lemma
?y \<le> ?x \<Longrightarrow> ?z \<le> ?y \<Longrightarrow> ?z \<le> ?x
###symbols
###defs
|
###output
\<lbrakk>x_1 \<le> x_2; x_3 \<le> x_1\<rbrakk> \<Longrightarrow> x_3 \<le> x_2###end
|
Groebner_Basis
|
Groebner_Basis.dnf(1)
|
lemma dnf:
"(P \<and> (Q \<or> R)) = ((P\<and>Q) \<or> (P\<and>R))"
"((Q \<or> R) \<and> P) = ((Q\<and>P) \<or> (R\<and>P))"
"(P \<and> Q) = (Q \<and> P)"
"(P \<or> Q) = (Q \<or> P)"
|
(?P \<and> (?Q \<or> ?R)) = (?P \<and> ?Q \<or> ?P \<and> ?R)
|
(x_1 \<and> (x_2 \<or> x_3)) = (x_1 \<and> x_2 \<or> x_1 \<and> x_3)
|
[] |
[] |
[] |
template
|
###lemma
(?P \<and> (?Q \<or> ?R)) = (?P \<and> ?Q \<or> ?P \<and> ?R)
###symbols
###defs
|
###output
(x_1 \<and> (x_2 \<or> x_3)) = (x_1 \<and> x_2 \<or> x_1 \<and> x_3)###end
|
Bali/Trans
|
Transfer.transfer_raw(54)
| null |
Transfer.Rel (rel_fun (list_all2 ?A) (list_all2 (list_all2 ?A))) subseqs subseqs
|
?H1 (?H2 (?H3 x_1) (?H3 (?H3 x_1))) ?H4 ?H4
|
[
"List.subseqs",
"List.list.list_all2",
"BNF_Def.rel_fun",
"Transfer.Rel"
] |
[
"'a list \\<Rightarrow> 'a list list",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> 'b list \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'c) \\<Rightarrow> ('b \\<Rightarrow> 'd) \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'b \\<Rightarrow> bool"
] |
[
"primrec subseqs :: \"'a list \\<Rightarrow> 'a list list\" where\n\"subseqs [] = [[]]\" |\n\"subseqs (x#xs) = (let xss = subseqs xs in map (Cons x) xss @ xss)\"",
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"",
"definition\n rel_fun :: \"('a \\<Rightarrow> 'c \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'd) \\<Rightarrow> bool\"\nwhere\n \"rel_fun A B = (\\<lambda>f g. \\<forall>x y. A x y \\<longrightarrow> B (f x) (g y))\"",
"definition Rel :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'b \\<Rightarrow> bool\"\n where \"Rel r \\<equiv> r\""
] |
template
|
###lemma
Transfer.Rel (rel_fun (list_all2 ?A) (list_all2 (list_all2 ?A))) subseqs subseqs
###symbols
List.subseqs :::: 'a list \<Rightarrow> 'a list list
List.list.list_all2 :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> 'b list \<Rightarrow> bool
BNF_Def.rel_fun :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'c) \<Rightarrow> ('b \<Rightarrow> 'd) \<Rightarrow> bool
Transfer.Rel :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool
###defs
primrec subseqs :: "'a list \<Rightarrow> 'a list list" where
"subseqs [] = [[]]" |
"subseqs (x#xs) = (let xss = subseqs xs in map (Cons x) xss @ xss)"
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
definition
rel_fun :: "('a \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'd) \<Rightarrow> bool"
where
"rel_fun A B = (\<lambda>f g. \<forall>x y. A x y \<longrightarrow> B (f x) (g y))"
definition Rel :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool"
where "Rel r \<equiv> r"
|
###output
?H1 (?H2 (?H3 x_1) (?H3 (?H3 x_1))) ?H4 ?H4###end
|
Nominal/Examples/Lambda_mu
|
Lambda_mu.swap_simps(3)
| null |
[(?a, ?b)] \<bullet> ?b = ?a
|
?H1 (?H2 (x_1, x_2) ?H3) x_2 = x_1
|
[
"List.list.Nil",
"List.list.Cons",
"Nominal.perm"
] |
[
"'a list",
"'a \\<Rightarrow> 'a list \\<Rightarrow> 'a list",
"('a \\<times> 'a) list \\<Rightarrow> 'b \\<Rightarrow> 'b"
] |
[
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"",
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"",
"consts \n perm :: \"'x prm \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixr \\<open>\\<bullet>\\<close> 80)\n swap :: \"('x \\<times> 'x) \\<Rightarrow> 'x \\<Rightarrow> 'x\""
] |
template
|
###lemma
[(?a, ?b)] \<bullet> ?b = ?a
###symbols
List.list.Nil :::: 'a list
List.list.Cons :::: 'a \<Rightarrow> 'a list \<Rightarrow> 'a list
Nominal.perm :::: ('a \<times> 'a) list \<Rightarrow> 'b \<Rightarrow> 'b
###defs
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
consts
perm :: "'x prm \<Rightarrow> 'a \<Rightarrow> 'a" (infixr \<open>\<bullet>\<close> 80)
swap :: "('x \<times> 'x) \<Rightarrow> 'x \<Rightarrow> 'x"
|
###output
?H1 (?H2 (x_1, x_2) ?H3) x_2 = x_1###end
|
Imperative_HOL/ex/List_Sublist
|
List_Sublist.nths_take
|
lemma nths_take: "nths xs {j. j < m} = take m xs"
|
nths ?xs {j. j < ?m} = take ?m ?xs
|
?H1 x_1 (?H2 (\<lambda>y_0. y_0 < x_2)) = ?H3 x_2 x_1
|
[
"List.take",
"Set.Collect",
"List.nths"
] |
[
"nat \\<Rightarrow> 'a list \\<Rightarrow> 'a list",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"'a list \\<Rightarrow> nat set \\<Rightarrow> 'a list"
] |
[
"primrec take:: \"nat \\<Rightarrow> 'a list \\<Rightarrow> 'a list\" where\ntake_Nil:\"take n [] = []\" |\ntake_Cons: \"take n (x # xs) = (case n of 0 \\<Rightarrow> [] | Suc m \\<Rightarrow> x # take m xs)\"\n \\<comment> \\<open>Warning: simpset does not contain this definition, but separate\n theorems for \\<open>n = 0\\<close> and \\<open>n = Suc k\\<close>\\<close>",
"definition nths :: \"'a list => nat set => 'a list\" where\n\"nths xs A = map fst (filter (\\<lambda>p. snd p \\<in> A) (zip xs [0..<size xs]))\""
] |
template
|
###lemma
nths ?xs {j. j < ?m} = take ?m ?xs
###symbols
List.take :::: nat \<Rightarrow> 'a list \<Rightarrow> 'a list
Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set
List.nths :::: 'a list \<Rightarrow> nat set \<Rightarrow> 'a list
###defs
primrec take:: "nat \<Rightarrow> 'a list \<Rightarrow> 'a list" where
take_Nil:"take n [] = []" |
take_Cons: "take n (x # xs) = (case n of 0 \<Rightarrow> [] | Suc m \<Rightarrow> x # take m xs)"
\<comment> \<open>Warning: simpset does not contain this definition, but separate
theorems for \<open>n = 0\<close> and \<open>n = Suc k\<close>\<close>
definition nths :: "'a list => nat set => 'a list" where
"nths xs A = map fst (filter (\<lambda>p. snd p \<in> A) (zip xs [0..<size xs]))"
|
###output
?H1 x_1 (?H2 (\<lambda>y_0. y_0 < x_2)) = ?H3 x_2 x_1###end
|
Analysis/Abstract_Topological_Spaces
|
Abstract_Topological_Spaces.proper_map_into_k_space_eq
|
lemma proper_map_into_k_space_eq:
assumes "k_space Y"
shows "proper_map X Y f \<longleftrightarrow>
f \<in> (topspace X) \<rightarrow> topspace Y \<and>
(\<forall>K. compactin Y K
\<longrightarrow> proper_map (subtopology X {x \<in> topspace X. f x \<in> K}) (subtopology Y K) f)"
(is "?lhs \<longleftrightarrow> ?rhs")
|
k_space ?Y \<Longrightarrow> proper_map ?X ?Y ?f = (?f \<in> topspace ?X \<rightarrow> topspace ?Y \<and> (\<forall>K. compactin ?Y K \<longrightarrow> proper_map (subtopology ?X {x \<in> topspace ?X. ?f x \<in> K}) (subtopology ?Y K) ?f))
|
?H1 x_1 \<Longrightarrow> ?H2 x_2 x_1 x_3 = (x_3 \<in> ?H3 (?H4 x_2) (?H4 x_1) \<and> (\<forall>y_0. ?H5 x_1 y_0 \<longrightarrow> ?H2 (?H6 x_2 (?H7 (\<lambda>y_1. y_1 \<in> ?H4 x_2 \<and> x_3 y_1 \<in> y_0))) (?H6 x_1 y_0) x_3))
|
[
"Set.Collect",
"Abstract_Topology.subtopology",
"Abstract_Topology.compactin",
"Abstract_Topology.topspace",
"FuncSet.funcset",
"Abstract_Topology.proper_map",
"Abstract_Topological_Spaces.k_space"
] |
[
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"'a topology \\<Rightarrow> 'a set \\<Rightarrow> 'a topology",
"'a topology \\<Rightarrow> 'a set \\<Rightarrow> bool",
"'a topology \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'b set \\<Rightarrow> ('a \\<Rightarrow> 'b) set",
"'a topology \\<Rightarrow> 'b topology \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"'a topology \\<Rightarrow> bool"
] |
[
"definition compactin where\n \"compactin X S \\<longleftrightarrow>\n S \\<subseteq> topspace X \\<and>\n (\\<forall>\\<U>. (\\<forall>U \\<in> \\<U>. openin X U) \\<and> S \\<subseteq> \\<Union>\\<U>\n \\<longrightarrow> (\\<exists>\\<F>. finite \\<F> \\<and> \\<F> \\<subseteq> \\<U> \\<and> S \\<subseteq> \\<Union>\\<F>))\"",
"definition \"topspace T = \\<Union>{S. openin T S}\"",
"abbreviation funcset :: \"'a set \\<Rightarrow> 'b set \\<Rightarrow> ('a \\<Rightarrow> 'b) set\" (infixr \"\\<rightarrow>\" 60)\n where \"A \\<rightarrow> B \\<equiv> Pi A (\\<lambda>_. B)\"",
"definition proper_map\n where\n \"proper_map X Y f \\<equiv>\n closed_map X Y f \\<and> (\\<forall>y \\<in> topspace Y. compactin X {x \\<in> topspace X. f x = y})\"",
"definition k_space where\n \"k_space X \\<equiv>\n \\<forall>S. S \\<subseteq> topspace X \\<longrightarrow> \n (closedin X S \\<longleftrightarrow> (\\<forall>K. compactin X K \\<longrightarrow> closedin (subtopology X K) (K \\<inter> S)))\""
] |
template
|
###lemma
k_space ?Y \<Longrightarrow> proper_map ?X ?Y ?f = (?f \<in> topspace ?X \<rightarrow> topspace ?Y \<and> (\<forall>K. compactin ?Y K \<longrightarrow> proper_map (subtopology ?X {x \<in> topspace ?X. ?f x \<in> K}) (subtopology ?Y K) ?f))
###symbols
Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set
Abstract_Topology.subtopology :::: 'a topology \<Rightarrow> 'a set \<Rightarrow> 'a topology
Abstract_Topology.compactin :::: 'a topology \<Rightarrow> 'a set \<Rightarrow> bool
Abstract_Topology.topspace :::: 'a topology \<Rightarrow> 'a set
FuncSet.funcset :::: 'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<Rightarrow> 'b) set
Abstract_Topology.proper_map :::: 'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
Abstract_Topological_Spaces.k_space :::: 'a topology \<Rightarrow> bool
###defs
definition compactin where
"compactin X S \<longleftrightarrow>
S \<subseteq> topspace X \<and>
(\<forall>\<U>. (\<forall>U \<in> \<U>. openin X U) \<and> S \<subseteq> \<Union>\<U>
\<longrightarrow> (\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<and> S \<subseteq> \<Union>\<F>))"
definition "topspace T = \<Union>{S. openin T S}"
abbreviation funcset :: "'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<Rightarrow> 'b) set" (infixr "\<rightarrow>" 60)
where "A \<rightarrow> B \<equiv> Pi A (\<lambda>_. B)"
definition proper_map
where
"proper_map X Y f \<equiv>
closed_map X Y f \<and> (\<forall>y \<in> topspace Y. compactin X {x \<in> topspace X. f x = y})"
definition k_space where
"k_space X \<equiv>
\<forall>S. S \<subseteq> topspace X \<longrightarrow>
(closedin X S \<longleftrightarrow> (\<forall>K. compactin X K \<longrightarrow> closedin (subtopology X K) (K \<inter> S)))"
|
###output
?H1 x_1 \<Longrightarrow> ?H2 x_2 x_1 x_3 = (x_3 \<in> ?H3 (?H4 x_2) (?H4 x_1) \<and> (\<forall>y_0. ?H5 x_1 y_0 \<longrightarrow> ?H2 (?H6 x_2 (?H7 (\<lambda>y_1. y_1 \<in> ?H4 x_2 \<and> x_3 y_1 \<in> y_0))) (?H6 x_1 y_0) x_3))###end
|
Library/Infinite_Set
|
Infinite_Set.enumerate_Suc''
|
lemma enumerate_Suc'':
fixes S :: "'a::wellorder set"
assumes "infinite S"
shows "enumerate S (Suc n) = (LEAST s. s \<in> S \<and> enumerate S n < s)"
|
infinite ?S \<Longrightarrow> wellorder_class.enumerate ?S (Suc ?n) = (LEAST s. s \<in> ?S \<and> wellorder_class.enumerate ?S ?n < s)
|
?H1 x_1 \<Longrightarrow> ?H2 x_1 (?H3 x_2) = ?H4 (\<lambda>y_0. y_0 \<in> x_1 \<and> ?H2 x_1 x_2 < y_0)
|
[
"Orderings.ord_class.Least",
"Nat.Suc",
"Infinite_Set.wellorder_class.enumerate",
"Finite_Set.infinite"
] |
[
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a",
"nat \\<Rightarrow> nat",
"'a set \\<Rightarrow> nat \\<Rightarrow> 'a",
"'a set \\<Rightarrow> bool"
] |
[
"class ord =\n fixes less_eq :: \"'a \\<Rightarrow> 'a \\<Rightarrow> bool\"\n and less :: \"'a \\<Rightarrow> 'a \\<Rightarrow> bool\"\nbegin",
"definition Suc :: \"nat \\<Rightarrow> nat\"\n where \"Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))\"",
"abbreviation infinite :: \"'a set \\<Rightarrow> bool\"\n where \"infinite S \\<equiv> \\<not> finite S\""
] |
template
|
###lemma
infinite ?S \<Longrightarrow> wellorder_class.enumerate ?S (Suc ?n) = (LEAST s. s \<in> ?S \<and> wellorder_class.enumerate ?S ?n < s)
###symbols
Orderings.ord_class.Least :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a
Nat.Suc :::: nat \<Rightarrow> nat
Infinite_Set.wellorder_class.enumerate :::: 'a set \<Rightarrow> nat \<Rightarrow> 'a
Finite_Set.infinite :::: 'a set \<Rightarrow> bool
###defs
class ord =
fixes less_eq :: "'a \<Rightarrow> 'a \<Rightarrow> bool"
and less :: "'a \<Rightarrow> 'a \<Rightarrow> bool"
begin
definition Suc :: "nat \<Rightarrow> nat"
where "Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))"
abbreviation infinite :: "'a set \<Rightarrow> bool"
where "infinite S \<equiv> \<not> finite S"
|
###output
?H1 x_1 \<Longrightarrow> ?H2 x_1 (?H3 x_2) = ?H4 (\<lambda>y_0. y_0 \<in> x_1 \<and> ?H2 x_1 x_2 < y_0)###end
|
Set_Interval
|
Set_Interval.atLeastAtMostSuc_conv
|
lemma atLeastAtMostSuc_conv: "m \<le> Suc n \<Longrightarrow> {m..Suc n} = insert (Suc n) {m..n}"
|
?m \<le> Suc ?n \<Longrightarrow> { ?m..Suc ?n} = insert (Suc ?n) { ?m.. ?n}
|
x_1 \<le> ?H1 x_2 \<Longrightarrow> ?H2 x_1 (?H1 x_2) = ?H3 (?H1 x_2) (?H2 x_1 x_2)
|
[
"Set.insert",
"Set_Interval.ord_class.atLeastAtMost",
"Nat.Suc"
] |
[
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a set",
"nat \\<Rightarrow> nat"
] |
[
"definition insert :: \"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set\"\n where insert_compr: \"insert a B = {x. x = a \\<or> x \\<in> B}\"",
"definition Suc :: \"nat \\<Rightarrow> nat\"\n where \"Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))\""
] |
template
|
###lemma
?m \<le> Suc ?n \<Longrightarrow> { ?m..Suc ?n} = insert (Suc ?n) { ?m.. ?n}
###symbols
Set.insert :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a set
Set_Interval.ord_class.atLeastAtMost :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a set
Nat.Suc :::: nat \<Rightarrow> nat
###defs
definition insert :: "'a \<Rightarrow> 'a set \<Rightarrow> 'a set"
where insert_compr: "insert a B = {x. x = a \<or> x \<in> B}"
definition Suc :: "nat \<Rightarrow> nat"
where "Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))"
|
###output
x_1 \<le> ?H1 x_2 \<Longrightarrow> ?H2 x_1 (?H1 x_2) = ?H3 (?H1 x_2) (?H2 x_1 x_2)###end
|
Library/Old_Datatype
|
Old_Datatype.ntrunc_equality
|
lemma ntrunc_equality: "(!!k. ntrunc k M = ntrunc k N) ==> M=N"
|
(\<And>k. ntrunc k ?M = ntrunc k ?N) \<Longrightarrow> ?M = ?N
|
(\<And>y_0. ?H1 y_0 x_1 = ?H1 y_0 x_2) \<Longrightarrow> x_1 = x_2
|
[
"Old_Datatype.ntrunc"
] |
[
"nat \\<Rightarrow> ('a, 'b) Old_Datatype.node set \\<Rightarrow> ('a, 'b) Old_Datatype.node set"
] |
[
"definition ntrunc :: \"[nat, ('a, 'b) dtree] => ('a, 'b) dtree\"\n where \"ntrunc k N == {n. n\\<in>N \\<and> ndepth(n)<k}\""
] |
template
|
###lemma
(\<And>k. ntrunc k ?M = ntrunc k ?N) \<Longrightarrow> ?M = ?N
###symbols
Old_Datatype.ntrunc :::: nat \<Rightarrow> ('a, 'b) Old_Datatype.node set \<Rightarrow> ('a, 'b) Old_Datatype.node set
###defs
definition ntrunc :: "[nat, ('a, 'b) dtree] => ('a, 'b) dtree"
where "ntrunc k N == {n. n\<in>N \<and> ndepth(n)<k}"
|
###output
(\<And>y_0. ?H1 y_0 x_1 = ?H1 y_0 x_2) \<Longrightarrow> x_1 = x_2###end
|
MicroJava/J/WellForm
|
WellForm.wf_prog_ws_prog
|
lemma wf_prog_ws_prog [intro]: "wf_prog wf_mb G \<Longrightarrow> ws_prog G"
|
wf_prog ?wf_mb ?G \<Longrightarrow> ws_prog ?G
|
?H1 x_1 x_2 \<Longrightarrow> ?H2 x_2
|
[
"WellForm.ws_prog",
"WellForm.wf_prog"
] |
[
"'a prog \\<Rightarrow> bool",
"('a prog \\<Rightarrow> cname \\<Rightarrow> 'a mdecl \\<Rightarrow> bool) \\<Rightarrow> 'a prog \\<Rightarrow> bool"
] |
[
"definition\n wf_prog :: \"prog \\<Rightarrow> bool\" where\n \"wf_prog G = (let is = ifaces G; cs = classes G in\n ObjectC \\<in> set cs \\<and> \n (\\<forall> m\\<in>set Object_mdecls. accmodi m \\<noteq> Package) \\<and>\n (\\<forall>xn. SXcptC xn \\<in> set cs) \\<and>\n (\\<forall>i\\<in>set is. wf_idecl G i) \\<and> unique is \\<and>\n (\\<forall>c\\<in>set cs. wf_cdecl G c) \\<and> unique cs)\""
] |
template
|
###lemma
wf_prog ?wf_mb ?G \<Longrightarrow> ws_prog ?G
###symbols
WellForm.ws_prog :::: 'a prog \<Rightarrow> bool
WellForm.wf_prog :::: ('a prog \<Rightarrow> cname \<Rightarrow> 'a mdecl \<Rightarrow> bool) \<Rightarrow> 'a prog \<Rightarrow> bool
###defs
definition
wf_prog :: "prog \<Rightarrow> bool" where
"wf_prog G = (let is = ifaces G; cs = classes G in
ObjectC \<in> set cs \<and>
(\<forall> m\<in>set Object_mdecls. accmodi m \<noteq> Package) \<and>
(\<forall>xn. SXcptC xn \<in> set cs) \<and>
(\<forall>i\<in>set is. wf_idecl G i) \<and> unique is \<and>
(\<forall>c\<in>set cs. wf_cdecl G c) \<and> unique cs)"
|
###output
?H1 x_1 x_2 \<Longrightarrow> ?H2 x_2###end
|
List
|
List.bind_simps(1)
|
lemma bind_simps [simp]:
"List.bind [] f = []"
"List.bind (x # xs) f = f x @ List.bind xs f"
|
List.bind [] ?f = []
|
?H1 ?H2 x_1 = ?H2
|
[
"List.list.Nil",
"List.bind"
] |
[
"'a list",
"'a list \\<Rightarrow> ('a \\<Rightarrow> 'b list) \\<Rightarrow> 'b list"
] |
[
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"",
"definition bind :: \"'a list \\<Rightarrow> ('a \\<Rightarrow> 'b list) \\<Rightarrow> 'b list\" where\n\"bind xs f = concat (map f xs)\""
] |
template
|
###lemma
List.bind [] ?f = []
###symbols
List.list.Nil :::: 'a list
List.bind :::: 'a list \<Rightarrow> ('a \<Rightarrow> 'b list) \<Rightarrow> 'b list
###defs
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
definition bind :: "'a list \<Rightarrow> ('a \<Rightarrow> 'b list) \<Rightarrow> 'b list" where
"bind xs f = concat (map f xs)"
|
###output
?H1 ?H2 x_1 = ?H2###end
|
Induct/Sexp
|
Sexp.sexp_case_Leaf
|
lemma sexp_case_Leaf [simp]: "sexp_case c d e (Leaf a) = c(a)"
|
sexp_case ?c ?d ?e (Leaf ?a) = ?c ?a
|
?H1 x_1 x_2 x_3 (?H2 x_4) = x_1 x_4
|
[
"Sexp.Leaf",
"Sexp.sexp_case"
] |
[
"'a \\<Rightarrow> ('a, 'b) Old_Datatype.node set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> (nat \\<Rightarrow> 'b) \\<Rightarrow> (('a, unit) Old_Datatype.node set \\<Rightarrow> ('a, unit) Old_Datatype.node set \\<Rightarrow> 'b) \\<Rightarrow> ('a, unit) Old_Datatype.node set \\<Rightarrow> 'b"
] |
[
"abbreviation \"Leaf == Old_Datatype.Leaf\"",
"definition\n sexp_case :: \"['a=>'b, nat=>'b, ['a item, 'a item]=>'b, \n 'a item] => 'b\" where\n \"sexp_case c d e M = (THE z. (\\<exists>x. M=Leaf(x) & z=c(x)) \n | (\\<exists>k. M=Numb(k) & z=d(k)) \n | (\\<exists>N1 N2. M = Scons N1 N2 & z=e N1 N2))\""
] |
template
|
###lemma
sexp_case ?c ?d ?e (Leaf ?a) = ?c ?a
###symbols
Sexp.Leaf :::: 'a \<Rightarrow> ('a, 'b) Old_Datatype.node set
Sexp.sexp_case :::: ('a \<Rightarrow> 'b) \<Rightarrow> (nat \<Rightarrow> 'b) \<Rightarrow> (('a, unit) Old_Datatype.node set \<Rightarrow> ('a, unit) Old_Datatype.node set \<Rightarrow> 'b) \<Rightarrow> ('a, unit) Old_Datatype.node set \<Rightarrow> 'b
###defs
abbreviation "Leaf == Old_Datatype.Leaf"
definition
sexp_case :: "['a=>'b, nat=>'b, ['a item, 'a item]=>'b,
'a item] => 'b" where
"sexp_case c d e M = (THE z. (\<exists>x. M=Leaf(x) & z=c(x))
| (\<exists>k. M=Numb(k) & z=d(k))
| (\<exists>N1 N2. M = Scons N1 N2 & z=e N1 N2))"
|
###output
?H1 x_1 x_2 x_3 (?H2 x_4) = x_1 x_4###end
|
Library/Mapping
|
Mapping.All_mapping_alist
|
lemma All_mapping_alist:
"(\<And>k v. (k, v) \<in> set xs \<Longrightarrow> P k v) \<Longrightarrow> All_mapping (Mapping.of_alist xs) P"
|
(\<And>k v. (k, v) \<in> set ?xs \<Longrightarrow> ?P k v) \<Longrightarrow> All_mapping (Mapping.of_alist ?xs) ?P
|
(\<And>y_0 y_1. (y_0, y_1) \<in> ?H1 x_1 \<Longrightarrow> x_2 y_0 y_1) \<Longrightarrow> ?H2 (?H3 x_1) x_2
|
[
"Mapping.of_alist",
"Mapping.All_mapping",
"List.list.set"
] |
[
"('a \\<times> 'b) list \\<Rightarrow> ('a, 'b) mapping",
"('a, 'b) mapping \\<Rightarrow> ('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool",
"'a list \\<Rightarrow> 'a set"
] |
[
"definition of_alist :: \"('k \\<times> 'v) list \\<Rightarrow> ('k, 'v) mapping\"\n where \"of_alist xs = foldr (\\<lambda>(k, v) m. update k v m) xs empty\"",
"definition \"All_mapping m P \\<longleftrightarrow>\n (\\<forall>x. case Mapping.lookup m x of None \\<Rightarrow> True | Some y \\<Rightarrow> P x y)\"",
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\""
] |
template
|
###lemma
(\<And>k v. (k, v) \<in> set ?xs \<Longrightarrow> ?P k v) \<Longrightarrow> All_mapping (Mapping.of_alist ?xs) ?P
###symbols
Mapping.of_alist :::: ('a \<times> 'b) list \<Rightarrow> ('a, 'b) mapping
Mapping.All_mapping :::: ('a, 'b) mapping \<Rightarrow> ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool
List.list.set :::: 'a list \<Rightarrow> 'a set
###defs
definition of_alist :: "('k \<times> 'v) list \<Rightarrow> ('k, 'v) mapping"
where "of_alist xs = foldr (\<lambda>(k, v) m. update k v m) xs empty"
definition "All_mapping m P \<longleftrightarrow>
(\<forall>x. case Mapping.lookup m x of None \<Rightarrow> True | Some y \<Rightarrow> P x y)"
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
|
###output
(\<And>y_0 y_1. (y_0, y_1) \<in> ?H1 x_1 \<Longrightarrow> x_2 y_0 y_1) \<Longrightarrow> ?H2 (?H3 x_1) x_2###end
|
Analysis/Abstract_Metric_Spaces
|
Abstract_Metric_Spaces.uniformly_continuous_map_paired
|
lemma uniformly_continuous_map_paired:
"uniformly_continuous_map m (prod_metric m1 m2) (\<lambda>x. (f x, g x)) \<longleftrightarrow>
uniformly_continuous_map m m1 f \<and> uniformly_continuous_map m m2 g"
|
uniformly_continuous_map ?m (prod_metric ?m1.0 ?m2.0) (\<lambda>x. (?f x, ?g x)) = (uniformly_continuous_map ?m ?m1.0 ?f \<and> uniformly_continuous_map ?m ?m2.0 ?g)
|
?H1 x_1 (?H2 x_2 x_3) (\<lambda>y_0. (x_4 y_0, x_5 y_0)) = (?H1 x_1 x_2 x_4 \<and> ?H1 x_1 x_3 x_5)
|
[
"Abstract_Metric_Spaces.prod_metric",
"Abstract_Metric_Spaces.uniformly_continuous_map"
] |
[
"'a metric \\<Rightarrow> 'b metric \\<Rightarrow> ('a \\<times> 'b) metric",
"'a metric \\<Rightarrow> 'b metric \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool"
] |
[
"definition prod_metric where\n \"prod_metric \\<equiv> \\<lambda>m1 m2. metric (mspace m1 \\<times> mspace m2, prod_dist (mdist m1) (mdist m2))\"",
"definition uniformly_continuous_map \n where \"uniformly_continuous_map \\<equiv> \n \\<lambda>m1 m2 f. f \\<in> mspace m1 \\<rightarrow> mspace m2 \\<and>\n (\\<forall>\\<epsilon>>0. \\<exists>\\<delta>>0. \\<forall>x \\<in> mspace m1. \\<forall>y \\<in> mspace m1. \n mdist m1 y x < \\<delta> \\<longrightarrow> mdist m2 (f y) (f x) < \\<epsilon>)\""
] |
template
|
###lemma
uniformly_continuous_map ?m (prod_metric ?m1.0 ?m2.0) (\<lambda>x. (?f x, ?g x)) = (uniformly_continuous_map ?m ?m1.0 ?f \<and> uniformly_continuous_map ?m ?m2.0 ?g)
###symbols
Abstract_Metric_Spaces.prod_metric :::: 'a metric \<Rightarrow> 'b metric \<Rightarrow> ('a \<times> 'b) metric
Abstract_Metric_Spaces.uniformly_continuous_map :::: 'a metric \<Rightarrow> 'b metric \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
###defs
definition prod_metric where
"prod_metric \<equiv> \<lambda>m1 m2. metric (mspace m1 \<times> mspace m2, prod_dist (mdist m1) (mdist m2))"
definition uniformly_continuous_map
where "uniformly_continuous_map \<equiv>
\<lambda>m1 m2 f. f \<in> mspace m1 \<rightarrow> mspace m2 \<and>
(\<forall>\<epsilon>>0. \<exists>\<delta>>0. \<forall>x \<in> mspace m1. \<forall>y \<in> mspace m1.
mdist m1 y x < \<delta> \<longrightarrow> mdist m2 (f y) (f x) < \<epsilon>)"
|
###output
?H1 x_1 (?H2 x_2 x_3) (\<lambda>y_0. (x_4 y_0, x_5 y_0)) = (?H1 x_1 x_2 x_4 \<and> ?H1 x_1 x_3 x_5)###end
|
Library/Dlist
|
Dlist.doubles_Cons_same
|
lemma doubles_Cons_same: "double\<^sup>*\<^sup>* xs ys \<Longrightarrow> double\<^sup>*\<^sup>* (x # xs) (x # ys)"
|
Dlist.double\<^sup>*\<^sup>* ?xs ?ys \<Longrightarrow> Dlist.double\<^sup>*\<^sup>* (?x # ?xs) (?x # ?ys)
|
?H1 ?H2 x_1 x_2 \<Longrightarrow> ?H1 ?H2 (?H3 x_3 x_1) (?H3 x_3 x_2)
|
[
"List.list.Cons",
"Dlist.double",
"Transitive_Closure.rtranclp"
] |
[
"'a \\<Rightarrow> 'a list \\<Rightarrow> 'a list",
"'a list \\<Rightarrow> 'a list \\<Rightarrow> bool",
"('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> bool"
] |
[
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"",
"inductive double :: \"'a list \\<Rightarrow> 'a list \\<Rightarrow> bool\" where\n \"double (xs @ ys) (xs @ x # ys)\" if \"x \\<in> set ys\""
] |
template
|
###lemma
Dlist.double\<^sup>*\<^sup>* ?xs ?ys \<Longrightarrow> Dlist.double\<^sup>*\<^sup>* (?x # ?xs) (?x # ?ys)
###symbols
List.list.Cons :::: 'a \<Rightarrow> 'a list \<Rightarrow> 'a list
Dlist.double :::: 'a list \<Rightarrow> 'a list \<Rightarrow> bool
Transitive_Closure.rtranclp :::: ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool
###defs
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
inductive double :: "'a list \<Rightarrow> 'a list \<Rightarrow> bool" where
"double (xs @ ys) (xs @ x # ys)" if "x \<in> set ys"
|
###output
?H1 ?H2 x_1 x_2 \<Longrightarrow> ?H1 ?H2 (?H3 x_3 x_1) (?H3 x_3 x_2)###end
|
Real_Asymp/Multiseries_Expansion
|
Multiseries_Expansion.landau_reduce_to_top(12)
| null |
(\<lambda>x. ?f (inverse x)) \<in> o(\<lambda>x. ?g (inverse x)) \<Longrightarrow> ?f \<in> o[at_right 0](?g)
|
(\<lambda>y_0. x_1 (?H1 y_0)) \<in> ?H2 (\<lambda>y_1. x_2 (?H1 y_1)) \<Longrightarrow> x_1 \<in> ?H3 (?H4 ?H5) x_2
|
[
"Groups.zero_class.zero",
"Topological_Spaces.order_topology_class.at_right",
"Landau_Symbols.smallo",
"Landau_Symbols.smallo_at_top",
"Fields.inverse_class.inverse"
] |
[
"'a",
"'a \\<Rightarrow> 'a filter",
"'a filter \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('a \\<Rightarrow> 'b) set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> ('a \\<Rightarrow> 'b) set",
"'a \\<Rightarrow> 'a"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"class order_topology = order + \"open\" +\n assumes open_generated_order: \"open = generate_topology (range (\\<lambda>a. {..< a}) \\<union> range (\\<lambda>a. {a <..}))\"\nbegin",
"definition smallo :: \"'a filter \\<Rightarrow> ('a \\<Rightarrow> ('b :: real_normed_field)) \\<Rightarrow> ('a \\<Rightarrow> 'b) set\"\n (\\<open>(1o[_]'(_'))\\<close>)\n where \"smallo F g = {f. (\\<forall>c>0. eventually (\\<lambda>x. norm (f x) \\<le> c * norm (g x)) F)}\"",
"abbreviation smallo_at_top (\\<open>(2o'(_'))\\<close>) where\n \"o(g) \\<equiv> smallo at_top g\"",
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin"
] |
template
|
###lemma
(\<lambda>x. ?f (inverse x)) \<in> o(\<lambda>x. ?g (inverse x)) \<Longrightarrow> ?f \<in> o[at_right 0](?g)
###symbols
Groups.zero_class.zero :::: 'a
Topological_Spaces.order_topology_class.at_right :::: 'a \<Rightarrow> 'a filter
Landau_Symbols.smallo :::: 'a filter \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'b) set
Landau_Symbols.smallo_at_top :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'b) set
Fields.inverse_class.inverse :::: 'a \<Rightarrow> 'a
###defs
class zero =
fixes zero :: 'a ("0")
class order_topology = order + "open" +
assumes open_generated_order: "open = generate_topology (range (\<lambda>a. {..< a}) \<union> range (\<lambda>a. {a <..}))"
begin
definition smallo :: "'a filter \<Rightarrow> ('a \<Rightarrow> ('b :: real_normed_field)) \<Rightarrow> ('a \<Rightarrow> 'b) set"
(\<open>(1o[_]'(_'))\<close>)
where "smallo F g = {f. (\<forall>c>0. eventually (\<lambda>x. norm (f x) \<le> c * norm (g x)) F)}"
abbreviation smallo_at_top (\<open>(2o'(_'))\<close>) where
"o(g) \<equiv> smallo at_top g"
class inverse = divide +
fixes inverse :: "'a \<Rightarrow> 'a"
begin
|
###output
(\<lambda>y_0. x_1 (?H1 y_0)) \<in> ?H2 (\<lambda>y_1. x_2 (?H1 y_1)) \<Longrightarrow> x_1 \<in> ?H3 (?H4 ?H5) x_2###end
|
Analysis/Polytope
|
Polytope.face_of_Times_decomp
| null |
(?C face_of ?S \<times> ?S') = (\<exists>F F'. F face_of ?S \<and> F' face_of ?S' \<and> ?C = F \<times> F')
|
?H1 x_1 (?H2 x_2 x_3) = (\<exists>y_0 y_1. ?H1 y_0 x_2 \<and> ?H1 y_1 x_3 \<and> x_1 = ?H2 y_0 y_1)
|
[
"Product_Type.Times",
"Polytope.face_of"
] |
[
"'a set \\<Rightarrow> 'b set \\<Rightarrow> ('a \\<times> 'b) set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"abbreviation Times :: \"'a set \\<Rightarrow> 'b set \\<Rightarrow> ('a \\<times> 'b) set\" (infixr \"\\<times>\" 80)\n where \"A \\<times> B \\<equiv> Sigma A (\\<lambda>_. B)\""
] |
template
|
###lemma
(?C face_of ?S \<times> ?S') = (\<exists>F F'. F face_of ?S \<and> F' face_of ?S' \<and> ?C = F \<times> F')
###symbols
Product_Type.Times :::: 'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<times> 'b) set
Polytope.face_of :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
###defs
abbreviation Times :: "'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<times> 'b) set" (infixr "\<times>" 80)
where "A \<times> B \<equiv> Sigma A (\<lambda>_. B)"
|
###output
?H1 x_1 (?H2 x_2 x_3) = (\<exists>y_0 y_1. ?H1 y_0 x_2 \<and> ?H1 y_1 x_3 \<and> x_1 = ?H2 y_0 y_1)###end
|
Set_Interval
|
Set_Interval.bounded_nat_set_is_finite
|
lemma bounded_nat_set_is_finite: "(\<forall>i\<in>N. i < (n::nat)) \<Longrightarrow> finite N"
|
\<forall>i\<in> ?N. i < ?n \<Longrightarrow> finite ?N
|
\<forall>y_0\<in>x_1. y_0 < x_2 \<Longrightarrow> ?H1 x_1
|
[
"Finite_Set.finite"
] |
[
"'a set \\<Rightarrow> bool"
] |
[
"class finite =\n assumes finite_UNIV: \"finite (UNIV :: 'a set)\"\nbegin"
] |
template
|
###lemma
\<forall>i\<in> ?N. i < ?n \<Longrightarrow> finite ?N
###symbols
Finite_Set.finite :::: 'a set \<Rightarrow> bool
###defs
class finite =
assumes finite_UNIV: "finite (UNIV :: 'a set)"
begin
|
###output
\<forall>y_0\<in>x_1. y_0 < x_2 \<Longrightarrow> ?H1 x_1###end
|
Quotient
|
Quotient.QT_all
| null |
Quot_True (All ?P) \<Longrightarrow> Quot_True ?P
|
?H1 (All x_1) \<Longrightarrow> ?H1 x_1
|
[
"Quotient.Quot_True"
] |
[
"'a \\<Rightarrow> bool"
] |
[
"definition\n Quot_True :: \"'a \\<Rightarrow> bool\"\nwhere\n \"Quot_True x \\<longleftrightarrow> True\""
] |
template
|
###lemma
Quot_True (All ?P) \<Longrightarrow> Quot_True ?P
###symbols
Quotient.Quot_True :::: 'a \<Rightarrow> bool
###defs
definition
Quot_True :: "'a \<Rightarrow> bool"
where
"Quot_True x \<longleftrightarrow> True"
|
###output
?H1 (All x_1) \<Longrightarrow> ?H1 x_1###end
|
Analysis/Complex_Transcendental
|
Complex_Transcendental.exp_Complex
|
lemma exp_Complex: "exp(Complex r t) = of_real(exp r) * Complex (cos t) (sin t)"
|
exp (Complex ?r ?t) = complex_of_real (exp ?r) * Complex (cos ?t) (sin ?t)
|
?H1 (?H2 x_1 x_2) = ?H3 (?H4 (?H1 x_1)) (?H2 (?H5 x_2) (?H6 x_2))
|
[
"Transcendental.sin",
"Transcendental.cos",
"Complex.complex_of_real",
"Groups.times_class.times",
"Complex.complex.Complex",
"Transcendental.exp"
] |
[
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a",
"real \\<Rightarrow> complex",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"real \\<Rightarrow> real \\<Rightarrow> complex",
"'a \\<Rightarrow> 'a"
] |
[
"definition sin :: \"'a \\<Rightarrow> 'a::{real_normed_algebra_1,banach}\"\n where \"sin = (\\<lambda>x. \\<Sum>n. sin_coeff n *\\<^sub>R x^n)\"",
"definition cos :: \"'a \\<Rightarrow> 'a::{real_normed_algebra_1,banach}\"\n where \"cos = (\\<lambda>x. \\<Sum>n. cos_coeff n *\\<^sub>R x^n)\"",
"abbreviation complex_of_real :: \"real \\<Rightarrow> complex\"\n where \"complex_of_real \\<equiv> of_real\"",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"codatatype complex = Complex (Re: real) (Im: real)",
"definition exp :: \"'a \\<Rightarrow> 'a::{real_normed_algebra_1,banach}\"\n where \"exp = (\\<lambda>x. \\<Sum>n. x^n /\\<^sub>R fact n)\""
] |
template
|
###lemma
exp (Complex ?r ?t) = complex_of_real (exp ?r) * Complex (cos ?t) (sin ?t)
###symbols
Transcendental.sin :::: 'a \<Rightarrow> 'a
Transcendental.cos :::: 'a \<Rightarrow> 'a
Complex.complex_of_real :::: real \<Rightarrow> complex
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Complex.complex.Complex :::: real \<Rightarrow> real \<Rightarrow> complex
Transcendental.exp :::: 'a \<Rightarrow> 'a
###defs
definition sin :: "'a \<Rightarrow> 'a::{real_normed_algebra_1,banach}"
where "sin = (\<lambda>x. \<Sum>n. sin_coeff n *\<^sub>R x^n)"
definition cos :: "'a \<Rightarrow> 'a::{real_normed_algebra_1,banach}"
where "cos = (\<lambda>x. \<Sum>n. cos_coeff n *\<^sub>R x^n)"
abbreviation complex_of_real :: "real \<Rightarrow> complex"
where "complex_of_real \<equiv> of_real"
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
codatatype complex = Complex (Re: real) (Im: real)
definition exp :: "'a \<Rightarrow> 'a::{real_normed_algebra_1,banach}"
where "exp = (\<lambda>x. \<Sum>n. x^n /\<^sub>R fact n)"
|
###output
?H1 (?H2 x_1 x_2) = ?H3 (?H4 (?H1 x_1)) (?H2 (?H5 x_2) (?H6 x_2))###end
|
String
|
String.digit4_ascii_of_iff
|
lemma digit4_ascii_of_iff [simp]:
"digit4 (String.ascii_of c) \<longleftrightarrow> digit4 c"
|
digit4 (String.ascii_of ?c) = digit4 ?c
|
?H1 (?H2 x_1) = ?H1 x_1
|
[
"String.ascii_of",
"String.char.digit4"
] |
[
"char \\<Rightarrow> char",
"char \\<Rightarrow> bool"
] |
[
"definition ascii_of :: \"char \\<Rightarrow> char\"\n where \"ascii_of c = Char (digit0 c) (digit1 c) (digit2 c) (digit3 c) (digit4 c) (digit5 c) (digit6 c) False\"",
"datatype char =\n Char (digit0: bool) (digit1: bool) (digit2: bool) (digit3: bool)\n (digit4: bool) (digit5: bool) (digit6: bool) (digit7: bool)"
] |
template
|
###lemma
digit4 (String.ascii_of ?c) = digit4 ?c
###symbols
String.ascii_of :::: char \<Rightarrow> char
String.char.digit4 :::: char \<Rightarrow> bool
###defs
definition ascii_of :: "char \<Rightarrow> char"
where "ascii_of c = Char (digit0 c) (digit1 c) (digit2 c) (digit3 c) (digit4 c) (digit5 c) (digit6 c) False"
datatype char =
Char (digit0: bool) (digit1: bool) (digit2: bool) (digit3: bool)
(digit4: bool) (digit5: bool) (digit6: bool) (digit7: bool)
|
###output
?H1 (?H2 x_1) = ?H1 x_1###end
|
Bali/Trans
|
Transfer.funpow_transfer
| null |
rel_fun (=) (rel_fun (rel_fun ?A ?A) (rel_fun ?A ?A)) compow compow
|
?H1 (=) (?H1 (?H1 x_1 x_1) (?H1 x_1 x_1)) ?H2 ?H2
|
[
"Nat.compow",
"BNF_Def.rel_fun"
] |
[
"nat \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'c) \\<Rightarrow> ('b \\<Rightarrow> 'd) \\<Rightarrow> bool"
] |
[
"consts compow :: \"nat \\<Rightarrow> 'a \\<Rightarrow> 'a\"",
"definition\n rel_fun :: \"('a \\<Rightarrow> 'c \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'd) \\<Rightarrow> bool\"\nwhere\n \"rel_fun A B = (\\<lambda>f g. \\<forall>x y. A x y \\<longrightarrow> B (f x) (g y))\""
] |
template
|
###lemma
rel_fun (=) (rel_fun (rel_fun ?A ?A) (rel_fun ?A ?A)) compow compow
###symbols
Nat.compow :::: nat \<Rightarrow> 'a \<Rightarrow> 'a
BNF_Def.rel_fun :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'c) \<Rightarrow> ('b \<Rightarrow> 'd) \<Rightarrow> bool
###defs
consts compow :: "nat \<Rightarrow> 'a \<Rightarrow> 'a"
definition
rel_fun :: "('a \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'd) \<Rightarrow> bool"
where
"rel_fun A B = (\<lambda>f g. \<forall>x y. A x y \<longrightarrow> B (f x) (g y))"
|
###output
?H1 (=) (?H1 (?H1 x_1 x_1) (?H1 x_1 x_1)) ?H2 ?H2###end
|
Bali/DeclConcepts
|
DeclConcepts.dynmethdSomeD
|
lemma dynmethdSomeD:
"\<lbrakk>dynmethd G statC dynC sig = Some dynM; is_class G dynC; ws_prog G\<rbrakk>
\<Longrightarrow> G\<turnstile>dynC \<preceq>\<^sub>C statC \<and> (\<exists> statM. methd G statC sig = Some statM)"
|
dynmethd ?G ?statC ?dynC ?sig = Some ?dynM \<Longrightarrow> is_class ?G ?dynC \<Longrightarrow> ws_prog ?G \<Longrightarrow> ?G\<turnstile> ?dynC\<preceq>\<^sub>C ?statC \<and> (\<exists>statM. methd ?G ?statC ?sig = Some statM)
|
\<lbrakk> ?H1 x_1 x_2 x_3 x_4 = ?H2 x_5; ?H3 x_1 x_3; ?H4 x_1\<rbrakk> \<Longrightarrow> ?H5 x_1 x_3 x_2 \<and> (\<exists>y_0. ?H6 x_1 x_2 x_4 = ?H2 y_0)
|
[
"DeclConcepts.methd",
"Decl.subclseq_syntax",
"Decl.ws_prog",
"Decl.is_class",
"Option.option.Some",
"DeclConcepts.dynmethd"
] |
[
"prog \\<Rightarrow> qtname \\<Rightarrow> sig \\<Rightarrow> (qtname \\<times> methd) option",
"prog \\<Rightarrow> qtname \\<Rightarrow> qtname \\<Rightarrow> bool",
"prog \\<Rightarrow> bool",
"prog \\<Rightarrow> qtname \\<Rightarrow> bool",
"'a \\<Rightarrow> 'a option",
"prog \\<Rightarrow> qtname \\<Rightarrow> qtname \\<Rightarrow> sig \\<Rightarrow> (qtname \\<times> methd) option"
] |
[
"definition\n methd :: \"prog \\<Rightarrow> qtname \\<Rightarrow> (sig,qtname \\<times> methd) table\" where\n \"methd G C =\n class_rec G C Map.empty\n (\\<lambda>C c subcls_mthds. \n filter_tab (\\<lambda>sig m. G\\<turnstile>C inherits method sig m)\n subcls_mthds \n ++ \n table_of (map (\\<lambda>(s,m). (s,C,m)) (methods c)))\"",
"abbreviation\n subclseq_syntax :: \"prog => [qtname, qtname] => bool\" (\"_\\<turnstile>_\\<preceq>\\<^sub>C _\" [71,71,71] 70) \n where \"G\\<turnstile>C \\<preceq>\\<^sub>C D == (C,D) \\<in>(subcls1 G)\\<^sup>*\"",
"definition\n ws_prog :: \"prog \\<Rightarrow> bool\" where\n \"ws_prog G = ((\\<forall>(I,i)\\<in>set (ifaces G). ws_idecl G I (isuperIfs i)) \\<and> \n (\\<forall>(C,c)\\<in>set (classes G). ws_cdecl G C (super c)))\"",
"abbreviation\n is_class :: \"prog \\<Rightarrow> qtname \\<Rightarrow> bool\"\n where \"is_class G C == class G C \\<noteq> None\"",
"datatype 'a option =\n None\n | Some (the: 'a)",
"definition\n dynmethd :: \"prog \\<Rightarrow> qtname \\<Rightarrow> qtname \\<Rightarrow> (sig,qtname \\<times> methd) table\" where\n \"dynmethd G statC dynC =\n (\\<lambda>sig.\n (if G\\<turnstile>dynC \\<preceq>\\<^sub>C statC\n then (case methd G statC sig of\n None \\<Rightarrow> None\n | Some statM \n \\<Rightarrow> (class_rec G dynC Map.empty\n (\\<lambda>C c subcls_mthds. \n subcls_mthds\n ++\n (filter_tab \n (\\<lambda> _ dynM. G,sig\\<turnstile>dynM overrides statM \\<or> dynM=statM)\n (methd G C) ))\n ) sig\n )\n else None))\""
] |
template
|
###lemma
dynmethd ?G ?statC ?dynC ?sig = Some ?dynM \<Longrightarrow> is_class ?G ?dynC \<Longrightarrow> ws_prog ?G \<Longrightarrow> ?G\<turnstile> ?dynC\<preceq>\<^sub>C ?statC \<and> (\<exists>statM. methd ?G ?statC ?sig = Some statM)
###symbols
DeclConcepts.methd :::: prog \<Rightarrow> qtname \<Rightarrow> sig \<Rightarrow> (qtname \<times> methd) option
Decl.subclseq_syntax :::: prog \<Rightarrow> qtname \<Rightarrow> qtname \<Rightarrow> bool
Decl.ws_prog :::: prog \<Rightarrow> bool
Decl.is_class :::: prog \<Rightarrow> qtname \<Rightarrow> bool
Option.option.Some :::: 'a \<Rightarrow> 'a option
DeclConcepts.dynmethd :::: prog \<Rightarrow> qtname \<Rightarrow> qtname \<Rightarrow> sig \<Rightarrow> (qtname \<times> methd) option
###defs
definition
methd :: "prog \<Rightarrow> qtname \<Rightarrow> (sig,qtname \<times> methd) table" where
"methd G C =
class_rec G C Map.empty
(\<lambda>C c subcls_mthds.
filter_tab (\<lambda>sig m. G\<turnstile>C inherits method sig m)
subcls_mthds
++
table_of (map (\<lambda>(s,m). (s,C,m)) (methods c)))"
abbreviation
subclseq_syntax :: "prog => [qtname, qtname] => bool" ("_\<turnstile>_\<preceq>\<^sub>C _" [71,71,71] 70)
where "G\<turnstile>C \<preceq>\<^sub>C D == (C,D) \<in>(subcls1 G)\<^sup>*"
definition
ws_prog :: "prog \<Rightarrow> bool" where
"ws_prog G = ((\<forall>(I,i)\<in>set (ifaces G). ws_idecl G I (isuperIfs i)) \<and>
(\<forall>(C,c)\<in>set (classes G). ws_cdecl G C (super c)))"
abbreviation
is_class :: "prog \<Rightarrow> qtname \<Rightarrow> bool"
where "is_class G C == class G C \<noteq> None"
datatype 'a option =
None
| Some (the: 'a)
definition
dynmethd :: "prog \<Rightarrow> qtname \<Rightarrow> qtname \<Rightarrow> (sig,qtname \<times> methd) table" where
"dynmethd G statC dynC =
(\<lambda>sig.
(if G\<turnstile>dynC \<preceq>\<^sub>C statC
then (case methd G statC sig of
None \<Rightarrow> None
| Some statM
\<Rightarrow> (class_rec G dynC Map.empty
(\<lambda>C c subcls_mthds.
subcls_mthds
++
(filter_tab
(\<lambda> _ dynM. G,sig\<turnstile>dynM overrides statM \<or> dynM=statM)
(methd G C) ))
) sig
)
else None))"
|
###output
\<lbrakk> ?H1 x_1 x_2 x_3 x_4 = ?H2 x_5; ?H3 x_1 x_3; ?H4 x_1\<rbrakk> \<Longrightarrow> ?H5 x_1 x_3 x_2 \<and> (\<exists>y_0. ?H6 x_1 x_2 x_4 = ?H2 y_0)###end
|
Auth/Smartcard/ShoupRubin
|
ShoupRubin.B_authenticates_A
|
lemma B_authenticates_A:
"\<lbrakk> Gets B (Crypt (pairK(A,B)) (Nonce Nb)) \<in> set evs;
B \<noteq> Spy; \<not>illegalUse(Card A); \<not>illegalUse(Card B);
evs \<in> sr \<rbrakk>
\<Longrightarrow> Outpts (Card A) A
\<lbrace>Key (sesK(Nb,pairK(A,B))), Crypt (pairK(A,B)) (Nonce Nb)\<rbrace> \<in> set evs"
|
Gets ?B (Crypt (pairK (?A, ?B)) (Nonce ?Nb)) \<in> set ?evs \<Longrightarrow> ?B \<noteq> Spy \<Longrightarrow> \<not> illegalUse (Card ?A) \<Longrightarrow> \<not> illegalUse (Card ?B) \<Longrightarrow> ?evs \<in> sr \<Longrightarrow> Outpts (Card ?A) ?A \<lbrace>Key (sesK (?Nb, pairK (?A, ?B))), Crypt (pairK (?A, ?B)) (Nonce ?Nb)\<rbrace> \<in> set ?evs
|
\<lbrakk> ?H1 x_1 (?H2 (?H3 (x_2, x_1)) (?H4 x_3)) \<in> ?H5 x_4; x_1 \<noteq> ?H6; \<not> ?H7 (?H8 x_2); \<not> ?H7 (?H8 x_1); x_4 \<in> ?H9\<rbrakk> \<Longrightarrow> ?H10 (?H8 x_2) x_2 (?H11 (?H12 (?H13 (x_3, ?H3 (x_2, x_1)))) (?H2 (?H3 (x_2, x_1)) (?H4 x_3))) \<in> ?H5 x_4
|
[
"ShoupRubin.sesK",
"Message.msg.Key",
"Message.msg.MPair",
"EventSC.event.Outpts",
"ShoupRubin.sr",
"EventSC.card.Card",
"Smartcard.illegalUse",
"Message.agent.Spy",
"List.list.set",
"Message.msg.Nonce",
"Smartcard.pairK",
"Message.msg.Crypt",
"EventSC.event.Gets"
] |
[
"nat \\<times> nat \\<Rightarrow> nat",
"nat \\<Rightarrow> msg",
"msg \\<Rightarrow> msg \\<Rightarrow> msg",
"card \\<Rightarrow> agent \\<Rightarrow> msg \\<Rightarrow> event",
"event list set",
"agent \\<Rightarrow> card",
"card \\<Rightarrow> bool",
"agent",
"'a list \\<Rightarrow> 'a set",
"nat \\<Rightarrow> msg",
"agent \\<times> agent \\<Rightarrow> nat",
"nat \\<Rightarrow> msg \\<Rightarrow> msg",
"agent \\<Rightarrow> msg \\<Rightarrow> event"
] |
[
"datatype\n msg = Agent agent \\<comment> \\<open>Agent names\\<close>\n | Number nat \\<comment> \\<open>Ordinary integers, timestamps, ...\\<close>\n | Nonce nat \\<comment> \\<open>Unguessable nonces\\<close>\n | Key key \\<comment> \\<open>Crypto keys\\<close>\n | Hash msg \\<comment> \\<open>Hashing\\<close>\n | MPair msg msg \\<comment> \\<open>Compound messages\\<close>\n | Crypt key msg \\<comment> \\<open>Encryption, public- or shared-key\\<close>",
"datatype\n msg = Agent agent \\<comment> \\<open>Agent names\\<close>\n | Number nat \\<comment> \\<open>Ordinary integers, timestamps, ...\\<close>\n | Nonce nat \\<comment> \\<open>Unguessable nonces\\<close>\n | Key key \\<comment> \\<open>Crypto keys\\<close>\n | Hash msg \\<comment> \\<open>Hashing\\<close>\n | MPair msg msg \\<comment> \\<open>Compound messages\\<close>\n | Crypt key msg \\<comment> \\<open>Encryption, public- or shared-key\\<close>",
"primrec illegalUse :: \"card => bool\" where\n illegalUse_def: \"illegalUse (Card A) = ( (Card A \\<in> stolen \\<and> A \\<in> bad) \\<or> Card A \\<in> cloned )\"",
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"",
"datatype\n msg = Agent agent \\<comment> \\<open>Agent names\\<close>\n | Number nat \\<comment> \\<open>Ordinary integers, timestamps, ...\\<close>\n | Nonce nat \\<comment> \\<open>Unguessable nonces\\<close>\n | Key key \\<comment> \\<open>Crypto keys\\<close>\n | Hash msg \\<comment> \\<open>Hashing\\<close>\n | MPair msg msg \\<comment> \\<open>Compound messages\\<close>\n | Crypt key msg \\<comment> \\<open>Encryption, public- or shared-key\\<close>",
"datatype\n msg = Agent agent \\<comment> \\<open>Agent names\\<close>\n | Number nat \\<comment> \\<open>Ordinary integers, timestamps, ...\\<close>\n | Nonce nat \\<comment> \\<open>Unguessable nonces\\<close>\n | Key key \\<comment> \\<open>Crypto keys\\<close>\n | Hash msg \\<comment> \\<open>Hashing\\<close>\n | MPair msg msg \\<comment> \\<open>Compound messages\\<close>\n | Crypt key msg \\<comment> \\<open>Encryption, public- or shared-key\\<close>"
] |
template
|
###lemma
Gets ?B (Crypt (pairK (?A, ?B)) (Nonce ?Nb)) \<in> set ?evs \<Longrightarrow> ?B \<noteq> Spy \<Longrightarrow> \<not> illegalUse (Card ?A) \<Longrightarrow> \<not> illegalUse (Card ?B) \<Longrightarrow> ?evs \<in> sr \<Longrightarrow> Outpts (Card ?A) ?A \<lbrace>Key (sesK (?Nb, pairK (?A, ?B))), Crypt (pairK (?A, ?B)) (Nonce ?Nb)\<rbrace> \<in> set ?evs
###symbols
ShoupRubin.sesK :::: nat \<times> nat \<Rightarrow> nat
Message.msg.Key :::: nat \<Rightarrow> msg
Message.msg.MPair :::: msg \<Rightarrow> msg \<Rightarrow> msg
EventSC.event.Outpts :::: card \<Rightarrow> agent \<Rightarrow> msg \<Rightarrow> event
ShoupRubin.sr :::: event list set
EventSC.card.Card :::: agent \<Rightarrow> card
Smartcard.illegalUse :::: card \<Rightarrow> bool
Message.agent.Spy :::: agent
List.list.set :::: 'a list \<Rightarrow> 'a set
Message.msg.Nonce :::: nat \<Rightarrow> msg
Smartcard.pairK :::: agent \<times> agent \<Rightarrow> nat
Message.msg.Crypt :::: nat \<Rightarrow> msg \<Rightarrow> msg
EventSC.event.Gets :::: agent \<Rightarrow> msg \<Rightarrow> event
###defs
datatype
msg = Agent agent \<comment> \<open>Agent names\<close>
| Number nat \<comment> \<open>Ordinary integers, timestamps, ...\<close>
| Nonce nat \<comment> \<open>Unguessable nonces\<close>
| Key key \<comment> \<open>Crypto keys\<close>
| Hash msg \<comment> \<open>Hashing\<close>
| MPair msg msg \<comment> \<open>Compound messages\<close>
| Crypt key msg \<comment> \<open>Encryption, public- or shared-key\<close>
datatype
msg = Agent agent \<comment> \<open>Agent names\<close>
| Number nat \<comment> \<open>Ordinary integers, timestamps, ...\<close>
| Nonce nat \<comment> \<open>Unguessable nonces\<close>
| Key key \<comment> \<open>Crypto keys\<close>
| Hash msg \<comment> \<open>Hashing\<close>
| MPair msg msg \<comment> \<open>Compound messages\<close>
| Crypt key msg \<comment> \<open>Encryption, public- or shared-key\<close>
primrec illegalUse :: "card => bool" where
illegalUse_def: "illegalUse (Card A) = ( (Card A \<in> stolen \<and> A \<in> bad) \<or> Card A \<in> cloned )"
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
datatype
msg = Agent agent \<comment> \<open>Agent names\<close>
| Number nat \<comment> \<open>Ordinary integers, timestamps, ...\<close>
| Nonce nat \<comment> \<open>Unguessable nonces\<close>
| Key key \<comment> \<open>Crypto keys\<close>
| Hash msg \<comment> \<open>Hashing\<close>
| MPair msg msg \<comment> \<open>Compound messages\<close>
| Crypt key msg \<comment> \<open>Encryption, public- or shared-key\<close>
datatype
msg = Agent agent \<comment> \<open>Agent names\<close>
| Number nat \<comment> \<open>Ordinary integers, timestamps, ...\<close>
| Nonce nat \<comment> \<open>Unguessable nonces\<close>
| Key key \<comment> \<open>Crypto keys\<close>
| Hash msg \<comment> \<open>Hashing\<close>
| MPair msg msg \<comment> \<open>Compound messages\<close>
| Crypt key msg \<comment> \<open>Encryption, public- or shared-key\<close>
|
###output
\<lbrakk> ?H1 x_1 (?H2 (?H3 (x_2, x_1)) (?H4 x_3)) \<in> ?H5 x_4; x_1 \<noteq> ?H6; \<not> ?H7 (?H8 x_2); \<not> ?H7 (?H8 x_1); x_4 \<in> ?H9\<rbrakk> \<Longrightarrow> ?H10 (?H8 x_2) x_2 (?H11 (?H12 (?H13 (x_3, ?H3 (x_2, x_1)))) (?H2 (?H3 (x_2, x_1)) (?H4 x_3))) \<in> ?H5 x_4###end
|
UNITY/Simple/Lift
|
Lifting_Set.strict_subset_transfer
| null |
bi_unique ?A \<Longrightarrow> rel_fun (rel_set ?A) (rel_fun (rel_set ?A) (=)) (\<subset>) (\<subset>)
|
?H1 x_1 \<Longrightarrow> ?H2 (?H3 x_1) (?H2 (?H3 x_1) (=)) ?H4 ?H4
|
[
"Set.subset",
"BNF_Def.rel_set",
"BNF_Def.rel_fun",
"Transfer.bi_unique"
] |
[
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a set \\<Rightarrow> 'b set \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'c) \\<Rightarrow> ('b \\<Rightarrow> 'd) \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool"
] |
[
"abbreviation subset :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset \\<equiv> less\"",
"definition rel_set :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a set \\<Rightarrow> 'b set \\<Rightarrow> bool\"\n where \"rel_set R = (\\<lambda>A B. (\\<forall>x\\<in>A. \\<exists>y\\<in>B. R x y) \\<and> (\\<forall>y\\<in>B. \\<exists>x\\<in>A. R x y))\"",
"definition\n rel_fun :: \"('a \\<Rightarrow> 'c \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'd) \\<Rightarrow> bool\"\nwhere\n \"rel_fun A B = (\\<lambda>f g. \\<forall>x y. A x y \\<longrightarrow> B (f x) (g y))\"",
"definition bi_unique :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool\"\n where \"bi_unique R \\<longleftrightarrow>\n (\\<forall>x y z. R x y \\<longrightarrow> R x z \\<longrightarrow> y = z) \\<and>\n (\\<forall>x y z. R x z \\<longrightarrow> R y z \\<longrightarrow> x = y)\""
] |
template
|
###lemma
bi_unique ?A \<Longrightarrow> rel_fun (rel_set ?A) (rel_fun (rel_set ?A) (=)) (\<subset>) (\<subset>)
###symbols
Set.subset :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
BNF_Def.rel_set :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a set \<Rightarrow> 'b set \<Rightarrow> bool
BNF_Def.rel_fun :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'c) \<Rightarrow> ('b \<Rightarrow> 'd) \<Rightarrow> bool
Transfer.bi_unique :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool
###defs
abbreviation subset :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset \<equiv> less"
definition rel_set :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a set \<Rightarrow> 'b set \<Rightarrow> bool"
where "rel_set R = (\<lambda>A B. (\<forall>x\<in>A. \<exists>y\<in>B. R x y) \<and> (\<forall>y\<in>B. \<exists>x\<in>A. R x y))"
definition
rel_fun :: "('a \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'd) \<Rightarrow> bool"
where
"rel_fun A B = (\<lambda>f g. \<forall>x y. A x y \<longrightarrow> B (f x) (g y))"
definition bi_unique :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool"
where "bi_unique R \<longleftrightarrow>
(\<forall>x y z. R x y \<longrightarrow> R x z \<longrightarrow> y = z) \<and>
(\<forall>x y z. R x z \<longrightarrow> R y z \<longrightarrow> x = y)"
|
###output
?H1 x_1 \<Longrightarrow> ?H2 (?H3 x_1) (?H2 (?H3 x_1) (=)) ?H4 ?H4###end
|
List
|
List.find_dropWhile
|
lemma find_dropWhile:
"List.find P xs = (case dropWhile (Not \<circ> P) xs
of [] \<Rightarrow> None
| x # _ \<Rightarrow> Some x)"
|
find ?P ?xs = (case dropWhile (Not \<circ> ?P) ?xs of [] \<Rightarrow> None | x # xa \<Rightarrow> Some x)
|
?H1 x_1 x_2 = ?H2 ?H3 (\<lambda>y_0 y_1. ?H4 y_0) (?H5 (?H6 Not x_1) x_2)
|
[
"Fun.comp",
"List.dropWhile",
"Option.option.Some",
"Option.option.None",
"List.list.case_list",
"List.find"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'a) \\<Rightarrow> 'c \\<Rightarrow> 'b",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> 'a list",
"'a \\<Rightarrow> 'a option",
"'a option",
"'a \\<Rightarrow> ('b \\<Rightarrow> 'b list \\<Rightarrow> 'a) \\<Rightarrow> 'b list \\<Rightarrow> 'a",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> 'a option"
] |
[
"definition comp :: \"('b \\<Rightarrow> 'c) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> 'c\" (infixl \"\\<circ>\" 55)\n where \"f \\<circ> g = (\\<lambda>x. f (g x))\"",
"primrec dropWhile :: \"('a \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> 'a list\" where\n\"dropWhile P [] = []\" |\n\"dropWhile P (x # xs) = (if P x then dropWhile P xs else x # xs)\"",
"datatype 'a option =\n None\n | Some (the: 'a)",
"datatype 'a option =\n None\n | Some (the: 'a)",
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"",
"primrec find :: \"('a \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> 'a option\" where\n\"find _ [] = None\" |\n\"find P (x#xs) = (if P x then Some x else find P xs)\""
] |
template
|
###lemma
find ?P ?xs = (case dropWhile (Not \<circ> ?P) ?xs of [] \<Rightarrow> None | x # xa \<Rightarrow> Some x)
###symbols
Fun.comp :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'a) \<Rightarrow> 'c \<Rightarrow> 'b
List.dropWhile :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> 'a list
Option.option.Some :::: 'a \<Rightarrow> 'a option
Option.option.None :::: 'a option
List.list.case_list :::: 'a \<Rightarrow> ('b \<Rightarrow> 'b list \<Rightarrow> 'a) \<Rightarrow> 'b list \<Rightarrow> 'a
List.find :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> 'a option
###defs
definition comp :: "('b \<Rightarrow> 'c) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'c" (infixl "\<circ>" 55)
where "f \<circ> g = (\<lambda>x. f (g x))"
primrec dropWhile :: "('a \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> 'a list" where
"dropWhile P [] = []" |
"dropWhile P (x # xs) = (if P x then dropWhile P xs else x # xs)"
datatype 'a option =
None
| Some (the: 'a)
datatype 'a option =
None
| Some (the: 'a)
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
primrec find :: "('a \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> 'a option" where
"find _ [] = None" |
"find P (x#xs) = (if P x then Some x else find P xs)"
|
###output
?H1 x_1 x_2 = ?H2 ?H3 (\<lambda>y_0 y_1. ?H4 y_0) (?H5 (?H6 Not x_1) x_2)###end
|
IMPP/Hoare
|
Hoare.MGT_alternI
|
lemma MGT_alternI: "G|-MGT c \<Longrightarrow>
G|-{\<lambda>Z s0. \<forall>s1. <c,s0> -c-> s1 \<longrightarrow> Z=s1}. c .{\<lambda>Z s1. Z=s1}"
|
?G|-{=}. ?c.{->} \<Longrightarrow> ?G|-{\<lambda>Z s0. \<forall>s1. < ?c,s0> -c-> s1 \<longrightarrow> Z = s1}. ?c .{(=)}
|
?H1 x_1 (?H2 x_2) \<Longrightarrow> ?H1 x_1 (?H3 (\<lambda>y_0 y_1. \<forall>y_2. ?H4 x_2 y_1 y_2 \<longrightarrow> y_0 = y_2) x_2 (=))
|
[
"Natural.evalc",
"Hoare.triple.triple",
"Hoare.MGT",
"Hoare.hoare_deriv"
] |
[
"com \\<Rightarrow> state assn",
"'a assn \\<Rightarrow> com \\<Rightarrow> 'a assn \\<Rightarrow> 'a triple",
"com \\<Rightarrow> state triple",
"'a triple set \\<Rightarrow> 'a triple \\<Rightarrow> bool"
] |
[
"inductive\n evalc :: \"[com,state, state] => bool\" (\"<_,_>/ -c-> _\" [0,0, 51] 51)\n where\n Skip: \"<SKIP,s> -c-> s\"\n\n | Assign: \"<X :== a,s> -c-> s[X::=a s]\"\n\n | Local: \"<c, s0[Loc Y::= a s0]> -c-> s1 ==>\n <LOCAL Y := a IN c, s0> -c-> s1[Loc Y::=s0<Y>]\"\n\n | Semi: \"[| <c0,s0> -c-> s1; <c1,s1> -c-> s2 |] ==>\n <c0;; c1, s0> -c-> s2\"\n\n | IfTrue: \"[| b s; <c0,s> -c-> s1 |] ==>\n <IF b THEN c0 ELSE c1, s> -c-> s1\"\n\n | IfFalse: \"[| ~b s; <c1,s> -c-> s1 |] ==>\n <IF b THEN c0 ELSE c1, s> -c-> s1\"\n\n | WhileFalse: \"~b s ==> <WHILE b DO c,s> -c-> s\"\n\n | WhileTrue: \"[| b s0; <c,s0> -c-> s1; <WHILE b DO c, s1> -c-> s2 |] ==>\n <WHILE b DO c, s0> -c-> s2\"\n\n | Body: \"<the (body pn), s0> -c-> s1 ==>\n <BODY pn, s0> -c-> s1\"\n\n | Call: \"<BODY pn, (setlocs s0 newlocs)[Loc Arg::=a s0]> -c-> s1 ==>\n <X:=CALL pn(a), s0> -c-> (setlocs s1 (getlocs s0))\n [X::=s1<Res>]\"",
"datatype 'a triple =\n triple \"'a assn\" com \"'a assn\" (\"{(1_)}./ (_)/ .{(1_)}\" [3,60,3] 58)",
"definition\n MGT :: \"com => state triple\" (\"{=}._.{->}\" [60] 58) where\n \"{=}.c.{->} = {%Z s0. Z = s0}. c .{%Z s1. <c,Z> -c-> s1}\""
] |
template
|
###lemma
?G|-{=}. ?c.{->} \<Longrightarrow> ?G|-{\<lambda>Z s0. \<forall>s1. < ?c,s0> -c-> s1 \<longrightarrow> Z = s1}. ?c .{(=)}
###symbols
Natural.evalc :::: com \<Rightarrow> state assn
Hoare.triple.triple :::: 'a assn \<Rightarrow> com \<Rightarrow> 'a assn \<Rightarrow> 'a triple
Hoare.MGT :::: com \<Rightarrow> state triple
Hoare.hoare_deriv :::: 'a triple set \<Rightarrow> 'a triple \<Rightarrow> bool
###defs
inductive
evalc :: "[com,state, state] => bool" ("<_,_>/ -c-> _" [0,0, 51] 51)
where
Skip: "<SKIP,s> -c-> s"
| Assign: "<X :== a,s> -c-> s[X::=a s]"
| Local: "<c, s0[Loc Y::= a s0]> -c-> s1 ==>
<LOCAL Y := a IN c, s0> -c-> s1[Loc Y::=s0<Y>]"
| Semi: "[| <c0,s0> -c-> s1; <c1,s1> -c-> s2 |] ==>
<c0;; c1, s0> -c-> s2"
| IfTrue: "[| b s; <c0,s> -c-> s1 |] ==>
<IF b THEN c0 ELSE c1, s> -c-> s1"
| IfFalse: "[| ~b s; <c1,s> -c-> s1 |] ==>
<IF b THEN c0 ELSE c1, s> -c-> s1"
| WhileFalse: "~b s ==> <WHILE b DO c,s> -c-> s"
| WhileTrue: "[| b s0; <c,s0> -c-> s1; <WHILE b DO c, s1> -c-> s2 |] ==>
<WHILE b DO c, s0> -c-> s2"
| Body: "<the (body pn), s0> -c-> s1 ==>
<BODY pn, s0> -c-> s1"
| Call: "<BODY pn, (setlocs s0 newlocs)[Loc Arg::=a s0]> -c-> s1 ==>
<X:=CALL pn(a), s0> -c-> (setlocs s1 (getlocs s0))
[X::=s1<Res>]"
datatype 'a triple =
triple "'a assn" com "'a assn" ("{(1_)}./ (_)/ .{(1_)}" [3,60,3] 58)
definition
MGT :: "com => state triple" ("{=}._.{->}" [60] 58) where
"{=}.c.{->} = {%Z s0. Z = s0}. c .{%Z s1. <c,Z> -c-> s1}"
|
###output
?H1 x_1 (?H2 x_2) \<Longrightarrow> ?H1 x_1 (?H3 (\<lambda>y_0 y_1. \<forall>y_2. ?H4 x_2 y_1 y_2 \<longrightarrow> y_0 = y_2) x_2 (=))###end
|
Analysis/Elementary_Topology
|
Elementary_Topology.islimpt_greaterThanLessThan2
|
lemma islimpt_greaterThanLessThan2:
fixes a b::"'a::{linorder_topology, dense_order}"
assumes "a < b"
shows "b islimpt {a<..<b}"
|
?a < ?b \<Longrightarrow> ?b islimpt { ?a<..< ?b}
|
x_1 < x_2 \<Longrightarrow> ?H1 x_2 (?H2 x_1 x_2)
|
[
"Set_Interval.ord_class.greaterThanLessThan",
"Elementary_Topology.topological_space_class.islimpt"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a set",
"'a \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[] |
template
|
###lemma
?a < ?b \<Longrightarrow> ?b islimpt { ?a<..< ?b}
###symbols
Set_Interval.ord_class.greaterThanLessThan :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a set
Elementary_Topology.topological_space_class.islimpt :::: 'a \<Rightarrow> 'a set \<Rightarrow> bool
###defs
|
###output
x_1 < x_2 \<Longrightarrow> ?H1 x_2 (?H2 x_1 x_2)###end
|
SPARK/Examples/RIPEMD-160/F
|
Fun.inj_on_imp_bij_betw
| null |
inj_on ?f ?A \<Longrightarrow> bij_betw ?f ?A (?f ` ?A)
|
?H1 x_1 x_2 \<Longrightarrow> ?H2 x_1 x_2 (?H3 x_1 x_2)
|
[
"Set.image",
"Fun.bij_betw",
"Fun.inj_on"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"definition image :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set\" (infixr \"`\" 90)\n where \"f ` A = {y. \\<exists>x\\<in>A. y = f x}\"",
"definition bij_betw :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set \\<Rightarrow> bool\" \\<comment> \\<open>bijective\\<close>\n where \"bij_betw f A B \\<longleftrightarrow> inj_on f A \\<and> f ` A = B\"",
"definition inj_on :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> bool\" \\<comment> \\<open>injective\\<close>\n where \"inj_on f A \\<longleftrightarrow> (\\<forall>x\\<in>A. \\<forall>y\\<in>A. f x = f y \\<longrightarrow> x = y)\""
] |
template
|
###lemma
inj_on ?f ?A \<Longrightarrow> bij_betw ?f ?A (?f ` ?A)
###symbols
Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set
Fun.bij_betw :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set \<Rightarrow> bool
Fun.inj_on :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> bool
###defs
definition image :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set" (infixr "`" 90)
where "f ` A = {y. \<exists>x\<in>A. y = f x}"
definition bij_betw :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set \<Rightarrow> bool" \<comment> \<open>bijective\<close>
where "bij_betw f A B \<longleftrightarrow> inj_on f A \<and> f ` A = B"
definition inj_on :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> bool" \<comment> \<open>injective\<close>
where "inj_on f A \<longleftrightarrow> (\<forall>x\<in>A. \<forall>y\<in>A. f x = f y \<longrightarrow> x = y)"
|
###output
?H1 x_1 x_2 \<Longrightarrow> ?H2 x_1 x_2 (?H3 x_1 x_2)###end
|
Nonstandard_Analysis/Star
|
StarDef.Standard_power
| null |
?x \<in> Standard \<Longrightarrow> ?x ^ ?n \<in> Standard
|
x_1 \<in> ?H1 \<Longrightarrow> ?H2 x_1 x_2 \<in> ?H1
|
[
"Power.power_class.power",
"StarDef.Standard"
] |
[
"'a \\<Rightarrow> nat \\<Rightarrow> 'a",
"'a star set"
] |
[
"primrec power :: \"'a \\<Rightarrow> nat \\<Rightarrow> 'a\" (infixr \"^\" 80)\n where\n power_0: \"a ^ 0 = 1\"\n | power_Suc: \"a ^ Suc n = a * a ^ n\"",
"definition Standard :: \"'a star set\"\n where \"Standard = range star_of\""
] |
template
|
###lemma
?x \<in> Standard \<Longrightarrow> ?x ^ ?n \<in> Standard
###symbols
Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a
StarDef.Standard :::: 'a star set
###defs
primrec power :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^" 80)
where
power_0: "a ^ 0 = 1"
| power_Suc: "a ^ Suc n = a * a ^ n"
definition Standard :: "'a star set"
where "Standard = range star_of"
|
###output
x_1 \<in> ?H1 \<Longrightarrow> ?H2 x_1 x_2 \<in> ?H1###end
|
IMPP/Com
|
Complete_Lattices.Inter_subset
| null |
(\<And>X. X \<in> ?A \<Longrightarrow> X \<subseteq> ?B) \<Longrightarrow> ?A \<noteq> {} \<Longrightarrow> \<Inter> ?A \<subseteq> ?B
|
\<lbrakk>\<And>y_0. y_0 \<in> x_1 \<Longrightarrow> ?H1 y_0 x_2; x_1 \<noteq> ?H2\<rbrakk> \<Longrightarrow> ?H1 (?H3 x_1) x_2
|
[
"Complete_Lattices.Inter",
"Set.empty",
"Set.subset_eq"
] |
[
"'a set set \\<Rightarrow> 'a set",
"'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"abbreviation Inter :: \"'a set set \\<Rightarrow> 'a set\" (\"\\<Inter>\")\n where \"\\<Inter>S \\<equiv> \\<Sqinter>S\"",
"abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"",
"abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\""
] |
template
|
###lemma
(\<And>X. X \<in> ?A \<Longrightarrow> X \<subseteq> ?B) \<Longrightarrow> ?A \<noteq> {} \<Longrightarrow> \<Inter> ?A \<subseteq> ?B
###symbols
Complete_Lattices.Inter :::: 'a set set \<Rightarrow> 'a set
Set.empty :::: 'a set
Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
###defs
abbreviation Inter :: "'a set set \<Rightarrow> 'a set" ("\<Inter>")
where "\<Inter>S \<equiv> \<Sqinter>S"
abbreviation empty :: "'a set" ("{}")
where "{} \<equiv> bot"
abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset_eq \<equiv> less_eq"
|
###output
\<lbrakk>\<And>y_0. y_0 \<in> x_1 \<Longrightarrow> ?H1 y_0 x_2; x_1 \<noteq> ?H2\<rbrakk> \<Longrightarrow> ?H1 (?H3 x_1) x_2###end
|
Analysis/Cartesian_Euclidean_Space
|
Cartesian_Euclidean_Space.component_le_onorm
|
lemma component_le_onorm:
fixes f :: "real^'m \<Rightarrow> real^'n"
shows "linear f \<Longrightarrow> \<bar>matrix f $ i $ j\<bar> \<le> onorm f"
|
linear ?f \<Longrightarrow> \<bar>matrix ?f $ ?i $ ?j\<bar> \<le> onorm ?f
|
?H1 x_1 \<Longrightarrow> ?H2 (?H3 (?H3 (?H4 x_1) x_2) x_3) \<le> ?H5 x_1
|
[
"Operator_Norm.onorm",
"Finite_Cartesian_Product.matrix",
"Finite_Cartesian_Product.vec.vec_nth",
"Groups.abs_class.abs",
"Real_Vector_Spaces.linear"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> real",
"(('a, 'b) vec \\<Rightarrow> ('a, 'c) vec) \\<Rightarrow> (('a, 'b) vec, 'c) vec",
"('a, 'b) vec \\<Rightarrow> 'b \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> bool"
] |
[
"definition \"vec x = (\\<chi> i. x)\"",
"class abs =\n fixes abs :: \"'a \\<Rightarrow> 'a\" (\"\\<bar>_\\<bar>\")"
] |
template
|
###lemma
linear ?f \<Longrightarrow> \<bar>matrix ?f $ ?i $ ?j\<bar> \<le> onorm ?f
###symbols
Operator_Norm.onorm :::: ('a \<Rightarrow> 'b) \<Rightarrow> real
Finite_Cartesian_Product.matrix :::: (('a, 'b) vec \<Rightarrow> ('a, 'c) vec) \<Rightarrow> (('a, 'b) vec, 'c) vec
Finite_Cartesian_Product.vec.vec_nth :::: ('a, 'b) vec \<Rightarrow> 'b \<Rightarrow> 'a
Groups.abs_class.abs :::: 'a \<Rightarrow> 'a
Real_Vector_Spaces.linear :::: ('a \<Rightarrow> 'b) \<Rightarrow> bool
###defs
definition "vec x = (\<chi> i. x)"
class abs =
fixes abs :: "'a \<Rightarrow> 'a" ("\<bar>_\<bar>")
|
###output
?H1 x_1 \<Longrightarrow> ?H2 (?H3 (?H3 (?H4 x_1) x_2) x_3) \<le> ?H5 x_1###end
|
Number_Theory/Residue_Primitive_Roots
|
Residue_Primitive_Roots.Carmichael_pos
|
lemma Carmichael_pos [simp, intro]: "Carmichael n > 0"
|
0 < Carmichael ?n
|
?H1 < ?H2 x_1
|
[
"Residue_Primitive_Roots.Carmichael",
"Groups.zero_class.zero"
] |
[
"nat \\<Rightarrow> nat",
"'a"
] |
[
"definition Carmichael where\n \"Carmichael n = (LCM a \\<in> totatives n. ord n a)\"",
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
0 < Carmichael ?n
###symbols
Residue_Primitive_Roots.Carmichael :::: nat \<Rightarrow> nat
Groups.zero_class.zero :::: 'a
###defs
definition Carmichael where
"Carmichael n = (LCM a \<in> totatives n. ord n a)"
class zero =
fixes zero :: 'a ("0")
|
###output
?H1 < ?H2 x_1###end
|
Library/FSet
|
FSet.Compr_fimage_eq
|
lemma Compr_fimage_eq: "{x. x |\<in>| f |`| A \<and> P x} = f ` {x. x |\<in>| A \<and> P (f x)}"
|
{x. x |\<in>| ?f |`| ?A \<and> ?P x} = ?f ` {x. x |\<in>| ?A \<and> ?P (?f x)}
|
?H1 (\<lambda>y_0. ?H2 y_0 (?H3 x_1 x_2) \<and> x_3 y_0) = ?H4 x_1 (?H1 (\<lambda>y_1. ?H2 y_1 x_2 \<and> x_3 (x_1 y_1)))
|
[
"Set.image",
"FSet.fimage",
"FSet.fmember",
"Set.Collect"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a fset \\<Rightarrow> 'b fset",
"'a \\<Rightarrow> 'a fset \\<Rightarrow> bool",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set"
] |
[
"definition image :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set\" (infixr \"`\" 90)\n where \"f ` A = {y. \\<exists>x\\<in>A. y = f x}\"",
"abbreviation fmember :: \"'a \\<Rightarrow> 'a fset \\<Rightarrow> bool\" (infix \"|\\<in>|\" 50) where\n \"x |\\<in>| X \\<equiv> x \\<in> fset X\""
] |
template
|
###lemma
{x. x |\<in>| ?f |`| ?A \<and> ?P x} = ?f ` {x. x |\<in>| ?A \<and> ?P (?f x)}
###symbols
Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set
FSet.fimage :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a fset \<Rightarrow> 'b fset
FSet.fmember :::: 'a \<Rightarrow> 'a fset \<Rightarrow> bool
Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set
###defs
definition image :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set" (infixr "`" 90)
where "f ` A = {y. \<exists>x\<in>A. y = f x}"
abbreviation fmember :: "'a \<Rightarrow> 'a fset \<Rightarrow> bool" (infix "|\<in>|" 50) where
"x |\<in>| X \<equiv> x \<in> fset X"
|
###output
?H1 (\<lambda>y_0. ?H2 y_0 (?H3 x_1 x_2) \<and> x_3 y_0) = ?H4 x_1 (?H1 (\<lambda>y_1. ?H2 y_1 x_2 \<and> x_3 (x_1 y_1)))###end
|
MicroJava/J/Conform
|
Conform.conforms_restr
|
lemma conforms_restr: "\<lbrakk>lT vn = None; s ::\<preceq> (G, lT(vn\<mapsto>T)) \<rbrakk> \<Longrightarrow> s ::\<preceq> (G, lT)"
|
?lT ?vn = None \<Longrightarrow> ?s ::\<preceq> (?G, ?lT(?vn \<mapsto> ?T)) \<Longrightarrow> ?s ::\<preceq> (?G, ?lT)
|
\<lbrakk>x_1 x_2 = ?H1; ?H2 x_3 (x_4, ?H3 x_1 x_2 (?H4 x_5))\<rbrakk> \<Longrightarrow> ?H2 x_3 (x_4, x_1)
|
[
"Option.option.Some",
"Fun.fun_upd",
"Conform.conforms",
"Option.option.None"
] |
[
"'a \\<Rightarrow> 'a option",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> 'b \\<Rightarrow> 'a \\<Rightarrow> 'b",
"val option \\<times> (loc \\<Rightarrow> (cname \\<times> (vname \\<times> cname \\<Rightarrow> val option)) option) \\<times> (vname \\<Rightarrow> val option) \\<Rightarrow> (vname list \\<times> fdecl list \\<times> stmt \\<times> expr) prog \\<times> (vname \\<Rightarrow> ty option) \\<Rightarrow> bool",
"'a option"
] |
[
"datatype 'a option =\n None\n | Some (the: 'a)",
"definition fun_upd :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> 'b \\<Rightarrow> ('a \\<Rightarrow> 'b)\"\n where \"fun_upd f a b = (\\<lambda>x. if x = a then b else f x)\"",
"definition\n conforms :: \"state \\<Rightarrow> env' \\<Rightarrow> bool\" (\"_\\<Colon>\\<preceq>_\" [71,71] 70) where\n \"xs\\<Colon>\\<preceq>E =\n (let (G, L) = E; s = snd xs; l = locals s in\n (\\<forall>r. \\<forall>obj\\<in>globs s r: G,s\\<turnstile>obj \\<Colon>\\<preceq>\\<surd>r) \\<and> G,s\\<turnstile>l [\\<sim>\\<Colon>\\<preceq>]L \\<and>\n (\\<forall>a. fst xs=Some(Xcpt (Loc a)) \\<longrightarrow> G,s\\<turnstile>Addr a\\<Colon>\\<preceq> Class (SXcpt Throwable)) \\<and>\n (fst xs=Some(Jump Ret) \\<longrightarrow> l Result \\<noteq> None))\"",
"datatype 'a option =\n None\n | Some (the: 'a)"
] |
template
|
###lemma
?lT ?vn = None \<Longrightarrow> ?s ::\<preceq> (?G, ?lT(?vn \<mapsto> ?T)) \<Longrightarrow> ?s ::\<preceq> (?G, ?lT)
###symbols
Option.option.Some :::: 'a \<Rightarrow> 'a option
Fun.fun_upd :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> 'a \<Rightarrow> 'b
Conform.conforms :::: val option \<times> (loc \<Rightarrow> (cname \<times> (vname \<times> cname \<Rightarrow> val option)) option) \<times> (vname \<Rightarrow> val option) \<Rightarrow> (vname list \<times> fdecl list \<times> stmt \<times> expr) prog \<times> (vname \<Rightarrow> ty option) \<Rightarrow> bool
Option.option.None :::: 'a option
###defs
datatype 'a option =
None
| Some (the: 'a)
definition fun_upd :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> ('a \<Rightarrow> 'b)"
where "fun_upd f a b = (\<lambda>x. if x = a then b else f x)"
definition
conforms :: "state \<Rightarrow> env' \<Rightarrow> bool" ("_\<Colon>\<preceq>_" [71,71] 70) where
"xs\<Colon>\<preceq>E =
(let (G, L) = E; s = snd xs; l = locals s in
(\<forall>r. \<forall>obj\<in>globs s r: G,s\<turnstile>obj \<Colon>\<preceq>\<surd>r) \<and> G,s\<turnstile>l [\<sim>\<Colon>\<preceq>]L \<and>
(\<forall>a. fst xs=Some(Xcpt (Loc a)) \<longrightarrow> G,s\<turnstile>Addr a\<Colon>\<preceq> Class (SXcpt Throwable)) \<and>
(fst xs=Some(Jump Ret) \<longrightarrow> l Result \<noteq> None))"
datatype 'a option =
None
| Some (the: 'a)
|
###output
\<lbrakk>x_1 x_2 = ?H1; ?H2 x_3 (x_4, ?H3 x_1 x_2 (?H4 x_5))\<rbrakk> \<Longrightarrow> ?H2 x_3 (x_4, x_1)###end
|
Number_Theory/Prime_Powers
|
Prime_Powers.mangoldt_sum
|
lemma mangoldt_sum:
assumes "n \<noteq> 0"
shows "(\<Sum>d | d dvd n. mangoldt d :: 'a :: real_algebra_1) = of_real (ln (real n))"
|
?n \<noteq> 0 \<Longrightarrow> (\<Sum>d | d dvd ?n. mangoldt d) = of_real (ln (real ?n))
|
x_1 \<noteq> ?H1 \<Longrightarrow> ?H2 ?H3 (?H4 (\<lambda>y_1. ?H5 y_1 x_1)) = ?H6 (?H7 (?H8 x_1))
|
[
"Real.real",
"Transcendental.ln_class.ln",
"Real_Vector_Spaces.of_real",
"Rings.dvd_class.dvd",
"Set.Collect",
"Prime_Powers.mangoldt",
"Groups_Big.comm_monoid_add_class.sum",
"Groups.zero_class.zero"
] |
[
"nat \\<Rightarrow> real",
"'a \\<Rightarrow> 'a",
"real \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> bool",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"nat \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b",
"'a"
] |
[
"abbreviation real :: \"nat \\<Rightarrow> real\"\n where \"real \\<equiv> of_nat\"",
"class ln = real_normed_algebra_1 + banach +\n fixes ln :: \"'a \\<Rightarrow> 'a\"\n assumes ln_one [simp]: \"ln 1 = 0\"",
"definition of_real :: \"real \\<Rightarrow> 'a::real_algebra_1\"\n where \"of_real r = scaleR r 1\"",
"definition dvd :: \"'a \\<Rightarrow> 'a \\<Rightarrow> bool\" (infix \"dvd\" 50)\n where \"b dvd a \\<longleftrightarrow> (\\<exists>k. a = b * k)\"",
"definition mangoldt :: \"nat \\<Rightarrow> 'a :: real_algebra_1\" where\n \"mangoldt n = (if primepow n then of_real (ln (real (aprimedivisor n))) else 0)\"",
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
?n \<noteq> 0 \<Longrightarrow> (\<Sum>d | d dvd ?n. mangoldt d) = of_real (ln (real ?n))
###symbols
Real.real :::: nat \<Rightarrow> real
Transcendental.ln_class.ln :::: 'a \<Rightarrow> 'a
Real_Vector_Spaces.of_real :::: real \<Rightarrow> 'a
Rings.dvd_class.dvd :::: 'a \<Rightarrow> 'a \<Rightarrow> bool
Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set
Prime_Powers.mangoldt :::: nat \<Rightarrow> 'a
Groups_Big.comm_monoid_add_class.sum :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b
Groups.zero_class.zero :::: 'a
###defs
abbreviation real :: "nat \<Rightarrow> real"
where "real \<equiv> of_nat"
class ln = real_normed_algebra_1 + banach +
fixes ln :: "'a \<Rightarrow> 'a"
assumes ln_one [simp]: "ln 1 = 0"
definition of_real :: "real \<Rightarrow> 'a::real_algebra_1"
where "of_real r = scaleR r 1"
definition dvd :: "'a \<Rightarrow> 'a \<Rightarrow> bool" (infix "dvd" 50)
where "b dvd a \<longleftrightarrow> (\<exists>k. a = b * k)"
definition mangoldt :: "nat \<Rightarrow> 'a :: real_algebra_1" where
"mangoldt n = (if primepow n then of_real (ln (real (aprimedivisor n))) else 0)"
class zero =
fixes zero :: 'a ("0")
|
###output
x_1 \<noteq> ?H1 \<Longrightarrow> ?H2 ?H3 (?H4 (\<lambda>y_1. ?H5 y_1 x_1)) = ?H6 (?H7 (?H8 x_1))###end
|
Probability/Probability_Mass_Function
|
Probability_Mass_Function.measure_prob_cong_0
|
lemma measure_prob_cong_0:
assumes "\<And>x. x \<in> A - B \<Longrightarrow> pmf p x = 0"
assumes "\<And>x. x \<in> B - A \<Longrightarrow> pmf p x = 0"
shows "measure (measure_pmf p) A = measure (measure_pmf p) B"
|
(\<And>x. x \<in> ?A - ?B \<Longrightarrow> pmf ?p x = 0) \<Longrightarrow> (\<And>x. x \<in> ?B - ?A \<Longrightarrow> pmf ?p x = 0) \<Longrightarrow> measure_pmf.prob ?p ?A = measure_pmf.prob ?p ?B
|
\<lbrakk>\<And>y_0. y_0 \<in> ?H1 x_1 x_2 \<Longrightarrow> ?H2 x_3 y_0 = ?H3; \<And>y_1. y_1 \<in> ?H1 x_2 x_1 \<Longrightarrow> ?H2 x_3 y_1 = ?H3\<rbrakk> \<Longrightarrow> ?H4 x_3 x_1 = ?H4 x_3 x_2
|
[
"Probability_Mass_Function.measure_pmf.prob",
"Groups.zero_class.zero",
"Probability_Mass_Function.pmf",
"Groups.minus_class.minus"
] |
[
"'a pmf \\<Rightarrow> 'a set \\<Rightarrow> real",
"'a",
"'a pmf \\<Rightarrow> 'a \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)"
] |
template
|
###lemma
(\<And>x. x \<in> ?A - ?B \<Longrightarrow> pmf ?p x = 0) \<Longrightarrow> (\<And>x. x \<in> ?B - ?A \<Longrightarrow> pmf ?p x = 0) \<Longrightarrow> measure_pmf.prob ?p ?A = measure_pmf.prob ?p ?B
###symbols
Probability_Mass_Function.measure_pmf.prob :::: 'a pmf \<Rightarrow> 'a set \<Rightarrow> real
Groups.zero_class.zero :::: 'a
Probability_Mass_Function.pmf :::: 'a pmf \<Rightarrow> 'a \<Rightarrow> real
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
###defs
class zero =
fixes zero :: 'a ("0")
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
|
###output
\<lbrakk>\<And>y_0. y_0 \<in> ?H1 x_1 x_2 \<Longrightarrow> ?H2 x_3 y_0 = ?H3; \<And>y_1. y_1 \<in> ?H1 x_2 x_1 \<Longrightarrow> ?H2 x_3 y_1 = ?H3\<rbrakk> \<Longrightarrow> ?H4 x_3 x_1 = ?H4 x_3 x_2###end
|
Set
|
Set.disjnt_self_iff_empty
|
lemma disjnt_self_iff_empty [simp]: "disjnt S S \<longleftrightarrow> S = {}"
|
disjnt ?S ?S = (?S = {})
|
?H1 x_1 x_1 = (x_1 = ?H2)
|
[
"Set.empty",
"Set.disjnt"
] |
[
"'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"",
"definition disjnt :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"disjnt A B \\<longleftrightarrow> A \\<inter> B = {}\""
] |
template
|
###lemma
disjnt ?S ?S = (?S = {})
###symbols
Set.empty :::: 'a set
Set.disjnt :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
###defs
abbreviation empty :: "'a set" ("{}")
where "{} \<equiv> bot"
definition disjnt :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "disjnt A B \<longleftrightarrow> A \<inter> B = {}"
|
###output
?H1 x_1 x_1 = (x_1 = ?H2)###end
|
Bit_Operations
|
Bit_Operations.and_less_eq
|
lemma and_less_eq:
\<open>k AND l \<le> k\<close> if \<open>l < 0\<close> for k l :: int
|
?l < 0 \<Longrightarrow> and ?k ?l \<le> ?k
|
x_1 < ?H1 \<Longrightarrow> ?H2 x_2 x_1 \<le> x_2
|
[
"Bit_Operations.semiring_bit_operations_class.and",
"Groups.zero_class.zero"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a"
] |
[
"class semiring_bit_operations = semiring_bits +\n fixes \"and\" :: \\<open>'a \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close> (infixr \\<open>AND\\<close> 64)\n and or :: \\<open>'a \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close> (infixr \\<open>OR\\<close> 59)\n and xor :: \\<open>'a \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close> (infixr \\<open>XOR\\<close> 59)\n and mask :: \\<open>nat \\<Rightarrow> 'a\\<close>\n and set_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and unset_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and flip_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and push_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and drop_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and take_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n assumes and_rec: \\<open>a AND b = of_bool (odd a \\<and> odd b) + 2 * ((a div 2) AND (b div 2))\\<close>\n and or_rec: \\<open>a OR b = of_bool (odd a \\<or> odd b) + 2 * ((a div 2) OR (b div 2))\\<close>\n and xor_rec: \\<open>a XOR b = of_bool (odd a \\<noteq> odd b) + 2 * ((a div 2) XOR (b div 2))\\<close>\n and mask_eq_exp_minus_1: \\<open>mask n = 2 ^ n - 1\\<close>\n and set_bit_eq_or: \\<open>set_bit n a = a OR push_bit n 1\\<close>\n and unset_bit_eq_or_xor: \\<open>unset_bit n a = (a OR push_bit n 1) XOR push_bit n 1\\<close>\n and flip_bit_eq_xor: \\<open>flip_bit n a = a XOR push_bit n 1\\<close>\n and push_bit_eq_mult: \\<open>push_bit n a = a * 2 ^ n\\<close>\n and drop_bit_eq_div: \\<open>drop_bit n a = a div 2 ^ n\\<close>\n and take_bit_eq_mod: \\<open>take_bit n a = a mod 2 ^ n\\<close>\nbegin",
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
?l < 0 \<Longrightarrow> and ?k ?l \<le> ?k
###symbols
Bit_Operations.semiring_bit_operations_class.and :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.zero_class.zero :::: 'a
###defs
class semiring_bit_operations = semiring_bits +
fixes "and" :: \<open>'a \<Rightarrow> 'a \<Rightarrow> 'a\<close> (infixr \<open>AND\<close> 64)
and or :: \<open>'a \<Rightarrow> 'a \<Rightarrow> 'a\<close> (infixr \<open>OR\<close> 59)
and xor :: \<open>'a \<Rightarrow> 'a \<Rightarrow> 'a\<close> (infixr \<open>XOR\<close> 59)
and mask :: \<open>nat \<Rightarrow> 'a\<close>
and set_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close>
and unset_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close>
and flip_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close>
and push_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close>
and drop_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close>
and take_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close>
assumes and_rec: \<open>a AND b = of_bool (odd a \<and> odd b) + 2 * ((a div 2) AND (b div 2))\<close>
and or_rec: \<open>a OR b = of_bool (odd a \<or> odd b) + 2 * ((a div 2) OR (b div 2))\<close>
and xor_rec: \<open>a XOR b = of_bool (odd a \<noteq> odd b) + 2 * ((a div 2) XOR (b div 2))\<close>
and mask_eq_exp_minus_1: \<open>mask n = 2 ^ n - 1\<close>
and set_bit_eq_or: \<open>set_bit n a = a OR push_bit n 1\<close>
and unset_bit_eq_or_xor: \<open>unset_bit n a = (a OR push_bit n 1) XOR push_bit n 1\<close>
and flip_bit_eq_xor: \<open>flip_bit n a = a XOR push_bit n 1\<close>
and push_bit_eq_mult: \<open>push_bit n a = a * 2 ^ n\<close>
and drop_bit_eq_div: \<open>drop_bit n a = a div 2 ^ n\<close>
and take_bit_eq_mod: \<open>take_bit n a = a mod 2 ^ n\<close>
begin
class zero =
fixes zero :: 'a ("0")
|
###output
x_1 < ?H1 \<Longrightarrow> ?H2 x_2 x_1 \<le> x_2###end
|
Library/Complemented_Lattices
|
Complemented_Lattices.image_of_maximum
|
lemma image_of_maximum:
fixes f::"'a::order \<Rightarrow> 'b::conditionally_complete_lattice"
assumes "mono f"
and "\<And>x. x:M \<Longrightarrow> x\<le>m"
and "m:M"
shows "(SUP x\<in>M. f x) = f m"
|
mono ?f \<Longrightarrow> (\<And>x. x \<in> ?M \<Longrightarrow> x \<le> ?m) \<Longrightarrow> ?m \<in> ?M \<Longrightarrow> Sup (?f ` ?M) = ?f ?m
|
\<lbrakk> ?H1 x_1; \<And>y_0. y_0 \<in> x_2 \<Longrightarrow> y_0 \<le> x_3; x_3 \<in> x_2\<rbrakk> \<Longrightarrow> ?H2 (?H3 x_1 x_2) = x_1 x_3
|
[
"Set.image",
"Complete_Lattices.Sup_class.Sup",
"Fun.order_class.mono"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set",
"'a set \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> bool"
] |
[
"definition image :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set\" (infixr \"`\" 90)\n where \"f ` A = {y. \\<exists>x\\<in>A. y = f x}\"",
"class Sup =\n fixes Sup :: \"'a set \\<Rightarrow> 'a\" (\"\\<Squnion> _\" [900] 900)"
] |
template
|
###lemma
mono ?f \<Longrightarrow> (\<And>x. x \<in> ?M \<Longrightarrow> x \<le> ?m) \<Longrightarrow> ?m \<in> ?M \<Longrightarrow> Sup (?f ` ?M) = ?f ?m
###symbols
Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set
Complete_Lattices.Sup_class.Sup :::: 'a set \<Rightarrow> 'a
Fun.order_class.mono :::: ('a \<Rightarrow> 'b) \<Rightarrow> bool
###defs
definition image :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set" (infixr "`" 90)
where "f ` A = {y. \<exists>x\<in>A. y = f x}"
class Sup =
fixes Sup :: "'a set \<Rightarrow> 'a" ("\<Squnion> _" [900] 900)
|
###output
\<lbrakk> ?H1 x_1; \<And>y_0. y_0 \<in> x_2 \<Longrightarrow> y_0 \<le> x_3; x_3 \<in> x_2\<rbrakk> \<Longrightarrow> ?H2 (?H3 x_1 x_2) = x_1 x_3###end
|
Analysis/Cartesian_Euclidean_Space
|
Cartesian_Euclidean_Space.convex_box_cart
|
lemma convex_box_cart:
assumes "\<And>i. convex {x. P i x}"
shows "convex {x. \<forall>i. P i (x$i)}"
|
(\<And>i. convex {x. ?P i x}) \<Longrightarrow> convex {x. \<forall>i. ?P i (x $ i)}
|
(\<And>y_0. ?H1 (?H2 (x_1 y_0))) \<Longrightarrow> ?H1 (?H2 (\<lambda>y_2. \<forall>y_3. x_1 y_3 (?H3 y_2 y_3)))
|
[
"Finite_Cartesian_Product.vec.vec_nth",
"Set.Collect",
"Convex.convex"
] |
[
"('a, 'b) vec \\<Rightarrow> 'b \\<Rightarrow> 'a",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> bool"
] |
[
"definition \"vec x = (\\<chi> i. x)\""
] |
template
|
###lemma
(\<And>i. convex {x. ?P i x}) \<Longrightarrow> convex {x. \<forall>i. ?P i (x $ i)}
###symbols
Finite_Cartesian_Product.vec.vec_nth :::: ('a, 'b) vec \<Rightarrow> 'b \<Rightarrow> 'a
Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set
Convex.convex :::: 'a set \<Rightarrow> bool
###defs
definition "vec x = (\<chi> i. x)"
|
###output
(\<And>y_0. ?H1 (?H2 (x_1 y_0))) \<Longrightarrow> ?H1 (?H2 (\<lambda>y_2. \<forall>y_3. x_1 y_3 (?H3 y_2 y_3)))###end
|
Transfer
|
Transfer.right_unique_parametric
|
lemma right_unique_parametric [transfer_rule]:
assumes [transfer_rule]: "bi_total A" "bi_unique B" "bi_total B"
shows "((A ===> B ===> (=)) ===> (=)) right_unique right_unique"
|
bi_total ?A \<Longrightarrow> bi_unique ?B \<Longrightarrow> bi_total ?B \<Longrightarrow> rel_fun (rel_fun ?A (rel_fun ?B (=))) (=) right_unique right_unique
|
\<lbrakk> ?H1 x_1; ?H2 x_2; ?H1 x_2\<rbrakk> \<Longrightarrow> ?H3 (?H3 x_1 (?H3 x_2 (=))) (=) ?H4 ?H4
|
[
"Transfer.right_unique",
"BNF_Def.rel_fun",
"Transfer.bi_unique",
"Transfer.bi_total"
] |
[
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'c) \\<Rightarrow> ('b \\<Rightarrow> 'd) \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool"
] |
[
"definition right_unique :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool\"\n where \"right_unique R \\<longleftrightarrow> (\\<forall>x y z. R x y \\<longrightarrow> R x z \\<longrightarrow> y = z)\"",
"definition\n rel_fun :: \"('a \\<Rightarrow> 'c \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'd) \\<Rightarrow> bool\"\nwhere\n \"rel_fun A B = (\\<lambda>f g. \\<forall>x y. A x y \\<longrightarrow> B (f x) (g y))\"",
"definition bi_unique :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool\"\n where \"bi_unique R \\<longleftrightarrow>\n (\\<forall>x y z. R x y \\<longrightarrow> R x z \\<longrightarrow> y = z) \\<and>\n (\\<forall>x y z. R x z \\<longrightarrow> R y z \\<longrightarrow> x = y)\"",
"definition bi_total :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool\"\n where \"bi_total R \\<longleftrightarrow> (\\<forall>x. \\<exists>y. R x y) \\<and> (\\<forall>y. \\<exists>x. R x y)\""
] |
template
|
###lemma
bi_total ?A \<Longrightarrow> bi_unique ?B \<Longrightarrow> bi_total ?B \<Longrightarrow> rel_fun (rel_fun ?A (rel_fun ?B (=))) (=) right_unique right_unique
###symbols
Transfer.right_unique :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool
BNF_Def.rel_fun :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'c) \<Rightarrow> ('b \<Rightarrow> 'd) \<Rightarrow> bool
Transfer.bi_unique :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool
Transfer.bi_total :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool
###defs
definition right_unique :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool"
where "right_unique R \<longleftrightarrow> (\<forall>x y z. R x y \<longrightarrow> R x z \<longrightarrow> y = z)"
definition
rel_fun :: "('a \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'd) \<Rightarrow> bool"
where
"rel_fun A B = (\<lambda>f g. \<forall>x y. A x y \<longrightarrow> B (f x) (g y))"
definition bi_unique :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool"
where "bi_unique R \<longleftrightarrow>
(\<forall>x y z. R x y \<longrightarrow> R x z \<longrightarrow> y = z) \<and>
(\<forall>x y z. R x z \<longrightarrow> R y z \<longrightarrow> x = y)"
definition bi_total :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool"
where "bi_total R \<longleftrightarrow> (\<forall>x. \<exists>y. R x y) \<and> (\<forall>y. \<exists>x. R x y)"
|
###output
\<lbrakk> ?H1 x_1; ?H2 x_2; ?H1 x_2\<rbrakk> \<Longrightarrow> ?H3 (?H3 x_1 (?H3 x_2 (=))) (=) ?H4 ?H4###end
|
Nominal/Examples/Crary
|
Crary.logical_symmetry
|
lemma logical_symmetry:
assumes a: "\<Gamma> \<turnstile> s is t : T"
shows "\<Gamma> \<turnstile> t is s : T"
|
?\<Gamma> \<turnstile> ?s is ?t : ?T \<Longrightarrow> ?\<Gamma> \<turnstile> ?t is ?s : ?T
|
?H1 x_1 x_2 x_3 x_4 \<Longrightarrow> ?H1 x_1 x_3 x_2 x_4
|
[
"Crary.log_equiv"
] |
[
"(name \\<times> ty) list \\<Rightarrow> trm \\<Rightarrow> trm \\<Rightarrow> ty \\<Rightarrow> bool"
] |
[] |
template
|
###lemma
?\<Gamma> \<turnstile> ?s is ?t : ?T \<Longrightarrow> ?\<Gamma> \<turnstile> ?t is ?s : ?T
###symbols
Crary.log_equiv :::: (name \<times> ty) list \<Rightarrow> trm \<Rightarrow> trm \<Rightarrow> ty \<Rightarrow> bool
###defs
|
###output
?H1 x_1 x_2 x_3 x_4 \<Longrightarrow> ?H1 x_1 x_3 x_2 x_4###end
|
Analysis/Norm_Arith
|
Norm_Arith.arithmetic_simps(22)
| null |
neg_numeral_class.sub (num.Bit0 ?k) (num.Bit1 ?l) = neg_numeral_class.dbl_dec (neg_numeral_class.sub ?k ?l)
|
?H1 (?H2 x_1) (?H3 x_2) = ?H4 (?H1 x_1 x_2)
|
[
"Num.neg_numeral_class.dbl_dec",
"Num.num.Bit1",
"Num.num.Bit0",
"Num.neg_numeral_class.sub"
] |
[
"'a \\<Rightarrow> 'a",
"num \\<Rightarrow> num",
"num \\<Rightarrow> num",
"num \\<Rightarrow> num \\<Rightarrow> 'a"
] |
[
"class neg_numeral = numeral + group_add\nbegin",
"datatype num = One | Bit0 num | Bit1 num",
"datatype num = One | Bit0 num | Bit1 num",
"class neg_numeral = numeral + group_add\nbegin"
] |
template
|
###lemma
neg_numeral_class.sub (num.Bit0 ?k) (num.Bit1 ?l) = neg_numeral_class.dbl_dec (neg_numeral_class.sub ?k ?l)
###symbols
Num.neg_numeral_class.dbl_dec :::: 'a \<Rightarrow> 'a
Num.num.Bit1 :::: num \<Rightarrow> num
Num.num.Bit0 :::: num \<Rightarrow> num
Num.neg_numeral_class.sub :::: num \<Rightarrow> num \<Rightarrow> 'a
###defs
class neg_numeral = numeral + group_add
begin
datatype num = One | Bit0 num | Bit1 num
datatype num = One | Bit0 num | Bit1 num
class neg_numeral = numeral + group_add
begin
|
###output
?H1 (?H2 x_1) (?H3 x_2) = ?H4 (?H1 x_1 x_2)###end
|
IMP/Abs_Int1
|
Abs_Int1.top_on_post
|
lemma top_on_post: "top_on_acom C X \<Longrightarrow> top_on_opt (post C) X"
|
top_on\<^sub>c ?C ?X \<Longrightarrow> top_on\<^sub>o (post ?C) ?X
|
?H1 x_1 x_2 \<Longrightarrow> ?H2 (?H3 x_1) x_2
|
[
"ACom.post",
"Abs_Int1.top_on_opt",
"Abs_Int1.top_on_acom"
] |
[
"'a acom \\<Rightarrow> 'a",
"'a st option \\<Rightarrow> char list set \\<Rightarrow> bool",
"'a st option acom \\<Rightarrow> char list set \\<Rightarrow> bool"
] |
[
"definition post :: \"'a acom \\<Rightarrow>'a\" where\n\"post C = last(annos C)\"",
"fun top_on_opt :: \"'a::order_top st option \\<Rightarrow> vname set \\<Rightarrow> bool\" (\"top'_on\\<^sub>o\") where\n\"top_on_opt (Some S) X = top_on_st S X\" |\n\"top_on_opt None X = True\"",
"definition top_on_acom :: \"'a::order_top st option acom \\<Rightarrow> vname set \\<Rightarrow> bool\" (\"top'_on\\<^sub>c\") where\n\"top_on_acom C X = (\\<forall>a \\<in> set(annos C). top_on_opt a X)\""
] |
template
|
###lemma
top_on\<^sub>c ?C ?X \<Longrightarrow> top_on\<^sub>o (post ?C) ?X
###symbols
ACom.post :::: 'a acom \<Rightarrow> 'a
Abs_Int1.top_on_opt :::: 'a st option \<Rightarrow> char list set \<Rightarrow> bool
Abs_Int1.top_on_acom :::: 'a st option acom \<Rightarrow> char list set \<Rightarrow> bool
###defs
definition post :: "'a acom \<Rightarrow>'a" where
"post C = last(annos C)"
fun top_on_opt :: "'a::order_top st option \<Rightarrow> vname set \<Rightarrow> bool" ("top'_on\<^sub>o") where
"top_on_opt (Some S) X = top_on_st S X" |
"top_on_opt None X = True"
definition top_on_acom :: "'a::order_top st option acom \<Rightarrow> vname set \<Rightarrow> bool" ("top'_on\<^sub>c") where
"top_on_acom C X = (\<forall>a \<in> set(annos C). top_on_opt a X)"
|
###output
?H1 x_1 x_2 \<Longrightarrow> ?H2 (?H3 x_1) x_2###end
|
Analysis/Abstract_Metric_Spaces
|
Abstract_Metric_Spaces.metrizable_imp_t1_space
|
lemma metrizable_imp_t1_space:
"metrizable_space X \<Longrightarrow> t1_space X"
|
metrizable_space ?X \<Longrightarrow> t1_space ?X
|
?H1 x_1 \<Longrightarrow> ?H2 x_1
|
[
"T1_Spaces.t1_space",
"Abstract_Metric_Spaces.metrizable_space"
] |
[
"'a topology \\<Rightarrow> bool",
"'a topology \\<Rightarrow> bool"
] |
[
"definition t1_space where\n \"t1_space X \\<equiv> \\<forall>x \\<in> topspace X. \\<forall>y \\<in> topspace X. x\\<noteq>y \\<longrightarrow> (\\<exists>U. openin X U \\<and> x \\<in> U \\<and> y \\<notin> U)\"",
"definition metrizable_space where\n \"metrizable_space X \\<equiv> \\<exists>M d. Metric_space M d \\<and> X = Metric_space.mtopology M d\""
] |
template
|
###lemma
metrizable_space ?X \<Longrightarrow> t1_space ?X
###symbols
T1_Spaces.t1_space :::: 'a topology \<Rightarrow> bool
Abstract_Metric_Spaces.metrizable_space :::: 'a topology \<Rightarrow> bool
###defs
definition t1_space where
"t1_space X \<equiv> \<forall>x \<in> topspace X. \<forall>y \<in> topspace X. x\<noteq>y \<longrightarrow> (\<exists>U. openin X U \<and> x \<in> U \<and> y \<notin> U)"
definition metrizable_space where
"metrizable_space X \<equiv> \<exists>M d. Metric_space M d \<and> X = Metric_space.mtopology M d"
|
###output
?H1 x_1 \<Longrightarrow> ?H2 x_1###end
|
Analysis/Convex_Euclidean_Space
|
Convex_Euclidean_Space.affine_hull_sing
|
lemma affine_hull_sing [simp]: "affine hull {a :: 'n::euclidean_space} = {a}"
|
affine hull { ?a} = { ?a}
|
?H1 ?H2 (?H3 x_1 ?H4) = ?H3 x_1 ?H4
|
[
"Set.empty",
"Set.insert",
"Affine.affine",
"Hull.hull"
] |
[
"'a set",
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> bool",
"('a set \\<Rightarrow> bool) \\<Rightarrow> 'a set \\<Rightarrow> 'a set"
] |
[
"abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"",
"definition insert :: \"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set\"\n where insert_compr: \"insert a B = {x. x = a \\<or> x \\<in> B}\"",
"definition hull :: \"('a set \\<Rightarrow> bool) \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"hull\" 75)\n where \"S hull s = \\<Inter>{t. S t \\<and> s \\<subseteq> t}\""
] |
template
|
###lemma
affine hull { ?a} = { ?a}
###symbols
Set.empty :::: 'a set
Set.insert :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a set
Affine.affine :::: 'a set \<Rightarrow> bool
Hull.hull :::: ('a set \<Rightarrow> bool) \<Rightarrow> 'a set \<Rightarrow> 'a set
###defs
abbreviation empty :: "'a set" ("{}")
where "{} \<equiv> bot"
definition insert :: "'a \<Rightarrow> 'a set \<Rightarrow> 'a set"
where insert_compr: "insert a B = {x. x = a \<or> x \<in> B}"
definition hull :: "('a set \<Rightarrow> bool) \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "hull" 75)
where "S hull s = \<Inter>{t. S t \<and> s \<subseteq> t}"
|
###output
?H1 ?H2 (?H3 x_1 ?H4) = ?H3 x_1 ?H4###end
|
Algebra/Chinese_Remainder
|
Chinese_Remainder.RDirProd_hom2(2)
|
lemma RDirProd_hom2:
assumes "f \<in> ring_hom S T"
shows "(\<lambda>(x, y). (x, f y)) \<in> ring_hom (RDirProd R S) (RDirProd R T)"
and "(\<lambda>(x, y). (f x, y)) \<in> ring_hom (RDirProd S R) (RDirProd T R)"
|
?f \<in> ring_hom ?S ?T \<Longrightarrow> (\<lambda>(x, y). (?f x, y)) \<in> ring_hom (RDirProd ?S ?R) (RDirProd ?T ?R)
|
x_1 \<in> ?H1 x_2 x_3 \<Longrightarrow> ?H2 (\<lambda>y_0. Pair (x_1 y_0)) \<in> ?H1 (?H3 x_2 x_4) (?H3 x_3 x_4)
|
[
"Chinese_Remainder.RDirProd",
"Product_Type.prod.case_prod",
"Ring.ring_hom"
] |
[
"('a, 'b) ring_scheme \\<Rightarrow> ('c, 'd) ring_scheme \\<Rightarrow> ('a \\<times> 'c) ring",
"('a \\<Rightarrow> 'b \\<Rightarrow> 'c) \\<Rightarrow> 'a \\<times> 'b \\<Rightarrow> 'c",
"('a, 'b) ring_scheme \\<Rightarrow> ('c, 'd) ring_scheme \\<Rightarrow> ('a \\<Rightarrow> 'c) set"
] |
[
"definition RDirProd :: \"('a, 'n) ring_scheme \\<Rightarrow> ('b, 'm) ring_scheme \\<Rightarrow> ('a \\<times> 'b) ring\"\n where \"RDirProd R S = monoid.extend (R \\<times>\\<times> S)\n \\<lparr> zero = one ((add_monoid R) \\<times>\\<times> (add_monoid S)),\n add = mult ((add_monoid R) \\<times>\\<times> (add_monoid S)) \\<rparr> \"",
"definition \"prod = {f. \\<exists>a b. f = Pair_Rep (a::'a) (b::'b)}\"",
"definition\n ring_hom :: \"[('a, 'm) ring_scheme, ('b, 'n) ring_scheme] => ('a => 'b) set\"\n where \"ring_hom R S =\n {h. h \\<in> carrier R \\<rightarrow> carrier S \\<and>\n (\\<forall>x y. x \\<in> carrier R \\<and> y \\<in> carrier R \\<longrightarrow>\n h (x \\<otimes>\\<^bsub>R\\<^esub> y) = h x \\<otimes>\\<^bsub>S\\<^esub> h y \\<and> h (x \\<oplus>\\<^bsub>R\\<^esub> y) = h x \\<oplus>\\<^bsub>S\\<^esub> h y) \\<and>\n h \\<one>\\<^bsub>R\\<^esub> = \\<one>\\<^bsub>S\\<^esub>}\""
] |
template
|
###lemma
?f \<in> ring_hom ?S ?T \<Longrightarrow> (\<lambda>(x, y). (?f x, y)) \<in> ring_hom (RDirProd ?S ?R) (RDirProd ?T ?R)
###symbols
Chinese_Remainder.RDirProd :::: ('a, 'b) ring_scheme \<Rightarrow> ('c, 'd) ring_scheme \<Rightarrow> ('a \<times> 'c) ring
Product_Type.prod.case_prod :::: ('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'a \<times> 'b \<Rightarrow> 'c
Ring.ring_hom :::: ('a, 'b) ring_scheme \<Rightarrow> ('c, 'd) ring_scheme \<Rightarrow> ('a \<Rightarrow> 'c) set
###defs
definition RDirProd :: "('a, 'n) ring_scheme \<Rightarrow> ('b, 'm) ring_scheme \<Rightarrow> ('a \<times> 'b) ring"
where "RDirProd R S = monoid.extend (R \<times>\<times> S)
\<lparr> zero = one ((add_monoid R) \<times>\<times> (add_monoid S)),
add = mult ((add_monoid R) \<times>\<times> (add_monoid S)) \<rparr> "
definition "prod = {f. \<exists>a b. f = Pair_Rep (a::'a) (b::'b)}"
definition
ring_hom :: "[('a, 'm) ring_scheme, ('b, 'n) ring_scheme] => ('a => 'b) set"
where "ring_hom R S =
{h. h \<in> carrier R \<rightarrow> carrier S \<and>
(\<forall>x y. x \<in> carrier R \<and> y \<in> carrier R \<longrightarrow>
h (x \<otimes>\<^bsub>R\<^esub> y) = h x \<otimes>\<^bsub>S\<^esub> h y \<and> h (x \<oplus>\<^bsub>R\<^esub> y) = h x \<oplus>\<^bsub>S\<^esub> h y) \<and>
h \<one>\<^bsub>R\<^esub> = \<one>\<^bsub>S\<^esub>}"
|
###output
x_1 \<in> ?H1 x_2 x_3 \<Longrightarrow> ?H2 (\<lambda>y_0. Pair (x_1 y_0)) \<in> ?H1 (?H3 x_2 x_4) (?H3 x_3 x_4)###end
|
Computational_Algebra/Polynomial
|
Polynomial.degree_sum_less
|
lemma degree_sum_less:
assumes "\<And>x. x \<in> A \<Longrightarrow> degree (f x) < n" "n > 0"
shows "degree (sum f A) < n"
|
(\<And>x. x \<in> ?A \<Longrightarrow> degree (?f x) < ?n) \<Longrightarrow> 0 < ?n \<Longrightarrow> degree (sum ?f ?A) < ?n
|
\<lbrakk>\<And>y_0. y_0 \<in> x_1 \<Longrightarrow> ?H1 (x_2 y_0) < x_3; ?H2 < x_3\<rbrakk> \<Longrightarrow> ?H1 (?H3 x_2 x_1) < x_3
|
[
"Groups_Big.comm_monoid_add_class.sum",
"Groups.zero_class.zero",
"Polynomial.degree"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b",
"'a",
"'a poly \\<Rightarrow> nat"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"definition degree :: \"'a::zero poly \\<Rightarrow> nat\"\n where \"degree p = (LEAST n. \\<forall>i>n. coeff p i = 0)\""
] |
template
|
###lemma
(\<And>x. x \<in> ?A \<Longrightarrow> degree (?f x) < ?n) \<Longrightarrow> 0 < ?n \<Longrightarrow> degree (sum ?f ?A) < ?n
###symbols
Groups_Big.comm_monoid_add_class.sum :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b
Groups.zero_class.zero :::: 'a
Polynomial.degree :::: 'a poly \<Rightarrow> nat
###defs
class zero =
fixes zero :: 'a ("0")
definition degree :: "'a::zero poly \<Rightarrow> nat"
where "degree p = (LEAST n. \<forall>i>n. coeff p i = 0)"
|
###output
\<lbrakk>\<And>y_0. y_0 \<in> x_1 \<Longrightarrow> ?H1 (x_2 y_0) < x_3; ?H2 < x_3\<rbrakk> \<Longrightarrow> ?H1 (?H3 x_2 x_1) < x_3###end
|
IMP/Complete_Lattice
|
Complete_Lattices.UN_simps(4)
| null |
(\<Union>x\<in> ?C. ?A x \<inter> ?B) = \<Union> (?A ` ?C) \<inter> ?B
|
?H1 (?H2 (\<lambda>y_0. ?H3 (x_1 y_0) x_2) x_3) = ?H3 (?H1 (?H2 x_1 x_3)) x_2
|
[
"Set.inter",
"Set.image",
"Complete_Lattices.Union"
] |
[
"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set",
"'a set set \\<Rightarrow> 'a set"
] |
[
"abbreviation inter :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<inter>\" 70)\n where \"(\\<inter>) \\<equiv> inf\"",
"definition image :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set\" (infixr \"`\" 90)\n where \"f ` A = {y. \\<exists>x\\<in>A. y = f x}\"",
"abbreviation Union :: \"'a set set \\<Rightarrow> 'a set\" (\"\\<Union>\")\n where \"\\<Union>S \\<equiv> \\<Squnion>S\""
] |
template
|
###lemma
(\<Union>x\<in> ?C. ?A x \<inter> ?B) = \<Union> (?A ` ?C) \<inter> ?B
###symbols
Set.inter :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set
Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set
Complete_Lattices.Union :::: 'a set set \<Rightarrow> 'a set
###defs
abbreviation inter :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<inter>" 70)
where "(\<inter>) \<equiv> inf"
definition image :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set" (infixr "`" 90)
where "f ` A = {y. \<exists>x\<in>A. y = f x}"
abbreviation Union :: "'a set set \<Rightarrow> 'a set" ("\<Union>")
where "\<Union>S \<equiv> \<Squnion>S"
|
###output
?H1 (?H2 (\<lambda>y_0. ?H3 (x_1 y_0) x_2) x_3) = ?H3 (?H1 (?H2 x_1 x_3)) x_2###end
|
Analysis/Equivalence_Lebesgue_Henstock_Integration
|
Equivalence_Lebesgue_Henstock_Integration.integrable_on_all_intervals_integrable_bound
|
lemma integrable_on_all_intervals_integrable_bound:
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach"
assumes intf: "\<And>a b. (\<lambda>x. if x \<in> S then f x else 0) integrable_on cbox a b"
and normf: "\<And>x. x \<in> S \<Longrightarrow> norm(f x) \<le> g x" and g: "g integrable_on S"
shows "f integrable_on S"
|
(\<And>a b. (\<lambda>x. if x \<in> ?S then ?f x else (0:: ?'b)) integrable_on cbox a b) \<Longrightarrow> (\<And>x. x \<in> ?S \<Longrightarrow> norm (?f x) \<le> ?g x) \<Longrightarrow> ?g integrable_on ?S \<Longrightarrow> ?f integrable_on ?S
|
\<lbrakk>\<And>y_0 y_1. ?H1 (\<lambda>y_2. if y_2 \<in> x_1 then x_2 y_2 else ?H2) (?H3 y_0 y_1); \<And>y_3. y_3 \<in> x_1 \<Longrightarrow> ?H4 (x_2 y_3) \<le> x_3 y_3; ?H1 x_3 x_1\<rbrakk> \<Longrightarrow> ?H1 x_2 x_1
|
[
"Real_Vector_Spaces.norm_class.norm",
"Topology_Euclidean_Space.cbox",
"Groups.zero_class.zero",
"Henstock_Kurzweil_Integration.integrable_on"
] |
[
"'a \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a set",
"'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"class norm =\n fixes norm :: \"'a \\<Rightarrow> real\"",
"class zero =\n fixes zero :: 'a (\"0\")",
"definition integrable_on (infixr \"integrable'_on\" 46)\n where \"f integrable_on i \\<longleftrightarrow> (\\<exists>y. (f has_integral y) i)\""
] |
template
|
###lemma
(\<And>a b. (\<lambda>x. if x \<in> ?S then ?f x else (0:: ?'b)) integrable_on cbox a b) \<Longrightarrow> (\<And>x. x \<in> ?S \<Longrightarrow> norm (?f x) \<le> ?g x) \<Longrightarrow> ?g integrable_on ?S \<Longrightarrow> ?f integrable_on ?S
###symbols
Real_Vector_Spaces.norm_class.norm :::: 'a \<Rightarrow> real
Topology_Euclidean_Space.cbox :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a set
Groups.zero_class.zero :::: 'a
Henstock_Kurzweil_Integration.integrable_on :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> bool
###defs
class norm =
fixes norm :: "'a \<Rightarrow> real"
class zero =
fixes zero :: 'a ("0")
definition integrable_on (infixr "integrable'_on" 46)
where "f integrable_on i \<longleftrightarrow> (\<exists>y. (f has_integral y) i)"
|
###output
\<lbrakk>\<And>y_0 y_1. ?H1 (\<lambda>y_2. if y_2 \<in> x_1 then x_2 y_2 else ?H2) (?H3 y_0 y_1); \<And>y_3. y_3 \<in> x_1 \<Longrightarrow> ?H4 (x_2 y_3) \<le> x_3 y_3; ?H1 x_3 x_1\<rbrakk> \<Longrightarrow> ?H1 x_2 x_1###end
|
Analysis/Tagged_Division
|
Tagged_Division.division_ofD(6)
|
lemma division_ofD[dest]:
assumes "s division_of i"
shows "finite s"
and "\<And>K. K \<in> s \<Longrightarrow> K \<subseteq> i"
and "\<And>K. K \<in> s \<Longrightarrow> K \<noteq> {}"
and "\<And>K. K \<in> s \<Longrightarrow> \<exists>a b. K = cbox a b"
and "\<And>K1 K2. K1 \<in> s \<Longrightarrow> K2 \<in> s \<Longrightarrow> K1 \<noteq> K2 \<Longrightarrow> interior(K1) \<inter> interior(K2) = {}"
and "\<Union>s = i"
|
?s division_of ?i \<Longrightarrow> \<Union> ?s = ?i
|
?H1 x_1 x_2 \<Longrightarrow> ?H2 x_1 = x_2
|
[
"Complete_Lattices.Union",
"Tagged_Division.division_of"
] |
[
"'a set set \\<Rightarrow> 'a set",
"'a set set \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"abbreviation Union :: \"'a set set \\<Rightarrow> 'a set\" (\"\\<Union>\")\n where \"\\<Union>S \\<equiv> \\<Squnion>S\""
] |
template
|
###lemma
?s division_of ?i \<Longrightarrow> \<Union> ?s = ?i
###symbols
Complete_Lattices.Union :::: 'a set set \<Rightarrow> 'a set
Tagged_Division.division_of :::: 'a set set \<Rightarrow> 'a set \<Rightarrow> bool
###defs
abbreviation Union :: "'a set set \<Rightarrow> 'a set" ("\<Union>")
where "\<Union>S \<equiv> \<Squnion>S"
|
###output
?H1 x_1 x_2 \<Longrightarrow> ?H2 x_1 = x_2###end
|
Nominal/Examples/Class1
|
Class1.ax_do_not_a_reduce
|
lemma ax_do_not_a_reduce:
shows "Ax x a \<longrightarrow>\<^sub>a M \<Longrightarrow> False"
|
Ax ?x ?a \<longrightarrow>\<^sub>a ?M \<Longrightarrow> False
|
?H1 (?H2 x_1 x_2) x_3 \<Longrightarrow> False
|
[
"Class1.trm.Ax",
"Class1.a_redu"
] |
[
"name \\<Rightarrow> coname \\<Rightarrow> trm",
"trm \\<Rightarrow> trm \\<Rightarrow> bool"
] |
[] |
template
|
###lemma
Ax ?x ?a \<longrightarrow>\<^sub>a ?M \<Longrightarrow> False
###symbols
Class1.trm.Ax :::: name \<Rightarrow> coname \<Rightarrow> trm
Class1.a_redu :::: trm \<Rightarrow> trm \<Rightarrow> bool
###defs
|
###output
?H1 (?H2 x_1 x_2) x_3 \<Longrightarrow> False###end
|
Groups_Big
|
Groups_Big.sum_abs
|
lemma sum_abs[iff]: "\<bar>sum f A\<bar> \<le> sum (\<lambda>i. \<bar>f i\<bar>) A"
for f :: "'a \<Rightarrow> 'b::ordered_ab_group_add_abs"
|
\<bar>sum ?f ?A\<bar> \<le> (\<Sum>i\<in> ?A. \<bar> ?f i\<bar>)
|
?H1 (?H2 x_1 x_2) \<le> ?H2 (\<lambda>y_0. ?H1 (x_1 y_0)) x_2
|
[
"Groups_Big.comm_monoid_add_class.sum",
"Groups.abs_class.abs"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b",
"'a \\<Rightarrow> 'a"
] |
[
"class abs =\n fixes abs :: \"'a \\<Rightarrow> 'a\" (\"\\<bar>_\\<bar>\")"
] |
template
|
###lemma
\<bar>sum ?f ?A\<bar> \<le> (\<Sum>i\<in> ?A. \<bar> ?f i\<bar>)
###symbols
Groups_Big.comm_monoid_add_class.sum :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b
Groups.abs_class.abs :::: 'a \<Rightarrow> 'a
###defs
class abs =
fixes abs :: "'a \<Rightarrow> 'a" ("\<bar>_\<bar>")
|
###output
?H1 (?H2 x_1 x_2) \<le> ?H2 (\<lambda>y_0. ?H1 (x_1 y_0)) x_2###end
|
Num
|
Num.nat_of_num_mult
|
lemma nat_of_num_mult: "nat_of_num (x * y) = nat_of_num x * nat_of_num y"
|
nat_of_num (?x * ?y) = nat_of_num ?x * nat_of_num ?y
|
?H1 (?H2 x_1 x_2) = ?H2 (?H1 x_1) (?H1 x_2)
|
[
"Groups.times_class.times",
"Num.nat_of_num"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"num \\<Rightarrow> nat"
] |
[
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"primrec nat_of_num :: \"num \\<Rightarrow> nat\"\n where\n \"nat_of_num One = Suc 0\"\n | \"nat_of_num (Bit0 x) = nat_of_num x + nat_of_num x\"\n | \"nat_of_num (Bit1 x) = Suc (nat_of_num x + nat_of_num x)\""
] |
template
|
###lemma
nat_of_num (?x * ?y) = nat_of_num ?x * nat_of_num ?y
###symbols
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Num.nat_of_num :::: num \<Rightarrow> nat
###defs
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
primrec nat_of_num :: "num \<Rightarrow> nat"
where
"nat_of_num One = Suc 0"
| "nat_of_num (Bit0 x) = nat_of_num x + nat_of_num x"
| "nat_of_num (Bit1 x) = Suc (nat_of_num x + nat_of_num x)"
|
###output
?H1 (?H2 x_1 x_2) = ?H2 (?H1 x_1) (?H1 x_2)###end
|
Probability/Weak_Convergence
|
Weak_Convergence.continuity_set_conv_imp_weak_conv
|
theorem continuity_set_conv_imp_weak_conv:
fixes f :: "real \<Rightarrow> real"
assumes *: "\<And>A. A \<in> sets borel \<Longrightarrow> M (frontier A) = 0 \<Longrightarrow> (\<lambda> n. (measure (M_seq n) A)) \<longlonglongrightarrow> measure M A"
shows "weak_conv_m M_seq M"
|
(\<And>n. real_distribution (?M_seq n)) \<Longrightarrow> real_distribution ?M \<Longrightarrow> (\<And>A. A \<in> sets borel \<Longrightarrow> emeasure ?M (frontier A) = 0 \<Longrightarrow> (\<lambda>n. Sigma_Algebra.measure (?M_seq n) A) \<longlonglongrightarrow> Sigma_Algebra.measure ?M A) \<Longrightarrow> weak_conv_m ?M_seq ?M
|
\<lbrakk>\<And>y_0. ?H1 (x_1 y_0); ?H1 x_2; \<And>y_1. \<lbrakk>y_1 \<in> ?H2 ?H3; ?H4 x_2 (?H5 y_1) = ?H6\<rbrakk> \<Longrightarrow> ?H7 (\<lambda>y_2. ?H8 (x_1 y_2) y_1) (?H8 x_2 y_1)\<rbrakk> \<Longrightarrow> ?H9 x_1 x_2
|
[
"Weak_Convergence.weak_conv_m",
"Sigma_Algebra.measure",
"Topological_Spaces.topological_space_class.LIMSEQ",
"Groups.zero_class.zero",
"Elementary_Topology.frontier",
"Sigma_Algebra.emeasure",
"Borel_Space.topological_space_class.borel",
"Sigma_Algebra.sets",
"Distribution_Functions.real_distribution"
] |
[
"(nat \\<Rightarrow> real measure) \\<Rightarrow> real measure \\<Rightarrow> bool",
"'a measure \\<Rightarrow> 'a set \\<Rightarrow> real",
"(nat \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> bool",
"'a",
"'a set \\<Rightarrow> 'a set",
"'a measure \\<Rightarrow> 'a set \\<Rightarrow> ennreal",
"'a measure",
"'a measure \\<Rightarrow> 'a set set",
"real measure \\<Rightarrow> bool"
] |
[
"definition\n weak_conv_m :: \"(nat \\<Rightarrow> real measure) \\<Rightarrow> real measure \\<Rightarrow> bool\"\nwhere\n \"weak_conv_m M_seq M \\<equiv> weak_conv (\\<lambda>n. cdf (M_seq n)) (cdf M)\"",
"class topological_space = \"open\" +\n assumes open_UNIV [simp, intro]: \"open UNIV\"\n assumes open_Int [intro]: \"open S \\<Longrightarrow> open T \\<Longrightarrow> open (S \\<inter> T)\"\n assumes open_Union [intro]: \"\\<forall>S\\<in>K. open S \\<Longrightarrow> open (\\<Union>K)\"\nbegin",
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
(\<And>n. real_distribution (?M_seq n)) \<Longrightarrow> real_distribution ?M \<Longrightarrow> (\<And>A. A \<in> sets borel \<Longrightarrow> emeasure ?M (frontier A) = 0 \<Longrightarrow> (\<lambda>n. Sigma_Algebra.measure (?M_seq n) A) \<longlonglongrightarrow> Sigma_Algebra.measure ?M A) \<Longrightarrow> weak_conv_m ?M_seq ?M
###symbols
Weak_Convergence.weak_conv_m :::: (nat \<Rightarrow> real measure) \<Rightarrow> real measure \<Rightarrow> bool
Sigma_Algebra.measure :::: 'a measure \<Rightarrow> 'a set \<Rightarrow> real
Topological_Spaces.topological_space_class.LIMSEQ :::: (nat \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> bool
Groups.zero_class.zero :::: 'a
Elementary_Topology.frontier :::: 'a set \<Rightarrow> 'a set
Sigma_Algebra.emeasure :::: 'a measure \<Rightarrow> 'a set \<Rightarrow> ennreal
Borel_Space.topological_space_class.borel :::: 'a measure
Sigma_Algebra.sets :::: 'a measure \<Rightarrow> 'a set set
Distribution_Functions.real_distribution :::: real measure \<Rightarrow> bool
###defs
definition
weak_conv_m :: "(nat \<Rightarrow> real measure) \<Rightarrow> real measure \<Rightarrow> bool"
where
"weak_conv_m M_seq M \<equiv> weak_conv (\<lambda>n. cdf (M_seq n)) (cdf M)"
class topological_space = "open" +
assumes open_UNIV [simp, intro]: "open UNIV"
assumes open_Int [intro]: "open S \<Longrightarrow> open T \<Longrightarrow> open (S \<inter> T)"
assumes open_Union [intro]: "\<forall>S\<in>K. open S \<Longrightarrow> open (\<Union>K)"
begin
class zero =
fixes zero :: 'a ("0")
|
###output
\<lbrakk>\<And>y_0. ?H1 (x_1 y_0); ?H1 x_2; \<And>y_1. \<lbrakk>y_1 \<in> ?H2 ?H3; ?H4 x_2 (?H5 y_1) = ?H6\<rbrakk> \<Longrightarrow> ?H7 (\<lambda>y_2. ?H8 (x_1 y_2) y_1) (?H8 x_2 y_1)\<rbrakk> \<Longrightarrow> ?H9 x_1 x_2###end
|
Bali/Trans
|
Transitive_Closure.rtranclp_into_tranclp2
| null |
?r ?a ?b \<Longrightarrow> ?r\<^sup>*\<^sup>* ?b ?c \<Longrightarrow> ?r\<^sup>+\<^sup>+ ?a ?c
|
\<lbrakk>x_1 x_2 x_3; ?H1 x_1 x_3 x_4\<rbrakk> \<Longrightarrow> ?H2 x_1 x_2 x_4
|
[
"Transitive_Closure.tranclp",
"Transitive_Closure.rtranclp"
] |
[
"('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> bool",
"('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> bool"
] |
[] |
template
|
###lemma
?r ?a ?b \<Longrightarrow> ?r\<^sup>*\<^sup>* ?b ?c \<Longrightarrow> ?r\<^sup>+\<^sup>+ ?a ?c
###symbols
Transitive_Closure.tranclp :::: ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool
Transitive_Closure.rtranclp :::: ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool
###defs
|
###output
\<lbrakk>x_1 x_2 x_3; ?H1 x_1 x_3 x_4\<rbrakk> \<Longrightarrow> ?H2 x_1 x_2 x_4###end
|
Library/Multiset
|
Multiset.count_gt_imp_in_mset
|
lemma count_gt_imp_in_mset: "count M x > n \<Longrightarrow> x \<in># M"
|
?n < count ?M ?x \<Longrightarrow> ?x \<in># ?M
|
x_1 < ?H1 x_2 x_3 \<Longrightarrow> ?H2 x_3 x_2
|
[
"Multiset.member_mset",
"Multiset.multiset.count"
] |
[
"'a \\<Rightarrow> 'a multiset \\<Rightarrow> bool",
"'a multiset \\<Rightarrow> 'a \\<Rightarrow> nat"
] |
[
"abbreviation member_mset :: \\<open>'a \\<Rightarrow> 'a multiset \\<Rightarrow> bool\\<close>\n where \\<open>member_mset a M \\<equiv> a \\<in> set_mset M\\<close>"
] |
template
|
###lemma
?n < count ?M ?x \<Longrightarrow> ?x \<in># ?M
###symbols
Multiset.member_mset :::: 'a \<Rightarrow> 'a multiset \<Rightarrow> bool
Multiset.multiset.count :::: 'a multiset \<Rightarrow> 'a \<Rightarrow> nat
###defs
abbreviation member_mset :: \<open>'a \<Rightarrow> 'a multiset \<Rightarrow> bool\<close>
where \<open>member_mset a M \<equiv> a \<in> set_mset M\<close>
|
###output
x_1 < ?H1 x_2 x_3 \<Longrightarrow> ?H2 x_3 x_2###end
|
HOLCF/ex/Hoare
|
Hoare.hoare_lemma3
|
lemma hoare_lemma3: "(\<forall>k. b1\<cdot>(iterate k\<cdot>g\<cdot>x) = TT) \<or> (\<exists>k. b1\<cdot>(iterate k\<cdot>g\<cdot>x) \<noteq> TT)"
|
(\<forall>k. b1\<cdot>(iterate k\<cdot>g\<cdot> ?x) = TT) \<or> (\<exists>k. b1\<cdot>(iterate k\<cdot>g\<cdot> ?x) \<noteq> TT)
|
(\<forall>y_0. ?H1 ?H2 (?H1 (?H1 (?H3 y_0) ?H4) x_1) = ?H5) \<or> (\<exists>y_1. ?H1 ?H2 (?H1 (?H1 (?H3 y_1) ?H4) x_1) \<noteq> ?H5)
|
[
"Tr.TT",
"Hoare.g",
"Fix.iterate",
"Hoare.b1",
"Cfun.cfun.Rep_cfun"
] |
[
"tr",
"'a \\<rightarrow> 'a",
"nat \\<Rightarrow> ('a \\<rightarrow> 'a) \\<rightarrow> 'a \\<rightarrow> 'a",
"'a \\<rightarrow> tr",
"('a \\<rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> 'b"
] |
[
"definition TT :: \"tr\"\n where \"TT = Def True\"",
"primrec iterate :: \"nat \\<Rightarrow> ('a::cpo \\<rightarrow> 'a) \\<rightarrow> ('a \\<rightarrow> 'a)\"\n where\n \"iterate 0 = (\\<Lambda> F x. x)\"\n | \"iterate (Suc n) = (\\<Lambda> F x. F\\<cdot>(iterate n\\<cdot>F\\<cdot>x))\""
] |
template
|
###lemma
(\<forall>k. b1\<cdot>(iterate k\<cdot>g\<cdot> ?x) = TT) \<or> (\<exists>k. b1\<cdot>(iterate k\<cdot>g\<cdot> ?x) \<noteq> TT)
###symbols
Tr.TT :::: tr
Hoare.g :::: 'a \<rightarrow> 'a
Fix.iterate :::: nat \<Rightarrow> ('a \<rightarrow> 'a) \<rightarrow> 'a \<rightarrow> 'a
Hoare.b1 :::: 'a \<rightarrow> tr
Cfun.cfun.Rep_cfun :::: ('a \<rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b
###defs
definition TT :: "tr"
where "TT = Def True"
primrec iterate :: "nat \<Rightarrow> ('a::cpo \<rightarrow> 'a) \<rightarrow> ('a \<rightarrow> 'a)"
where
"iterate 0 = (\<Lambda> F x. x)"
| "iterate (Suc n) = (\<Lambda> F x. F\<cdot>(iterate n\<cdot>F\<cdot>x))"
|
###output
(\<forall>y_0. ?H1 ?H2 (?H1 (?H1 (?H3 y_0) ?H4) x_1) = ?H5) \<or> (\<exists>y_1. ?H1 ?H2 (?H1 (?H1 (?H3 y_1) ?H4) x_1) \<noteq> ?H5)###end
|
Nonstandard_Analysis/NSA
|
NSA.st_HFinite
|
lemma st_HFinite: "x \<in> HFinite \<Longrightarrow> st x \<in> HFinite"
|
?x \<in> HFinite \<Longrightarrow> st ?x \<in> HFinite
|
x_1 \<in> ?H1 \<Longrightarrow> ?H2 x_1 \<in> ?H1
|
[
"NSA.st",
"NSA.HFinite"
] |
[
"real star \\<Rightarrow> real star",
"'a star set"
] |
[
"definition st :: \"hypreal \\<Rightarrow> hypreal\"\n where \"st = (\\<lambda>x. SOME r. x \\<in> HFinite \\<and> r \\<in> \\<real> \\<and> r \\<approx> x)\"\n \\<comment> \\<open>the standard part of a hyperreal\\<close>",
"definition HFinite :: \"('a::real_normed_vector) star set\"\n where \"HFinite = {x. \\<exists>r \\<in> Reals. hnorm x < r}\""
] |
template
|
###lemma
?x \<in> HFinite \<Longrightarrow> st ?x \<in> HFinite
###symbols
NSA.st :::: real star \<Rightarrow> real star
NSA.HFinite :::: 'a star set
###defs
definition st :: "hypreal \<Rightarrow> hypreal"
where "st = (\<lambda>x. SOME r. x \<in> HFinite \<and> r \<in> \<real> \<and> r \<approx> x)"
\<comment> \<open>the standard part of a hyperreal\<close>
definition HFinite :: "('a::real_normed_vector) star set"
where "HFinite = {x. \<exists>r \<in> Reals. hnorm x < r}"
|
###output
x_1 \<in> ?H1 \<Longrightarrow> ?H2 x_1 \<in> ?H1###end
|
Nominal/Examples/Lambda_mu
|
Lambda_mu.perm_app(1)
| null |
?pi \<bullet> ?f ?x = (?pi \<bullet> ?f) (?pi \<bullet> ?x)
|
?H1 x_1 (x_2 x_3) = ?H1 x_1 x_2 (?H1 x_1 x_3)
|
[
"Nominal.perm"
] |
[
"('a \\<times> 'a) list \\<Rightarrow> 'b \\<Rightarrow> 'b"
] |
[
"consts \n perm :: \"'x prm \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixr \\<open>\\<bullet>\\<close> 80)\n swap :: \"('x \\<times> 'x) \\<Rightarrow> 'x \\<Rightarrow> 'x\""
] |
template
|
###lemma
?pi \<bullet> ?f ?x = (?pi \<bullet> ?f) (?pi \<bullet> ?x)
###symbols
Nominal.perm :::: ('a \<times> 'a) list \<Rightarrow> 'b \<Rightarrow> 'b
###defs
consts
perm :: "'x prm \<Rightarrow> 'a \<Rightarrow> 'a" (infixr \<open>\<bullet>\<close> 80)
swap :: "('x \<times> 'x) \<Rightarrow> 'x \<Rightarrow> 'x"
|
###output
?H1 x_1 (x_2 x_3) = ?H1 x_1 x_2 (?H1 x_1 x_3)###end
|
Library/Extended_Real
|
Extended_Real.ereal_of_enat_le_iff
|
lemma ereal_of_enat_le_iff[simp]: "ereal_of_enat m \<le> ereal_of_enat n \<longleftrightarrow> m \<le> n"
|
(ereal_of_enat ?m \<le> ereal_of_enat ?n) = (?m \<le> ?n)
|
(?H1 x_1 \<le> ?H1 x_2) = (x_1 \<le> x_2)
|
[
"Extended_Real.ereal_of_enat"
] |
[
"enat \\<Rightarrow> ereal"
] |
[
"definition \"ereal_of_enat n = (case n of enat n \\<Rightarrow> ereal (real n) | \\<infinity> \\<Rightarrow> \\<infinity>)\""
] |
template
|
###lemma
(ereal_of_enat ?m \<le> ereal_of_enat ?n) = (?m \<le> ?n)
###symbols
Extended_Real.ereal_of_enat :::: enat \<Rightarrow> ereal
###defs
definition "ereal_of_enat n = (case n of enat n \<Rightarrow> ereal (real n) | \<infinity> \<Rightarrow> \<infinity>)"
|
###output
(?H1 x_1 \<le> ?H1 x_2) = (x_1 \<le> x_2)###end
|
Data_Structures/Binomial_Heap
|
Binomial_Heap.merge_simp2
|
lemma merge_simp2[simp]: "merge [] ts\<^sub>2 = ts\<^sub>2"
|
merge [] ?ts\<^sub>2 = ?ts\<^sub>2
|
?H1 ?H2 x_1 = x_1
|
[
"List.list.Nil",
"Binomial_Heap.merge"
] |
[
"'a list",
"'a tree list \\<Rightarrow> 'a tree list \\<Rightarrow> 'a tree list"
] |
[
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"",
"fun merge :: \"'a::linorder trees \\<Rightarrow> 'a trees \\<Rightarrow> 'a trees\" where\n \"merge ts\\<^sub>1 [] = ts\\<^sub>1\"\n| \"merge [] ts\\<^sub>2 = ts\\<^sub>2\"\n| \"merge (t\\<^sub>1#ts\\<^sub>1 =: h\\<^sub>1) (t\\<^sub>2#ts\\<^sub>2 =: h\\<^sub>2) = (\n if rank t\\<^sub>1 < rank t\\<^sub>2 then t\\<^sub>1 # merge ts\\<^sub>1 h\\<^sub>2 else\n if rank t\\<^sub>2 < rank t\\<^sub>1 then t\\<^sub>2 # merge h\\<^sub>1 ts\\<^sub>2\n else ins_tree (link t\\<^sub>1 t\\<^sub>2) (merge ts\\<^sub>1 ts\\<^sub>2)\n )\""
] |
template
|
###lemma
merge [] ?ts\<^sub>2 = ?ts\<^sub>2
###symbols
List.list.Nil :::: 'a list
Binomial_Heap.merge :::: 'a tree list \<Rightarrow> 'a tree list \<Rightarrow> 'a tree list
###defs
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
fun merge :: "'a::linorder trees \<Rightarrow> 'a trees \<Rightarrow> 'a trees" where
"merge ts\<^sub>1 [] = ts\<^sub>1"
| "merge [] ts\<^sub>2 = ts\<^sub>2"
| "merge (t\<^sub>1#ts\<^sub>1 =: h\<^sub>1) (t\<^sub>2#ts\<^sub>2 =: h\<^sub>2) = (
if rank t\<^sub>1 < rank t\<^sub>2 then t\<^sub>1 # merge ts\<^sub>1 h\<^sub>2 else
if rank t\<^sub>2 < rank t\<^sub>1 then t\<^sub>2 # merge h\<^sub>1 ts\<^sub>2
else ins_tree (link t\<^sub>1 t\<^sub>2) (merge ts\<^sub>1 ts\<^sub>2)
)"
|
###output
?H1 ?H2 x_1 = x_1###end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.