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
|
|---|---|---|---|---|---|---|---|---|---|---|
Combinatorics/Orbits
|
Orbits.cyclic_on_inI
|
lemma cyclic_on_inI:
assumes "cyclic_on f S" "s \<in> S" shows "f s \<in> S"
|
cyclic_on ?f ?S \<Longrightarrow> ?s \<in> ?S \<Longrightarrow> ?f ?s \<in> ?S
|
\<lbrakk> ?H1 x_1 x_2; x_3 \<in> x_2\<rbrakk> \<Longrightarrow> x_1 x_3 \<in> x_2
|
[
"Orbits.cyclic_on"
] |
[
"('a \\<Rightarrow> 'a) \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"definition cyclic_on :: \"('a \\<Rightarrow> 'a) \\<Rightarrow> 'a set \\<Rightarrow> bool\" where\n \"cyclic_on f S \\<longleftrightarrow> (\\<exists>s\\<in>S. S = orbit f s)\""
] |
template
|
###lemma
cyclic_on ?f ?S \<Longrightarrow> ?s \<in> ?S \<Longrightarrow> ?f ?s \<in> ?S
###symbols
Orbits.cyclic_on :::: ('a \<Rightarrow> 'a) \<Rightarrow> 'a set \<Rightarrow> bool
###defs
definition cyclic_on :: "('a \<Rightarrow> 'a) \<Rightarrow> 'a set \<Rightarrow> bool" where
"cyclic_on f S \<longleftrightarrow> (\<exists>s\<in>S. S = orbit f s)"
|
###output
\<lbrakk> ?H1 x_1 x_2; x_3 \<in> x_2\<rbrakk> \<Longrightarrow> x_1 x_3 \<in> x_2###end
|
Library/FuncSet
|
FuncSet.Pi_cong
|
lemma Pi_cong: "(\<And>w. w \<in> A \<Longrightarrow> f w = g w) \<Longrightarrow> f \<in> Pi A B \<longleftrightarrow> g \<in> Pi A B"
|
(\<And>w. w \<in> ?A \<Longrightarrow> ?f w = ?g w) \<Longrightarrow> (?f \<in> Pi ?A ?B) = (?g \<in> Pi ?A ?B)
|
(\<And>y_0. y_0 \<in> x_1 \<Longrightarrow> x_2 y_0 = x_3 y_0) \<Longrightarrow> (x_2 \<in> ?H1 x_1 x_4) = (x_3 \<in> ?H1 x_1 x_4)
|
[
"FuncSet.Pi"
] |
[
"'a set \\<Rightarrow> ('a \\<Rightarrow> 'b set) \\<Rightarrow> ('a \\<Rightarrow> 'b) set"
] |
[
"definition Pi :: \"'a set \\<Rightarrow> ('a \\<Rightarrow> 'b set) \\<Rightarrow> ('a \\<Rightarrow> 'b) set\"\n where \"Pi A B = {f. \\<forall>x. x \\<in> A \\<longrightarrow> f x \\<in> B x}\""
] |
template
|
###lemma
(\<And>w. w \<in> ?A \<Longrightarrow> ?f w = ?g w) \<Longrightarrow> (?f \<in> Pi ?A ?B) = (?g \<in> Pi ?A ?B)
###symbols
FuncSet.Pi :::: 'a set \<Rightarrow> ('a \<Rightarrow> 'b set) \<Rightarrow> ('a \<Rightarrow> 'b) set
###defs
definition Pi :: "'a set \<Rightarrow> ('a \<Rightarrow> 'b set) \<Rightarrow> ('a \<Rightarrow> 'b) set"
where "Pi A B = {f. \<forall>x. x \<in> A \<longrightarrow> f x \<in> B x}"
|
###output
(\<And>y_0. y_0 \<in> x_1 \<Longrightarrow> x_2 y_0 = x_3 y_0) \<Longrightarrow> (x_2 \<in> ?H1 x_1 x_4) = (x_3 \<in> ?H1 x_1 x_4)###end
|
Computational_Algebra/Formal_Power_Series
|
Formal_Power_Series.fps_lr_inverse_mult_divring(1)
|
lemma fps_lr_inverse_mult_divring:
fixes f g :: "'a::division_ring fps"
shows "fps_left_inverse (f * g) (inverse ((f*g)$0)) =
fps_left_inverse g (inverse (g$0)) * fps_left_inverse f (inverse (f$0))"
and "fps_right_inverse (f * g) (inverse ((f*g)$0)) =
fps_right_inverse g (inverse (g$0)) * fps_right_inverse f (inverse (f$0))"
|
fps_left_inverse (?f * ?g) (inverse (fps_nth (?f * ?g) 0)) = fps_left_inverse ?g (inverse (fps_nth ?g 0)) * fps_left_inverse ?f (inverse (fps_nth ?f 0))
|
?H1 (?H2 x_1 x_2) (?H3 (?H4 (?H2 x_1 x_2) ?H5)) = ?H2 (?H1 x_2 (?H3 (?H4 x_2 ?H5))) (?H1 x_1 (?H3 (?H4 x_1 ?H5)))
|
[
"Groups.zero_class.zero",
"Formal_Power_Series.fps.fps_nth",
"Fields.inverse_class.inverse",
"Groups.times_class.times",
"Formal_Power_Series.fps_left_inverse"
] |
[
"'a",
"'a fps \\<Rightarrow> nat \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a fps \\<Rightarrow> 'a \\<Rightarrow> 'a fps"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"abbreviation \"fps_left_inverse \\<equiv> (\\<lambda>f x. Abs_fps (fps_left_inverse_constructor f x))\""
] |
template
|
###lemma
fps_left_inverse (?f * ?g) (inverse (fps_nth (?f * ?g) 0)) = fps_left_inverse ?g (inverse (fps_nth ?g 0)) * fps_left_inverse ?f (inverse (fps_nth ?f 0))
###symbols
Groups.zero_class.zero :::: 'a
Formal_Power_Series.fps.fps_nth :::: 'a fps \<Rightarrow> nat \<Rightarrow> 'a
Fields.inverse_class.inverse :::: 'a \<Rightarrow> 'a
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Formal_Power_Series.fps_left_inverse :::: 'a fps \<Rightarrow> 'a \<Rightarrow> 'a fps
###defs
class zero =
fixes zero :: 'a ("0")
class inverse = divide +
fixes inverse :: "'a \<Rightarrow> 'a"
begin
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
abbreviation "fps_left_inverse \<equiv> (\<lambda>f x. Abs_fps (fps_left_inverse_constructor f x))"
|
###output
?H1 (?H2 x_1 x_2) (?H3 (?H4 (?H2 x_1 x_2) ?H5)) = ?H2 (?H1 x_2 (?H3 (?H4 x_2 ?H5))) (?H1 x_1 (?H3 (?H4 x_1 ?H5)))###end
|
Analysis/Abstract_Topology
|
Abstract_Topology.closed_map_into_subtopology
|
lemma closed_map_into_subtopology:
"\<lbrakk>closed_map X X' f; f \<in> topspace X \<rightarrow> S\<rbrakk> \<Longrightarrow> closed_map X (subtopology X' S) f"
|
closed_map ?X ?X' ?f \<Longrightarrow> ?f \<in> topspace ?X \<rightarrow> ?S \<Longrightarrow> closed_map ?X (subtopology ?X' ?S) ?f
|
\<lbrakk> ?H1 x_1 x_2 x_3; x_3 \<in> ?H2 (?H3 x_1) x_4\<rbrakk> \<Longrightarrow> ?H1 x_1 (?H4 x_2 x_4) x_3
|
[
"Abstract_Topology.subtopology",
"Abstract_Topology.topspace",
"FuncSet.funcset",
"Abstract_Topology.closed_map"
] |
[
"'a topology \\<Rightarrow> 'a set \\<Rightarrow> 'a topology",
"'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"
] |
[
"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 closed_map :: \"'a topology \\<Rightarrow> 'b topology \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool\"\n where \"closed_map X1 X2 f \\<equiv> \\<forall>U. closedin X1 U \\<longrightarrow> closedin X2 (f ` U)\""
] |
template
|
###lemma
closed_map ?X ?X' ?f \<Longrightarrow> ?f \<in> topspace ?X \<rightarrow> ?S \<Longrightarrow> closed_map ?X (subtopology ?X' ?S) ?f
###symbols
Abstract_Topology.subtopology :::: 'a topology \<Rightarrow> 'a set \<Rightarrow> 'a topology
Abstract_Topology.topspace :::: 'a topology \<Rightarrow> 'a set
FuncSet.funcset :::: 'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<Rightarrow> 'b) set
Abstract_Topology.closed_map :::: 'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
###defs
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 closed_map :: "'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool"
where "closed_map X1 X2 f \<equiv> \<forall>U. closedin X1 U \<longrightarrow> closedin X2 (f ` U)"
|
###output
\<lbrakk> ?H1 x_1 x_2 x_3; x_3 \<in> ?H2 (?H3 x_1) x_4\<rbrakk> \<Longrightarrow> ?H1 x_1 (?H4 x_2 x_4) x_3###end
|
Analysis/Derivative
|
Derivative.vector_diff_chain_within
|
lemma vector_diff_chain_within:
assumes "(f has_vector_derivative f') (at x within s)"
and "(g has_vector_derivative g') (at (f x) within f ` s)"
shows "((g \<circ> f) has_vector_derivative (f' *\<^sub>R g')) (at x within s)"
|
(?f has_vector_derivative ?f') (at ?x within ?s) \<Longrightarrow> (?g has_vector_derivative ?g') (at (?f ?x) within ?f ` ?s) \<Longrightarrow> (?g \<circ> ?f has_vector_derivative ?f' *\<^sub>R ?g') (at ?x within ?s)
|
\<lbrakk> ?H1 x_1 x_2 (?H2 x_3 x_4); ?H1 x_5 x_6 (?H2 (x_1 x_3) (?H3 x_1 x_4))\<rbrakk> \<Longrightarrow> ?H1 (?H4 x_5 x_1) (?H5 x_2 x_6) (?H2 x_3 x_4)
|
[
"Real_Vector_Spaces.scaleR_class.scaleR",
"Fun.comp",
"Set.image",
"Topological_Spaces.topological_space_class.at_within",
"Deriv.has_vector_derivative"
] |
[
"real \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'a) \\<Rightarrow> 'c \\<Rightarrow> 'b",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set",
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a filter",
"(real \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> real filter \\<Rightarrow> bool"
] |
[
"class scaleR =\n fixes scaleR :: \"real \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixr \"*\\<^sub>R\" 75)\nbegin",
"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))\"",
"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 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",
"definition has_vector_derivative :: \"(real \\<Rightarrow> 'b::real_normed_vector) \\<Rightarrow> 'b \\<Rightarrow> real filter \\<Rightarrow> bool\"\n (infix \"has'_vector'_derivative\" 50)\n where \"(f has_vector_derivative f') net \\<longleftrightarrow> (f has_derivative (\\<lambda>x. x *\\<^sub>R f')) net\""
] |
template
|
###lemma
(?f has_vector_derivative ?f') (at ?x within ?s) \<Longrightarrow> (?g has_vector_derivative ?g') (at (?f ?x) within ?f ` ?s) \<Longrightarrow> (?g \<circ> ?f has_vector_derivative ?f' *\<^sub>R ?g') (at ?x within ?s)
###symbols
Real_Vector_Spaces.scaleR_class.scaleR :::: real \<Rightarrow> 'a \<Rightarrow> 'a
Fun.comp :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'a) \<Rightarrow> 'c \<Rightarrow> 'b
Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set
Topological_Spaces.topological_space_class.at_within :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a filter
Deriv.has_vector_derivative :::: (real \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> real filter \<Rightarrow> bool
###defs
class scaleR =
fixes scaleR :: "real \<Rightarrow> 'a \<Rightarrow> 'a" (infixr "*\<^sub>R" 75)
begin
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))"
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 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
definition has_vector_derivative :: "(real \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> 'b \<Rightarrow> real filter \<Rightarrow> bool"
(infix "has'_vector'_derivative" 50)
where "(f has_vector_derivative f') net \<longleftrightarrow> (f has_derivative (\<lambda>x. x *\<^sub>R f')) net"
|
###output
\<lbrakk> ?H1 x_1 x_2 (?H2 x_3 x_4); ?H1 x_5 x_6 (?H2 (x_1 x_3) (?H3 x_1 x_4))\<rbrakk> \<Longrightarrow> ?H1 (?H4 x_5 x_1) (?H5 x_2 x_6) (?H2 x_3 x_4)###end
|
Algebra/IntRing
|
IntRing.UNIV(1)
|
lemma UNIV:
"x \<in> UNIV \<longleftrightarrow> True"
"A \<subseteq> UNIV \<longleftrightarrow> True"
"(\<forall>x \<in> UNIV. P x) \<longleftrightarrow> (\<forall>x. P x)"
"(\<exists>x \<in> UNIV. P x) \<longleftrightarrow> (\<exists>x. P x)"
"(True \<longrightarrow> Q) \<longleftrightarrow> Q"
"(True \<Longrightarrow> PROP R) \<equiv> PROP R"
|
(?x \<in> UNIV) = True
|
(x_1 \<in> ?H1) = True
|
[
"Set.UNIV"
] |
[
"'a set"
] |
[
"abbreviation UNIV :: \"'a set\"\n where \"UNIV \\<equiv> top\""
] |
template
|
###lemma
(?x \<in> UNIV) = True
###symbols
Set.UNIV :::: 'a set
###defs
abbreviation UNIV :: "'a set"
where "UNIV \<equiv> top"
|
###output
(x_1 \<in> ?H1) = True###end
|
Algebra/IntRing
|
IntRing.dvds_eq_Idl
|
lemma dvds_eq_Idl: "l dvd k \<and> k dvd l \<longleftrightarrow> Idl\<^bsub>\<Z>\<^esub> {k} = Idl\<^bsub>\<Z>\<^esub> {l}"
|
(?l dvd ?k \<and> ?k dvd ?l) = (Idl\<^bsub>\<Z>\<^esub> { ?k} = Idl\<^bsub>\<Z>\<^esub> { ?l})
|
(?H1 x_1 x_2 \<and> ?H1 x_2 x_1) = (?H2 ?H3 (?H4 x_2 ?H5) = ?H2 ?H3 (?H4 x_1 ?H5))
|
[
"Set.empty",
"Set.insert",
"IntRing.int_ring",
"Ideal.genideal",
"Rings.dvd_class.dvd"
] |
[
"'a set",
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"int ring",
"('a, 'b) ring_scheme \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"'a \\<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 int_ring :: \"int ring\" (\"\\<Z>\")\n where \"int_ring \\<equiv> \\<lparr>carrier = UNIV, mult = (*), one = 1, zero = 0, add = (+)\\<rparr>\"",
"definition genideal :: \"_ \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (\"Idl\\<index> _\" [80] 79)\n where \"genideal R S = \\<Inter>{I. ideal I R \\<and> S \\<subseteq> I}\"",
"definition dvd :: \"'a \\<Rightarrow> 'a \\<Rightarrow> bool\" (infix \"dvd\" 50)\n where \"b dvd a \\<longleftrightarrow> (\\<exists>k. a = b * k)\""
] |
template
|
###lemma
(?l dvd ?k \<and> ?k dvd ?l) = (Idl\<^bsub>\<Z>\<^esub> { ?k} = Idl\<^bsub>\<Z>\<^esub> { ?l})
###symbols
Set.empty :::: 'a set
Set.insert :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a set
IntRing.int_ring :::: int ring
Ideal.genideal :::: ('a, 'b) ring_scheme \<Rightarrow> 'a set \<Rightarrow> 'a set
Rings.dvd_class.dvd :::: 'a \<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 int_ring :: "int ring" ("\<Z>")
where "int_ring \<equiv> \<lparr>carrier = UNIV, mult = (*), one = 1, zero = 0, add = (+)\<rparr>"
definition genideal :: "_ \<Rightarrow> 'a set \<Rightarrow> 'a set" ("Idl\<index> _" [80] 79)
where "genideal R S = \<Inter>{I. ideal I R \<and> S \<subseteq> I}"
definition dvd :: "'a \<Rightarrow> 'a \<Rightarrow> bool" (infix "dvd" 50)
where "b dvd a \<longleftrightarrow> (\<exists>k. a = b * k)"
|
###output
(?H1 x_1 x_2 \<and> ?H1 x_2 x_1) = (?H2 ?H3 (?H4 x_2 ?H5) = ?H2 ?H3 (?H4 x_1 ?H5))###end
|
List
|
List.distinct_swap
|
lemma distinct_swap[simp]: "\<lbrakk> i < size xs; j < size xs\<rbrakk> \<Longrightarrow>
distinct(xs[i := xs!j, j := xs!i]) = distinct xs"
|
?i < length ?xs \<Longrightarrow> ?j < length ?xs \<Longrightarrow> distinct (?xs[ ?i := ?xs ! ?j, ?j := ?xs ! ?i]) = distinct ?xs
|
\<lbrakk>x_1 < ?H1 x_2; x_3 < ?H1 x_2\<rbrakk> \<Longrightarrow> ?H2 (?H3 (?H3 x_2 x_1 (?H4 x_2 x_3)) x_3 (?H4 x_2 x_1)) = ?H2 x_2
|
[
"List.nth",
"List.list_update",
"List.distinct",
"List.length"
] |
[
"'a list \\<Rightarrow> nat \\<Rightarrow> 'a",
"'a list \\<Rightarrow> nat \\<Rightarrow> 'a \\<Rightarrow> 'a list",
"'a list \\<Rightarrow> bool",
"'a list \\<Rightarrow> nat"
] |
[
"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>",
"primrec list_update :: \"'a list \\<Rightarrow> nat \\<Rightarrow> 'a \\<Rightarrow> 'a list\" where\n\"list_update [] i v = []\" |\n\"list_update (x # xs) i v =\n (case i of 0 \\<Rightarrow> v # xs | Suc j \\<Rightarrow> x # list_update xs j v)\"",
"primrec distinct :: \"'a list \\<Rightarrow> bool\" where\n\"distinct [] \\<longleftrightarrow> True\" |\n\"distinct (x # xs) \\<longleftrightarrow> x \\<notin> set xs \\<and> distinct xs\"",
"abbreviation length :: \"'a list \\<Rightarrow> nat\" where\n\"length \\<equiv> size\""
] |
template
|
###lemma
?i < length ?xs \<Longrightarrow> ?j < length ?xs \<Longrightarrow> distinct (?xs[ ?i := ?xs ! ?j, ?j := ?xs ! ?i]) = distinct ?xs
###symbols
List.nth :::: 'a list \<Rightarrow> nat \<Rightarrow> 'a
List.list_update :::: 'a list \<Rightarrow> nat \<Rightarrow> 'a \<Rightarrow> 'a list
List.distinct :::: 'a list \<Rightarrow> bool
List.length :::: 'a list \<Rightarrow> nat
###defs
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>
primrec list_update :: "'a list \<Rightarrow> nat \<Rightarrow> 'a \<Rightarrow> 'a list" where
"list_update [] i v = []" |
"list_update (x # xs) i v =
(case i of 0 \<Rightarrow> v # xs | Suc j \<Rightarrow> x # list_update xs j v)"
primrec distinct :: "'a list \<Rightarrow> bool" where
"distinct [] \<longleftrightarrow> True" |
"distinct (x # xs) \<longleftrightarrow> x \<notin> set xs \<and> distinct xs"
abbreviation length :: "'a list \<Rightarrow> nat" where
"length \<equiv> size"
|
###output
\<lbrakk>x_1 < ?H1 x_2; x_3 < ?H1 x_2\<rbrakk> \<Longrightarrow> ?H2 (?H3 (?H3 x_2 x_1 (?H4 x_2 x_3)) x_3 (?H4 x_2 x_1)) = ?H2 x_2###end
|
Computational_Algebra/Formal_Power_Series
|
Formal_Power_Series.fps_integral0_deriv
|
lemma fps_integral0_deriv:
fixes a :: "'a::{division_ring,ring_char_0} fps"
shows "fps_integral0 (fps_deriv a) = a - fps_const (a$0)"
|
fps_integral0 (fps_deriv ?a) = ?a - fps_const (fps_nth ?a 0)
|
?H1 (?H2 x_1) = ?H3 x_1 (?H4 (?H5 x_1 ?H6))
|
[
"Groups.zero_class.zero",
"Formal_Power_Series.fps.fps_nth",
"Formal_Power_Series.fps_const",
"Groups.minus_class.minus",
"Formal_Power_Series.fps_deriv",
"Formal_Power_Series.fps_integral0"
] |
[
"'a",
"'a fps \\<Rightarrow> nat \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a fps",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a fps \\<Rightarrow> 'a fps",
"'a fps \\<Rightarrow> 'a fps"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"definition \"fps_const c = Abs_fps (\\<lambda>n. if n = 0 then c else 0)\"",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)",
"definition \"fps_deriv f = Abs_fps (\\<lambda>n. of_nat (n + 1) * f $ (n + 1))\"",
"abbreviation \"fps_integral0 a \\<equiv> fps_integral a 0\""
] |
template
|
###lemma
fps_integral0 (fps_deriv ?a) = ?a - fps_const (fps_nth ?a 0)
###symbols
Groups.zero_class.zero :::: 'a
Formal_Power_Series.fps.fps_nth :::: 'a fps \<Rightarrow> nat \<Rightarrow> 'a
Formal_Power_Series.fps_const :::: 'a \<Rightarrow> 'a fps
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Formal_Power_Series.fps_deriv :::: 'a fps \<Rightarrow> 'a fps
Formal_Power_Series.fps_integral0 :::: 'a fps \<Rightarrow> 'a fps
###defs
class zero =
fixes zero :: 'a ("0")
definition "fps_const c = Abs_fps (\<lambda>n. if n = 0 then c else 0)"
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
definition "fps_deriv f = Abs_fps (\<lambda>n. of_nat (n + 1) * f $ (n + 1))"
abbreviation "fps_integral0 a \<equiv> fps_integral a 0"
|
###output
?H1 (?H2 x_1) = ?H3 x_1 (?H4 (?H5 x_1 ?H6))###end
|
Quotient_Examples/Quotient_Message
|
Quotient_Message.msgrel_imp_eqv_freeright_aux
|
lemma msgrel_imp_eqv_freeright_aux:
shows "freeright U \<sim> freeright U"
|
freeright ?U \<sim> freeright ?U
|
?H1 (?H2 x_1) (?H2 x_1)
|
[
"Quotient_Message.freeright",
"Quotient_Message.msgrel"
] |
[
"freemsg \\<Rightarrow> freemsg",
"freemsg \\<Rightarrow> freemsg \\<Rightarrow> bool"
] |
[
"primrec\n freeright :: \"freemsg \\<Rightarrow> freemsg\"\nwhere\n \"freeright (NONCE N) = NONCE N\"\n| \"freeright (MPAIR X Y) = Y\"\n| \"freeright (CRYPT K X) = freeright X\"\n| \"freeright (DECRYPT K X) = freeright X\"",
"inductive\n msgrel::\"freemsg \\<Rightarrow> freemsg \\<Rightarrow> bool\" (infixl \"\\<sim>\" 50)\nwhere\n CD: \"CRYPT K (DECRYPT K X) \\<sim> X\"\n| DC: \"DECRYPT K (CRYPT K X) \\<sim> X\"\n| NONCE: \"NONCE N \\<sim> NONCE N\"\n| MPAIR: \"\\<lbrakk>X \\<sim> X'; Y \\<sim> Y'\\<rbrakk> \\<Longrightarrow> MPAIR X Y \\<sim> MPAIR X' Y'\"\n| CRYPT: \"X \\<sim> X' \\<Longrightarrow> CRYPT K X \\<sim> CRYPT K X'\"\n| DECRYPT: \"X \\<sim> X' \\<Longrightarrow> DECRYPT K X \\<sim> DECRYPT K X'\"\n| SYM: \"X \\<sim> Y \\<Longrightarrow> Y \\<sim> X\"\n| TRANS: \"\\<lbrakk>X \\<sim> Y; Y \\<sim> Z\\<rbrakk> \\<Longrightarrow> X \\<sim> Z\""
] |
template
|
###lemma
freeright ?U \<sim> freeright ?U
###symbols
Quotient_Message.freeright :::: freemsg \<Rightarrow> freemsg
Quotient_Message.msgrel :::: freemsg \<Rightarrow> freemsg \<Rightarrow> bool
###defs
primrec
freeright :: "freemsg \<Rightarrow> freemsg"
where
"freeright (NONCE N) = NONCE N"
| "freeright (MPAIR X Y) = Y"
| "freeright (CRYPT K X) = freeright X"
| "freeright (DECRYPT K X) = freeright X"
inductive
msgrel::"freemsg \<Rightarrow> freemsg \<Rightarrow> bool" (infixl "\<sim>" 50)
where
CD: "CRYPT K (DECRYPT K X) \<sim> X"
| DC: "DECRYPT K (CRYPT K X) \<sim> X"
| NONCE: "NONCE N \<sim> NONCE N"
| MPAIR: "\<lbrakk>X \<sim> X'; Y \<sim> Y'\<rbrakk> \<Longrightarrow> MPAIR X Y \<sim> MPAIR X' Y'"
| CRYPT: "X \<sim> X' \<Longrightarrow> CRYPT K X \<sim> CRYPT K X'"
| DECRYPT: "X \<sim> X' \<Longrightarrow> DECRYPT K X \<sim> DECRYPT K X'"
| SYM: "X \<sim> Y \<Longrightarrow> Y \<sim> X"
| TRANS: "\<lbrakk>X \<sim> Y; Y \<sim> Z\<rbrakk> \<Longrightarrow> X \<sim> Z"
|
###output
?H1 (?H2 x_1) (?H2 x_1)###end
|
UNITY/Comp
|
Complete_Lattices.Sup2_I
| null |
?r \<in> ?A \<Longrightarrow> ?r ?a ?b \<Longrightarrow> Sup ?A ?a ?b
|
\<lbrakk>x_1 \<in> x_2; x_1 x_3 x_4\<rbrakk> \<Longrightarrow> ?H1 x_2 x_3 x_4
|
[
"Complete_Lattices.Sup_class.Sup"
] |
[
"'a set \\<Rightarrow> 'a"
] |
[
"class Sup =\n fixes Sup :: \"'a set \\<Rightarrow> 'a\" (\"\\<Squnion> _\" [900] 900)"
] |
template
|
###lemma
?r \<in> ?A \<Longrightarrow> ?r ?a ?b \<Longrightarrow> Sup ?A ?a ?b
###symbols
Complete_Lattices.Sup_class.Sup :::: 'a set \<Rightarrow> 'a
###defs
class Sup =
fixes Sup :: "'a set \<Rightarrow> 'a" ("\<Squnion> _" [900] 900)
|
###output
\<lbrakk>x_1 \<in> x_2; x_1 x_3 x_4\<rbrakk> \<Longrightarrow> ?H1 x_2 x_3 x_4###end
|
HOL
|
HOL.no_atp(122)
| null |
?lx * ?ly * ?rx = ?lx * ?rx * ?ly
|
?H1 (?H1 x_1 x_2) x_3 = ?H1 (?H1 x_1 x_3) x_2
|
[
"Groups.times_class.times"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a"
] |
[
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)"
] |
template
|
###lemma
?lx * ?ly * ?rx = ?lx * ?rx * ?ly
###symbols
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
###defs
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
|
###output
?H1 (?H1 x_1 x_2) x_3 = ?H1 (?H1 x_1 x_3) x_2###end
|
Analysis/Borel_Space
|
Borel_Space.borel_measurable_eq
| null |
?f \<in> borel_measurable ?M \<Longrightarrow> ?g \<in> borel_measurable ?M \<Longrightarrow> {w \<in> space ?M. ?f w = ?g w} \<in> sets ?M
|
\<lbrakk>x_1 \<in> ?H1 x_2; x_3 \<in> ?H1 x_2\<rbrakk> \<Longrightarrow> ?H2 (\<lambda>y_0. y_0 \<in> ?H3 x_2 \<and> x_1 y_0 = x_3 y_0) \<in> ?H4 x_2
|
[
"Sigma_Algebra.sets",
"Sigma_Algebra.space",
"Set.Collect",
"Borel_Space.borel_measurable"
] |
[
"'a measure \\<Rightarrow> 'a set set",
"'a measure \\<Rightarrow> 'a set",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"'a measure \\<Rightarrow> ('a \\<Rightarrow> 'b) set"
] |
[
"abbreviation \"borel_measurable M \\<equiv> measurable M borel\""
] |
template
|
###lemma
?f \<in> borel_measurable ?M \<Longrightarrow> ?g \<in> borel_measurable ?M \<Longrightarrow> {w \<in> space ?M. ?f w = ?g w} \<in> sets ?M
###symbols
Sigma_Algebra.sets :::: 'a measure \<Rightarrow> 'a set set
Sigma_Algebra.space :::: 'a measure \<Rightarrow> 'a set
Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set
Borel_Space.borel_measurable :::: 'a measure \<Rightarrow> ('a \<Rightarrow> 'b) set
###defs
abbreviation "borel_measurable M \<equiv> measurable M borel"
|
###output
\<lbrakk>x_1 \<in> ?H1 x_2; x_3 \<in> ?H1 x_2\<rbrakk> \<Longrightarrow> ?H2 (\<lambda>y_0. y_0 \<in> ?H3 x_2 \<and> x_1 y_0 = x_3 y_0) \<in> ?H4 x_2###end
|
Complex_Analysis/Complex_Analysis
|
Complex_Analysis_Basics.analytic_intros(33)
| null |
?f analytic_on ?S \<Longrightarrow> (deriv ^^ ?n) ?f analytic_on ?S
|
?H1 x_1 x_2 \<Longrightarrow> ?H1 (?H2 ?H3 x_3 x_1) x_2
|
[
"Derivative.deriv",
"Nat.compower",
"Complex_Analysis_Basics.analytic_on"
] |
[
"('a \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> nat \\<Rightarrow> 'a",
"(complex \\<Rightarrow> complex) \\<Rightarrow> complex set \\<Rightarrow> bool"
] |
[
"abbreviation compower :: \"'a \\<Rightarrow> nat \\<Rightarrow> 'a\" (infixr \"^^\" 80)\n where \"f ^^ n \\<equiv> compow n f\""
] |
template
|
###lemma
?f analytic_on ?S \<Longrightarrow> (deriv ^^ ?n) ?f analytic_on ?S
###symbols
Derivative.deriv :::: ('a \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> 'a
Nat.compower :::: 'a \<Rightarrow> nat \<Rightarrow> 'a
Complex_Analysis_Basics.analytic_on :::: (complex \<Rightarrow> complex) \<Rightarrow> complex set \<Rightarrow> bool
###defs
abbreviation compower :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^^" 80)
where "f ^^ n \<equiv> compow n f"
|
###output
?H1 x_1 x_2 \<Longrightarrow> ?H1 (?H2 ?H3 x_3 x_1) x_2###end
|
Analysis/Set_Integral
|
Set_Integral.set_borel_measurable_subset
| null |
set_borel_measurable ?M ?A ?f \<Longrightarrow> ?B \<in> sets ?M \<Longrightarrow> ?B \<subseteq> ?A \<Longrightarrow> set_borel_measurable ?M ?B ?f
|
\<lbrakk> ?H1 x_1 x_2 x_3; x_4 \<in> ?H2 x_1; ?H3 x_4 x_2\<rbrakk> \<Longrightarrow> ?H1 x_1 x_4 x_3
|
[
"Set.subset_eq",
"Sigma_Algebra.sets",
"Set_Integral.set_borel_measurable"
] |
[
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool",
"'a measure \\<Rightarrow> 'a set set",
"'a measure \\<Rightarrow> 'a set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool"
] |
[
"abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\""
] |
template
|
###lemma
set_borel_measurable ?M ?A ?f \<Longrightarrow> ?B \<in> sets ?M \<Longrightarrow> ?B \<subseteq> ?A \<Longrightarrow> set_borel_measurable ?M ?B ?f
###symbols
Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
Sigma_Algebra.sets :::: 'a measure \<Rightarrow> 'a set set
Set_Integral.set_borel_measurable :::: 'a measure \<Rightarrow> 'a set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
###defs
abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset_eq \<equiv> less_eq"
|
###output
\<lbrakk> ?H1 x_1 x_2 x_3; x_4 \<in> ?H2 x_1; ?H3 x_4 x_2\<rbrakk> \<Longrightarrow> ?H1 x_1 x_4 x_3###end
|
HOLCF/Domain
|
Domain_Aux.lub_ID_finite
| null |
chain ?d \<Longrightarrow> (\<Squnion>n. ?d n) = ID \<Longrightarrow> (\<And>n. decisive (?d n)) \<Longrightarrow> \<exists>n. ?d n\<cdot> ?x = ?x
|
\<lbrakk> ?H1 x_1; ?H2 x_1 = ?H3; \<And>y_1. ?H4 (x_1 y_1)\<rbrakk> \<Longrightarrow> \<exists>y_2. ?H5 (x_1 y_2) x_2 = x_2
|
[
"Cfun.cfun.Rep_cfun",
"Domain_Aux.decisive",
"Cfun.ID",
"Porder.po_class.Lub",
"Porder.po_class.chain"
] |
[
"('a \\<rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> 'b",
"('a \\<rightarrow> 'a) \\<Rightarrow> bool",
"'a \\<rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b",
"(nat \\<Rightarrow> 'a) \\<Rightarrow> bool"
] |
[
"definition\n decisive :: \"('a::pcpo \\<rightarrow> 'a) \\<Rightarrow> bool\"\nwhere\n \"decisive d \\<longleftrightarrow> (\\<forall>x. d\\<cdot>x = x \\<or> d\\<cdot>x = \\<bottom>)\"",
"definition ID :: \"'a \\<rightarrow> 'a\"\n where \"ID = (\\<Lambda> x. x)\"",
"class po = below +\n assumes below_refl [iff]: \"x \\<sqsubseteq> x\"\n assumes below_trans: \"x \\<sqsubseteq> y \\<Longrightarrow> y \\<sqsubseteq> z \\<Longrightarrow> x \\<sqsubseteq> z\"\n assumes below_antisym: \"x \\<sqsubseteq> y \\<Longrightarrow> y \\<sqsubseteq> x \\<Longrightarrow> x = y\"\nbegin",
"class po = below +\n assumes below_refl [iff]: \"x \\<sqsubseteq> x\"\n assumes below_trans: \"x \\<sqsubseteq> y \\<Longrightarrow> y \\<sqsubseteq> z \\<Longrightarrow> x \\<sqsubseteq> z\"\n assumes below_antisym: \"x \\<sqsubseteq> y \\<Longrightarrow> y \\<sqsubseteq> x \\<Longrightarrow> x = y\"\nbegin"
] |
template
|
###lemma
chain ?d \<Longrightarrow> (\<Squnion>n. ?d n) = ID \<Longrightarrow> (\<And>n. decisive (?d n)) \<Longrightarrow> \<exists>n. ?d n\<cdot> ?x = ?x
###symbols
Cfun.cfun.Rep_cfun :::: ('a \<rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b
Domain_Aux.decisive :::: ('a \<rightarrow> 'a) \<Rightarrow> bool
Cfun.ID :::: 'a \<rightarrow> 'a
Porder.po_class.Lub :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b
Porder.po_class.chain :::: (nat \<Rightarrow> 'a) \<Rightarrow> bool
###defs
definition
decisive :: "('a::pcpo \<rightarrow> 'a) \<Rightarrow> bool"
where
"decisive d \<longleftrightarrow> (\<forall>x. d\<cdot>x = x \<or> d\<cdot>x = \<bottom>)"
definition ID :: "'a \<rightarrow> 'a"
where "ID = (\<Lambda> x. x)"
class po = below +
assumes below_refl [iff]: "x \<sqsubseteq> x"
assumes below_trans: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> z \<Longrightarrow> x \<sqsubseteq> z"
assumes below_antisym: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> x \<Longrightarrow> x = y"
begin
class po = below +
assumes below_refl [iff]: "x \<sqsubseteq> x"
assumes below_trans: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> z \<Longrightarrow> x \<sqsubseteq> z"
assumes below_antisym: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> x \<Longrightarrow> x = y"
begin
|
###output
\<lbrakk> ?H1 x_1; ?H2 x_1 = ?H3; \<And>y_1. ?H4 (x_1 y_1)\<rbrakk> \<Longrightarrow> \<exists>y_2. ?H5 (x_1 y_2) x_2 = x_2###end
|
UNITY/Comp/Alloc
|
Alloc.fst_lift_map_eq_fst
|
lemma fst_lift_map_eq_fst [simp]: "fst (lift_map i x) i = fst x"
|
fst (lift_map ?i ?x) ?i = fst ?x
|
?H1 (?H2 x_1 x_2) x_1 = ?H1 x_2
|
[
"Lift_prog.lift_map",
"Product_Type.prod.fst"
] |
[
"nat \\<Rightarrow> 'a \\<times> (nat \\<Rightarrow> 'a) \\<times> 'b \\<Rightarrow> (nat \\<Rightarrow> 'a) \\<times> 'b",
"'a \\<times> 'b \\<Rightarrow> 'a"
] |
[
"definition lift_map :: \"[nat, 'b * ((nat=>'b) * 'c)] => (nat=>'b) * 'c\" where\n \"lift_map i == %(s,(f,uu)). (insert_map i s f, uu)\"",
"definition \"prod = {f. \\<exists>a b. f = Pair_Rep (a::'a) (b::'b)}\""
] |
template
|
###lemma
fst (lift_map ?i ?x) ?i = fst ?x
###symbols
Lift_prog.lift_map :::: nat \<Rightarrow> 'a \<times> (nat \<Rightarrow> 'a) \<times> 'b \<Rightarrow> (nat \<Rightarrow> 'a) \<times> 'b
Product_Type.prod.fst :::: 'a \<times> 'b \<Rightarrow> 'a
###defs
definition lift_map :: "[nat, 'b * ((nat=>'b) * 'c)] => (nat=>'b) * 'c" where
"lift_map i == %(s,(f,uu)). (insert_map i s f, uu)"
definition "prod = {f. \<exists>a b. f = Pair_Rep (a::'a) (b::'b)}"
|
###output
?H1 (?H2 x_1 x_2) x_1 = ?H1 x_2###end
|
Analysis/Set_Integral
|
Set_Integral.set_integrable_mult_right_iff
|
lemma set_integrable_mult_right_iff [simp]:
fixes a :: "'a::{real_normed_field, second_countable_topology}"
assumes "a \<noteq> 0"
shows "set_integrable M A (\<lambda>t. a * f t) \<longleftrightarrow> set_integrable M A f"
|
?a \<noteq> (0:: ?'a) \<Longrightarrow> set_integrable ?M ?A (\<lambda>t. ?a * ?f t) = set_integrable ?M ?A ?f
|
x_1 \<noteq> ?H1 \<Longrightarrow> ?H2 x_2 x_3 (\<lambda>y_0. ?H3 x_1 (x_4 y_0)) = ?H2 x_2 x_3 x_4
|
[
"Groups.times_class.times",
"Set_Integral.set_integrable",
"Groups.zero_class.zero"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a measure \\<Rightarrow> 'a set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"'a"
] |
[
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
?a \<noteq> (0:: ?'a) \<Longrightarrow> set_integrable ?M ?A (\<lambda>t. ?a * ?f t) = set_integrable ?M ?A ?f
###symbols
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Set_Integral.set_integrable :::: 'a measure \<Rightarrow> 'a set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
Groups.zero_class.zero :::: 'a
###defs
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
class zero =
fixes zero :: 'a ("0")
|
###output
x_1 \<noteq> ?H1 \<Longrightarrow> ?H2 x_2 x_3 (\<lambda>y_0. ?H3 x_1 (x_4 y_0)) = ?H2 x_2 x_3 x_4###end
|
Library/Countable_Set_Type
|
Countable_Set_Type.rel_cset_csingle_iff
|
lemma rel_cset_csingle_iff [simp]: "rel_cset R (csingle x) (csingle y) \<longleftrightarrow> R x y"
|
rel_cset ?R (csingle ?x) (csingle ?y) = ?R ?x ?y
|
?H1 x_1 (?H2 x_2) (?H2 x_3) = x_1 x_2 x_3
|
[
"Countable_Set_Type.csingle",
"Countable_Set_Type.rel_cset"
] |
[
"'a \\<Rightarrow> 'a cset",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a cset \\<Rightarrow> 'b cset \\<Rightarrow> bool"
] |
[
"abbreviation csingle :: \"'a \\<Rightarrow> 'a cset\" where \"csingle x \\<equiv> cinsert x cempty\""
] |
template
|
###lemma
rel_cset ?R (csingle ?x) (csingle ?y) = ?R ?x ?y
###symbols
Countable_Set_Type.csingle :::: 'a \<Rightarrow> 'a cset
Countable_Set_Type.rel_cset :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a cset \<Rightarrow> 'b cset \<Rightarrow> bool
###defs
abbreviation csingle :: "'a \<Rightarrow> 'a cset" where "csingle x \<equiv> cinsert x cempty"
|
###output
?H1 x_1 (?H2 x_2) (?H2 x_3) = x_1 x_2 x_3###end
|
Nonstandard_Analysis/NSComplex
|
NSComplex.hIm_add
|
lemma hIm_add: "\<And>x y. hIm (x + y) = hIm x + hIm y"
|
hIm (?x + ?y) = hIm ?x + hIm ?y
|
?H1 (?H2 x_1 x_2) = ?H2 (?H1 x_1) (?H1 x_2)
|
[
"Groups.plus_class.plus",
"NSComplex.hIm"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"complex star \\<Rightarrow> real star"
] |
[
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"definition hIm :: \"hcomplex \\<Rightarrow> hypreal\"\n where \"hIm = *f* Im\""
] |
template
|
###lemma
hIm (?x + ?y) = hIm ?x + hIm ?y
###symbols
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
NSComplex.hIm :::: complex star \<Rightarrow> real star
###defs
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
definition hIm :: "hcomplex \<Rightarrow> hypreal"
where "hIm = *f* Im"
|
###output
?H1 (?H2 x_1 x_2) = ?H2 (?H1 x_1) (?H1 x_2)###end
|
Analysis/Line_Segment
|
Line_Segment.component_complement_connected
| null |
connected ?S \<Longrightarrow> ?C \<in> components (- ?S) \<Longrightarrow> connected (- ?C)
|
\<lbrakk> ?H1 x_1; x_2 \<in> ?H2 (?H3 x_1)\<rbrakk> \<Longrightarrow> ?H1 (?H3 x_2)
|
[
"Groups.uminus_class.uminus",
"Connected.components",
"Topological_Spaces.topological_space_class.connected"
] |
[
"'a \\<Rightarrow> 'a",
"'a set \\<Rightarrow> 'a set set",
"'a set \\<Rightarrow> bool"
] |
[
"class uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)",
"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
connected ?S \<Longrightarrow> ?C \<in> components (- ?S) \<Longrightarrow> connected (- ?C)
###symbols
Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a
Connected.components :::: 'a set \<Rightarrow> 'a set set
Topological_Spaces.topological_space_class.connected :::: 'a set \<Rightarrow> bool
###defs
class uminus =
fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80)
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; x_2 \<in> ?H2 (?H3 x_1)\<rbrakk> \<Longrightarrow> ?H1 (?H3 x_2)###end
|
Nonstandard_Analysis/HSeries
|
HSeries.sumhr_minus_one_realpow_zero
|
lemma sumhr_minus_one_realpow_zero [simp]: "\<And>N. sumhr (0, N + N, \<lambda>i. (-1) ^ (i + 1)) = 0"
|
sumhr (0, ?N + ?N, \<lambda>i. (- 1) ^ (i + 1)) = 0
|
?H1 (?H2, ?H3 x_1 x_1, \<lambda>y_0. ?H4 (?H5 ?H6) (?H3 y_0 ?H6)) = ?H2
|
[
"Groups.one_class.one",
"Groups.uminus_class.uminus",
"Power.power_class.power",
"Groups.plus_class.plus",
"Groups.zero_class.zero",
"HSeries.sumhr"
] |
[
"'a",
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> nat \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a",
"nat star \\<times> nat star \\<times> (nat \\<Rightarrow> real) \\<Rightarrow> real star"
] |
[
"class one =\n fixes one :: 'a (\"1\")",
"class uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)",
"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 plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"class zero =\n fixes zero :: 'a (\"0\")",
"definition sumhr :: \"hypnat \\<times> hypnat \\<times> (nat \\<Rightarrow> real) \\<Rightarrow> hypreal\"\n where \"sumhr = (\\<lambda>(M,N,f). starfun2 (\\<lambda>m n. sum f {m..<n}) M N)\""
] |
template
|
###lemma
sumhr (0, ?N + ?N, \<lambda>i. (- 1) ^ (i + 1)) = 0
###symbols
Groups.one_class.one :::: 'a
Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a
Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.zero_class.zero :::: 'a
HSeries.sumhr :::: nat star \<times> nat star \<times> (nat \<Rightarrow> real) \<Rightarrow> real star
###defs
class one =
fixes one :: 'a ("1")
class uminus =
fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80)
primrec power :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^" 80)
where
power_0: "a ^ 0 = 1"
| power_Suc: "a ^ Suc n = a * a ^ n"
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
class zero =
fixes zero :: 'a ("0")
definition sumhr :: "hypnat \<times> hypnat \<times> (nat \<Rightarrow> real) \<Rightarrow> hypreal"
where "sumhr = (\<lambda>(M,N,f). starfun2 (\<lambda>m n. sum f {m..<n}) M N)"
|
###output
?H1 (?H2, ?H3 x_1 x_1, \<lambda>y_0. ?H4 (?H5 ?H6) (?H3 y_0 ?H6)) = ?H2###end
|
Decision_Procs/Approximation_Bounds
|
Approximation_Bounds.get_odd_ex
|
lemma get_odd_ex: "\<exists> k. Suc k = get_odd n \<and> odd (Suc k)"
|
\<exists>k. Suc k = get_odd ?n \<and> odd (Suc k)
|
\<exists>y_0. ?H1 y_0 = ?H2 x_1 \<and> ?H3 (?H1 y_0)
|
[
"Parity.semiring_parity_class.odd",
"Approximation_Bounds.get_odd",
"Nat.Suc"
] |
[
"'a \\<Rightarrow> bool",
"nat \\<Rightarrow> nat",
"nat \\<Rightarrow> nat"
] |
[
"class semiring_parity = comm_semiring_1 + semiring_modulo +\n assumes mod_2_eq_odd: \\<open>a mod 2 = of_bool (\\<not> 2 dvd a)\\<close>\n and odd_one [simp]: \\<open>\\<not> 2 dvd 1\\<close>\n and even_half_succ_eq [simp]: \\<open>2 dvd a \\<Longrightarrow> (1 + a) div 2 = a div 2\\<close>\nbegin",
"definition get_odd :: \"nat \\<Rightarrow> nat\" where\n \"get_odd n = (if odd n then n else (Suc n))\"",
"definition Suc :: \"nat \\<Rightarrow> nat\"\n where \"Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))\""
] |
template
|
###lemma
\<exists>k. Suc k = get_odd ?n \<and> odd (Suc k)
###symbols
Parity.semiring_parity_class.odd :::: 'a \<Rightarrow> bool
Approximation_Bounds.get_odd :::: nat \<Rightarrow> nat
Nat.Suc :::: nat \<Rightarrow> nat
###defs
class semiring_parity = comm_semiring_1 + semiring_modulo +
assumes mod_2_eq_odd: \<open>a mod 2 = of_bool (\<not> 2 dvd a)\<close>
and odd_one [simp]: \<open>\<not> 2 dvd 1\<close>
and even_half_succ_eq [simp]: \<open>2 dvd a \<Longrightarrow> (1 + a) div 2 = a div 2\<close>
begin
definition get_odd :: "nat \<Rightarrow> nat" where
"get_odd n = (if odd n then n else (Suc n))"
definition Suc :: "nat \<Rightarrow> nat"
where "Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))"
|
###output
\<exists>y_0. ?H1 y_0 = ?H2 x_1 \<and> ?H3 (?H1 y_0)###end
|
Decision_Procs/Parametric_Ferrante_Rackoff
|
Parametric_Ferrante_Rackoff.tmmul
|
lemma tmmul[simp]: "Itm vs bs (tmmul t i) = Itm vs bs (Mul i t)"
|
Itm ?vs ?bs (tmmul ?t ?i) = Itm ?vs ?bs (tm.Mul ?i ?t)
|
?H1 x_1 x_2 (?H2 x_3 x_4) = ?H1 x_1 x_2 (?H3 x_4 x_3)
|
[
"Parametric_Ferrante_Rackoff.tm.Mul",
"Parametric_Ferrante_Rackoff.tmmul",
"Parametric_Ferrante_Rackoff.Itm"
] |
[
"poly \\<Rightarrow> tm \\<Rightarrow> tm",
"tm \\<Rightarrow> poly \\<Rightarrow> tm",
"'a list \\<Rightarrow> 'a list \\<Rightarrow> tm \\<Rightarrow> 'a"
] |
[
"datatype (plugins del: size) tm = CP poly | Bound nat | Add tm tm | Mul poly tm\n | Neg tm | Sub tm tm | CNP nat poly tm",
"fun tmmul:: \"tm \\<Rightarrow> poly \\<Rightarrow> tm\"\n where\n \"tmmul (CP j) = (\\<lambda>i. CP (i *\\<^sub>p j))\"\n | \"tmmul (CNP n c a) = (\\<lambda>i. CNP n (i *\\<^sub>p c) (tmmul a i))\"\n | \"tmmul t = (\\<lambda>i. Mul i t)\"",
"primrec Itm :: \"'a::field_char_0 list \\<Rightarrow> 'a list \\<Rightarrow> tm \\<Rightarrow> 'a\"\n where\n \"Itm vs bs (CP c) = (Ipoly vs c)\"\n | \"Itm vs bs (Bound n) = bs!n\"\n | \"Itm vs bs (Neg a) = -(Itm vs bs a)\"\n | \"Itm vs bs (Add a b) = Itm vs bs a + Itm vs bs b\"\n | \"Itm vs bs (Sub a b) = Itm vs bs a - Itm vs bs b\"\n | \"Itm vs bs (Mul c a) = (Ipoly vs c) * Itm vs bs a\"\n | \"Itm vs bs (CNP n c t) = (Ipoly vs c)*(bs!n) + Itm vs bs t\""
] |
template
|
###lemma
Itm ?vs ?bs (tmmul ?t ?i) = Itm ?vs ?bs (tm.Mul ?i ?t)
###symbols
Parametric_Ferrante_Rackoff.tm.Mul :::: poly \<Rightarrow> tm \<Rightarrow> tm
Parametric_Ferrante_Rackoff.tmmul :::: tm \<Rightarrow> poly \<Rightarrow> tm
Parametric_Ferrante_Rackoff.Itm :::: 'a list \<Rightarrow> 'a list \<Rightarrow> tm \<Rightarrow> 'a
###defs
datatype (plugins del: size) tm = CP poly | Bound nat | Add tm tm | Mul poly tm
| Neg tm | Sub tm tm | CNP nat poly tm
fun tmmul:: "tm \<Rightarrow> poly \<Rightarrow> tm"
where
"tmmul (CP j) = (\<lambda>i. CP (i *\<^sub>p j))"
| "tmmul (CNP n c a) = (\<lambda>i. CNP n (i *\<^sub>p c) (tmmul a i))"
| "tmmul t = (\<lambda>i. Mul i t)"
primrec Itm :: "'a::field_char_0 list \<Rightarrow> 'a list \<Rightarrow> tm \<Rightarrow> 'a"
where
"Itm vs bs (CP c) = (Ipoly vs c)"
| "Itm vs bs (Bound n) = bs!n"
| "Itm vs bs (Neg a) = -(Itm vs bs a)"
| "Itm vs bs (Add a b) = Itm vs bs a + Itm vs bs b"
| "Itm vs bs (Sub a b) = Itm vs bs a - Itm vs bs b"
| "Itm vs bs (Mul c a) = (Ipoly vs c) * Itm vs bs a"
| "Itm vs bs (CNP n c t) = (Ipoly vs c)*(bs!n) + Itm vs bs t"
|
###output
?H1 x_1 x_2 (?H2 x_3 x_4) = ?H1 x_1 x_2 (?H3 x_4 x_3)###end
|
Analysis/Cross3
|
Cross3.cross3_simps(45)
| null |
(?a + ?b) *s ?x = ?a *s ?x + ?b *s ?x
|
?H1 (?H2 x_1 x_2) x_3 = ?H2 (?H1 x_1 x_3) (?H1 x_2 x_3)
|
[
"Groups.plus_class.plus",
"Finite_Cartesian_Product.vector_scalar_mult"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> ('a, 'b) vec \\<Rightarrow> ('a, 'b) vec"
] |
[
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"definition vector_scalar_mult:: \"'a::times \\<Rightarrow> 'a ^ 'n \\<Rightarrow> 'a ^ 'n\" (infixl \"*s\" 70)\n where \"c *s x = (\\<chi> i. c * (x$i))\""
] |
template
|
###lemma
(?a + ?b) *s ?x = ?a *s ?x + ?b *s ?x
###symbols
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Finite_Cartesian_Product.vector_scalar_mult :::: 'a \<Rightarrow> ('a, 'b) vec \<Rightarrow> ('a, 'b) vec
###defs
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
definition vector_scalar_mult:: "'a::times \<Rightarrow> 'a ^ 'n \<Rightarrow> 'a ^ 'n" (infixl "*s" 70)
where "c *s x = (\<chi> i. c * (x$i))"
|
###output
?H1 (?H2 x_1 x_2) x_3 = ?H2 (?H1 x_1 x_3) (?H1 x_2 x_3)###end
|
Library/Multiset_Order
|
Multiset_Order.multp\<^sub>H\<^sub>O_iff_set_mset_less\<^sub>H\<^sub>O_set_mset
| null |
multp\<^sub>H\<^sub>O ?R ?M1.0 ?M2.0 = (set_mset (?M1.0 - ?M2.0) \<noteq> set_mset (?M2.0 - ?M1.0) \<and> (\<forall>y\<in># ?M1.0 - ?M2.0. \<exists>x\<in># ?M2.0 - ?M1.0. ?R y x))
|
?H1 x_1 x_2 x_3 = (?H2 (?H3 x_2 x_3) \<noteq> ?H2 (?H3 x_3 x_2) \<and> ?H4 (?H3 x_2 x_3) (\<lambda>y_0. ?H5 (?H3 x_3 x_2) (x_1 y_0)))
|
[
"Multiset.Bex",
"Multiset.Ball",
"Groups.minus_class.minus",
"Multiset.set_mset",
"Multiset_Order.multp\\<^sub>H\\<^sub>O"
] |
[
"'a multiset \\<Rightarrow> ('a \\<Rightarrow> bool) \\<Rightarrow> bool",
"'a multiset \\<Rightarrow> ('a \\<Rightarrow> bool) \\<Rightarrow> bool",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a multiset \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> 'a multiset \\<Rightarrow> 'a multiset \\<Rightarrow> bool"
] |
[
"abbreviation Bex :: \"'a multiset \\<Rightarrow> ('a \\<Rightarrow> bool) \\<Rightarrow> bool\"\n where \"Bex M \\<equiv> Set.Bex (set_mset M)\"",
"abbreviation Ball :: \"'a multiset \\<Rightarrow> ('a \\<Rightarrow> bool) \\<Rightarrow> bool\"\n where \"Ball M \\<equiv> Set.Ball (set_mset M)\"",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)",
"definition set_mset :: \\<open>'a multiset \\<Rightarrow> 'a set\\<close>\n where \\<open>set_mset M = {x. count M x > 0}\\<close>",
"definition multp\\<^sub>H\\<^sub>O where\n \"multp\\<^sub>H\\<^sub>O r M N \\<longleftrightarrow> M \\<noteq> N \\<and> (\\<forall>y. count N y < count M y \\<longrightarrow> (\\<exists>x. r y x \\<and> count M x < count N x))\""
] |
template
|
###lemma
multp\<^sub>H\<^sub>O ?R ?M1.0 ?M2.0 = (set_mset (?M1.0 - ?M2.0) \<noteq> set_mset (?M2.0 - ?M1.0) \<and> (\<forall>y\<in># ?M1.0 - ?M2.0. \<exists>x\<in># ?M2.0 - ?M1.0. ?R y x))
###symbols
Multiset.Bex :::: 'a multiset \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool
Multiset.Ball :::: 'a multiset \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Multiset.set_mset :::: 'a multiset \<Rightarrow> 'a set
Multiset_Order.multp\<^sub>H\<^sub>O :::: ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> 'a multiset \<Rightarrow> 'a multiset \<Rightarrow> bool
###defs
abbreviation Bex :: "'a multiset \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool"
where "Bex M \<equiv> Set.Bex (set_mset M)"
abbreviation Ball :: "'a multiset \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool"
where "Ball M \<equiv> Set.Ball (set_mset M)"
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
definition set_mset :: \<open>'a multiset \<Rightarrow> 'a set\<close>
where \<open>set_mset M = {x. count M x > 0}\<close>
definition multp\<^sub>H\<^sub>O where
"multp\<^sub>H\<^sub>O r M N \<longleftrightarrow> M \<noteq> N \<and> (\<forall>y. count N y < count M y \<longrightarrow> (\<exists>x. r y x \<and> count M x < count N x))"
|
###output
?H1 x_1 x_2 x_3 = (?H2 (?H3 x_2 x_3) \<noteq> ?H2 (?H3 x_3 x_2) \<and> ?H4 (?H3 x_2 x_3) (\<lambda>y_0. ?H5 (?H3 x_3 x_2) (x_1 y_0)))###end
|
Analysis/Derivative
|
Derivative.field_differentiable_add
|
lemma field_differentiable_add [derivative_intros]:
assumes "f field_differentiable F" "g field_differentiable F"
shows "(\<lambda>z. f z + g z) field_differentiable F"
|
?f field_differentiable ?F \<Longrightarrow> ?g field_differentiable ?F \<Longrightarrow> (\<lambda>z. ?f z + ?g z) field_differentiable ?F
|
\<lbrakk> ?H1 x_1 x_2; ?H1 x_3 x_2\<rbrakk> \<Longrightarrow> ?H1 (\<lambda>y_0. ?H2 (x_1 y_0) (x_3 y_0)) x_2
|
[
"Groups.plus_class.plus",
"Derivative.field_differentiable"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'a) \\<Rightarrow> 'a filter \\<Rightarrow> bool"
] |
[
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)"
] |
template
|
###lemma
?f field_differentiable ?F \<Longrightarrow> ?g field_differentiable ?F \<Longrightarrow> (\<lambda>z. ?f z + ?g z) field_differentiable ?F
###symbols
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Derivative.field_differentiable :::: ('a \<Rightarrow> 'a) \<Rightarrow> 'a filter \<Rightarrow> bool
###defs
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
|
###output
\<lbrakk> ?H1 x_1 x_2; ?H1 x_3 x_2\<rbrakk> \<Longrightarrow> ?H1 (\<lambda>y_0. ?H2 (x_1 y_0) (x_3 y_0)) x_2###end
|
Bali/State
|
State.globs_upd_gobj_new
|
lemma globs_upd_gobj_new [rule_format (no_asm), simp]:
"globs s r = None \<longrightarrow> globs (upd_gobj r n v s) = globs s"
|
globs ?s ?r = None \<Longrightarrow> globs (upd_gobj ?r ?n ?v ?s) = globs ?s
|
?H1 x_1 x_2 = ?H2 \<Longrightarrow> ?H1 (?H3 x_2 x_3 x_4 x_1) = ?H1 x_1
|
[
"State.upd_gobj",
"Option.option.None",
"State.globs"
] |
[
"oref \\<Rightarrow> vn \\<Rightarrow> val \\<Rightarrow> st \\<Rightarrow> st",
"'a option",
"st \\<Rightarrow> oref \\<Rightarrow> obj option"
] |
[
"definition\n upd_gobj :: \"oref \\<Rightarrow> vn \\<Rightarrow> val \\<Rightarrow> st \\<Rightarrow> st\"\n where \"upd_gobj r n v = case_st (\\<lambda>g l. st (chg_map (upd_obj n v) r g) l)\"",
"datatype 'a option =\n None\n | Some (the: 'a)",
"definition\n globs :: \"st \\<Rightarrow> globs\"\n where \"globs = case_st (\\<lambda>g l. g)\""
] |
template
|
###lemma
globs ?s ?r = None \<Longrightarrow> globs (upd_gobj ?r ?n ?v ?s) = globs ?s
###symbols
State.upd_gobj :::: oref \<Rightarrow> vn \<Rightarrow> val \<Rightarrow> st \<Rightarrow> st
Option.option.None :::: 'a option
State.globs :::: st \<Rightarrow> oref \<Rightarrow> obj option
###defs
definition
upd_gobj :: "oref \<Rightarrow> vn \<Rightarrow> val \<Rightarrow> st \<Rightarrow> st"
where "upd_gobj r n v = case_st (\<lambda>g l. st (chg_map (upd_obj n v) r g) l)"
datatype 'a option =
None
| Some (the: 'a)
definition
globs :: "st \<Rightarrow> globs"
where "globs = case_st (\<lambda>g l. g)"
|
###output
?H1 x_1 x_2 = ?H2 \<Longrightarrow> ?H1 (?H3 x_2 x_3 x_4 x_1) = ?H1 x_1###end
|
Computational_Algebra/Formal_Laurent_Series
|
Formal_Laurent_Series.fls_base_factor_mult_fls_X_intpow(2)
|
lemma fls_base_factor_mult_fls_X_intpow:
fixes f :: "'a::semiring_1 fls"
shows "fls_base_factor (fls_X_intpow i * f) = fls_base_factor f"
and "fls_base_factor (f * fls_X_intpow i) = fls_base_factor f"
|
fls_base_factor (?f * fls_X_intpow ?i) = fls_base_factor ?f
|
?H1 (?H2 x_1 (?H3 x_2)) = ?H1 x_1
|
[
"Formal_Laurent_Series.fls_X_intpow",
"Groups.times_class.times",
"Formal_Laurent_Series.fls_base_factor"
] |
[
"int \\<Rightarrow> 'a fls",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a fls \\<Rightarrow> 'a fls"
] |
[
"abbreviation \"fls_X_intpow \\<equiv> (\\<lambda>i. fls_shift (-i) 1)\"\n\\<comment> \\<open>\n Unifies @{term fls_X} and @{term fls_X_inv} so that @{term \"fls_X_intpow\"} returns the equivalent\n of the implied variable raised to the supplied integer argument of @{term \"fls_X_intpow\"}, whether\n positive or negative.\n\\<close>",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"definition fls_base_factor :: \"('a::zero) fls \\<Rightarrow> 'a fls\"\n where fls_base_factor_def[simp]: \"fls_base_factor f = fls_shift (fls_subdegree f) f\""
] |
template
|
###lemma
fls_base_factor (?f * fls_X_intpow ?i) = fls_base_factor ?f
###symbols
Formal_Laurent_Series.fls_X_intpow :::: int \<Rightarrow> 'a fls
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Formal_Laurent_Series.fls_base_factor :::: 'a fls \<Rightarrow> 'a fls
###defs
abbreviation "fls_X_intpow \<equiv> (\<lambda>i. fls_shift (-i) 1)"
\<comment> \<open>
Unifies @{term fls_X} and @{term fls_X_inv} so that @{term "fls_X_intpow"} returns the equivalent
of the implied variable raised to the supplied integer argument of @{term "fls_X_intpow"}, whether
positive or negative.
\<close>
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
definition fls_base_factor :: "('a::zero) fls \<Rightarrow> 'a fls"
where fls_base_factor_def[simp]: "fls_base_factor f = fls_shift (fls_subdegree f) f"
|
###output
?H1 (?H2 x_1 (?H3 x_2)) = ?H1 x_1###end
|
Nominal/Examples/LocalWeakening
|
LocalWeakening.perm_pi_simp(1)
| null |
?pi \<bullet> rev ?pi \<bullet> ?x = ?x
|
?H1 x_1 (?H1 (?H2 x_1) x_2) = x_2
|
[
"List.rev",
"Nominal.perm"
] |
[
"'a list \\<Rightarrow> 'a list",
"('a \\<times> 'a) list \\<Rightarrow> 'b \\<Rightarrow> 'b"
] |
[
"primrec rev :: \"'a list \\<Rightarrow> 'a list\" where\n\"rev [] = []\" |\n\"rev (x # xs) = rev xs @ [x]\"",
"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> rev ?pi \<bullet> ?x = ?x
###symbols
List.rev :::: 'a list \<Rightarrow> 'a list
Nominal.perm :::: ('a \<times> 'a) list \<Rightarrow> 'b \<Rightarrow> 'b
###defs
primrec rev :: "'a list \<Rightarrow> 'a list" where
"rev [] = []" |
"rev (x # xs) = rev xs @ [x]"
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 (?H1 (?H2 x_1) x_2) = x_2###end
|
Data_Structures/AVL_Set
|
AVL_Set.height_balR2
|
lemma height_balR2:
"\<lbrakk> avl l; avl r; height r \<noteq> height l + 2 \<rbrakk> \<Longrightarrow>
height (balR l a r) = 1 + max (height l) (height r)"
|
avl ?l \<Longrightarrow> avl ?r \<Longrightarrow> height ?r \<noteq> height ?l + 2 \<Longrightarrow> height (balR ?l ?a ?r) = 1 + max (height ?l) (height ?r)
|
\<lbrakk> ?H1 x_1; ?H1 x_2; ?H2 x_2 \<noteq> ?H3 (?H2 x_1) (?H4 (?H5 ?H6))\<rbrakk> \<Longrightarrow> ?H2 (?H7 x_1 x_3 x_2) = ?H3 ?H8 (?H9 (?H2 x_1) (?H2 x_2))
|
[
"Orderings.ord_class.max",
"Groups.one_class.one",
"AVL_Set_Code.balR",
"Num.num.One",
"Num.num.Bit0",
"Num.numeral_class.numeral",
"Groups.plus_class.plus",
"Tree.height_class.height",
"AVL_Set.avl"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a",
"('a \\<times> nat) tree \\<Rightarrow> 'a \\<Rightarrow> ('a \\<times> nat) tree \\<Rightarrow> ('a \\<times> nat) tree",
"num",
"num \\<Rightarrow> num",
"num \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> nat",
"('a \\<times> nat) tree \\<Rightarrow> bool"
] |
[
"class ord =\n fixes less_eq :: \"'a \\<Rightarrow> 'a \\<Rightarrow> bool\"\n and less :: \"'a \\<Rightarrow> 'a \\<Rightarrow> bool\"\nbegin",
"class one =\n fixes one :: 'a (\"1\")",
"definition balR :: \"'a tree_ht \\<Rightarrow> 'a \\<Rightarrow> 'a tree_ht \\<Rightarrow> 'a tree_ht\" where\n\"balR A a BC =\n (if ht BC = ht A + 2 then\n case BC of\n Node B (c, _) C \\<Rightarrow>\n if ht B \\<le> ht C then node (node A a B) c C\n else\n case B of\n Node B\\<^sub>1 (b, _) B\\<^sub>2 \\<Rightarrow> node (node A a B\\<^sub>1) b (node B\\<^sub>2 c C)\n else node A a BC)\"",
"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 plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"class height = fixes height :: \"'a \\<Rightarrow> nat\"",
"fun avl :: \"'a tree_ht \\<Rightarrow> bool\" where\n\"avl Leaf = True\" |\n\"avl (Node l (a,n) r) =\n (abs(int(height l) - int(height r)) \\<le> 1 \\<and>\n n = max (height l) (height r) + 1 \\<and> avl l \\<and> avl r)\""
] |
template
|
###lemma
avl ?l \<Longrightarrow> avl ?r \<Longrightarrow> height ?r \<noteq> height ?l + 2 \<Longrightarrow> height (balR ?l ?a ?r) = 1 + max (height ?l) (height ?r)
###symbols
Orderings.ord_class.max :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.one_class.one :::: 'a
AVL_Set_Code.balR :::: ('a \<times> nat) tree \<Rightarrow> 'a \<Rightarrow> ('a \<times> nat) tree \<Rightarrow> ('a \<times> nat) tree
Num.num.One :::: num
Num.num.Bit0 :::: num \<Rightarrow> num
Num.numeral_class.numeral :::: num \<Rightarrow> 'a
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Tree.height_class.height :::: 'a \<Rightarrow> nat
AVL_Set.avl :::: ('a \<times> nat) tree \<Rightarrow> bool
###defs
class ord =
fixes less_eq :: "'a \<Rightarrow> 'a \<Rightarrow> bool"
and less :: "'a \<Rightarrow> 'a \<Rightarrow> bool"
begin
class one =
fixes one :: 'a ("1")
definition balR :: "'a tree_ht \<Rightarrow> 'a \<Rightarrow> 'a tree_ht \<Rightarrow> 'a tree_ht" where
"balR A a BC =
(if ht BC = ht A + 2 then
case BC of
Node B (c, _) C \<Rightarrow>
if ht B \<le> ht C then node (node A a B) c C
else
case B of
Node B\<^sub>1 (b, _) B\<^sub>2 \<Rightarrow> node (node A a B\<^sub>1) b (node B\<^sub>2 c C)
else node A a BC)"
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 plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
class height = fixes height :: "'a \<Rightarrow> nat"
fun avl :: "'a tree_ht \<Rightarrow> bool" where
"avl Leaf = True" |
"avl (Node l (a,n) r) =
(abs(int(height l) - int(height r)) \<le> 1 \<and>
n = max (height l) (height r) + 1 \<and> avl l \<and> avl r)"
|
###output
\<lbrakk> ?H1 x_1; ?H1 x_2; ?H2 x_2 \<noteq> ?H3 (?H2 x_1) (?H4 (?H5 ?H6))\<rbrakk> \<Longrightarrow> ?H2 (?H7 x_1 x_3 x_2) = ?H3 ?H8 (?H9 (?H2 x_1) (?H2 x_2))###end
|
Transcendental
|
Transcendental.isCont_arcsin
|
lemma isCont_arcsin: "-1 < x \<Longrightarrow> x < 1 \<Longrightarrow> isCont arcsin x"
|
- 1 < ?x \<Longrightarrow> ?x < 1 \<Longrightarrow> isCont arcsin ?x
|
\<lbrakk> ?H1 ?H2 < x_1; x_1 < ?H2\<rbrakk> \<Longrightarrow> ?H3 ?H4 x_1
|
[
"Transcendental.arcsin",
"Topological_Spaces.isCont",
"Groups.one_class.one",
"Groups.uminus_class.uminus"
] |
[
"real \\<Rightarrow> real",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> bool",
"'a",
"'a \\<Rightarrow> 'a"
] |
[
"definition arcsin :: \"real \\<Rightarrow> real\"\n where \"arcsin y = (THE x. -(pi/2) \\<le> x \\<and> x \\<le> pi/2 \\<and> sin x = y)\"",
"abbreviation isCont :: \"('a::t2_space \\<Rightarrow> 'b::topological_space) \\<Rightarrow> 'a \\<Rightarrow> bool\"\n where \"isCont f a \\<equiv> continuous (at a) f\"",
"class one =\n fixes one :: 'a (\"1\")",
"class uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)"
] |
template
|
###lemma
- 1 < ?x \<Longrightarrow> ?x < 1 \<Longrightarrow> isCont arcsin ?x
###symbols
Transcendental.arcsin :::: real \<Rightarrow> real
Topological_Spaces.isCont :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> bool
Groups.one_class.one :::: 'a
Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a
###defs
definition arcsin :: "real \<Rightarrow> real"
where "arcsin y = (THE x. -(pi/2) \<le> x \<and> x \<le> pi/2 \<and> sin x = y)"
abbreviation isCont :: "('a::t2_space \<Rightarrow> 'b::topological_space) \<Rightarrow> 'a \<Rightarrow> bool"
where "isCont f a \<equiv> continuous (at a) f"
class one =
fixes one :: 'a ("1")
class uminus =
fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80)
|
###output
\<lbrakk> ?H1 ?H2 < x_1; x_1 < ?H2\<rbrakk> \<Longrightarrow> ?H3 ?H4 x_1###end
|
Library/FSet
|
FSet.ball_simps(3)
|
lemma ball_simps [simp, no_atp]:
"\<And>A P Q. fBall A (\<lambda>x. P x \<or> Q) = (fBall A P \<or> Q)"
"\<And>A P Q. fBall A (\<lambda>x. P \<or> Q x) = (P \<or> fBall A Q)"
"\<And>A P Q. fBall A (\<lambda>x. P \<longrightarrow> Q x) = (P \<longrightarrow> fBall A Q)"
"\<And>A P Q. fBall A (\<lambda>x. P x \<longrightarrow> Q) = (fBex A P \<longrightarrow> Q)"
"\<And>P. fBall {||} P = True"
"\<And>a B P. fBall (finsert a B) P = (P a \<and> fBall B P)"
"\<And>A P f. fBall (f |`| A) P = fBall A (\<lambda>x. P (f x))"
"\<And>A P. (\<not> fBall A P) = fBex A (\<lambda>x. \<not> P x)"
|
(\<forall>x|\<in>| ?A. ?P \<longrightarrow> ?Q x) = (?P \<longrightarrow> fBall ?A ?Q)
|
?H1 x_1 (\<lambda>y_0. x_2 \<longrightarrow> x_3 y_0) = (x_2 \<longrightarrow> ?H1 x_1 x_3)
|
[
"FSet.Ball"
] |
[
"'a fset \\<Rightarrow> ('a \\<Rightarrow> bool) \\<Rightarrow> bool"
] |
[
"abbreviation Ball :: \"'a fset \\<Rightarrow> ('a \\<Rightarrow> bool) \\<Rightarrow> bool\" where\n \"Ball X \\<equiv> Set.Ball (fset X)\""
] |
template
|
###lemma
(\<forall>x|\<in>| ?A. ?P \<longrightarrow> ?Q x) = (?P \<longrightarrow> fBall ?A ?Q)
###symbols
FSet.Ball :::: 'a fset \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool
###defs
abbreviation Ball :: "'a fset \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool" where
"Ball X \<equiv> Set.Ball (fset X)"
|
###output
?H1 x_1 (\<lambda>y_0. x_2 \<longrightarrow> x_3 y_0) = (x_2 \<longrightarrow> ?H1 x_1 x_3)###end
|
HOLCF/FOCUS/Fstream
|
Fstream.fstream_lub_lemma1
|
lemma fstream_lub_lemma1:
"\<lbrakk>chain Y; (\<Squnion>i. Y i) = a\<leadsto>s\<rbrakk> \<Longrightarrow> \<exists>j t. Y j = a\<leadsto>t"
|
chain ?Y \<Longrightarrow> (\<Squnion>i. ?Y i) = ?a\<leadsto> ?s \<Longrightarrow> \<exists>j t. ?Y j = ?a\<leadsto>t
|
\<lbrakk> ?H1 x_1; ?H2 x_1 = ?H3 x_2 x_3\<rbrakk> \<Longrightarrow> \<exists>y_1 y_2. x_1 y_1 = ?H3 x_2 y_2
|
[
"Fstream.fscons'",
"Porder.po_class.Lub",
"Porder.po_class.chain"
] |
[
"'a \\<Rightarrow> 'a lift stream \\<Rightarrow> 'a lift stream",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b",
"(nat \\<Rightarrow> 'a) \\<Rightarrow> bool"
] |
[
"class po = below +\n assumes below_refl [iff]: \"x \\<sqsubseteq> x\"\n assumes below_trans: \"x \\<sqsubseteq> y \\<Longrightarrow> y \\<sqsubseteq> z \\<Longrightarrow> x \\<sqsubseteq> z\"\n assumes below_antisym: \"x \\<sqsubseteq> y \\<Longrightarrow> y \\<sqsubseteq> x \\<Longrightarrow> x = y\"\nbegin",
"class po = below +\n assumes below_refl [iff]: \"x \\<sqsubseteq> x\"\n assumes below_trans: \"x \\<sqsubseteq> y \\<Longrightarrow> y \\<sqsubseteq> z \\<Longrightarrow> x \\<sqsubseteq> z\"\n assumes below_antisym: \"x \\<sqsubseteq> y \\<Longrightarrow> y \\<sqsubseteq> x \\<Longrightarrow> x = y\"\nbegin"
] |
template
|
###lemma
chain ?Y \<Longrightarrow> (\<Squnion>i. ?Y i) = ?a\<leadsto> ?s \<Longrightarrow> \<exists>j t. ?Y j = ?a\<leadsto>t
###symbols
Fstream.fscons' :::: 'a \<Rightarrow> 'a lift stream \<Rightarrow> 'a lift stream
Porder.po_class.Lub :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b
Porder.po_class.chain :::: (nat \<Rightarrow> 'a) \<Rightarrow> bool
###defs
class po = below +
assumes below_refl [iff]: "x \<sqsubseteq> x"
assumes below_trans: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> z \<Longrightarrow> x \<sqsubseteq> z"
assumes below_antisym: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> x \<Longrightarrow> x = y"
begin
class po = below +
assumes below_refl [iff]: "x \<sqsubseteq> x"
assumes below_trans: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> z \<Longrightarrow> x \<sqsubseteq> z"
assumes below_antisym: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> x \<Longrightarrow> x = y"
begin
|
###output
\<lbrakk> ?H1 x_1; ?H2 x_1 = ?H3 x_2 x_3\<rbrakk> \<Longrightarrow> \<exists>y_1 y_2. x_1 y_1 = ?H3 x_2 y_2###end
|
Nominal/Examples/LocalWeakening
|
LocalWeakening.fresh_eqvt
| null |
?pi \<bullet> ?a \<sharp> ?x = ?pi \<bullet> ?a \<sharp> ?pi \<bullet> ?x
|
?H1 x_1 (?H2 x_2 x_3) = ?H2 (?H1 x_1 x_2) (?H1 x_1 x_3)
|
[
"Nominal.fresh",
"Nominal.perm"
] |
[
"'a \\<Rightarrow> 'b \\<Rightarrow> bool",
"('a \\<times> 'a) list \\<Rightarrow> 'b \\<Rightarrow> 'b"
] |
[
"definition fresh :: \"'x \\<Rightarrow> 'a \\<Rightarrow> bool\" (\\<open>_ \\<sharp> _\\<close> [80,80] 80) where\n \"a \\<sharp> x \\<longleftrightarrow> a \\<notin> supp x\"",
"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> ?a \<sharp> ?x = ?pi \<bullet> ?a \<sharp> ?pi \<bullet> ?x
###symbols
Nominal.fresh :::: 'a \<Rightarrow> 'b \<Rightarrow> bool
Nominal.perm :::: ('a \<times> 'a) list \<Rightarrow> 'b \<Rightarrow> 'b
###defs
definition fresh :: "'x \<Rightarrow> 'a \<Rightarrow> bool" (\<open>_ \<sharp> _\<close> [80,80] 80) where
"a \<sharp> x \<longleftrightarrow> a \<notin> supp x"
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 (?H2 x_2 x_3) = ?H2 (?H1 x_1 x_2) (?H1 x_1 x_3)###end
|
Library/Multiset
|
Multiset.full_multiset_induct
|
lemma full_multiset_induct [case_names less]:
assumes ih: "\<And>B. \<forall>(A::'a multiset). A \<subset># B \<longrightarrow> P A \<Longrightarrow> P B"
shows "P B"
|
(\<And>B. \<forall>A. A \<subset># B \<longrightarrow> ?P A \<Longrightarrow> ?P B) \<Longrightarrow> ?P ?B
|
(\<And>y_0. \<forall>y_1. ?H1 y_1 y_0 \<longrightarrow> x_1 y_1 \<Longrightarrow> x_1 y_0) \<Longrightarrow> x_1 x_2
|
[
"Multiset.subset_mset"
] |
[
"'a multiset \\<Rightarrow> 'a multiset \\<Rightarrow> bool"
] |
[
"definition subset_mset :: \"'a multiset \\<Rightarrow> 'a multiset \\<Rightarrow> bool\" (infix \"\\<subset>#\" 50)\n where \"A \\<subset># B \\<longleftrightarrow> A \\<subseteq># B \\<and> A \\<noteq> B\""
] |
template
|
###lemma
(\<And>B. \<forall>A. A \<subset># B \<longrightarrow> ?P A \<Longrightarrow> ?P B) \<Longrightarrow> ?P ?B
###symbols
Multiset.subset_mset :::: 'a multiset \<Rightarrow> 'a multiset \<Rightarrow> bool
###defs
definition subset_mset :: "'a multiset \<Rightarrow> 'a multiset \<Rightarrow> bool" (infix "\<subset>#" 50)
where "A \<subset># B \<longleftrightarrow> A \<subseteq># B \<and> A \<noteq> B"
|
###output
(\<And>y_0. \<forall>y_1. ?H1 y_1 y_0 \<longrightarrow> x_1 y_1 \<Longrightarrow> x_1 y_0) \<Longrightarrow> x_1 x_2###end
|
HOLCF/Domain_Aux
|
Domain_Aux.decisive_cases
|
lemma decisive_cases:
assumes "decisive d" obtains "d\<cdot>x = x" | "d\<cdot>x = \<bottom>"
|
decisive ?d \<Longrightarrow> (?d\<cdot> ?x = ?x \<Longrightarrow> ?thesis) \<Longrightarrow> (?d\<cdot> ?x = \<bottom> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
|
\<lbrakk> ?H1 x_1; ?H2 x_1 x_2 = x_2 \<Longrightarrow> x_3; ?H2 x_1 x_2 = ?H3 \<Longrightarrow> x_3\<rbrakk> \<Longrightarrow> x_3
|
[
"Pcpo.pcpo_class.bottom",
"Cfun.cfun.Rep_cfun",
"Domain_Aux.decisive"
] |
[
"'a",
"('a \\<rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> 'b",
"('a \\<rightarrow> 'a) \\<Rightarrow> bool"
] |
[
"class pcpo = cpo +\n assumes least: \"\\<exists>x. \\<forall>y. x \\<sqsubseteq> y\"\nbegin",
"definition\n decisive :: \"('a::pcpo \\<rightarrow> 'a) \\<Rightarrow> bool\"\nwhere\n \"decisive d \\<longleftrightarrow> (\\<forall>x. d\\<cdot>x = x \\<or> d\\<cdot>x = \\<bottom>)\""
] |
template
|
###lemma
decisive ?d \<Longrightarrow> (?d\<cdot> ?x = ?x \<Longrightarrow> ?thesis) \<Longrightarrow> (?d\<cdot> ?x = \<bottom> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
###symbols
Pcpo.pcpo_class.bottom :::: 'a
Cfun.cfun.Rep_cfun :::: ('a \<rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b
Domain_Aux.decisive :::: ('a \<rightarrow> 'a) \<Rightarrow> bool
###defs
class pcpo = cpo +
assumes least: "\<exists>x. \<forall>y. x \<sqsubseteq> y"
begin
definition
decisive :: "('a::pcpo \<rightarrow> 'a) \<Rightarrow> bool"
where
"decisive d \<longleftrightarrow> (\<forall>x. d\<cdot>x = x \<or> d\<cdot>x = \<bottom>)"
|
###output
\<lbrakk> ?H1 x_1; ?H2 x_1 x_2 = x_2 \<Longrightarrow> x_3; ?H2 x_1 x_2 = ?H3 \<Longrightarrow> x_3\<rbrakk> \<Longrightarrow> x_3###end
|
Filter
|
Filter.filterlim_at_top_div_const_nat
|
lemma filterlim_at_top_div_const_nat:
assumes "c > 0"
shows "filterlim (\<lambda>x::nat. x div c) at_top at_top"
|
0 < ?c \<Longrightarrow> LIM x sequentially. x div ?c :> sequentially
|
?H1 < x_1 \<Longrightarrow> ?H2 (\<lambda>y_0. ?H3 y_0 x_1) ?H4 ?H4
|
[
"Filter.sequentially",
"Rings.divide_class.divide",
"Filter.filterlim",
"Groups.zero_class.zero"
] |
[
"nat filter",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b filter \\<Rightarrow> 'a filter \\<Rightarrow> bool",
"'a"
] |
[
"abbreviation sequentially :: \"nat filter\"\n where \"sequentially \\<equiv> at_top\"",
"class divide =\n fixes divide :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"div\" 70)",
"definition filterlim :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b filter \\<Rightarrow> 'a filter \\<Rightarrow> bool\" where\n \"filterlim f F2 F1 \\<longleftrightarrow> filtermap f F1 \\<le> F2\"",
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
0 < ?c \<Longrightarrow> LIM x sequentially. x div ?c :> sequentially
###symbols
Filter.sequentially :::: nat filter
Rings.divide_class.divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Filter.filterlim :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b filter \<Rightarrow> 'a filter \<Rightarrow> bool
Groups.zero_class.zero :::: 'a
###defs
abbreviation sequentially :: "nat filter"
where "sequentially \<equiv> at_top"
class divide =
fixes divide :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "div" 70)
definition filterlim :: "('a \<Rightarrow> 'b) \<Rightarrow> 'b filter \<Rightarrow> 'a filter \<Rightarrow> bool" where
"filterlim f F2 F1 \<longleftrightarrow> filtermap f F1 \<le> F2"
class zero =
fixes zero :: 'a ("0")
|
###output
?H1 < x_1 \<Longrightarrow> ?H2 (\<lambda>y_0. ?H3 y_0 x_1) ?H4 ?H4###end
|
Types_To_Sets/Examples/Finite
|
Finite_Set.bij_betw_finite
| null |
bij_betw ?f ?A ?B \<Longrightarrow> finite ?A = finite ?B
|
?H1 x_1 x_2 x_3 \<Longrightarrow> ?H2 x_2 = ?H2 x_3
|
[
"Finite_Set.finite",
"Fun.bij_betw"
] |
[
"'a set \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set \\<Rightarrow> bool"
] |
[
"class finite =\n assumes finite_UNIV: \"finite (UNIV :: 'a set)\"\nbegin",
"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\""
] |
template
|
###lemma
bij_betw ?f ?A ?B \<Longrightarrow> finite ?A = finite ?B
###symbols
Finite_Set.finite :::: 'a set \<Rightarrow> bool
Fun.bij_betw :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set \<Rightarrow> bool
###defs
class finite =
assumes finite_UNIV: "finite (UNIV :: 'a set)"
begin
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"
|
###output
?H1 x_1 x_2 x_3 \<Longrightarrow> ?H2 x_2 = ?H2 x_3###end
|
Probability/Probability
|
Probability_Measure.distributed_transform_integral
| null |
distributed ?M ?N ?X (\<lambda>x. ennreal (?Px x)) \<Longrightarrow> (\<And>x. x \<in> space ?N \<Longrightarrow> 0 \<le> ?Px x) \<Longrightarrow> distributed ?M ?P ?Y (\<lambda>x. ennreal (?Py x)) \<Longrightarrow> (\<And>x. x \<in> space ?P \<Longrightarrow> 0 \<le> ?Py x) \<Longrightarrow> ?Y = ?T \<circ> ?X \<Longrightarrow> ?T \<in> ?N \<rightarrow>\<^sub>M ?P \<Longrightarrow> ?f \<in> borel_measurable ?P \<Longrightarrow> LINT x| ?P. ?Py x * ?f x = LINT x| ?N. ?Px x * ?f (?T x)
|
\<lbrakk> ?H1 x_1 x_2 x_3 (\<lambda>y_0. ?H2 (x_4 y_0)); \<And>y_1. y_1 \<in> ?H3 x_2 \<Longrightarrow> ?H4 \<le> x_4 y_1; ?H1 x_1 x_5 x_6 (\<lambda>y_2. ?H2 (x_7 y_2)); \<And>y_3. y_3 \<in> ?H3 x_5 \<Longrightarrow> ?H4 \<le> x_7 y_3; x_6 = ?H5 x_8 x_3; x_8 \<in> ?H6 x_2 x_5; x_9 \<in> ?H7 x_5\<rbrakk> \<Longrightarrow> ?H8 x_5 (\<lambda>y_4. ?H9 (x_7 y_4) (x_9 y_4)) = ?H8 x_2 (\<lambda>y_5. ?H9 (x_4 y_5) (x_9 (x_8 y_5)))
|
[
"Groups.times_class.times",
"Bochner_Integration.lebesgue_integral",
"Borel_Space.borel_measurable",
"Sigma_Algebra.measurable",
"Fun.comp",
"Groups.zero_class.zero",
"Sigma_Algebra.space",
"Extended_Nonnegative_Real.ennreal",
"Probability_Measure.distributed"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a measure \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> 'b",
"'a measure \\<Rightarrow> ('a \\<Rightarrow> 'b) set",
"'a measure \\<Rightarrow> 'b measure \\<Rightarrow> ('a \\<Rightarrow> 'b) set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'a) \\<Rightarrow> 'c \\<Rightarrow> 'b",
"'a",
"'a measure \\<Rightarrow> 'a set",
"real \\<Rightarrow> ennreal",
"'a measure \\<Rightarrow> 'b measure \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('b \\<Rightarrow> ennreal) \\<Rightarrow> bool"
] |
[
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"abbreviation \"borel_measurable M \\<equiv> measurable M borel\"",
"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))\"",
"class zero =\n fixes zero :: 'a (\"0\")",
"typedef ennreal = \"{x :: ereal. 0 \\<le> x}\"\n morphisms enn2ereal e2ennreal'",
"definition distributed :: \"'a measure \\<Rightarrow> 'b measure \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('b \\<Rightarrow> ennreal) \\<Rightarrow> bool\"\nwhere\n \"distributed M N X f \\<longleftrightarrow>\n distr M N X = density N f \\<and> f \\<in> borel_measurable N \\<and> X \\<in> measurable M N\""
] |
template
|
###lemma
distributed ?M ?N ?X (\<lambda>x. ennreal (?Px x)) \<Longrightarrow> (\<And>x. x \<in> space ?N \<Longrightarrow> 0 \<le> ?Px x) \<Longrightarrow> distributed ?M ?P ?Y (\<lambda>x. ennreal (?Py x)) \<Longrightarrow> (\<And>x. x \<in> space ?P \<Longrightarrow> 0 \<le> ?Py x) \<Longrightarrow> ?Y = ?T \<circ> ?X \<Longrightarrow> ?T \<in> ?N \<rightarrow>\<^sub>M ?P \<Longrightarrow> ?f \<in> borel_measurable ?P \<Longrightarrow> LINT x| ?P. ?Py x * ?f x = LINT x| ?N. ?Px x * ?f (?T x)
###symbols
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Bochner_Integration.lebesgue_integral :::: 'a measure \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'b
Borel_Space.borel_measurable :::: 'a measure \<Rightarrow> ('a \<Rightarrow> 'b) set
Sigma_Algebra.measurable :::: 'a measure \<Rightarrow> 'b measure \<Rightarrow> ('a \<Rightarrow> 'b) set
Fun.comp :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'a) \<Rightarrow> 'c \<Rightarrow> 'b
Groups.zero_class.zero :::: 'a
Sigma_Algebra.space :::: 'a measure \<Rightarrow> 'a set
Extended_Nonnegative_Real.ennreal :::: real \<Rightarrow> ennreal
Probability_Measure.distributed :::: 'a measure \<Rightarrow> 'b measure \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('b \<Rightarrow> ennreal) \<Rightarrow> bool
###defs
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
abbreviation "borel_measurable M \<equiv> measurable M borel"
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))"
class zero =
fixes zero :: 'a ("0")
typedef ennreal = "{x :: ereal. 0 \<le> x}"
morphisms enn2ereal e2ennreal'
definition distributed :: "'a measure \<Rightarrow> 'b measure \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('b \<Rightarrow> ennreal) \<Rightarrow> bool"
where
"distributed M N X f \<longleftrightarrow>
distr M N X = density N f \<and> f \<in> borel_measurable N \<and> X \<in> measurable M N"
|
###output
\<lbrakk> ?H1 x_1 x_2 x_3 (\<lambda>y_0. ?H2 (x_4 y_0)); \<And>y_1. y_1 \<in> ?H3 x_2 \<Longrightarrow> ?H4 \<le> x_4 y_1; ?H1 x_1 x_5 x_6 (\<lambda>y_2. ?H2 (x_7 y_2)); \<And>y_3. y_3 \<in> ?H3 x_5 \<Longrightarrow> ?H4 \<le> x_7 y_3; x_6 = ?H5 x_8 x_3; x_8 \<in> ?H6 x_2 x_5; x_9 \<in> ?H7 x_5\<rbrakk> \<Longrightarrow> ?H8 x_5 (\<lambda>y_4. ?H9 (x_7 y_4) (x_9 y_4)) = ?H8 x_2 (\<lambda>y_5. ?H9 (x_4 y_5) (x_9 (x_8 y_5)))###end
|
Bali/Decl
|
Decl.acc_modi_bottom
|
lemma acc_modi_bottom: "a \<le> Private \<Longrightarrow> a = Private"
|
?a \<le> Private \<Longrightarrow> ?a = Private
|
x_1 \<le> ?H1 \<Longrightarrow> x_1 = ?H1
|
[
"Decl.acc_modi.Private"
] |
[
"acc_modi"
] |
[
"datatype acc_modi (* access modifier *)\n = Private | Package | Protected | Public"
] |
template
|
###lemma
?a \<le> Private \<Longrightarrow> ?a = Private
###symbols
Decl.acc_modi.Private :::: acc_modi
###defs
datatype acc_modi (* access modifier *)
= Private | Package | Protected | Public
|
###output
x_1 \<le> ?H1 \<Longrightarrow> x_1 = ?H1###end
|
Analysis/Abstract_Topology
|
Abstract_Topology.embedding_map_compose
|
lemma embedding_map_compose:
assumes "embedding_map X X' f" "embedding_map X' X'' g"
shows "embedding_map X X'' (g \<circ> f)"
|
embedding_map ?X ?X' ?f \<Longrightarrow> embedding_map ?X' ?X'' ?g \<Longrightarrow> embedding_map ?X ?X'' (?g \<circ> ?f)
|
\<lbrakk> ?H1 x_1 x_2 x_3; ?H1 x_2 x_4 x_5\<rbrakk> \<Longrightarrow> ?H1 x_1 x_4 (?H2 x_5 x_3)
|
[
"Fun.comp",
"Abstract_Topology.embedding_map"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'a) \\<Rightarrow> 'c \\<Rightarrow> 'b",
"'a topology \\<Rightarrow> 'b topology \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool"
] |
[
"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))\"",
"definition embedding_map\n where \"embedding_map X Y f \\<equiv> homeomorphic_map X (subtopology Y (f ` (topspace X))) f\""
] |
template
|
###lemma
embedding_map ?X ?X' ?f \<Longrightarrow> embedding_map ?X' ?X'' ?g \<Longrightarrow> embedding_map ?X ?X'' (?g \<circ> ?f)
###symbols
Fun.comp :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'a) \<Rightarrow> 'c \<Rightarrow> 'b
Abstract_Topology.embedding_map :::: 'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
###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))"
definition embedding_map
where "embedding_map X Y f \<equiv> homeomorphic_map X (subtopology Y (f ` (topspace X))) f"
|
###output
\<lbrakk> ?H1 x_1 x_2 x_3; ?H1 x_2 x_4 x_5\<rbrakk> \<Longrightarrow> ?H1 x_1 x_4 (?H2 x_5 x_3)###end
|
Algebra/Lattice
|
Lattices_Big.ex_has_greatest_nat_lemma
| null |
?P ?k \<Longrightarrow> \<forall>x. ?P x \<longrightarrow> (\<exists>y. ?P y \<and> \<not> ?f y \<le> ?f x) \<Longrightarrow> \<exists>y. ?P y \<and> \<not> ?f y < ?f ?k + ?n
|
\<lbrakk>x_1 x_2; \<forall>y_0. x_1 y_0 \<longrightarrow> (\<exists>y_1. x_1 y_1 \<and> \<not> x_3 y_1 \<le> x_3 y_0)\<rbrakk> \<Longrightarrow> \<exists>y_2. x_1 y_2 \<and> \<not> x_3 y_2 < ?H1 (x_3 x_2) x_4
|
[
"Groups.plus_class.plus"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a"
] |
[
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)"
] |
template
|
###lemma
?P ?k \<Longrightarrow> \<forall>x. ?P x \<longrightarrow> (\<exists>y. ?P y \<and> \<not> ?f y \<le> ?f x) \<Longrightarrow> \<exists>y. ?P y \<and> \<not> ?f y < ?f ?k + ?n
###symbols
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
###defs
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
|
###output
\<lbrakk>x_1 x_2; \<forall>y_0. x_1 y_0 \<longrightarrow> (\<exists>y_1. x_1 y_1 \<and> \<not> x_3 y_1 \<le> x_3 y_0)\<rbrakk> \<Longrightarrow> \<exists>y_2. x_1 y_2 \<and> \<not> x_3 y_2 < ?H1 (x_3 x_2) x_4###end
|
Library/Extended_Real
|
Extended_Real.ereal_power_divide
|
lemma ereal_power_divide:
fixes x y :: ereal
shows "y \<noteq> 0 \<Longrightarrow> (x / y) ^ n = x^n / y^n"
|
?y \<noteq> 0 \<Longrightarrow> (?x / ?y) ^ ?n = ?x ^ ?n / ?y ^ ?n
|
x_1 \<noteq> ?H1 \<Longrightarrow> ?H2 (?H3 x_2 x_1) x_3 = ?H3 (?H2 x_2 x_3) (?H2 x_1 x_3)
|
[
"Fields.inverse_class.inverse_divide",
"Power.power_class.power",
"Groups.zero_class.zero"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> nat \\<Rightarrow> 'a",
"'a"
] |
[
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"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 zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
?y \<noteq> 0 \<Longrightarrow> (?x / ?y) ^ ?n = ?x ^ ?n / ?y ^ ?n
###symbols
Fields.inverse_class.inverse_divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a
Groups.zero_class.zero :::: 'a
###defs
class inverse = divide +
fixes inverse :: "'a \<Rightarrow> 'a"
begin
primrec power :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^" 80)
where
power_0: "a ^ 0 = 1"
| power_Suc: "a ^ Suc n = a * a ^ n"
class zero =
fixes zero :: 'a ("0")
|
###output
x_1 \<noteq> ?H1 \<Longrightarrow> ?H2 (?H3 x_2 x_1) x_3 = ?H3 (?H2 x_2 x_3) (?H2 x_1 x_3)###end
|
Nonstandard_Analysis/CLim
|
CLim.star_of_Im
|
lemma star_of_Im [simp]: "star_of (Im x) = hIm (star_of x)"
|
hypreal_of_real (Im ?x) = hIm (hcomplex_of_complex ?x)
|
?H1 (?H2 x_1) = ?H3 (?H4 x_1)
|
[
"NSComplex.hcomplex_of_complex",
"NSComplex.hIm",
"Complex.complex.Im",
"HyperDef.hypreal_of_real"
] |
[
"complex \\<Rightarrow> complex star",
"complex star \\<Rightarrow> real star",
"complex \\<Rightarrow> real",
"real \\<Rightarrow> real star"
] |
[
"abbreviation hcomplex_of_complex :: \"complex \\<Rightarrow> complex star\"\n where \"hcomplex_of_complex \\<equiv> star_of\"",
"definition hIm :: \"hcomplex \\<Rightarrow> hypreal\"\n where \"hIm = *f* Im\"",
"codatatype complex = Complex (Re: real) (Im: real)",
"abbreviation hypreal_of_real :: \"real \\<Rightarrow> real star\"\n where \"hypreal_of_real \\<equiv> star_of\""
] |
template
|
###lemma
hypreal_of_real (Im ?x) = hIm (hcomplex_of_complex ?x)
###symbols
NSComplex.hcomplex_of_complex :::: complex \<Rightarrow> complex star
NSComplex.hIm :::: complex star \<Rightarrow> real star
Complex.complex.Im :::: complex \<Rightarrow> real
HyperDef.hypreal_of_real :::: real \<Rightarrow> real star
###defs
abbreviation hcomplex_of_complex :: "complex \<Rightarrow> complex star"
where "hcomplex_of_complex \<equiv> star_of"
definition hIm :: "hcomplex \<Rightarrow> hypreal"
where "hIm = *f* Im"
codatatype complex = Complex (Re: real) (Im: real)
abbreviation hypreal_of_real :: "real \<Rightarrow> real star"
where "hypreal_of_real \<equiv> star_of"
|
###output
?H1 (?H2 x_1) = ?H3 (?H4 x_1)###end
|
List
|
List.sorted_wrt_iff_nth_less
|
lemma sorted_wrt_iff_nth_less:
"sorted_wrt P xs = (\<forall>i j. i < j \<longrightarrow> j < length xs \<longrightarrow> P (xs ! i) (xs ! j))"
|
sorted_wrt ?P ?xs = (\<forall>i j. i < j \<longrightarrow> j < length ?xs \<longrightarrow> ?P (?xs ! i) (?xs ! j))
|
?H1 x_1 x_2 = (\<forall>y_0 y_1. y_0 < y_1 \<longrightarrow> y_1 < ?H2 x_2 \<longrightarrow> x_1 (?H3 x_2 y_0) (?H3 x_2 y_1))
|
[
"List.nth",
"List.length",
"List.sorted_wrt"
] |
[
"'a list \\<Rightarrow> nat \\<Rightarrow> 'a",
"'a list \\<Rightarrow> nat",
"('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> bool"
] |
[
"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>",
"abbreviation length :: \"'a list \\<Rightarrow> nat\" where\n\"length \\<equiv> size\"",
"fun sorted_wrt :: \"('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> bool\" where\n\"sorted_wrt P [] = True\" |\n\"sorted_wrt P (x # ys) = ((\\<forall>y \\<in> set ys. P x y) \\<and> sorted_wrt P ys)\""
] |
template
|
###lemma
sorted_wrt ?P ?xs = (\<forall>i j. i < j \<longrightarrow> j < length ?xs \<longrightarrow> ?P (?xs ! i) (?xs ! j))
###symbols
List.nth :::: 'a list \<Rightarrow> nat \<Rightarrow> 'a
List.length :::: 'a list \<Rightarrow> nat
List.sorted_wrt :::: ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> bool
###defs
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>
abbreviation length :: "'a list \<Rightarrow> nat" where
"length \<equiv> size"
fun sorted_wrt :: "('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> bool" where
"sorted_wrt P [] = True" |
"sorted_wrt P (x # ys) = ((\<forall>y \<in> set ys. P x y) \<and> sorted_wrt P ys)"
|
###output
?H1 x_1 x_2 = (\<forall>y_0 y_1. y_0 < y_1 \<longrightarrow> y_1 < ?H2 x_2 \<longrightarrow> x_1 (?H3 x_2 y_0) (?H3 x_2 y_1))###end
|
Analysis/Cartesian_Euclidean_Space
|
Cartesian_Euclidean_Space.component_le_infnorm_cart
|
lemma component_le_infnorm_cart: "\<bar>x$i\<bar> \<le> infnorm (x::real^'n)"
|
\<bar> ?x $ ?i\<bar> \<le> infnorm ?x
|
?H1 (?H2 x_1 x_2) \<le> ?H3 x_1
|
[
"Linear_Algebra.infnorm",
"Finite_Cartesian_Product.vec.vec_nth",
"Groups.abs_class.abs"
] |
[
"'a \\<Rightarrow> real",
"('a, 'b) vec \\<Rightarrow> 'b \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a"
] |
[
"definition \"vec x = (\\<chi> i. x)\"",
"class abs =\n fixes abs :: \"'a \\<Rightarrow> 'a\" (\"\\<bar>_\\<bar>\")"
] |
template
|
###lemma
\<bar> ?x $ ?i\<bar> \<le> infnorm ?x
###symbols
Linear_Algebra.infnorm :::: 'a \<Rightarrow> real
Finite_Cartesian_Product.vec.vec_nth :::: ('a, 'b) vec \<Rightarrow> 'b \<Rightarrow> 'a
Groups.abs_class.abs :::: 'a \<Rightarrow> 'a
###defs
definition "vec x = (\<chi> i. x)"
class abs =
fixes abs :: "'a \<Rightarrow> 'a" ("\<bar>_\<bar>")
|
###output
?H1 (?H2 x_1 x_2) \<le> ?H3 x_1###end
|
Metis_Examples/Message
|
Message.keysFor_synth
|
lemma keysFor_synth [simp]:
"keysFor (synth H) = keysFor H \<union> invKey`{K. Key K \<in> H}"
|
keysFor (synth ?H) = keysFor ?H \<union> invKey ` {K. Key K \<in> ?H}
|
?H1 (?H2 x_1) = ?H3 (?H1 x_1) (?H4 ?H5 (?H6 (\<lambda>y_0. ?H7 y_0 \<in> x_1)))
|
[
"Message.msg.Key",
"Set.Collect",
"Message.invKey",
"Set.image",
"Set.union",
"Message.synth",
"Message.keysFor"
] |
[
"nat \\<Rightarrow> msg",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"nat \\<Rightarrow> nat",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"msg set \\<Rightarrow> msg set",
"msg set \\<Rightarrow> nat set"
] |
[
"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>",
"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 \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<union>\" 65)\n where \"union \\<equiv> sup\"",
"inductive_set\n synth :: \"msg set => msg set\"\n for H :: \"msg set\"\n where\n Inj [intro]: \"X \\<in> H \\<Longrightarrow> X \\<in> synth H\"\n | Agent [intro]: \"Agent agt \\<in> synth H\"\n | Number [intro]: \"Number n \\<in> synth H\"\n | Hash [intro]: \"X \\<in> synth H \\<Longrightarrow> Hash X \\<in> synth H\"\n | MPair [intro]: \"\\<lbrakk>X \\<in> synth H; Y \\<in> synth H\\<rbrakk> \\<Longrightarrow> \\<lbrace>X,Y\\<rbrace> \\<in> synth H\"\n | Crypt [intro]: \"\\<lbrakk>X \\<in> synth H; Key(K) \\<in> H\\<rbrakk> \\<Longrightarrow> Crypt K X \\<in> synth H\"",
"definition keysFor :: \"msg set \\<Rightarrow> key set\" where\n \\<comment> \\<open>Keys useful to decrypt elements of a message set\\<close>\n \"keysFor H == invKey ` {K. \\<exists>X. Crypt K X \\<in> H}\""
] |
template
|
###lemma
keysFor (synth ?H) = keysFor ?H \<union> invKey ` {K. Key K \<in> ?H}
###symbols
Message.msg.Key :::: nat \<Rightarrow> msg
Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set
Message.invKey :::: nat \<Rightarrow> nat
Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set
Set.union :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set
Message.synth :::: msg set \<Rightarrow> msg set
Message.keysFor :::: msg set \<Rightarrow> nat set
###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>
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 \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<union>" 65)
where "union \<equiv> sup"
inductive_set
synth :: "msg set => msg set"
for H :: "msg set"
where
Inj [intro]: "X \<in> H \<Longrightarrow> X \<in> synth H"
| Agent [intro]: "Agent agt \<in> synth H"
| Number [intro]: "Number n \<in> synth H"
| Hash [intro]: "X \<in> synth H \<Longrightarrow> Hash X \<in> synth H"
| MPair [intro]: "\<lbrakk>X \<in> synth H; Y \<in> synth H\<rbrakk> \<Longrightarrow> \<lbrace>X,Y\<rbrace> \<in> synth H"
| Crypt [intro]: "\<lbrakk>X \<in> synth H; Key(K) \<in> H\<rbrakk> \<Longrightarrow> Crypt K X \<in> synth H"
definition keysFor :: "msg set \<Rightarrow> key set" where
\<comment> \<open>Keys useful to decrypt elements of a message set\<close>
"keysFor H == invKey ` {K. \<exists>X. Crypt K X \<in> H}"
|
###output
?H1 (?H2 x_1) = ?H3 (?H1 x_1) (?H4 ?H5 (?H6 (\<lambda>y_0. ?H7 y_0 \<in> x_1)))###end
|
Predicate_Compile_Examples/Predicate_Compile_Tests
|
Predicate_Compile_Tests.map_prods_hoaux_PPiii_PiioE
| null |
pred.eval (map_prods_hoaux_PPiii_Piio ?x (?xa, ?xb)) ?xc \<Longrightarrow> (map_prods_hoaux ?x (?xa, ?xb, ?xc) \<Longrightarrow> ?P) \<Longrightarrow> ?P
|
\<lbrakk> ?H1 (?H2 x_1 (x_2, x_3)) x_4; ?H3 x_1 (x_2, x_3, x_4) \<Longrightarrow> x_5\<rbrakk> \<Longrightarrow> x_5
|
[
"Predicate_Compile_Tests.map_prods_hoaux",
"Predicate_Compile_Tests.map_prods_hoaux_PPiii_Piio",
"Predicate.pred.eval"
] |
[
"('a \\<times> 'b) \\<times> 'c \\<Rightarrow> 'a \\<times> 'b \\<times> 'c \\<Rightarrow> bool",
"('a \\<times> 'b) \\<times> 'c \\<Rightarrow> 'a \\<times> 'b \\<Rightarrow> 'c Predicate.pred",
"'a Predicate.pred \\<Rightarrow> 'a \\<Rightarrow> bool"
] |
[
"datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: \"'a \\<Rightarrow> bool\")"
] |
template
|
###lemma
pred.eval (map_prods_hoaux_PPiii_Piio ?x (?xa, ?xb)) ?xc \<Longrightarrow> (map_prods_hoaux ?x (?xa, ?xb, ?xc) \<Longrightarrow> ?P) \<Longrightarrow> ?P
###symbols
Predicate_Compile_Tests.map_prods_hoaux :::: ('a \<times> 'b) \<times> 'c \<Rightarrow> 'a \<times> 'b \<times> 'c \<Rightarrow> bool
Predicate_Compile_Tests.map_prods_hoaux_PPiii_Piio :::: ('a \<times> 'b) \<times> 'c \<Rightarrow> 'a \<times> 'b \<Rightarrow> 'c Predicate.pred
Predicate.pred.eval :::: 'a Predicate.pred \<Rightarrow> 'a \<Rightarrow> bool
###defs
datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: "'a \<Rightarrow> bool")
|
###output
\<lbrakk> ?H1 (?H2 x_1 (x_2, x_3)) x_4; ?H3 x_1 (x_2, x_3, x_4) \<Longrightarrow> x_5\<rbrakk> \<Longrightarrow> x_5###end
|
Matrix_LP/Matrix
|
Matrix.transpose_apply_matrix
|
lemma transpose_apply_matrix: "f 0 = 0 \<Longrightarrow> transpose_matrix (apply_matrix f A) = apply_matrix f (transpose_matrix A)"
|
?f (0:: ?'b) = (0:: ?'a) \<Longrightarrow> transpose_matrix (apply_matrix ?f ?A) = apply_matrix ?f (transpose_matrix ?A)
|
x_1 ?H1 = ?H1 \<Longrightarrow> ?H2 (?H3 x_1 x_2) = ?H3 x_1 (?H2 x_2)
|
[
"Matrix.apply_matrix",
"Matrix.transpose_matrix",
"Groups.zero_class.zero"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a matrix \\<Rightarrow> 'b matrix",
"'a matrix \\<Rightarrow> 'a matrix",
"'a"
] |
[
"definition apply_matrix :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> ('a::zero) matrix \\<Rightarrow> ('b::zero) matrix\" where\n \"apply_matrix f == % A. Abs_matrix (apply_infmatrix f (Rep_matrix A))\"",
"definition transpose_matrix :: \"('a::zero) matrix \\<Rightarrow> 'a matrix\" where\n \"transpose_matrix == Abs_matrix o transpose_infmatrix o Rep_matrix\"",
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
?f (0:: ?'b) = (0:: ?'a) \<Longrightarrow> transpose_matrix (apply_matrix ?f ?A) = apply_matrix ?f (transpose_matrix ?A)
###symbols
Matrix.apply_matrix :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a matrix \<Rightarrow> 'b matrix
Matrix.transpose_matrix :::: 'a matrix \<Rightarrow> 'a matrix
Groups.zero_class.zero :::: 'a
###defs
definition apply_matrix :: "('a \<Rightarrow> 'b) \<Rightarrow> ('a::zero) matrix \<Rightarrow> ('b::zero) matrix" where
"apply_matrix f == % A. Abs_matrix (apply_infmatrix f (Rep_matrix A))"
definition transpose_matrix :: "('a::zero) matrix \<Rightarrow> 'a matrix" where
"transpose_matrix == Abs_matrix o transpose_infmatrix o Rep_matrix"
class zero =
fixes zero :: 'a ("0")
|
###output
x_1 ?H1 = ?H1 \<Longrightarrow> ?H2 (?H3 x_1 x_2) = ?H3 x_1 (?H2 x_2)###end
|
Nominal/Examples/Pattern
|
Pattern.set_pat_vars_supp
|
lemma set_pat_vars_supp: "set (pat_vars p) = supp p"
|
set (pat_vars ?p) = supp ?p
|
?H1 (?H2 x_1) = ?H3 x_1
|
[
"Nominal.supp",
"Pattern.pat_vars",
"List.list.set"
] |
[
"'a \\<Rightarrow> 'b set",
"pat \\<Rightarrow> name list",
"'a list \\<Rightarrow> 'a set"
] |
[
"definition supp :: \"'a \\<Rightarrow> ('x set)\" where \n \"supp x = {a . (infinite {b . [(a,b)]\\<bullet>x \\<noteq> x})}\"",
"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
set (pat_vars ?p) = supp ?p
###symbols
Nominal.supp :::: 'a \<Rightarrow> 'b set
Pattern.pat_vars :::: pat \<Rightarrow> name list
List.list.set :::: 'a list \<Rightarrow> 'a set
###defs
definition supp :: "'a \<Rightarrow> ('x set)" where
"supp x = {a . (infinite {b . [(a,b)]\<bullet>x \<noteq> x})}"
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
?H1 (?H2 x_1) = ?H3 x_1###end
|
Decision_Procs/Parametric_Ferrante_Rackoff
|
Parametric_Ferrante_Rackoff.msubstpos_nb
|
lemma msubstpos_nb:
assumes lp: "islin p"
and tnb: "tmbound0 t"
shows "bound0 (msubstpos p c t)"
|
islin ?p \<Longrightarrow> tmbound0 ?t \<Longrightarrow> bound0 (msubstpos ?p ?c ?t)
|
\<lbrakk> ?H1 x_1; ?H2 x_2\<rbrakk> \<Longrightarrow> ?H3 (?H4 x_1 x_3 x_2)
|
[
"Parametric_Ferrante_Rackoff.msubstpos",
"Parametric_Ferrante_Rackoff.bound0",
"Parametric_Ferrante_Rackoff.tmbound0",
"Parametric_Ferrante_Rackoff.islin"
] |
[
"fm \\<Rightarrow> poly \\<Rightarrow> tm \\<Rightarrow> fm",
"fm \\<Rightarrow> bool",
"tm \\<Rightarrow> bool",
"fm \\<Rightarrow> bool"
] |
[
"fun msubstpos :: \"fm \\<Rightarrow> poly \\<Rightarrow> tm \\<Rightarrow> fm\"\n where\n \"msubstpos (And p q) c t = And (msubstpos p c t) (msubstpos q c t)\"\n | \"msubstpos (Or p q) c t = Or (msubstpos p c t) (msubstpos q c t)\"\n | \"msubstpos (Eq (CNP 0 a r)) c t = msubsteq2 c t a r\"\n | \"msubstpos (NEq (CNP 0 a r)) c t = Not (msubsteq2 c t a r)\"\n | \"msubstpos (Lt (CNP 0 a r)) c t = msubstltpos c t a r\"\n | \"msubstpos (Le (CNP 0 a r)) c t = msubstlepos c t a r\"\n | \"msubstpos p c t = p\"",
"fun bound0:: \"fm \\<Rightarrow> bool\" \\<comment> \\<open>a formula is independent of Bound 0\\<close>\n where\n \"bound0 T = True\"\n | \"bound0 F = True\"\n | \"bound0 (Lt a) = tmbound0 a\"\n | \"bound0 (Le a) = tmbound0 a\"\n | \"bound0 (Eq a) = tmbound0 a\"\n | \"bound0 (NEq a) = tmbound0 a\"\n | \"bound0 (Not p) = bound0 p\"\n | \"bound0 (And p q) = (bound0 p \\<and> bound0 q)\"\n | \"bound0 (Or p q) = (bound0 p \\<and> bound0 q)\"\n | \"bound0 (Imp p q) = ((bound0 p) \\<and> (bound0 q))\"\n | \"bound0 (Iff p q) = (bound0 p \\<and> bound0 q)\"\n | \"bound0 p = False\"",
"primrec tmbound0 :: \"tm \\<Rightarrow> bool\" \\<comment> \\<open>a \\<open>tm\\<close> is \\<^emph>\\<open>independent\\<close> of Bound 0\\<close>\n where\n \"tmbound0 (CP c) = True\"\n | \"tmbound0 (Bound n) = (n>0)\"\n | \"tmbound0 (CNP n c a) = (n\\<noteq>0 \\<and> tmbound0 a)\"\n | \"tmbound0 (Neg a) = tmbound0 a\"\n | \"tmbound0 (Add a b) = (tmbound0 a \\<and> tmbound0 b)\"\n | \"tmbound0 (Sub a b) = (tmbound0 a \\<and> tmbound0 b)\"\n | \"tmbound0 (Mul i a) = tmbound0 a\"",
"fun islin :: \"fm \\<Rightarrow> bool\"\n where\n \"islin (And p q) = (islin p \\<and> islin q \\<and> p \\<noteq> T \\<and> p \\<noteq> F \\<and> q \\<noteq> T \\<and> q \\<noteq> F)\"\n | \"islin (Or p q) = (islin p \\<and> islin q \\<and> p \\<noteq> T \\<and> p \\<noteq> F \\<and> q \\<noteq> T \\<and> q \\<noteq> F)\"\n | \"islin (Eq (CNP 0 c s)) = (isnpoly c \\<and> c \\<noteq> 0\\<^sub>p \\<and> tmbound0 s \\<and> allpolys isnpoly s)\"\n | \"islin (NEq (CNP 0 c s)) = (isnpoly c \\<and> c \\<noteq> 0\\<^sub>p \\<and> tmbound0 s \\<and> allpolys isnpoly s)\"\n | \"islin (Lt (CNP 0 c s)) = (isnpoly c \\<and> c \\<noteq> 0\\<^sub>p \\<and> tmbound0 s \\<and> allpolys isnpoly s)\"\n | \"islin (Le (CNP 0 c s)) = (isnpoly c \\<and> c \\<noteq> 0\\<^sub>p \\<and> tmbound0 s \\<and> allpolys isnpoly s)\"\n | \"islin (Not p) = False\"\n | \"islin (Imp p q) = False\"\n | \"islin (Iff p q) = False\"\n | \"islin p = bound0 p\""
] |
template
|
###lemma
islin ?p \<Longrightarrow> tmbound0 ?t \<Longrightarrow> bound0 (msubstpos ?p ?c ?t)
###symbols
Parametric_Ferrante_Rackoff.msubstpos :::: fm \<Rightarrow> poly \<Rightarrow> tm \<Rightarrow> fm
Parametric_Ferrante_Rackoff.bound0 :::: fm \<Rightarrow> bool
Parametric_Ferrante_Rackoff.tmbound0 :::: tm \<Rightarrow> bool
Parametric_Ferrante_Rackoff.islin :::: fm \<Rightarrow> bool
###defs
fun msubstpos :: "fm \<Rightarrow> poly \<Rightarrow> tm \<Rightarrow> fm"
where
"msubstpos (And p q) c t = And (msubstpos p c t) (msubstpos q c t)"
| "msubstpos (Or p q) c t = Or (msubstpos p c t) (msubstpos q c t)"
| "msubstpos (Eq (CNP 0 a r)) c t = msubsteq2 c t a r"
| "msubstpos (NEq (CNP 0 a r)) c t = Not (msubsteq2 c t a r)"
| "msubstpos (Lt (CNP 0 a r)) c t = msubstltpos c t a r"
| "msubstpos (Le (CNP 0 a r)) c t = msubstlepos c t a r"
| "msubstpos p c t = p"
fun bound0:: "fm \<Rightarrow> bool" \<comment> \<open>a formula is independent of Bound 0\<close>
where
"bound0 T = True"
| "bound0 F = True"
| "bound0 (Lt a) = tmbound0 a"
| "bound0 (Le a) = tmbound0 a"
| "bound0 (Eq a) = tmbound0 a"
| "bound0 (NEq a) = tmbound0 a"
| "bound0 (Not p) = bound0 p"
| "bound0 (And p q) = (bound0 p \<and> bound0 q)"
| "bound0 (Or p q) = (bound0 p \<and> bound0 q)"
| "bound0 (Imp p q) = ((bound0 p) \<and> (bound0 q))"
| "bound0 (Iff p q) = (bound0 p \<and> bound0 q)"
| "bound0 p = False"
primrec tmbound0 :: "tm \<Rightarrow> bool" \<comment> \<open>a \<open>tm\<close> is \<^emph>\<open>independent\<close> of Bound 0\<close>
where
"tmbound0 (CP c) = True"
| "tmbound0 (Bound n) = (n>0)"
| "tmbound0 (CNP n c a) = (n\<noteq>0 \<and> tmbound0 a)"
| "tmbound0 (Neg a) = tmbound0 a"
| "tmbound0 (Add a b) = (tmbound0 a \<and> tmbound0 b)"
| "tmbound0 (Sub a b) = (tmbound0 a \<and> tmbound0 b)"
| "tmbound0 (Mul i a) = tmbound0 a"
fun islin :: "fm \<Rightarrow> bool"
where
"islin (And p q) = (islin p \<and> islin q \<and> p \<noteq> T \<and> p \<noteq> F \<and> q \<noteq> T \<and> q \<noteq> F)"
| "islin (Or p q) = (islin p \<and> islin q \<and> p \<noteq> T \<and> p \<noteq> F \<and> q \<noteq> T \<and> q \<noteq> F)"
| "islin (Eq (CNP 0 c s)) = (isnpoly c \<and> c \<noteq> 0\<^sub>p \<and> tmbound0 s \<and> allpolys isnpoly s)"
| "islin (NEq (CNP 0 c s)) = (isnpoly c \<and> c \<noteq> 0\<^sub>p \<and> tmbound0 s \<and> allpolys isnpoly s)"
| "islin (Lt (CNP 0 c s)) = (isnpoly c \<and> c \<noteq> 0\<^sub>p \<and> tmbound0 s \<and> allpolys isnpoly s)"
| "islin (Le (CNP 0 c s)) = (isnpoly c \<and> c \<noteq> 0\<^sub>p \<and> tmbound0 s \<and> allpolys isnpoly s)"
| "islin (Not p) = False"
| "islin (Imp p q) = False"
| "islin (Iff p q) = False"
| "islin p = bound0 p"
|
###output
\<lbrakk> ?H1 x_1; ?H2 x_2\<rbrakk> \<Longrightarrow> ?H3 (?H4 x_1 x_3 x_2)###end
|
Computational_Algebra/Primes
|
Primes.prime_ge_0_int
|
lemma prime_ge_0_int: "prime p \<Longrightarrow> p \<ge> (0::int)"
|
prime ?p \<Longrightarrow> 0 \<le> ?p
|
?H1 x_1 \<Longrightarrow> ?H2 \<le> x_1
|
[
"Groups.zero_class.zero",
"Factorial_Ring.normalization_semidom_class.prime"
] |
[
"'a",
"'a \\<Rightarrow> bool"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
prime ?p \<Longrightarrow> 0 \<le> ?p
###symbols
Groups.zero_class.zero :::: 'a
Factorial_Ring.normalization_semidom_class.prime :::: 'a \<Rightarrow> bool
###defs
class zero =
fixes zero :: 'a ("0")
|
###output
?H1 x_1 \<Longrightarrow> ?H2 \<le> x_1###end
|
Analysis/Polytope
|
Polytope.polyhedron_Inter
|
lemma polyhedron_Inter [intro,simp]:
"\<lbrakk>finite F; \<And>S. S \<in> F \<Longrightarrow> polyhedron S\<rbrakk> \<Longrightarrow> polyhedron(\<Inter>F)"
|
finite ?F \<Longrightarrow> (\<And>S. S \<in> ?F \<Longrightarrow> polyhedron S) \<Longrightarrow> polyhedron (\<Inter> ?F)
|
\<lbrakk> ?H1 x_1; \<And>y_0. y_0 \<in> x_1 \<Longrightarrow> ?H2 y_0\<rbrakk> \<Longrightarrow> ?H2 (?H3 x_1)
|
[
"Complete_Lattices.Inter",
"Polytope.polyhedron",
"Finite_Set.finite"
] |
[
"'a set set \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> bool",
"'a set \\<Rightarrow> bool"
] |
[
"abbreviation Inter :: \"'a set set \\<Rightarrow> 'a set\" (\"\\<Inter>\")\n where \"\\<Inter>S \\<equiv> \\<Sqinter>S\"",
"class finite =\n assumes finite_UNIV: \"finite (UNIV :: 'a set)\"\nbegin"
] |
template
|
###lemma
finite ?F \<Longrightarrow> (\<And>S. S \<in> ?F \<Longrightarrow> polyhedron S) \<Longrightarrow> polyhedron (\<Inter> ?F)
###symbols
Complete_Lattices.Inter :::: 'a set set \<Rightarrow> 'a set
Polytope.polyhedron :::: 'a set \<Rightarrow> bool
Finite_Set.finite :::: 'a set \<Rightarrow> bool
###defs
abbreviation Inter :: "'a set set \<Rightarrow> 'a set" ("\<Inter>")
where "\<Inter>S \<equiv> \<Sqinter>S"
class finite =
assumes finite_UNIV: "finite (UNIV :: 'a set)"
begin
|
###output
\<lbrakk> ?H1 x_1; \<And>y_0. y_0 \<in> x_1 \<Longrightarrow> ?H2 y_0\<rbrakk> \<Longrightarrow> ?H2 (?H3 x_1)###end
|
Deriv
|
Deriv.derivative_eq_intros(13)
| null |
(?f1 has_derivative ?f'1) (at ?x1 within ?s1) \<Longrightarrow> (?g1 has_derivative ?g'1) (at ?x1 within ?s1) \<Longrightarrow> (\<lambda>h. ?f1 ?x1 * ?g'1 h + ?f'1 h * ?g1 ?x1) = ?g' \<Longrightarrow> ((\<lambda>x. ?f1 x * ?g1 x) has_derivative ?g') (at ?x1 within ?s1)
|
\<lbrakk> ?H1 x_1 x_2 (?H2 x_3 x_4); ?H1 x_5 x_6 (?H2 x_3 x_4); (\<lambda>y_0. ?H3 (?H4 (x_1 x_3) (x_6 y_0)) (?H4 (x_2 y_0) (x_5 x_3))) = x_7\<rbrakk> \<Longrightarrow> ?H1 (\<lambda>y_1. ?H4 (x_1 y_1) (x_5 y_1)) x_7 (?H2 x_3 x_4)
|
[
"Groups.times_class.times",
"Groups.plus_class.plus",
"Topological_Spaces.topological_space_class.at_within",
"Deriv.has_derivative"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a filter",
"('a \\<Rightarrow> 'b) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> 'a filter \\<Rightarrow> bool"
] |
[
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"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",
"definition has_derivative :: \"('a::real_normed_vector \\<Rightarrow> 'b::real_normed_vector) \\<Rightarrow>\n ('a \\<Rightarrow> 'b) \\<Rightarrow> 'a filter \\<Rightarrow> bool\" (infix \"(has'_derivative)\" 50)\n where \"(f has_derivative f') F \\<longleftrightarrow>\n bounded_linear f' \\<and>\n ((\\<lambda>y. ((f y - f (Lim F (\\<lambda>x. x))) - f' (y - Lim F (\\<lambda>x. x))) /\\<^sub>R norm (y - Lim F (\\<lambda>x. x))) \\<longlongrightarrow> 0) F\""
] |
template
|
###lemma
(?f1 has_derivative ?f'1) (at ?x1 within ?s1) \<Longrightarrow> (?g1 has_derivative ?g'1) (at ?x1 within ?s1) \<Longrightarrow> (\<lambda>h. ?f1 ?x1 * ?g'1 h + ?f'1 h * ?g1 ?x1) = ?g' \<Longrightarrow> ((\<lambda>x. ?f1 x * ?g1 x) has_derivative ?g') (at ?x1 within ?s1)
###symbols
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Topological_Spaces.topological_space_class.at_within :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a filter
Deriv.has_derivative :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'a filter \<Rightarrow> bool
###defs
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
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
definition has_derivative :: "('a::real_normed_vector \<Rightarrow> 'b::real_normed_vector) \<Rightarrow>
('a \<Rightarrow> 'b) \<Rightarrow> 'a filter \<Rightarrow> bool" (infix "(has'_derivative)" 50)
where "(f has_derivative f') F \<longleftrightarrow>
bounded_linear f' \<and>
((\<lambda>y. ((f y - f (Lim F (\<lambda>x. x))) - f' (y - Lim F (\<lambda>x. x))) /\<^sub>R norm (y - Lim F (\<lambda>x. x))) \<longlongrightarrow> 0) F"
|
###output
\<lbrakk> ?H1 x_1 x_2 (?H2 x_3 x_4); ?H1 x_5 x_6 (?H2 x_3 x_4); (\<lambda>y_0. ?H3 (?H4 (x_1 x_3) (x_6 y_0)) (?H4 (x_2 y_0) (x_5 x_3))) = x_7\<rbrakk> \<Longrightarrow> ?H1 (\<lambda>y_1. ?H4 (x_1 y_1) (x_5 y_1)) x_7 (?H2 x_3 x_4)###end
|
HOLCF/Lift
|
Lifting.pcr_Domainp
| null |
Domainp ?B = ?P \<Longrightarrow> Domainp (?A OO ?B) = (\<lambda>x. \<exists>y. ?A x y \<and> ?P y)
|
?H1 x_1 = x_2 \<Longrightarrow> ?H1 (?H2 x_3 x_1) = (\<lambda>y_0. \<exists>y_1. x_3 y_0 y_1 \<and> x_2 y_1)
|
[
"Relation.relcompp",
"Relation.Domainp"
] |
[
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'c \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'c \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> bool"
] |
[] |
template
|
###lemma
Domainp ?B = ?P \<Longrightarrow> Domainp (?A OO ?B) = (\<lambda>x. \<exists>y. ?A x y \<and> ?P y)
###symbols
Relation.relcompp :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'c \<Rightarrow> bool
Relation.Domainp :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> bool
###defs
|
###output
?H1 x_1 = x_2 \<Longrightarrow> ?H1 (?H2 x_3 x_1) = (\<lambda>y_0. \<exists>y_1. x_3 y_0 y_1 \<and> x_2 y_1)###end
|
Computational_Algebra/Polynomial
|
Polynomial.monom_power
|
lemma monom_power: "monom c n ^ k = monom (c ^ k) (n * k)"
|
monom ?c ?n ^ ?k = monom (?c ^ ?k) (?n * ?k)
|
?H1 (?H2 x_1 x_2) x_3 = ?H2 (?H1 x_1 x_3) (?H3 x_2 x_3)
|
[
"Groups.times_class.times",
"Polynomial.monom",
"Power.power_class.power"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> nat \\<Rightarrow> 'a poly",
"'a \\<Rightarrow> nat \\<Rightarrow> 'a"
] |
[
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"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\""
] |
template
|
###lemma
monom ?c ?n ^ ?k = monom (?c ^ ?k) (?n * ?k)
###symbols
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Polynomial.monom :::: 'a \<Rightarrow> nat \<Rightarrow> 'a poly
Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a
###defs
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
primrec power :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^" 80)
where
power_0: "a ^ 0 = 1"
| power_Suc: "a ^ Suc n = a * a ^ n"
|
###output
?H1 (?H2 x_1 x_2) x_3 = ?H2 (?H1 x_1 x_3) (?H3 x_2 x_3)###end
|
HOLCF/Tr
|
Transfer.Ex1_parametric
| null |
bi_unique ?A \<Longrightarrow> bi_total ?A \<Longrightarrow> rel_fun (rel_fun ?A (=)) (=) Ex1 Ex1
|
\<lbrakk> ?H1 x_1; ?H2 x_1\<rbrakk> \<Longrightarrow> ?H3 (?H3 x_1 (=)) (=) Ex1 Ex1
|
[
"BNF_Def.rel_fun",
"Transfer.bi_total",
"Transfer.bi_unique"
] |
[
"('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\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_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)\"",
"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> bi_total ?A \<Longrightarrow> rel_fun (rel_fun ?A (=)) (=) Ex1 Ex1
###symbols
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_total :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool
Transfer.bi_unique :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool
###defs
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_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)"
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
\<lbrakk> ?H1 x_1; ?H2 x_1\<rbrakk> \<Longrightarrow> ?H3 (?H3 x_1 (=)) (=) Ex1 Ex1###end
|
Analysis/Elementary_Topology
|
Elementary_Topology.continuous_on_no_limpt
|
lemma continuous_on_no_limpt:
"(\<And>x. \<not> x islimpt S) \<Longrightarrow> continuous_on S f"
|
(\<And>x. \<not> x islimpt ?S) \<Longrightarrow> continuous_on ?S ?f
|
(\<And>y_0. \<not> ?H1 y_0 x_1) \<Longrightarrow> ?H2 x_1 x_2
|
[
"Topological_Spaces.continuous_on",
"Elementary_Topology.topological_space_class.islimpt"
] |
[
"'a set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"'a \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"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))\""
] |
template
|
###lemma
(\<And>x. \<not> x islimpt ?S) \<Longrightarrow> continuous_on ?S ?f
###symbols
Topological_Spaces.continuous_on :::: 'a set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
Elementary_Topology.topological_space_class.islimpt :::: 'a \<Rightarrow> 'a set \<Rightarrow> bool
###defs
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))"
|
###output
(\<And>y_0. \<not> ?H1 y_0 x_1) \<Longrightarrow> ?H2 x_1 x_2###end
|
Combinatorics/Orbits
|
Orbits.funpow_dist1_le_self
|
lemma funpow_dist1_le_self:
assumes "(f ^^ m) x = x" "0 < m" "y \<in> orbit f x"
shows "funpow_dist1 f x y \<le> m"
|
(?f ^^ ?m) ?x = ?x \<Longrightarrow> 0 < ?m \<Longrightarrow> ?y \<in> orbit ?f ?x \<Longrightarrow> funpow_dist1 ?f ?x ?y \<le> ?m
|
\<lbrakk> ?H1 x_1 x_2 x_3 = x_3; ?H2 < x_2; x_4 \<in> ?H3 x_1 x_3\<rbrakk> \<Longrightarrow> ?H4 x_1 x_3 x_4 \<le> x_2
|
[
"Orbits.funpow_dist1",
"Orbits.orbit",
"Groups.zero_class.zero",
"Nat.compower"
] |
[
"('a \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> nat",
"('a \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> 'a set",
"'a",
"'a \\<Rightarrow> nat \\<Rightarrow> 'a"
] |
[
"abbreviation funpow_dist1 :: \"('a \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> nat\" where\n \"funpow_dist1 f x y \\<equiv> Suc (funpow_dist f (f x) y)\"",
"inductive_set orbit :: \"('a \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> 'a set\" for f x where\n base: \"f x \\<in> orbit f x\" |\n step: \"y \\<in> orbit f x \\<Longrightarrow> f y \\<in> orbit f x\"",
"class zero =\n fixes zero :: 'a (\"0\")",
"abbreviation compower :: \"'a \\<Rightarrow> nat \\<Rightarrow> 'a\" (infixr \"^^\" 80)\n where \"f ^^ n \\<equiv> compow n f\""
] |
template
|
###lemma
(?f ^^ ?m) ?x = ?x \<Longrightarrow> 0 < ?m \<Longrightarrow> ?y \<in> orbit ?f ?x \<Longrightarrow> funpow_dist1 ?f ?x ?y \<le> ?m
###symbols
Orbits.funpow_dist1 :::: ('a \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> nat
Orbits.orbit :::: ('a \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> 'a set
Groups.zero_class.zero :::: 'a
Nat.compower :::: 'a \<Rightarrow> nat \<Rightarrow> 'a
###defs
abbreviation funpow_dist1 :: "('a \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> nat" where
"funpow_dist1 f x y \<equiv> Suc (funpow_dist f (f x) y)"
inductive_set orbit :: "('a \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> 'a set" for f x where
base: "f x \<in> orbit f x" |
step: "y \<in> orbit f x \<Longrightarrow> f y \<in> orbit f x"
class zero =
fixes zero :: 'a ("0")
abbreviation compower :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^^" 80)
where "f ^^ n \<equiv> compow n f"
|
###output
\<lbrakk> ?H1 x_1 x_2 x_3 = x_3; ?H2 < x_2; x_4 \<in> ?H3 x_1 x_3\<rbrakk> \<Longrightarrow> ?H4 x_1 x_3 x_4 \<le> x_2###end
|
Analysis/Interval_Integral
|
Interval_Integral.ereal_decseq_approx
|
lemma ereal_decseq_approx:
fixes a b :: ereal
assumes "a < b"
obtains X :: "nat \<Rightarrow> real" where
"decseq X" "\<And>i. a < X i" "\<And>i. X i < b" "X \<longlonglongrightarrow> a"
|
?a < ?b \<Longrightarrow> (\<And>X. decseq X \<Longrightarrow> (\<And>i. ?a < ereal (X i)) \<Longrightarrow> (\<And>i. ereal (X i) < ?b) \<Longrightarrow> (\<lambda>x. ereal (X x)) \<longlonglongrightarrow> ?a \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
|
\<lbrakk>x_1 < x_2; \<And>y_0. \<lbrakk> ?H1 y_0; \<And>y_1. x_1 < ?H2 (y_0 y_1); \<And>y_2. ?H2 (y_0 y_2) < x_2; ?H3 (\<lambda>y_3. ?H2 (y_0 y_3)) x_1\<rbrakk> \<Longrightarrow> x_3\<rbrakk> \<Longrightarrow> x_3
|
[
"Topological_Spaces.topological_space_class.LIMSEQ",
"Extended_Real.ereal.ereal",
"Topological_Spaces.decseq"
] |
[
"(nat \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> bool",
"real \\<Rightarrow> ereal",
"(nat \\<Rightarrow> 'a) \\<Rightarrow> bool"
] |
[
"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",
"datatype ereal = ereal real | PInfty | MInfty",
"abbreviation decseq :: \"(nat \\<Rightarrow> 'a::order) \\<Rightarrow> bool\"\n where \"decseq X \\<equiv> antimono X\""
] |
template
|
###lemma
?a < ?b \<Longrightarrow> (\<And>X. decseq X \<Longrightarrow> (\<And>i. ?a < ereal (X i)) \<Longrightarrow> (\<And>i. ereal (X i) < ?b) \<Longrightarrow> (\<lambda>x. ereal (X x)) \<longlonglongrightarrow> ?a \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
###symbols
Topological_Spaces.topological_space_class.LIMSEQ :::: (nat \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> bool
Extended_Real.ereal.ereal :::: real \<Rightarrow> ereal
Topological_Spaces.decseq :::: (nat \<Rightarrow> 'a) \<Rightarrow> bool
###defs
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
datatype ereal = ereal real | PInfty | MInfty
abbreviation decseq :: "(nat \<Rightarrow> 'a::order) \<Rightarrow> bool"
where "decseq X \<equiv> antimono X"
|
###output
\<lbrakk>x_1 < x_2; \<And>y_0. \<lbrakk> ?H1 y_0; \<And>y_1. x_1 < ?H2 (y_0 y_1); \<And>y_2. ?H2 (y_0 y_2) < x_2; ?H3 (\<lambda>y_3. ?H2 (y_0 y_3)) x_1\<rbrakk> \<Longrightarrow> x_3\<rbrakk> \<Longrightarrow> x_3###end
|
Library/Multiset
|
Multiset.filter_mset_add_mset
|
lemma filter_mset_add_mset [simp]:
"filter_mset P (add_mset x A) =
(if P x then add_mset x (filter_mset P A) else filter_mset P A)"
|
filter_mset ?P (add_mset ?x ?A) = (if ?P ?x then add_mset ?x (filter_mset ?P ?A) else filter_mset ?P ?A)
|
?H1 x_1 (?H2 x_2 x_3) = (if x_1 x_2 then ?H2 x_2 (?H1 x_1 x_3) else ?H1 x_1 x_3)
|
[
"Multiset.add_mset",
"Multiset.filter_mset"
] |
[
"'a \\<Rightarrow> 'a multiset \\<Rightarrow> 'a multiset",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a multiset \\<Rightarrow> 'a multiset"
] |
[] |
template
|
###lemma
filter_mset ?P (add_mset ?x ?A) = (if ?P ?x then add_mset ?x (filter_mset ?P ?A) else filter_mset ?P ?A)
###symbols
Multiset.add_mset :::: 'a \<Rightarrow> 'a multiset \<Rightarrow> 'a multiset
Multiset.filter_mset :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a multiset \<Rightarrow> 'a multiset
###defs
|
###output
?H1 x_1 (?H2 x_2 x_3) = (if x_1 x_2 then ?H2 x_2 (?H1 x_1 x_3) else ?H1 x_1 x_3)###end
|
Analysis/Brouwer_Fixpoint
|
Brouwer_Fixpoint.Borsuk_maps_homotopic_in_path_component
|
lemma Borsuk_maps_homotopic_in_path_component:
assumes "path_component (- S) a b"
shows "homotopic_with_canon (\<lambda>x. True) S (sphere 0 1)
(\<lambda>x. inverse(norm(x-a)) *\<^sub>R (x-a))
(\<lambda>x. inverse(norm(x - b)) *\<^sub>R (x - b))"
|
path_component (- ?S) ?a ?b \<Longrightarrow> homotopic_with_canon (\<lambda>x. True) ?S (sphere (0:: ?'a) 1) (\<lambda>x. (x - ?a) /\<^sub>R norm (x - ?a)) (\<lambda>x. (x - ?b) /\<^sub>R norm (x - ?b))
|
?H1 (?H2 x_1) x_2 x_3 \<Longrightarrow> ?H3 (\<lambda>y_0. True) x_1 (?H4 ?H5 ?H6) (\<lambda>y_1. ?H7 (?H8 y_1 x_2) (?H9 (?H8 y_1 x_2))) (\<lambda>y_2. ?H7 (?H8 y_2 x_3) (?H9 (?H8 y_2 x_3)))
|
[
"Real_Vector_Spaces.norm_class.norm",
"Groups.minus_class.minus",
"Real_Vector_Spaces.scaleR_class.divideR",
"Groups.one_class.one",
"Groups.zero_class.zero",
"Elementary_Metric_Spaces.sphere",
"Homotopy.homotopic_with_canon",
"Groups.uminus_class.uminus",
"Path_Connected.path_component"
] |
[
"'a \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> real \\<Rightarrow> 'a",
"'a",
"'a",
"'a \\<Rightarrow> real \\<Rightarrow> 'a set",
"(('a \\<Rightarrow> 'b) \\<Rightarrow> bool) \\<Rightarrow> 'a set \\<Rightarrow> 'b set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"'a \\<Rightarrow> 'a",
"'a set \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> bool"
] |
[
"class norm =\n fixes norm :: \"'a \\<Rightarrow> real\"",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)",
"class scaleR =\n fixes scaleR :: \"real \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixr \"*\\<^sub>R\" 75)\nbegin",
"class one =\n fixes one :: 'a (\"1\")",
"class zero =\n fixes zero :: 'a (\"0\")",
"abbreviation homotopic_with_canon ::\n \"[('a::topological_space \\<Rightarrow> 'b::topological_space) \\<Rightarrow> bool, 'a set, 'b set, 'a \\<Rightarrow> 'b, 'a \\<Rightarrow> 'b] \\<Rightarrow> bool\"\nwhere\n \"homotopic_with_canon P S T p q \\<equiv> homotopic_with P (top_of_set S) (top_of_set T) p q\"",
"class uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)"
] |
template
|
###lemma
path_component (- ?S) ?a ?b \<Longrightarrow> homotopic_with_canon (\<lambda>x. True) ?S (sphere (0:: ?'a) 1) (\<lambda>x. (x - ?a) /\<^sub>R norm (x - ?a)) (\<lambda>x. (x - ?b) /\<^sub>R norm (x - ?b))
###symbols
Real_Vector_Spaces.norm_class.norm :::: 'a \<Rightarrow> real
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Real_Vector_Spaces.scaleR_class.divideR :::: 'a \<Rightarrow> real \<Rightarrow> 'a
Groups.one_class.one :::: 'a
Groups.zero_class.zero :::: 'a
Elementary_Metric_Spaces.sphere :::: 'a \<Rightarrow> real \<Rightarrow> 'a set
Homotopy.homotopic_with_canon :::: (('a \<Rightarrow> 'b) \<Rightarrow> bool) \<Rightarrow> 'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a
Path_Connected.path_component :::: 'a set \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool
###defs
class norm =
fixes norm :: "'a \<Rightarrow> real"
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
class scaleR =
fixes scaleR :: "real \<Rightarrow> 'a \<Rightarrow> 'a" (infixr "*\<^sub>R" 75)
begin
class one =
fixes one :: 'a ("1")
class zero =
fixes zero :: 'a ("0")
abbreviation homotopic_with_canon ::
"[('a::topological_space \<Rightarrow> 'b::topological_space) \<Rightarrow> bool, 'a set, 'b set, 'a \<Rightarrow> 'b, 'a \<Rightarrow> 'b] \<Rightarrow> bool"
where
"homotopic_with_canon P S T p q \<equiv> homotopic_with P (top_of_set S) (top_of_set T) p q"
class uminus =
fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80)
|
###output
?H1 (?H2 x_1) x_2 x_3 \<Longrightarrow> ?H3 (\<lambda>y_0. True) x_1 (?H4 ?H5 ?H6) (\<lambda>y_1. ?H7 (?H8 y_1 x_2) (?H9 (?H8 y_1 x_2))) (\<lambda>y_2. ?H7 (?H8 y_2 x_3) (?H9 (?H8 y_2 x_3)))###end
|
Probability/Probability
|
Probability_Mass_Function.set_return_pmf
| null |
set_pmf (return_pmf ?x) = { ?x}
|
?H1 (?H2 x_1) = ?H3 x_1 ?H4
|
[
"Set.empty",
"Set.insert",
"Probability_Mass_Function.return_pmf",
"Probability_Mass_Function.set_pmf"
] |
[
"'a set",
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"'a \\<Rightarrow> 'a pmf",
"'a pmf \\<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}\""
] |
template
|
###lemma
set_pmf (return_pmf ?x) = { ?x}
###symbols
Set.empty :::: 'a set
Set.insert :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a set
Probability_Mass_Function.return_pmf :::: 'a \<Rightarrow> 'a pmf
Probability_Mass_Function.set_pmf :::: 'a pmf \<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}"
|
###output
?H1 (?H2 x_1) = ?H3 x_1 ?H4###end
|
Bali/State
|
State.obj_ty_obj_class
|
lemma obj_ty_obj_class: "G\<turnstile>obj_ty obj\<preceq> Class statC = G\<turnstile>obj_class obj \<preceq>\<^sub>C statC"
|
?G\<turnstile>obj_ty ?obj\<preceq>Class ?statC = ?G\<turnstile>obj_class ?obj\<preceq>\<^sub>C ?statC
|
?H1 x_1 (?H2 x_2) (?H3 x_3) = ?H4 x_1 (?H5 x_2) x_3
|
[
"State.obj_class",
"Decl.subclseq_syntax",
"Type.Class",
"State.obj_ty",
"TypeRel.widen"
] |
[
"obj \\<Rightarrow> qtname",
"prog \\<Rightarrow> qtname \\<Rightarrow> qtname \\<Rightarrow> bool",
"qtname \\<Rightarrow> ty",
"obj \\<Rightarrow> ty",
"prog \\<Rightarrow> ty \\<Rightarrow> ty \\<Rightarrow> bool"
] |
[
"definition\n obj_class :: \"obj \\<Rightarrow> qtname\" where\n \"obj_class obj = (case tag obj of \n CInst C \\<Rightarrow> C \n | Arr T k \\<Rightarrow> Object)\"",
"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>*\"",
"abbreviation \"Class C == RefT (ClassT C)\"",
"definition\n obj_ty :: \"obj \\<Rightarrow> ty\" where\n \"obj_ty obj = (case tag obj of \n CInst C \\<Rightarrow> Class C \n | Arr T k \\<Rightarrow> T.[])\"",
"inductive\n widen :: \"ty => ty => bool\" (\"_ \\<preceq> _\" [71,71] 70)\nwhere\n refl [intro!, simp]: \"T \\<preceq> T\"\n| subcls: \"C\\<preceq>C D \\<Longrightarrow> Class C \\<preceq> Class D\"\n| null [intro!]: \"NT \\<preceq> R\""
] |
template
|
###lemma
?G\<turnstile>obj_ty ?obj\<preceq>Class ?statC = ?G\<turnstile>obj_class ?obj\<preceq>\<^sub>C ?statC
###symbols
State.obj_class :::: obj \<Rightarrow> qtname
Decl.subclseq_syntax :::: prog \<Rightarrow> qtname \<Rightarrow> qtname \<Rightarrow> bool
Type.Class :::: qtname \<Rightarrow> ty
State.obj_ty :::: obj \<Rightarrow> ty
TypeRel.widen :::: prog \<Rightarrow> ty \<Rightarrow> ty \<Rightarrow> bool
###defs
definition
obj_class :: "obj \<Rightarrow> qtname" where
"obj_class obj = (case tag obj of
CInst C \<Rightarrow> C
| Arr T k \<Rightarrow> Object)"
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>*"
abbreviation "Class C == RefT (ClassT C)"
definition
obj_ty :: "obj \<Rightarrow> ty" where
"obj_ty obj = (case tag obj of
CInst C \<Rightarrow> Class C
| Arr T k \<Rightarrow> T.[])"
inductive
widen :: "ty => ty => bool" ("_ \<preceq> _" [71,71] 70)
where
refl [intro!, simp]: "T \<preceq> T"
| subcls: "C\<preceq>C D \<Longrightarrow> Class C \<preceq> Class D"
| null [intro!]: "NT \<preceq> R"
|
###output
?H1 x_1 (?H2 x_2) (?H3 x_3) = ?H4 x_1 (?H5 x_2) x_3###end
|
Metis_Examples/Message
|
Message.analz_insert_eq_I
| null |
(\<And>x. x \<in> analz (insert ?X ?H) \<Longrightarrow> x \<in> insert ?X (analz ?H)) \<Longrightarrow> analz (insert ?X ?H) = insert ?X (analz ?H)
|
(\<And>y_0. y_0 \<in> ?H1 (?H2 x_1 x_2) \<Longrightarrow> y_0 \<in> ?H2 x_1 (?H1 x_2)) \<Longrightarrow> ?H1 (?H2 x_1 x_2) = ?H2 x_1 (?H1 x_2)
|
[
"Set.insert",
"Message.analz"
] |
[
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"msg set \\<Rightarrow> msg set"
] |
[
"definition insert :: \"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set\"\n where insert_compr: \"insert a B = {x. x = a \\<or> x \\<in> B}\"",
"inductive_set\n analz :: \"msg set \\<Rightarrow> msg set\"\n for H :: \"msg set\"\n where\n Inj [intro,simp]: \"X \\<in> H \\<Longrightarrow> X \\<in> analz H\"\n | Fst: \"\\<lbrace>X,Y\\<rbrace> \\<in> analz H \\<Longrightarrow> X \\<in> analz H\"\n | Snd: \"\\<lbrace>X,Y\\<rbrace> \\<in> analz H \\<Longrightarrow> Y \\<in> analz H\"\n | Decrypt [dest]: \n \"\\<lbrakk>Crypt K X \\<in> analz H; Key(invKey K) \\<in> analz H\\<rbrakk> \\<Longrightarrow> X \\<in> analz H\""
] |
template
|
###lemma
(\<And>x. x \<in> analz (insert ?X ?H) \<Longrightarrow> x \<in> insert ?X (analz ?H)) \<Longrightarrow> analz (insert ?X ?H) = insert ?X (analz ?H)
###symbols
Set.insert :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a set
Message.analz :::: msg set \<Rightarrow> msg set
###defs
definition insert :: "'a \<Rightarrow> 'a set \<Rightarrow> 'a set"
where insert_compr: "insert a B = {x. x = a \<or> x \<in> B}"
inductive_set
analz :: "msg set \<Rightarrow> msg set"
for H :: "msg set"
where
Inj [intro,simp]: "X \<in> H \<Longrightarrow> X \<in> analz H"
| Fst: "\<lbrace>X,Y\<rbrace> \<in> analz H \<Longrightarrow> X \<in> analz H"
| Snd: "\<lbrace>X,Y\<rbrace> \<in> analz H \<Longrightarrow> Y \<in> analz H"
| Decrypt [dest]:
"\<lbrakk>Crypt K X \<in> analz H; Key(invKey K) \<in> analz H\<rbrakk> \<Longrightarrow> X \<in> analz H"
|
###output
(\<And>y_0. y_0 \<in> ?H1 (?H2 x_1 x_2) \<Longrightarrow> y_0 \<in> ?H2 x_1 (?H1 x_2)) \<Longrightarrow> ?H1 (?H2 x_1 x_2) = ?H2 x_1 (?H1 x_2)###end
|
Real
|
Real.le_nat_floor
|
lemma le_nat_floor: "real x \<le> a \<Longrightarrow> x \<le> nat \<lfloor>a\<rfloor>"
|
real ?x \<le> ?a \<Longrightarrow> ?x \<le> nat \<lfloor> ?a\<rfloor>
|
?H1 x_1 \<le> x_2 \<Longrightarrow> x_1 \<le> ?H2 (?H3 x_2)
|
[
"Archimedean_Field.floor_ceiling_class.floor",
"Int.nat",
"Real.real"
] |
[
"'a \\<Rightarrow> int",
"int \\<Rightarrow> nat",
"nat \\<Rightarrow> real"
] |
[
"class floor_ceiling = archimedean_field +\n fixes floor :: \"'a \\<Rightarrow> int\" (\"\\<lfloor>_\\<rfloor>\")\n assumes floor_correct: \"of_int \\<lfloor>x\\<rfloor> \\<le> x \\<and> x < of_int (\\<lfloor>x\\<rfloor> + 1)\"",
"abbreviation real :: \"nat \\<Rightarrow> real\"\n where \"real \\<equiv> of_nat\""
] |
template
|
###lemma
real ?x \<le> ?a \<Longrightarrow> ?x \<le> nat \<lfloor> ?a\<rfloor>
###symbols
Archimedean_Field.floor_ceiling_class.floor :::: 'a \<Rightarrow> int
Int.nat :::: int \<Rightarrow> nat
Real.real :::: nat \<Rightarrow> real
###defs
class floor_ceiling = archimedean_field +
fixes floor :: "'a \<Rightarrow> int" ("\<lfloor>_\<rfloor>")
assumes floor_correct: "of_int \<lfloor>x\<rfloor> \<le> x \<and> x < of_int (\<lfloor>x\<rfloor> + 1)"
abbreviation real :: "nat \<Rightarrow> real"
where "real \<equiv> of_nat"
|
###output
?H1 x_1 \<le> x_2 \<Longrightarrow> x_1 \<le> ?H2 (?H3 x_2)###end
|
Probability/Hoeffding
|
Hoeffding.prob_neg_binomial_pmf_abs_ge_bound
|
lemma prob_neg_binomial_pmf_abs_ge_bound:
fixes n :: nat and k :: real
defines "\<mu> \<equiv> real n * q / p"
assumes "k \<ge> 0" and n_ge: "n \<ge> p * k * (p\<^sup>2 * k + 1)"
shows "measure_pmf.prob (neg_binomial_pmf n p) {x. \<bar>real x - \<mu>\<bar> \<ge> k} \<le>
2 * exp (-2 * p ^ 3 * k ^ 2 / n)"
|
?p \<in> {0<..<1} \<Longrightarrow> 0 \<le> ?k \<Longrightarrow> ?p * ?k * (?p\<^sup>2 * ?k + 1) \<le> real ?n \<Longrightarrow> measure_pmf.prob (neg_binomial_pmf ?n ?p) {x. ?k \<le> \<bar>real x - real ?n * (1 - ?p) / ?p\<bar>} \<le> 2 * exp (- 2 * ?p ^ 3 * ?k\<^sup>2 / real ?n)
|
\<lbrakk>x_1 \<in> ?H1 ?H2 ?H3; ?H2 \<le> x_2; ?H4 (?H4 x_1 x_2) (?H5 (?H4 (?H6 x_1) x_2) ?H3) \<le> ?H7 x_3\<rbrakk> \<Longrightarrow> ?H8 (?H9 x_3 x_1) (?H10 (\<lambda>y_0. x_2 \<le> ?H11 (?H12 (?H7 y_0) (?H13 (?H4 (?H7 x_3) (?H12 ?H3 x_1)) x_1)))) \<le> ?H4 (?H14 (?H15 ?H16)) (?H17 (?H13 (?H4 (?H4 (?H18 (?H14 (?H15 ?H16))) (?H19 x_1 (?H14 (?H20 ?H16)))) (?H6 x_2)) (?H7 x_3)))
|
[
"Num.num.Bit1",
"Power.power_class.power",
"Groups.uminus_class.uminus",
"Transcendental.exp",
"Num.num.One",
"Num.num.Bit0",
"Num.numeral_class.numeral",
"Fields.inverse_class.inverse_divide",
"Groups.minus_class.minus",
"Groups.abs_class.abs",
"Set.Collect",
"Probability_Mass_Function.neg_binomial_pmf",
"Probability_Mass_Function.measure_pmf.prob",
"Real.real",
"Power.power_class.power2",
"Groups.plus_class.plus",
"Groups.times_class.times",
"Groups.one_class.one",
"Groups.zero_class.zero",
"Set_Interval.ord_class.greaterThanLessThan"
] |
[
"num \\<Rightarrow> num",
"'a \\<Rightarrow> nat \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a",
"num",
"num \\<Rightarrow> num",
"num \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"nat \\<Rightarrow> real \\<Rightarrow> nat pmf",
"'a pmf \\<Rightarrow> 'a set \\<Rightarrow> real",
"nat \\<Rightarrow> real",
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a",
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a set"
] |
[
"datatype num = One | Bit0 num | Bit1 num",
"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 uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)",
"definition exp :: \"'a \\<Rightarrow> 'a::{real_normed_algebra_1,banach}\"\n where \"exp = (\\<lambda>x. \\<Sum>n. x^n /\\<^sub>R fact n)\"",
"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 inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)",
"class abs =\n fixes abs :: \"'a \\<Rightarrow> 'a\" (\"\\<bar>_\\<bar>\")",
"primrec neg_binomial_pmf :: \"nat \\<Rightarrow> real \\<Rightarrow> nat pmf\" where\n \"neg_binomial_pmf 0 p = return_pmf 0\"\n| \"neg_binomial_pmf (Suc n) p =\n map_pmf (\\<lambda>(x,y). (x + y)) (pair_pmf (geometric_pmf p) (neg_binomial_pmf n p))\"",
"abbreviation real :: \"nat \\<Rightarrow> real\"\n where \"real \\<equiv> of_nat\"",
"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 plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"class one =\n fixes one :: 'a (\"1\")",
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
?p \<in> {0<..<1} \<Longrightarrow> 0 \<le> ?k \<Longrightarrow> ?p * ?k * (?p\<^sup>2 * ?k + 1) \<le> real ?n \<Longrightarrow> measure_pmf.prob (neg_binomial_pmf ?n ?p) {x. ?k \<le> \<bar>real x - real ?n * (1 - ?p) / ?p\<bar>} \<le> 2 * exp (- 2 * ?p ^ 3 * ?k\<^sup>2 / real ?n)
###symbols
Num.num.Bit1 :::: num \<Rightarrow> num
Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a
Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a
Transcendental.exp :::: 'a \<Rightarrow> 'a
Num.num.One :::: num
Num.num.Bit0 :::: num \<Rightarrow> num
Num.numeral_class.numeral :::: num \<Rightarrow> 'a
Fields.inverse_class.inverse_divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.abs_class.abs :::: 'a \<Rightarrow> 'a
Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set
Probability_Mass_Function.neg_binomial_pmf :::: nat \<Rightarrow> real \<Rightarrow> nat pmf
Probability_Mass_Function.measure_pmf.prob :::: 'a pmf \<Rightarrow> 'a set \<Rightarrow> real
Real.real :::: nat \<Rightarrow> real
Power.power_class.power2 :::: 'a \<Rightarrow> 'a
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.one_class.one :::: 'a
Groups.zero_class.zero :::: 'a
Set_Interval.ord_class.greaterThanLessThan :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a set
###defs
datatype num = One | Bit0 num | Bit1 num
primrec power :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^" 80)
where
power_0: "a ^ 0 = 1"
| power_Suc: "a ^ Suc n = a * a ^ n"
class uminus =
fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80)
definition exp :: "'a \<Rightarrow> 'a::{real_normed_algebra_1,banach}"
where "exp = (\<lambda>x. \<Sum>n. x^n /\<^sub>R fact n)"
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 inverse = divide +
fixes inverse :: "'a \<Rightarrow> 'a"
begin
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
class abs =
fixes abs :: "'a \<Rightarrow> 'a" ("\<bar>_\<bar>")
primrec neg_binomial_pmf :: "nat \<Rightarrow> real \<Rightarrow> nat pmf" where
"neg_binomial_pmf 0 p = return_pmf 0"
| "neg_binomial_pmf (Suc n) p =
map_pmf (\<lambda>(x,y). (x + y)) (pair_pmf (geometric_pmf p) (neg_binomial_pmf n p))"
abbreviation real :: "nat \<Rightarrow> real"
where "real \<equiv> of_nat"
primrec power :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^" 80)
where
power_0: "a ^ 0 = 1"
| power_Suc: "a ^ Suc n = a * a ^ n"
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
class one =
fixes one :: 'a ("1")
class zero =
fixes zero :: 'a ("0")
|
###output
\<lbrakk>x_1 \<in> ?H1 ?H2 ?H3; ?H2 \<le> x_2; ?H4 (?H4 x_1 x_2) (?H5 (?H4 (?H6 x_1) x_2) ?H3) \<le> ?H7 x_3\<rbrakk> \<Longrightarrow> ?H8 (?H9 x_3 x_1) (?H10 (\<lambda>y_0. x_2 \<le> ?H11 (?H12 (?H7 y_0) (?H13 (?H4 (?H7 x_3) (?H12 ?H3 x_1)) x_1)))) \<le> ?H4 (?H14 (?H15 ?H16)) (?H17 (?H13 (?H4 (?H4 (?H18 (?H14 (?H15 ?H16))) (?H19 x_1 (?H14 (?H20 ?H16)))) (?H6 x_2)) (?H7 x_3)))###end
|
Complex
|
Complex.sgn_eq
|
lemma sgn_eq: "sgn z = z / complex_of_real (cmod z)"
|
sgn ?z = ?z / complex_of_real (cmod ?z)
|
?H1 x_1 = ?H2 x_1 (?H3 (?H4 x_1))
|
[
"Complex.cmod",
"Complex.complex_of_real",
"Fields.inverse_class.inverse_divide",
"Groups.sgn_class.sgn"
] |
[
"complex \\<Rightarrow> real",
"real \\<Rightarrow> complex",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a"
] |
[
"abbreviation cmod :: \"complex \\<Rightarrow> real\"\n where \"cmod \\<equiv> norm\"",
"abbreviation complex_of_real :: \"real \\<Rightarrow> complex\"\n where \"complex_of_real \\<equiv> of_real\"",
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"class sgn =\n fixes sgn :: \"'a \\<Rightarrow> 'a\""
] |
template
|
###lemma
sgn ?z = ?z / complex_of_real (cmod ?z)
###symbols
Complex.cmod :::: complex \<Rightarrow> real
Complex.complex_of_real :::: real \<Rightarrow> complex
Fields.inverse_class.inverse_divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.sgn_class.sgn :::: 'a \<Rightarrow> 'a
###defs
abbreviation cmod :: "complex \<Rightarrow> real"
where "cmod \<equiv> norm"
abbreviation complex_of_real :: "real \<Rightarrow> complex"
where "complex_of_real \<equiv> of_real"
class inverse = divide +
fixes inverse :: "'a \<Rightarrow> 'a"
begin
class sgn =
fixes sgn :: "'a \<Rightarrow> 'a"
|
###output
?H1 x_1 = ?H2 x_1 (?H3 (?H4 x_1))###end
|
Analysis/Retracts
|
Retracts.nullhomotopic_into_rel_frontier_extension
| null |
closed ?S \<Longrightarrow> continuous_on ?S ?f \<Longrightarrow> convex ?T \<Longrightarrow> bounded ?T \<Longrightarrow> ?f ` ?S \<subseteq> rel_frontier ?T \<Longrightarrow> ?S \<noteq> {} \<Longrightarrow> (\<exists>c. homotopic_with_canon (\<lambda>x. True) ?S (rel_frontier ?T) ?f (\<lambda>x. c)) = (\<exists>g. continuous_on UNIV g \<and> range g \<subseteq> rel_frontier ?T \<and> (\<forall>x\<in> ?S. g x = ?f x))
|
\<lbrakk> ?H1 x_1; ?H2 x_1 x_2; ?H3 x_3; ?H4 x_3; ?H5 (?H6 x_2 x_1) (?H7 x_3); x_1 \<noteq> ?H8\<rbrakk> \<Longrightarrow> (\<exists>y_0. ?H9 (\<lambda>y_1. True) x_1 (?H7 x_3) x_2 (\<lambda>y_2. y_0)) = (\<exists>y_3. ?H2 ?H10 y_3 \<and> ?H5 (?H11 y_3) (?H7 x_3) \<and> (\<forall>y_4\<in>x_1. y_3 y_4 = x_2 y_4))
|
[
"Set.range",
"Set.UNIV",
"Homotopy.homotopic_with_canon",
"Set.empty",
"Starlike.rel_frontier",
"Set.image",
"Set.subset_eq",
"Elementary_Metric_Spaces.metric_space_class.bounded",
"Convex.convex",
"Topological_Spaces.continuous_on",
"Topological_Spaces.topological_space_class.closed"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set",
"'a set",
"(('a \\<Rightarrow> 'b) \\<Rightarrow> bool) \\<Rightarrow> 'a set \\<Rightarrow> 'b set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"'a set",
"'a set \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool",
"'a set \\<Rightarrow> bool",
"'a set \\<Rightarrow> bool",
"'a set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"'a set \\<Rightarrow> bool"
] |
[
"abbreviation range :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set\" \\<comment> \\<open>of function\\<close>\n where \"range f \\<equiv> f ` UNIV\"",
"abbreviation UNIV :: \"'a set\"\n where \"UNIV \\<equiv> top\"",
"abbreviation homotopic_with_canon ::\n \"[('a::topological_space \\<Rightarrow> 'b::topological_space) \\<Rightarrow> bool, 'a set, 'b set, 'a \\<Rightarrow> 'b, 'a \\<Rightarrow> 'b] \\<Rightarrow> bool\"\nwhere\n \"homotopic_with_canon P S T p q \\<equiv> homotopic_with P (top_of_set S) (top_of_set T) p q\"",
"abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"",
"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 subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\"",
"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
closed ?S \<Longrightarrow> continuous_on ?S ?f \<Longrightarrow> convex ?T \<Longrightarrow> bounded ?T \<Longrightarrow> ?f ` ?S \<subseteq> rel_frontier ?T \<Longrightarrow> ?S \<noteq> {} \<Longrightarrow> (\<exists>c. homotopic_with_canon (\<lambda>x. True) ?S (rel_frontier ?T) ?f (\<lambda>x. c)) = (\<exists>g. continuous_on UNIV g \<and> range g \<subseteq> rel_frontier ?T \<and> (\<forall>x\<in> ?S. g x = ?f x))
###symbols
Set.range :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b set
Set.UNIV :::: 'a set
Homotopy.homotopic_with_canon :::: (('a \<Rightarrow> 'b) \<Rightarrow> bool) \<Rightarrow> 'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
Set.empty :::: 'a set
Starlike.rel_frontier :::: 'a set \<Rightarrow> 'a set
Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set
Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
Elementary_Metric_Spaces.metric_space_class.bounded :::: 'a set \<Rightarrow> bool
Convex.convex :::: 'a set \<Rightarrow> bool
Topological_Spaces.continuous_on :::: 'a set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
Topological_Spaces.topological_space_class.closed :::: 'a set \<Rightarrow> bool
###defs
abbreviation range :: "('a \<Rightarrow> 'b) \<Rightarrow> 'b set" \<comment> \<open>of function\<close>
where "range f \<equiv> f ` UNIV"
abbreviation UNIV :: "'a set"
where "UNIV \<equiv> top"
abbreviation homotopic_with_canon ::
"[('a::topological_space \<Rightarrow> 'b::topological_space) \<Rightarrow> bool, 'a set, 'b set, 'a \<Rightarrow> 'b, 'a \<Rightarrow> 'b] \<Rightarrow> bool"
where
"homotopic_with_canon P S T p q \<equiv> homotopic_with P (top_of_set S) (top_of_set T) p q"
abbreviation empty :: "'a set" ("{}")
where "{} \<equiv> bot"
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 subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset_eq \<equiv> less_eq"
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; ?H4 x_3; ?H5 (?H6 x_2 x_1) (?H7 x_3); x_1 \<noteq> ?H8\<rbrakk> \<Longrightarrow> (\<exists>y_0. ?H9 (\<lambda>y_1. True) x_1 (?H7 x_3) x_2 (\<lambda>y_2. y_0)) = (\<exists>y_3. ?H2 ?H10 y_3 \<and> ?H5 (?H11 y_3) (?H7 x_3) \<and> (\<forall>y_4\<in>x_1. y_3 y_4 = x_2 y_4))###end
|
Decision_Procs/Parametric_Ferrante_Rackoff
|
Parametric_Ferrante_Rackoff.disj_nb
|
lemma disj_nb[simp]: "bound n p \<Longrightarrow> bound n q \<Longrightarrow> bound n (disj p q)"
|
bound ?n ?p \<Longrightarrow> bound ?n ?q \<Longrightarrow> bound ?n (Parametric_Ferrante_Rackoff.disj ?p ?q)
|
\<lbrakk> ?H1 x_1 x_2; ?H1 x_1 x_3\<rbrakk> \<Longrightarrow> ?H1 x_1 (?H2 x_2 x_3)
|
[
"Parametric_Ferrante_Rackoff.disj",
"Parametric_Ferrante_Rackoff.bound"
] |
[
"fm \\<Rightarrow> fm \\<Rightarrow> fm",
"nat \\<Rightarrow> fm \\<Rightarrow> bool"
] |
[
"definition disj :: \"fm \\<Rightarrow> fm \\<Rightarrow> fm\"\n where \"disj p q \\<equiv>\n (if (p = T \\<or> q = T) then T\n else if p = F then q\n else if q = F then p\n else if p = q then p\n else Or p q)\"",
"primrec bound:: \"nat \\<Rightarrow> fm \\<Rightarrow> bool\" \\<comment> \\<open>a formula is independent of Bound n\\<close>\n where\n \"bound m T = True\"\n | \"bound m F = True\"\n | \"bound m (Lt t) = tmbound m t\"\n | \"bound m (Le t) = tmbound m t\"\n | \"bound m (Eq t) = tmbound m t\"\n | \"bound m (NEq t) = tmbound m t\"\n | \"bound m (Not p) = bound m p\"\n | \"bound m (And p q) = (bound m p \\<and> bound m q)\"\n | \"bound m (Or p q) = (bound m p \\<and> bound m q)\"\n | \"bound m (Imp p q) = ((bound m p) \\<and> (bound m q))\"\n | \"bound m (Iff p q) = (bound m p \\<and> bound m q)\"\n | \"bound m (E p) = bound (Suc m) p\"\n | \"bound m (A p) = bound (Suc m) p\""
] |
template
|
###lemma
bound ?n ?p \<Longrightarrow> bound ?n ?q \<Longrightarrow> bound ?n (Parametric_Ferrante_Rackoff.disj ?p ?q)
###symbols
Parametric_Ferrante_Rackoff.disj :::: fm \<Rightarrow> fm \<Rightarrow> fm
Parametric_Ferrante_Rackoff.bound :::: nat \<Rightarrow> fm \<Rightarrow> bool
###defs
definition disj :: "fm \<Rightarrow> fm \<Rightarrow> fm"
where "disj p q \<equiv>
(if (p = T \<or> q = T) then T
else if p = F then q
else if q = F then p
else if p = q then p
else Or p q)"
primrec bound:: "nat \<Rightarrow> fm \<Rightarrow> bool" \<comment> \<open>a formula is independent of Bound n\<close>
where
"bound m T = True"
| "bound m F = True"
| "bound m (Lt t) = tmbound m t"
| "bound m (Le t) = tmbound m t"
| "bound m (Eq t) = tmbound m t"
| "bound m (NEq t) = tmbound m t"
| "bound m (Not p) = bound m p"
| "bound m (And p q) = (bound m p \<and> bound m q)"
| "bound m (Or p q) = (bound m p \<and> bound m q)"
| "bound m (Imp p q) = ((bound m p) \<and> (bound m q))"
| "bound m (Iff p q) = (bound m p \<and> bound m q)"
| "bound m (E p) = bound (Suc m) p"
| "bound m (A p) = bound (Suc m) p"
|
###output
\<lbrakk> ?H1 x_1 x_2; ?H1 x_1 x_3\<rbrakk> \<Longrightarrow> ?H1 x_1 (?H2 x_2 x_3)###end
|
Induct/SList
|
SList.ListI
|
lemma ListI: "x \<in> list (range Leaf) \<Longrightarrow> x \<in> List"
|
?x \<in> list (range Leaf) \<Longrightarrow> ?x \<in> List
|
x_1 \<in> ?H1 (?H2 ?H3) \<Longrightarrow> x_1 \<in> ?H4
|
[
"SList.List",
"Sexp.Leaf",
"Set.range",
"SList.list"
] |
[
"('a, unit) Old_Datatype.node set set",
"'a \\<Rightarrow> ('a, 'b) Old_Datatype.node set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set",
"('a, unit) Old_Datatype.node set set \\<Rightarrow> ('a, unit) Old_Datatype.node set set"
] |
[
"definition \"List = list (range Leaf)\"",
"abbreviation \"Leaf == Old_Datatype.Leaf\"",
"abbreviation range :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set\" \\<comment> \\<open>of function\\<close>\n where \"range f \\<equiv> f ` UNIV\"",
"inductive_set\n list :: \"'a item set => 'a item set\"\n for A :: \"'a item set\"\n where\n NIL_I: \"NIL \\<in> list A\"\n | CONS_I: \"[| a \\<in> A; M \\<in> list A |] ==> CONS a M \\<in> list A\""
] |
template
|
###lemma
?x \<in> list (range Leaf) \<Longrightarrow> ?x \<in> List
###symbols
SList.List :::: ('a, unit) Old_Datatype.node set set
Sexp.Leaf :::: 'a \<Rightarrow> ('a, 'b) Old_Datatype.node set
Set.range :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b set
SList.list :::: ('a, unit) Old_Datatype.node set set \<Rightarrow> ('a, unit) Old_Datatype.node set set
###defs
definition "List = list (range Leaf)"
abbreviation "Leaf == Old_Datatype.Leaf"
abbreviation range :: "('a \<Rightarrow> 'b) \<Rightarrow> 'b set" \<comment> \<open>of function\<close>
where "range f \<equiv> f ` UNIV"
inductive_set
list :: "'a item set => 'a item set"
for A :: "'a item set"
where
NIL_I: "NIL \<in> list A"
| CONS_I: "[| a \<in> A; M \<in> list A |] ==> CONS a M \<in> list A"
|
###output
x_1 \<in> ?H1 (?H2 ?H3) \<Longrightarrow> x_1 \<in> ?H4###end
|
Auth/Smartcard/EventSC
|
EventSC.knows_subset_knows_A_Gets
|
lemma knows_subset_knows_A_Gets: "knows A evs \<subseteq> knows A (A_Gets A' X # evs)"
|
knows ?A ?evs \<subseteq> knows ?A (A_Gets ?A' ?X # ?evs)
|
?H1 (?H2 x_1 x_2) (?H2 x_1 (?H3 (?H4 x_3 x_4) x_2))
|
[
"EventSC.event.A_Gets",
"List.list.Cons",
"EventSC.knows",
"Set.subset_eq"
] |
[
"agent \\<Rightarrow> msg \\<Rightarrow> event",
"'a \\<Rightarrow> 'a list \\<Rightarrow> 'a list",
"agent \\<Rightarrow> event list \\<Rightarrow> msg set",
"'a set \\<Rightarrow> 'a set \\<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 [] = []\"",
"abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\""
] |
template
|
###lemma
knows ?A ?evs \<subseteq> knows ?A (A_Gets ?A' ?X # ?evs)
###symbols
EventSC.event.A_Gets :::: agent \<Rightarrow> msg \<Rightarrow> event
List.list.Cons :::: 'a \<Rightarrow> 'a list \<Rightarrow> 'a list
EventSC.knows :::: agent \<Rightarrow> event list \<Rightarrow> msg set
Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<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 [] = []"
abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset_eq \<equiv> less_eq"
|
###output
?H1 (?H2 x_1 x_2) (?H2 x_1 (?H3 (?H4 x_3 x_4) x_2))###end
|
Complete_Lattices
|
Complete_Lattices.UN_iff
|
lemma UN_iff [simp]: "b \<in> (\<Union>x\<in>A. B x) \<longleftrightarrow> (\<exists>x\<in>A. b \<in> B x)"
|
(?b \<in> \<Union> (?B ` ?A)) = (\<exists>x\<in> ?A. ?b \<in> ?B x)
|
(x_1 \<in> ?H1 (?H2 x_2 x_3)) = (\<exists>y_1\<in>x_3. x_1 \<in> x_2 y_1)
|
[
"Set.image",
"Complete_Lattices.Union"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set",
"'a set set \\<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 Union :: \"'a set set \\<Rightarrow> 'a set\" (\"\\<Union>\")\n where \"\\<Union>S \\<equiv> \\<Squnion>S\""
] |
template
|
###lemma
(?b \<in> \<Union> (?B ` ?A)) = (\<exists>x\<in> ?A. ?b \<in> ?B x)
###symbols
Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set
Complete_Lattices.Union :::: 'a set set \<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 Union :: "'a set set \<Rightarrow> 'a set" ("\<Union>")
where "\<Union>S \<equiv> \<Squnion>S"
|
###output
(x_1 \<in> ?H1 (?H2 x_2 x_3)) = (\<exists>y_1\<in>x_3. x_1 \<in> x_2 y_1)###end
|
HOLCF/Tr
|
Transfer.transfer_raw(200)
| null |
Transfer.Rel (rel_fun ?A (rel_fun (rel_fun (=) (rel_fun ?A ?A)) (rel_fun (=) ?A))) rec_nat rec_nat
|
?H1 (?H2 x_1 (?H2 (?H2 (=) (?H2 x_1 x_1)) (?H2 (=) x_1))) ?H3 ?H3
|
[
"Nat.rec_nat",
"BNF_Def.rel_fun",
"Transfer.Rel"
] |
[
"'a \\<Rightarrow> (nat \\<Rightarrow> 'a \\<Rightarrow> 'a) \\<Rightarrow> nat \\<Rightarrow> 'a",
"('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"
] |
[
"abbreviation rec_nat :: \"'a \\<Rightarrow> (nat \\<Rightarrow> 'a \\<Rightarrow> 'a) \\<Rightarrow> nat \\<Rightarrow> 'a\"\n where \"rec_nat \\<equiv> old.rec_nat\"",
"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 ?A (rel_fun (rel_fun (=) (rel_fun ?A ?A)) (rel_fun (=) ?A))) rec_nat rec_nat
###symbols
Nat.rec_nat :::: 'a \<Rightarrow> (nat \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> nat \<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
Transfer.Rel :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool
###defs
abbreviation rec_nat :: "'a \<Rightarrow> (nat \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> nat \<Rightarrow> 'a"
where "rec_nat \<equiv> old.rec_nat"
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 x_1 (?H2 (?H2 (=) (?H2 x_1 x_1)) (?H2 (=) x_1))) ?H3 ?H3###end
|
Analysis/Convex_Euclidean_Space
|
Convex_Euclidean_Space.any_closest_point_dot
|
lemma any_closest_point_dot:
assumes "convex S" "closed S" "x \<in> S" "y \<in> S" "\<forall>z\<in>S. dist a x \<le> dist a z"
shows "inner (a - x) (y - x) \<le> 0"
|
convex ?S \<Longrightarrow> closed ?S \<Longrightarrow> ?x \<in> ?S \<Longrightarrow> ?y \<in> ?S \<Longrightarrow> \<forall>z\<in> ?S. dist ?a ?x \<le> dist ?a z \<Longrightarrow> (?a - ?x) \<bullet> (?y - ?x) \<le> 0
|
\<lbrakk> ?H1 x_1; ?H2 x_1; x_2 \<in> x_1; x_3 \<in> x_1; \<forall>y_0\<in>x_1. ?H3 x_4 x_2 \<le> ?H3 x_4 y_0\<rbrakk> \<Longrightarrow> ?H4 (?H5 x_4 x_2) (?H5 x_3 x_2) \<le> ?H6
|
[
"Groups.zero_class.zero",
"Groups.minus_class.minus",
"Inner_Product.real_inner_class.inner",
"Real_Vector_Spaces.dist_class.dist",
"Topological_Spaces.topological_space_class.closed",
"Convex.convex"
] |
[
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> real",
"'a set \\<Rightarrow> bool",
"'a set \\<Rightarrow> bool"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)",
"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",
"class dist =\n fixes dist :: \"'a \\<Rightarrow> 'a \\<Rightarrow> real\"",
"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
convex ?S \<Longrightarrow> closed ?S \<Longrightarrow> ?x \<in> ?S \<Longrightarrow> ?y \<in> ?S \<Longrightarrow> \<forall>z\<in> ?S. dist ?a ?x \<le> dist ?a z \<Longrightarrow> (?a - ?x) \<bullet> (?y - ?x) \<le> 0
###symbols
Groups.zero_class.zero :::: 'a
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Inner_Product.real_inner_class.inner :::: 'a \<Rightarrow> 'a \<Rightarrow> real
Real_Vector_Spaces.dist_class.dist :::: 'a \<Rightarrow> 'a \<Rightarrow> real
Topological_Spaces.topological_space_class.closed :::: 'a set \<Rightarrow> bool
Convex.convex :::: 'a set \<Rightarrow> bool
###defs
class zero =
fixes zero :: 'a ("0")
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
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
class dist =
fixes dist :: "'a \<Rightarrow> 'a \<Rightarrow> real"
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 \<in> x_1; x_3 \<in> x_1; \<forall>y_0\<in>x_1. ?H3 x_4 x_2 \<le> ?H3 x_4 y_0\<rbrakk> \<Longrightarrow> ?H4 (?H5 x_4 x_2) (?H5 x_3 x_2) \<le> ?H6###end
|
Algebra/Coset
|
Coset.one_FactGroup
|
lemma one_FactGroup [simp]: "one(G Mod N) = N"
|
\<one>\<^bsub> ?G Mod ?N\<^esub> = ?N
|
?H1 (?H2 x_1 x_2) = x_2
|
[
"Coset.FactGroup",
"Group.monoid.one"
] |
[
"('a, 'b) monoid_scheme \\<Rightarrow> 'a set \\<Rightarrow> 'a set monoid",
"('a, 'b) monoid_scheme \\<Rightarrow> 'a"
] |
[
"definition\n FactGroup :: \"[('a,'b) monoid_scheme, 'a set] \\<Rightarrow> ('a set) monoid\" (infixl \"Mod\" 65)\n \\<comment> \\<open>Actually defined for groups rather than monoids\\<close>\n where \"FactGroup G H = \\<lparr>carrier = rcosets\\<^bsub>G\\<^esub> H, mult = set_mult G, one = H\\<rparr>\"",
"class monoid = times + one +\n assumes monoid_assoc: \"(x * y) * z = x * (y * z)\"\n and monoid_left_one: \"1 * x = x\"\n and monoid_right_one: \"x * 1 = x\""
] |
template
|
###lemma
\<one>\<^bsub> ?G Mod ?N\<^esub> = ?N
###symbols
Coset.FactGroup :::: ('a, 'b) monoid_scheme \<Rightarrow> 'a set \<Rightarrow> 'a set monoid
Group.monoid.one :::: ('a, 'b) monoid_scheme \<Rightarrow> 'a
###defs
definition
FactGroup :: "[('a,'b) monoid_scheme, 'a set] \<Rightarrow> ('a set) monoid" (infixl "Mod" 65)
\<comment> \<open>Actually defined for groups rather than monoids\<close>
where "FactGroup G H = \<lparr>carrier = rcosets\<^bsub>G\<^esub> H, mult = set_mult G, one = H\<rparr>"
class monoid = times + one +
assumes monoid_assoc: "(x * y) * z = x * (y * z)"
and monoid_left_one: "1 * x = x"
and monoid_right_one: "x * 1 = x"
|
###output
?H1 (?H2 x_1 x_2) = x_2###end
|
Equiv_Relations
|
Equiv_Relations.eq_equiv_class
|
lemma eq_equiv_class: "r``{a} = r``{b} \<Longrightarrow> equiv A r \<Longrightarrow> b \<in> A \<Longrightarrow> (a, b) \<in> r"
|
?r `` { ?a} = ?r `` { ?b} \<Longrightarrow> equiv ?A ?r \<Longrightarrow> ?b \<in> ?A \<Longrightarrow> (?a, ?b) \<in> ?r
|
\<lbrakk> ?H1 x_1 (?H2 x_2 ?H3) = ?H1 x_1 (?H2 x_3 ?H3); ?H4 x_4 x_1; x_3 \<in> x_4\<rbrakk> \<Longrightarrow> (x_2, x_3) \<in> x_1
|
[
"Equiv_Relations.equiv",
"Set.empty",
"Set.insert",
"Relation.Image"
] |
[
"'a set \\<Rightarrow> ('a \\<times> 'a) set \\<Rightarrow> bool",
"'a set",
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"('a \\<times> 'b) set \\<Rightarrow> 'a set \\<Rightarrow> 'b set"
] |
[
"definition equiv :: \"'a set \\<Rightarrow> ('a \\<times> 'a) set \\<Rightarrow> bool\"\n where \"equiv A r \\<longleftrightarrow> refl_on A r \\<and> sym r \\<and> trans r\"",
"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 Image :: \"('a \\<times> 'b) set \\<Rightarrow> 'a set \\<Rightarrow> 'b set\" (infixr \"``\" 90)\n where \"r `` s = {y. \\<exists>x\\<in>s. (x, y) \\<in> r}\""
] |
template
|
###lemma
?r `` { ?a} = ?r `` { ?b} \<Longrightarrow> equiv ?A ?r \<Longrightarrow> ?b \<in> ?A \<Longrightarrow> (?a, ?b) \<in> ?r
###symbols
Equiv_Relations.equiv :::: 'a set \<Rightarrow> ('a \<times> 'a) set \<Rightarrow> bool
Set.empty :::: 'a set
Set.insert :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a set
Relation.Image :::: ('a \<times> 'b) set \<Rightarrow> 'a set \<Rightarrow> 'b set
###defs
definition equiv :: "'a set \<Rightarrow> ('a \<times> 'a) set \<Rightarrow> bool"
where "equiv A r \<longleftrightarrow> refl_on A r \<and> sym r \<and> trans r"
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 Image :: "('a \<times> 'b) set \<Rightarrow> 'a set \<Rightarrow> 'b set" (infixr "``" 90)
where "r `` s = {y. \<exists>x\<in>s. (x, y) \<in> r}"
|
###output
\<lbrakk> ?H1 x_1 (?H2 x_2 ?H3) = ?H1 x_1 (?H2 x_3 ?H3); ?H4 x_4 x_1; x_3 \<in> x_4\<rbrakk> \<Longrightarrow> (x_2, x_3) \<in> x_1###end
|
Series
|
Series.summable_norm_comparison_test
|
lemma summable_norm_comparison_test:
"\<exists>N. \<forall>n\<ge>N. norm (f n) \<le> g n \<Longrightarrow> summable g \<Longrightarrow> summable (\<lambda>n. norm (f n))"
|
\<exists>N. \<forall>n\<ge>N. norm (?f n) \<le> ?g n \<Longrightarrow> summable ?g \<Longrightarrow> summable (\<lambda>n. norm (?f n))
|
\<lbrakk>\<exists>y_0. \<forall>y_1\<ge>y_0. ?H1 (x_1 y_1) \<le> x_2 y_1; ?H2 x_2\<rbrakk> \<Longrightarrow> ?H2 (\<lambda>y_2. ?H1 (x_1 y_2))
|
[
"Series.summable",
"Real_Vector_Spaces.norm_class.norm"
] |
[
"(nat \\<Rightarrow> 'a) \\<Rightarrow> bool",
"'a \\<Rightarrow> real"
] |
[
"definition summable :: \"(nat \\<Rightarrow> 'a::{topological_space, comm_monoid_add}) \\<Rightarrow> bool\"\n where \"summable f \\<longleftrightarrow> (\\<exists>s. f sums s)\"",
"class norm =\n fixes norm :: \"'a \\<Rightarrow> real\""
] |
template
|
###lemma
\<exists>N. \<forall>n\<ge>N. norm (?f n) \<le> ?g n \<Longrightarrow> summable ?g \<Longrightarrow> summable (\<lambda>n. norm (?f n))
###symbols
Series.summable :::: (nat \<Rightarrow> 'a) \<Rightarrow> bool
Real_Vector_Spaces.norm_class.norm :::: 'a \<Rightarrow> real
###defs
definition summable :: "(nat \<Rightarrow> 'a::{topological_space, comm_monoid_add}) \<Rightarrow> bool"
where "summable f \<longleftrightarrow> (\<exists>s. f sums s)"
class norm =
fixes norm :: "'a \<Rightarrow> real"
|
###output
\<lbrakk>\<exists>y_0. \<forall>y_1\<ge>y_0. ?H1 (x_1 y_1) \<le> x_2 y_1; ?H2 x_2\<rbrakk> \<Longrightarrow> ?H2 (\<lambda>y_2. ?H1 (x_1 y_2))###end
|
Library/RBT_Set
|
RBT_Set.subset_Coset_empty_Set_empty
|
lemma subset_Coset_empty_Set_empty [code]:
"Coset t1 \<le> Set t2 \<longleftrightarrow> (case (RBT.impl_of t1, RBT.impl_of t2) of
(rbt.Empty, rbt.Empty) \<Rightarrow> False |
(_, _) \<Rightarrow> Code.abort (STR ''non_empty_trees'') (\<lambda>_. Coset t1 \<le> Set t2))"
|
(RBT_Set.Coset ?t1.0 \<subseteq> RBT_Set.Set ?t2.0) = (case (rbt.impl_of ?t1.0, rbt.impl_of ?t2.0) of (rbt.Empty, rbt.Empty) \<Rightarrow> False | (rbt.Empty, Branch color rbt1 a b rbt2) \<Rightarrow> Code.abort STR ''non_empty_trees'' (\<lambda>_. RBT_Set.Coset ?t1.0 \<subseteq> RBT_Set.Set ?t2.0) | (Branch color rbt1 a ba rbt2, xa) \<Rightarrow> Code.abort STR ''non_empty_trees'' (\<lambda>_. RBT_Set.Coset ?t1.0 \<subseteq> RBT_Set.Set ?t2.0))
|
?H1 (?H2 x_1) (?H3 x_2) = ?H4 (\<lambda>y_0 y_1. ?H5 (?H5 False (\<lambda>y_2 y_3 y_4 y_5 y_6. ?H6 (?H7 False True True True False True True (?H7 True True True True False True True (?H7 False True True True False True True (?H7 True True True True True False True (?H7 True False True False False True True (?H7 True False True True False True True (?H7 False False False False True True True (?H7 False False True False True True True (?H7 True False False True True True True (?H7 True True True True True False True (?H7 False False True False True True True (?H7 False True False False True True True (?H7 True False True False False True True (?H7 True False True False False True True (?H7 True True False False True True True ?H8))))))))))))))) (\<lambda>y_7. ?H1 (?H2 x_1) (?H3 x_2))) y_1) (\<lambda>y_8 y_9 y_10 y_11 y_12. ?H6 (?H7 False True True True False True True (?H7 True True True True False True True (?H7 False True True True False True True (?H7 True True True True True False True (?H7 True False True False False True True (?H7 True False True True False True True (?H7 False False False False True True True (?H7 False False True False True True True (?H7 True False False True True True True (?H7 True True True True True False True (?H7 False False True False True True True (?H7 False True False False True True True (?H7 True False True False False True True (?H7 True False True False False True True (?H7 True True False False True True True ?H8))))))))))))))) (\<lambda>y_13. ?H1 (?H2 x_1) (?H3 x_2))) y_0) (?H9 x_1, ?H9 x_2)
|
[
"RBT.rbt.impl_of",
"String.empty_literal",
"String.Literal",
"String.Code.abort",
"RBT_Impl.rbt.case_rbt",
"Product_Type.prod.case_prod",
"RBT_Set.Set",
"RBT_Set.Coset",
"Set.subset_eq"
] |
[
"('a, 'b) RBT.rbt \\<Rightarrow> ('a, 'b) RBT_Impl.rbt",
"String.literal",
"bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> String.literal \\<Rightarrow> String.literal",
"String.literal \\<Rightarrow> (unit \\<Rightarrow> 'a) \\<Rightarrow> 'a",
"'a \\<Rightarrow> (color \\<Rightarrow> ('b, 'c) RBT_Impl.rbt \\<Rightarrow> 'b \\<Rightarrow> 'c \\<Rightarrow> ('b, 'c) RBT_Impl.rbt \\<Rightarrow> 'a) \\<Rightarrow> ('b, 'c) RBT_Impl.rbt \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b \\<Rightarrow> 'c) \\<Rightarrow> 'a \\<times> 'b \\<Rightarrow> 'c",
"('a, unit) RBT.rbt \\<Rightarrow> 'a set",
"('a, unit) RBT.rbt \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"typedef (overloaded) ('a, 'b) rbt = \"{t :: ('a::linorder, 'b) RBT_Impl.rbt. is_rbt t}\"\n morphisms impl_of RBT",
"abbreviation (output) empty_literal :: String.literal\n where \"empty_literal \\<equiv> 0\"",
"datatype ('a, 'b) rbt = Empty | Branch color \"('a, 'b) rbt\" 'a 'b \"('a, 'b) rbt\"",
"definition \"prod = {f. \\<exists>a b. f = Pair_Rep (a::'a) (b::'b)}\"",
"definition Set :: \"('a::linorder, unit) rbt \\<Rightarrow> 'a set\" \n where \"Set t = {x . RBT.lookup t x = Some ()}\"",
"definition Coset :: \"('a::linorder, unit) rbt \\<Rightarrow> 'a set\" \n where [simp]: \"Coset t = - Set t\"",
"abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\""
] |
template
|
###lemma
(RBT_Set.Coset ?t1.0 \<subseteq> RBT_Set.Set ?t2.0) = (case (rbt.impl_of ?t1.0, rbt.impl_of ?t2.0) of (rbt.Empty, rbt.Empty) \<Rightarrow> False | (rbt.Empty, Branch color rbt1 a b rbt2) \<Rightarrow> Code.abort STR ''non_empty_trees'' (\<lambda>_. RBT_Set.Coset ?t1.0 \<subseteq> RBT_Set.Set ?t2.0) | (Branch color rbt1 a ba rbt2, xa) \<Rightarrow> Code.abort STR ''non_empty_trees'' (\<lambda>_. RBT_Set.Coset ?t1.0 \<subseteq> RBT_Set.Set ?t2.0))
###symbols
RBT.rbt.impl_of :::: ('a, 'b) RBT.rbt \<Rightarrow> ('a, 'b) RBT_Impl.rbt
String.empty_literal :::: String.literal
String.Literal :::: bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> String.literal \<Rightarrow> String.literal
String.Code.abort :::: String.literal \<Rightarrow> (unit \<Rightarrow> 'a) \<Rightarrow> 'a
RBT_Impl.rbt.case_rbt :::: 'a \<Rightarrow> (color \<Rightarrow> ('b, 'c) RBT_Impl.rbt \<Rightarrow> 'b \<Rightarrow> 'c \<Rightarrow> ('b, 'c) RBT_Impl.rbt \<Rightarrow> 'a) \<Rightarrow> ('b, 'c) RBT_Impl.rbt \<Rightarrow> 'a
Product_Type.prod.case_prod :::: ('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'a \<times> 'b \<Rightarrow> 'c
RBT_Set.Set :::: ('a, unit) RBT.rbt \<Rightarrow> 'a set
RBT_Set.Coset :::: ('a, unit) RBT.rbt \<Rightarrow> 'a set
Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
###defs
typedef (overloaded) ('a, 'b) rbt = "{t :: ('a::linorder, 'b) RBT_Impl.rbt. is_rbt t}"
morphisms impl_of RBT
abbreviation (output) empty_literal :: String.literal
where "empty_literal \<equiv> 0"
datatype ('a, 'b) rbt = Empty | Branch color "('a, 'b) rbt" 'a 'b "('a, 'b) rbt"
definition "prod = {f. \<exists>a b. f = Pair_Rep (a::'a) (b::'b)}"
definition Set :: "('a::linorder, unit) rbt \<Rightarrow> 'a set"
where "Set t = {x . RBT.lookup t x = Some ()}"
definition Coset :: "('a::linorder, unit) rbt \<Rightarrow> 'a set"
where [simp]: "Coset t = - Set t"
abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset_eq \<equiv> less_eq"
|
###output
?H1 (?H2 x_1) (?H3 x_2) = ?H4 (\<lambda>y_0 y_1. ?H5 (?H5 False (\<lambda>y_2 y_3 y_4 y_5 y_6. ?H6 (?H7 False True True True False True True (?H7 True True True True False True True (?H7 False True True True False True True (?H7 True True True True True False True (?H7 True False True False False True True (?H7 True False True True False True True (?H7 False False False False True True True (?H7 False False True False True True True (?H7 True False False True True True True (?H7 True True True True True False True (?H7 False False True False True True True (?H7 False True False False True True True (?H7 True False True False False True True (?H7 True False True False False True True (?H7 True True False False True True True ?H8))))))))))))))) (\<lambda>y_7. ?H1 (?H2 x_1) (?H3 x_2))) y_1) (\<lambda>y_8 y_9 y_10 y_11 y_12. ?H6 (?H7 False True True True False True True (?H7 True True True True False True True (?H7 False True True True False True True (?H7 True True True True True False True (?H7 True False True False False True True (?H7 True False True True False True True (?H7 False False False False True True True (?H7 False False True False True True True (?H7 True False False True True True True (?H7 True True True True True False True (?H7 False False True False True True True (?H7 False True False False True True True (?H7 True False True False False True True (?H7 True False True False False True True (?H7 True True False False True True True ?H8))))))))))))))) (\<lambda>y_13. ?H1 (?H2 x_1) (?H3 x_2))) y_0) (?H9 x_1, ?H9 x_2)###end
|
Analysis/Norm_Arith
|
Norm_Arith.arithmetic_simps(45)
| null |
numeral ?m + numeral ?n = numeral (?m + ?n)
|
?H1 (?H2 x_1) (?H2 x_2) = ?H2 (?H1 x_1 x_2)
|
[
"Num.numeral_class.numeral",
"Groups.plus_class.plus"
] |
[
"num \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a"
] |
[
"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 plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)"
] |
template
|
###lemma
numeral ?m + numeral ?n = numeral (?m + ?n)
###symbols
Num.numeral_class.numeral :::: num \<Rightarrow> 'a
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
###defs
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 plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
|
###output
?H1 (?H2 x_1) (?H2 x_2) = ?H2 (?H1 x_1 x_2)###end
|
Computational_Algebra/Formal_Laurent_Series
|
Formal_Laurent_Series.fls_subdegree_mult
|
lemma fls_subdegree_mult [simp]:
fixes f g :: "'a::semiring_no_zero_divisors fls"
assumes "f \<noteq> 0" "g \<noteq> 0"
shows "fls_subdegree (f * g) = fls_subdegree f + fls_subdegree g"
|
?f \<noteq> 0 \<Longrightarrow> ?g \<noteq> 0 \<Longrightarrow> fls_subdegree (?f * ?g) = fls_subdegree ?f + fls_subdegree ?g
|
\<lbrakk>x_1 \<noteq> ?H1; x_2 \<noteq> ?H1\<rbrakk> \<Longrightarrow> ?H2 (?H3 x_1 x_2) = ?H4 (?H2 x_1) (?H2 x_2)
|
[
"Groups.plus_class.plus",
"Groups.times_class.times",
"Formal_Laurent_Series.fls_subdegree",
"Groups.zero_class.zero"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a fls \\<Rightarrow> int",
"'a"
] |
[
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"definition fls_subdegree :: \"('a::zero) fls \\<Rightarrow> int\"\n where \"fls_subdegree f \\<equiv> (if f = 0 then 0 else LEAST n::int. f$$n \\<noteq> 0)\"",
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
?f \<noteq> 0 \<Longrightarrow> ?g \<noteq> 0 \<Longrightarrow> fls_subdegree (?f * ?g) = fls_subdegree ?f + fls_subdegree ?g
###symbols
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Formal_Laurent_Series.fls_subdegree :::: 'a fls \<Rightarrow> int
Groups.zero_class.zero :::: 'a
###defs
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
definition fls_subdegree :: "('a::zero) fls \<Rightarrow> int"
where "fls_subdegree f \<equiv> (if f = 0 then 0 else LEAST n::int. f$$n \<noteq> 0)"
class zero =
fixes zero :: 'a ("0")
|
###output
\<lbrakk>x_1 \<noteq> ?H1; x_2 \<noteq> ?H1\<rbrakk> \<Longrightarrow> ?H2 (?H3 x_1 x_2) = ?H4 (?H2 x_1) (?H2 x_2)###end
|
Bali/DefiniteAssignment
|
DefiniteAssignment.da_elim_cases(55)
| null |
?Env\<turnstile> ?B \<guillemotright>\<langle> ?e1.0.[ ?e2.0]\<rangle>\<guillemotright> ?A \<Longrightarrow> (\<And>E1. ?Env\<turnstile> ?B \<guillemotright>\<langle> ?e1.0\<rangle>\<guillemotright> E1 \<Longrightarrow> ?Env\<turnstile> nrm E1 \<guillemotright>\<langle> ?e2.0\<rangle>\<guillemotright> ?A \<Longrightarrow> ?P) \<Longrightarrow> ?P
|
\<lbrakk> ?H1 x_1 x_2 (?H2 (?H3 x_3 x_4)) x_5; \<And>y_0. \<lbrakk> ?H1 x_1 x_2 (?H2 x_3) y_0; ?H1 x_1 (?H4 y_0) (?H2 x_4) x_5\<rbrakk> \<Longrightarrow> x_6\<rbrakk> \<Longrightarrow> x_6
|
[
"DefiniteAssignment.assigned.nrm",
"Term.var.AVar",
"Term.inj_term_class.inj_term",
"DefiniteAssignment.da"
] |
[
"'a assigned_scheme \\<Rightarrow> lname set",
"expr \\<Rightarrow> expr \\<Rightarrow> Term.var",
"'a \\<Rightarrow> Term.term",
"env \\<Rightarrow> lname set \\<Rightarrow> Term.term \\<Rightarrow> assigned \\<Rightarrow> bool"
] |
[
"record assigned = \n nrm :: \"lname set\" \\<comment> \\<open>Definetly assigned variables \n for normal completion\\<close>\n brk :: \"breakass\" \\<comment> \\<open>Definetly assigned variables for \n abrupt completion with a break\\<close>",
"datatype var\n = LVar lname \\<comment> \\<open>local variable (incl. parameters)\\<close>\n | FVar qtname qtname bool expr vname (\"{_,_,_}_.._\"[10,10,10,85,99]90)\n \\<comment> \\<open>class field\\<close>\n \\<comment> \\<open>\\<^term>\\<open>{accC,statDeclC,stat}e..fn\\<close>\\<close>\n \\<comment> \\<open>\\<open>accC\\<close>: accessing class (static class were\\<close>\n \\<comment> \\<open>the code is declared. Annotation only needed for\\<close>\n \\<comment> \\<open>evaluation to check accessibility)\\<close>\n \\<comment> \\<open>\\<open>statDeclC\\<close>: static declaration class of field\\<close>\n \\<comment> \\<open>\\<open>stat\\<close>: static or instance field?\\<close>\n \\<comment> \\<open>\\<open>e\\<close>: reference to object\\<close>\n \\<comment> \\<open>\\<open>fn\\<close>: field name\\<close>\n | AVar expr expr (\"_.[_]\"[90,10 ]90)\n \\<comment> \\<open>array component\\<close>\n \\<comment> \\<open>\\<^term>\\<open>e1.[e2]\\<close>: e1 array reference; e2 index\\<close>\n | InsInitV stmt var \n \\<comment> \\<open>insertion of initialization before evaluation\\<close>\n \\<comment> \\<open>of var (technical term for smallstep semantics.)\\<close>\n\nand expr\n = NewC qtname \\<comment> \\<open>class instance creation\\<close>\n | NewA ty expr (\"New _[_]\"[99,10 ]85) \n \\<comment> \\<open>array creation\\<close> \n | Cast ty expr \\<comment> \\<open>type cast\\<close>\n | Inst expr ref_ty (\"_ InstOf _\"[85,99] 85) \n \\<comment> \\<open>instanceof\\<close> \n | Lit val \\<comment> \\<open>literal value, references not allowed\\<close>\n | UnOp unop expr \\<comment> \\<open>unary operation\\<close>\n | BinOp binop expr expr \\<comment> \\<open>binary operation\\<close>\n \n | Super \\<comment> \\<open>special Super keyword\\<close>\n | Acc var \\<comment> \\<open>variable access\\<close>\n | Ass var expr (\"_:=_\" [90,85 ]85)\n \\<comment> \\<open>variable assign\\<close> \n | Cond expr expr expr (\"_ ? _ : _\" [85,85,80]80) \\<comment> \\<open>conditional\\<close> \n | Call qtname ref_ty inv_mode expr mname \"(ty list)\" \"(expr list)\" \n (\"{_,_,_}_\\<cdot>_'( {_}_')\"[10,10,10,85,99,10,10]85) \n \\<comment> \\<open>method call\\<close> \n \\<comment> \\<open>\\<^term>\\<open>{accC,statT,mode}e\\<cdot>mn({pTs}args)\\<close> \"\\<close>\n \\<comment> \\<open>\\<open>accC\\<close>: accessing class (static class were\\<close>\n \\<comment> \\<open>the call code is declared. Annotation only needed for\\<close>\n \\<comment> \\<open>evaluation to check accessibility)\\<close>\n \\<comment> \\<open>\\<open>statT\\<close>: static declaration class/interface of\\<close>\n \\<comment> \\<open>method\\<close>\n \\<comment> \\<open>\\<open>mode\\<close>: invocation mode\\<close>\n \\<comment> \\<open>\\<open>e\\<close>: reference to object\\<close>\n \\<comment> \\<open>\\<open>mn\\<close>: field name\\<close> \n \\<comment> \\<open>\\<open>pTs\\<close>: types of parameters\\<close>\n \\<comment> \\<open>\\<open>args\\<close>: the actual parameters/arguments\\<close> \n | Methd qtname sig \\<comment> \\<open>(folded) method (see below)\\<close>\n | Body qtname stmt \\<comment> \\<open>(unfolded) method body\\<close>\n | InsInitE stmt expr \n \\<comment> \\<open>insertion of initialization before\\<close>\n \\<comment> \\<open>evaluation of expr (technical term for smallstep sem.)\\<close>\n | Callee locals expr \\<comment> \\<open>save callers locals in callee-Frame\\<close>\n \\<comment> \\<open>(technical term for smallstep semantics)\\<close>\nand stmt\n = Skip \\<comment> \\<open>empty statement\\<close>\n | Expr expr \\<comment> \\<open>expression statement\\<close>\n | Lab jump stmt (\"_\\<bullet> _\" [ 99,66]66)\n \\<comment> \\<open>labeled statement; handles break\\<close>\n | Comp stmt stmt (\"_;; _\" [ 66,65]65)\n | If' expr stmt stmt (\"If'(_') _ Else _\" [ 80,79,79]70)\n | Loop label expr stmt (\"_\\<bullet> While'(_') _\" [ 99,80,79]70)\n | Jmp jump \\<comment> \\<open>break, continue, return\\<close>\n | Throw expr\n | TryC stmt qtname vname stmt (\"Try _ Catch'(_ _') _\" [79,99,80,79]70)\n \\<comment> \\<open>\\<^term>\\<open>Try c1 Catch(C vn) c2\\<close>\\<close> \n \\<comment> \\<open>\\<open>c1\\<close>: block were exception may be thrown\\<close>\n \\<comment> \\<open>\\<open>C\\<close>: execption class to catch\\<close>\n \\<comment> \\<open>\\<open>vn\\<close>: local name for exception used in \\<open>c2\\<close>\\<close>\n \\<comment> \\<open>\\<open>c2\\<close>: block to execute when exception is cateched\\<close>\n | Fin stmt stmt (\"_ Finally _\" [ 79,79]70)\n | FinA abopt stmt \\<comment> \\<open>Save abruption of first statement\\<close> \n \\<comment> \\<open>technical term for smallstep sem.)\\<close>\n | Init qtname \\<comment> \\<open>class initialization\\<close>",
"class inj_term =\n fixes inj_term:: \"'a \\<Rightarrow> term\" (\"\\<langle>_\\<rangle>\" 1000)",
"inductive\n da :: \"env \\<Rightarrow> lname set \\<Rightarrow> term \\<Rightarrow> assigned \\<Rightarrow> bool\" (\"_\\<turnstile> _ \\<guillemotright>_\\<guillemotright> _\" [65,65,65,65] 71)\nwhere\n Skip: \"Env\\<turnstile> B \\<guillemotright>\\<langle>Skip\\<rangle>\\<guillemotright> \\<lparr>nrm=B,brk=\\<lambda> l. UNIV\\<rparr>\"\n\n| Expr: \"Env\\<turnstile> B \\<guillemotright>\\<langle>e\\<rangle>\\<guillemotright> A \n \\<Longrightarrow> \n Env\\<turnstile> B \\<guillemotright>\\<langle>Expr e\\<rangle>\\<guillemotright> A\"\n| Lab: \"\\<lbrakk>Env\\<turnstile> B \\<guillemotright>\\<langle>c\\<rangle>\\<guillemotright> C; nrm A = nrm C \\<inter> (brk C) l; brk A = rmlab l (brk C)\\<rbrakk>\n \\<Longrightarrow> \n Env\\<turnstile> B \\<guillemotright>\\<langle>Break l\\<bullet> c\\<rangle>\\<guillemotright> A\" \n\n| Comp: \"\\<lbrakk>Env\\<turnstile> B \\<guillemotright>\\<langle>c1\\<rangle>\\<guillemotright> C1; Env\\<turnstile> nrm C1 \\<guillemotright>\\<langle>c2\\<rangle>\\<guillemotright> C2; \n nrm A = nrm C2; brk A = (brk C1) \\<Rightarrow>\\<inter> (brk C2)\\<rbrakk> \n \\<Longrightarrow> \n Env\\<turnstile> B \\<guillemotright>\\<langle>c1;; c2\\<rangle>\\<guillemotright> A\"\n\n| If: \"\\<lbrakk>Env\\<turnstile> B \\<guillemotright>\\<langle>e\\<rangle>\\<guillemotright> E;\n Env\\<turnstile> (B \\<union> assigns_if True e) \\<guillemotright>\\<langle>c1\\<rangle>\\<guillemotright> C1;\n Env\\<turnstile> (B \\<union> assigns_if False e) \\<guillemotright>\\<langle>c2\\<rangle>\\<guillemotright> C2;\n nrm A = nrm C1 \\<inter> nrm C2;\n brk A = brk C1 \\<Rightarrow>\\<inter> brk C2 \\<rbrakk> \n \\<Longrightarrow>\n Env\\<turnstile> B \\<guillemotright>\\<langle>If(e) c1 Else c2\\<rangle>\\<guillemotright> A\"\n\n\\<comment> \\<open>Note that \\<^term>\\<open>E\\<close> is not further used, because we take the specialized\n sets that also consider if the expression evaluates to True or False. \n Inside of \\<^term>\\<open>e\\<close> there is no {\\tt break} or {\\tt finally}, so the break\n map of \\<^term>\\<open>E\\<close> will be the trivial one. So \n \\<^term>\\<open>Env\\<turnstile>B \\<guillemotright>\\<langle>e\\<rangle>\\<guillemotright> E\\<close> is just used to ensure the definite assignment in\n expression \\<^term>\\<open>e\\<close>.\n Notice the implicit analysis of a constant boolean expression \\<^term>\\<open>e\\<close>\n in this rule. For example, if \\<^term>\\<open>e\\<close> is constantly \\<^term>\\<open>True\\<close> then \n \\<^term>\\<open>assigns_if False e = UNIV\\<close> and therefor \\<^term>\\<open>nrm C2=UNIV\\<close>.\n So finally \\<^term>\\<open>nrm A = nrm C1\\<close>. For the break maps this trick \n workd too, because the trivial break map will map all labels to \n \\<^term>\\<open>UNIV\\<close>. In the example, if no break occurs in \\<^term>\\<open>c2\\<close> the break\n maps will trivially map to \\<^term>\\<open>UNIV\\<close> and if a break occurs it will map\n to \\<^term>\\<open>UNIV\\<close> too, because \\<^term>\\<open>assigns_if False e = UNIV\\<close>. So\n in the intersection of the break maps the path \\<^term>\\<open>c2\\<close> will have no\n contribution.\\<close>\n\n| Loop: \"\\<lbrakk>Env\\<turnstile> B \\<guillemotright>\\<langle>e\\<rangle>\\<guillemotright> E; \n Env\\<turnstile> (B \\<union> assigns_if True e) \\<guillemotright>\\<langle>c\\<rangle>\\<guillemotright> C;\n nrm A = nrm C \\<inter> (B \\<union> assigns_if False e);\n brk A = brk C\\<rbrakk> \n \\<Longrightarrow>\n Env\\<turnstile> B \\<guillemotright>\\<langle>l\\<bullet> While(e) c\\<rangle>\\<guillemotright> A\"\n\\<comment> \\<open>The \\<open>Loop\\<close> rule resembles some of the ideas of the \\<open>If\\<close> rule.\n For the \\<^term>\\<open>nrm A\\<close> the set \\<^term>\\<open>B \\<union> assigns_if False e\\<close> \n will be \\<^term>\\<open>UNIV\\<close> if the condition is constantly True. To normally exit\n the while loop, we must consider the body \\<^term>\\<open>c\\<close> to be completed \n normally (\\<^term>\\<open>nrm C\\<close>) or with a break. But in this model, \n the label \\<^term>\\<open>l\\<close> of the loop\n only handles continue labels, not break labels. The break label will be\n handled by an enclosing \\<^term>\\<open>Lab\\<close> statement. So we don't have to\n handle the breaks specially.\\<close>\n\n| Jmp: \"\\<lbrakk>jump=Ret \\<longrightarrow> Result \\<in> B;\n nrm A = UNIV;\n brk A = (case jump of\n Break l \\<Rightarrow> \\<lambda> k. if k=l then B else UNIV \n | Cont l \\<Rightarrow> \\<lambda> k. UNIV\n | Ret \\<Rightarrow> \\<lambda> k. UNIV)\\<rbrakk> \n \\<Longrightarrow> \n Env\\<turnstile> B \\<guillemotright>\\<langle>Jmp jump\\<rangle>\\<guillemotright> A\"\n\\<comment> \\<open>In case of a break to label \\<^term>\\<open>l\\<close> the corresponding break set is all\n variables assigned before the break. The assigned variables for normal\n completion of the \\<^term>\\<open>Jmp\\<close> is \\<^term>\\<open>UNIV\\<close>, because the statement will\n never complete normally. For continue and return the break map is the \n trivial one. In case of a return we enshure that the result value is\n assigned.\\<close>\n\n| Throw: \"\\<lbrakk>Env\\<turnstile> B \\<guillemotright>\\<langle>e\\<rangle>\\<guillemotright> E; nrm A = UNIV; brk A = (\\<lambda> l. UNIV)\\<rbrakk> \n \\<Longrightarrow> Env\\<turnstile> B \\<guillemotright>\\<langle>Throw e\\<rangle>\\<guillemotright> A\"\n\n| Try: \"\\<lbrakk>Env\\<turnstile> B \\<guillemotright>\\<langle>c1\\<rangle>\\<guillemotright> C1; \n Env\\<lparr>lcl := (lcl Env)(VName vn\\<mapsto>Class C)\\<rparr>\\<turnstile> (B \\<union> {VName vn}) \\<guillemotright>\\<langle>c2\\<rangle>\\<guillemotright> C2; \n nrm A = nrm C1 \\<inter> nrm C2;\n brk A = brk C1 \\<Rightarrow>\\<inter> brk C2\\<rbrakk> \n \\<Longrightarrow> Env\\<turnstile> B \\<guillemotright>\\<langle>Try c1 Catch(C vn) c2\\<rangle>\\<guillemotright> A\"\n\n| Fin: \"\\<lbrakk>Env\\<turnstile> B \\<guillemotright>\\<langle>c1\\<rangle>\\<guillemotright> C1;\n Env\\<turnstile> B \\<guillemotright>\\<langle>c2\\<rangle>\\<guillemotright> C2;\n nrm A = nrm C1 \\<union> nrm C2;\n brk A = ((brk C1) \\<Rightarrow>\\<union>\\<^sub>\\<forall> (nrm C2)) \\<Rightarrow>\\<inter> (brk C2)\\<rbrakk> \n \\<Longrightarrow>\n Env\\<turnstile> B \\<guillemotright>\\<langle>c1 Finally c2\\<rangle>\\<guillemotright> A\" \n\\<comment> \\<open>The set of assigned variables before execution \\<^term>\\<open>c2\\<close> are the same\n as before execution \\<^term>\\<open>c1\\<close>, because \\<^term>\\<open>c1\\<close> could throw an exception\n and so we can't guarantee that any variable will be assigned in \\<^term>\\<open>c1\\<close>.\n The \\<open>Finally\\<close> statement completes\n normally if both \\<^term>\\<open>c1\\<close> and \\<^term>\\<open>c2\\<close> complete normally. If \\<^term>\\<open>c1\\<close>\n completes abruptly with a break, then \\<^term>\\<open>c2\\<close> also will be executed \n and may terminate normally or with a break. The overall break map then is\n the intersection of the maps of both paths. If \\<^term>\\<open>c2\\<close> terminates \n normally we have to extend all break sets in \\<^term>\\<open>brk C1\\<close> with \n \\<^term>\\<open>nrm C2\\<close> (\\<open>\\<Rightarrow>\\<union>\\<^sub>\\<forall>\\<close>). If \\<^term>\\<open>c2\\<close> exits with a break this\n break will appear in the overall result state. We don't know if \n \\<^term>\\<open>c1\\<close> completed normally or abruptly (maybe with an exception not only\n a break) so \\<^term>\\<open>c1\\<close> has no contribution to the break map following this\n path.\\<close>\n\n\\<comment> \\<open>Evaluation of expressions and the break sets of definite assignment:\n Thinking of a Java expression we assume that we can never have\n a break statement inside of a expression. So for all expressions the\n break sets could be set to the trivial one: \\<^term>\\<open>\\<lambda> l. UNIV\\<close>. \n But we can't\n trivially proof, that evaluating an expression will never result in a \n break, allthough Java expressions allready syntactically don't allow\n nested stetements in them. The reason are the nested class initialzation \n statements which are inserted by the evaluation rules. So to proof the\n absence of a break we need to ensure, that the initialization statements\n will never end up in a break. In a wellfromed initialization statement, \n of course, were breaks are nested correctly inside of \\<^term>\\<open>Lab\\<close> \n or \\<^term>\\<open>Loop\\<close> statements evaluation of the whole initialization \n statement will never result in a break, because this break will be \n handled inside of the statement. But for simplicity we haven't added\n the analysis of the correct nesting of breaks in the typing judgments \n right now. So we have decided to adjust the rules of definite assignment\n to fit to these circumstances. If an initialization is involved during\n evaluation of the expression (evaluation rules \\<open>FVar\\<close>, \\<open>NewC\\<close> \n and \\<open>NewA\\<close>\\<close>\n\n| Init: \"Env\\<turnstile> B \\<guillemotright>\\<langle>Init C\\<rangle>\\<guillemotright> \\<lparr>nrm=B,brk=\\<lambda> l. UNIV\\<rparr>\"\n\\<comment> \\<open>Wellformedness of a program will ensure, that every static initialiser \n is definetly assigned and the jumps are nested correctly. The case here\n for \\<^term>\\<open>Init\\<close> is just for convenience, to get a proper precondition \n for the induction hypothesis in various proofs, so that we don't have to\n expand the initialisation on every point where it is triggerred by the\n evaluation rules.\\<close> \n| NewC: \"Env\\<turnstile> B \\<guillemotright>\\<langle>NewC C\\<rangle>\\<guillemotright> \\<lparr>nrm=B,brk=\\<lambda> l. UNIV\\<rparr>\" \n\n| NewA: \"Env\\<turnstile> B \\<guillemotright>\\<langle>e\\<rangle>\\<guillemotright> A \n \\<Longrightarrow>\n Env\\<turnstile> B \\<guillemotright>\\<langle>New T[e]\\<rangle>\\<guillemotright> A\"\n\n| Cast: \"Env\\<turnstile> B \\<guillemotright>\\<langle>e\\<rangle>\\<guillemotright> A\n \\<Longrightarrow>\n Env\\<turnstile> B \\<guillemotright>\\<langle>Cast T e\\<rangle>\\<guillemotright> A\"\n\n| Inst: \"Env\\<turnstile> B \\<guillemotright>\\<langle>e\\<rangle>\\<guillemotright> A \n \\<Longrightarrow> \n Env\\<turnstile> B \\<guillemotright>\\<langle>e InstOf T\\<rangle>\\<guillemotright> A\"\n\n| Lit: \"Env\\<turnstile> B \\<guillemotright>\\<langle>Lit v\\<rangle>\\<guillemotright> \\<lparr>nrm=B,brk=\\<lambda> l. UNIV\\<rparr>\"\n\n| UnOp: \"Env\\<turnstile> B \\<guillemotright>\\<langle>e\\<rangle>\\<guillemotright> A\n \\<Longrightarrow> \n Env\\<turnstile> B \\<guillemotright>\\<langle>UnOp unop e\\<rangle>\\<guillemotright> A\"\n\n| CondAnd: \"\\<lbrakk>Env\\<turnstile> B \\<guillemotright>\\<langle>e1\\<rangle>\\<guillemotright> E1; Env\\<turnstile> (B \\<union> assigns_if True e1) \\<guillemotright>\\<langle>e2\\<rangle>\\<guillemotright> E2; \n nrm A = B \\<union> (assigns_if True (BinOp CondAnd e1 e2) \\<inter> \n assigns_if False (BinOp CondAnd e1 e2));\n brk A = (\\<lambda> l. UNIV) \\<rbrakk>\n \\<Longrightarrow>\n Env\\<turnstile> B \\<guillemotright>\\<langle>BinOp CondAnd e1 e2\\<rangle>\\<guillemotright> A\"\n\n| CondOr: \"\\<lbrakk>Env\\<turnstile> B \\<guillemotright>\\<langle>e1\\<rangle>\\<guillemotright> E1; Env\\<turnstile> (B \\<union> assigns_if False e1) \\<guillemotright>\\<langle>e2\\<rangle>\\<guillemotright> E2; \n nrm A = B \\<union> (assigns_if True (BinOp CondOr e1 e2) \\<inter> \n assigns_if False (BinOp CondOr e1 e2));\n brk A = (\\<lambda> l. UNIV) \\<rbrakk>\n \\<Longrightarrow>\n Env\\<turnstile> B \\<guillemotright>\\<langle>BinOp CondOr e1 e2\\<rangle>\\<guillemotright> A\"\n\n| BinOp: \"\\<lbrakk>Env\\<turnstile> B \\<guillemotright>\\<langle>e1\\<rangle>\\<guillemotright> E1; Env\\<turnstile> nrm E1 \\<guillemotright>\\<langle>e2\\<rangle>\\<guillemotright> A; \n binop \\<noteq> CondAnd; binop \\<noteq> CondOr\\<rbrakk>\n \\<Longrightarrow>\n Env\\<turnstile> B \\<guillemotright>\\<langle>BinOp binop e1 e2\\<rangle>\\<guillemotright> A\"\n\n| Super: \"This \\<in> B \n \\<Longrightarrow> \n Env\\<turnstile> B \\<guillemotright>\\<langle>Super\\<rangle>\\<guillemotright> \\<lparr>nrm=B,brk=\\<lambda> l. UNIV\\<rparr>\"\n\n| AccLVar: \"\\<lbrakk>vn \\<in> B;\n nrm A = B; brk A = (\\<lambda> k. UNIV)\\<rbrakk> \n \\<Longrightarrow> \n Env\\<turnstile> B \\<guillemotright>\\<langle>Acc (LVar vn)\\<rangle>\\<guillemotright> A\"\n\\<comment> \\<open>To properly access a local variable we have to test the definite \n assignment here. The variable must occur in the set \\<^term>\\<open>B\\<close>\\<close>\n\n| Acc: \"\\<lbrakk>\\<forall> vn. v \\<noteq> LVar vn;\n Env\\<turnstile> B \\<guillemotright>\\<langle>v\\<rangle>\\<guillemotright> A\\<rbrakk>\n \\<Longrightarrow>\n Env\\<turnstile> B \\<guillemotright>\\<langle>Acc v\\<rangle>\\<guillemotright> A\"\n\n| AssLVar: \"\\<lbrakk>Env\\<turnstile> B \\<guillemotright>\\<langle>e\\<rangle>\\<guillemotright> E; nrm A = nrm E \\<union> {vn}; brk A = brk E\\<rbrakk> \n \\<Longrightarrow> \n Env\\<turnstile> B \\<guillemotright>\\<langle>(LVar vn) := e\\<rangle>\\<guillemotright> A\"\n\n| Ass: \"\\<lbrakk>\\<forall> vn. v \\<noteq> LVar vn; Env\\<turnstile> B \\<guillemotright>\\<langle>v\\<rangle>\\<guillemotright> V; Env\\<turnstile> nrm V \\<guillemotright>\\<langle>e\\<rangle>\\<guillemotright> A\\<rbrakk>\n \\<Longrightarrow>\n Env\\<turnstile> B \\<guillemotright>\\<langle>v := e\\<rangle>\\<guillemotright> A\"\n\n| CondBool: \"\\<lbrakk>Env\\<turnstile>(c ? e1 : e2)\\<Colon>-(PrimT Boolean);\n Env\\<turnstile> B \\<guillemotright>\\<langle>c\\<rangle>\\<guillemotright> C;\n Env\\<turnstile> (B \\<union> assigns_if True c) \\<guillemotright>\\<langle>e1\\<rangle>\\<guillemotright> E1;\n Env\\<turnstile> (B \\<union> assigns_if False c) \\<guillemotright>\\<langle>e2\\<rangle>\\<guillemotright> E2;\n nrm A = B \\<union> (assigns_if True (c ? e1 : e2) \\<inter> \n assigns_if False (c ? e1 : e2));\n brk A = (\\<lambda> l. UNIV)\\<rbrakk>\n \\<Longrightarrow> \n Env\\<turnstile> B \\<guillemotright>\\<langle>c ? e1 : e2\\<rangle>\\<guillemotright> A\" \n\n| Cond: \"\\<lbrakk>\\<not> Env\\<turnstile>(c ? e1 : e2)\\<Colon>-(PrimT Boolean);\n Env\\<turnstile> B \\<guillemotright>\\<langle>c\\<rangle>\\<guillemotright> C;\n Env\\<turnstile> (B \\<union> assigns_if True c) \\<guillemotright>\\<langle>e1\\<rangle>\\<guillemotright> E1;\n Env\\<turnstile> (B \\<union> assigns_if False c) \\<guillemotright>\\<langle>e2\\<rangle>\\<guillemotright> E2;\n nrm A = nrm E1 \\<inter> nrm E2; brk A = (\\<lambda> l. UNIV)\\<rbrakk>\n \\<Longrightarrow> \n Env\\<turnstile> B \\<guillemotright>\\<langle>c ? e1 : e2\\<rangle>\\<guillemotright> A\" \n\n| Call: \"\\<lbrakk>Env\\<turnstile> B \\<guillemotright>\\<langle>e\\<rangle>\\<guillemotright> E; Env\\<turnstile> nrm E \\<guillemotright>\\<langle>args\\<rangle>\\<guillemotright> A\\<rbrakk> \n \\<Longrightarrow> \n Env\\<turnstile> B \\<guillemotright>\\<langle>{accC,statT,mode}e\\<cdot>mn({pTs}args)\\<rangle>\\<guillemotright> A\"\n\n\\<comment> \\<open>The interplay of \\<^term>\\<open>Call\\<close>, \\<^term>\\<open>Methd\\<close> and \\<^term>\\<open>Body\\<close>:\n Why rules for \\<^term>\\<open>Methd\\<close> and \\<^term>\\<open>Body\\<close> at all? Note that a\n Java source program will not include bare \\<^term>\\<open>Methd\\<close> or \\<^term>\\<open>Body\\<close>\n terms. These terms are just introduced during evaluation. So definite\n assignment of \\<^term>\\<open>Call\\<close> does not consider \\<^term>\\<open>Methd\\<close> or \n \\<^term>\\<open>Body\\<close> at all. So for definite assignment alone we could omit the\n rules for \\<^term>\\<open>Methd\\<close> and \\<^term>\\<open>Body\\<close>. \n But since evaluation of the method invocation is\n split up into three rules we must ensure that we have enough information\n about the call even in the \\<^term>\\<open>Body\\<close> term to make sure that we can\n proof type safety. Also we must be able transport this information \n from \\<^term>\\<open>Call\\<close> to \\<^term>\\<open>Methd\\<close> and then further to \\<^term>\\<open>Body\\<close> \n during evaluation to establish the definite assignment of \\<^term>\\<open>Methd\\<close>\n during evaluation of \\<^term>\\<open>Call\\<close>, and of \\<^term>\\<open>Body\\<close> during evaluation\n of \\<^term>\\<open>Methd\\<close>. This is necessary since definite assignment will be\n a precondition for each induction hypothesis coming out of the evaluation\n rules, and therefor we have to establish the definite assignment of the\n sub-evaluation during the type-safety proof. Note that well-typedness is\n also a precondition for type-safety and so we can omit some assertion \n that are already ensured by well-typedness.\\<close>\n| Methd: \"\\<lbrakk>methd (prg Env) D sig = Some m;\n Env\\<turnstile> B \\<guillemotright>\\<langle>Body (declclass m) (stmt (mbody (mthd m)))\\<rangle>\\<guillemotright> A\n \\<rbrakk>\n \\<Longrightarrow>\n Env\\<turnstile> B \\<guillemotright>\\<langle>Methd D sig\\<rangle>\\<guillemotright> A\" \n\n| Body: \"\\<lbrakk>Env\\<turnstile> B \\<guillemotright>\\<langle>c\\<rangle>\\<guillemotright> C; jumpNestingOkS {Ret} c; Result \\<in> nrm C;\n nrm A = B; brk A = (\\<lambda> l. UNIV)\\<rbrakk>\n \\<Longrightarrow>\n Env\\<turnstile> B \\<guillemotright>\\<langle>Body D c\\<rangle>\\<guillemotright> A\"\n\\<comment> \\<open>Note that \\<^term>\\<open>A\\<close> is not correlated to \\<^term>\\<open>C\\<close>. If the body\n statement returns abruptly with return, evaluation of \\<^term>\\<open>Body\\<close>\n will absorb this return and complete normally. So we cannot trivially\n get the assigned variables of the body statement since it has not \n completed normally or with a break.\n If the body completes normally we guarantee that the result variable\n is set with this rule. But if the body completes abruptly with a return\n we can't guarantee that the result variable is set here, since \n definite assignment only talks about normal completion and breaks. So\n for a return the \\<^term>\\<open>Jump\\<close> rule ensures that the result variable is\n set and then this information must be carried over to the \\<^term>\\<open>Body\\<close>\n rule by the conformance predicate of the state.\\<close>\n| LVar: \"Env\\<turnstile> B \\<guillemotright>\\<langle>LVar vn\\<rangle>\\<guillemotright> \\<lparr>nrm=B, brk=\\<lambda> l. UNIV\\<rparr>\" \n\n| FVar: \"Env\\<turnstile> B \\<guillemotright>\\<langle>e\\<rangle>\\<guillemotright> A \n \\<Longrightarrow> \n Env\\<turnstile> B \\<guillemotright>\\<langle>{accC,statDeclC,stat}e..fn\\<rangle>\\<guillemotright> A\" \n\n| AVar: \"\\<lbrakk>Env\\<turnstile> B \\<guillemotright>\\<langle>e1\\<rangle>\\<guillemotright> E1; Env\\<turnstile> nrm E1 \\<guillemotright>\\<langle>e2\\<rangle>\\<guillemotright> A\\<rbrakk>\n \\<Longrightarrow> \n Env\\<turnstile> B \\<guillemotright>\\<langle>e1.[e2]\\<rangle>\\<guillemotright> A\" \n\n| Nil: \"Env\\<turnstile> B \\<guillemotright>\\<langle>[]::expr list\\<rangle>\\<guillemotright> \\<lparr>nrm=B, brk=\\<lambda> l. UNIV\\<rparr>\" \n\n| Cons: \"\\<lbrakk>Env\\<turnstile> B \\<guillemotright>\\<langle>e::expr\\<rangle>\\<guillemotright> E; Env\\<turnstile> nrm E \\<guillemotright>\\<langle>es\\<rangle>\\<guillemotright> A\\<rbrakk>\n \\<Longrightarrow> \n Env\\<turnstile> B \\<guillemotright>\\<langle>e#es\\<rangle>\\<guillemotright> A\""
] |
template
|
###lemma
?Env\<turnstile> ?B \<guillemotright>\<langle> ?e1.0.[ ?e2.0]\<rangle>\<guillemotright> ?A \<Longrightarrow> (\<And>E1. ?Env\<turnstile> ?B \<guillemotright>\<langle> ?e1.0\<rangle>\<guillemotright> E1 \<Longrightarrow> ?Env\<turnstile> nrm E1 \<guillemotright>\<langle> ?e2.0\<rangle>\<guillemotright> ?A \<Longrightarrow> ?P) \<Longrightarrow> ?P
###symbols
DefiniteAssignment.assigned.nrm :::: 'a assigned_scheme \<Rightarrow> lname set
Term.var.AVar :::: expr \<Rightarrow> expr \<Rightarrow> Term.var
Term.inj_term_class.inj_term :::: 'a \<Rightarrow> Term.term
DefiniteAssignment.da :::: env \<Rightarrow> lname set \<Rightarrow> Term.term \<Rightarrow> assigned \<Rightarrow> bool
###defs
record assigned =
nrm :: "lname set" \<comment> \<open>Definetly assigned variables
for normal completion\<close>
brk :: "breakass" \<comment> \<open>Definetly assigned variables for
abrupt completion with a break\<close>
datatype var
= LVar lname \<comment> \<open>local variable (incl. parameters)\<close>
| FVar qtname qtname bool expr vname ("{_,_,_}_.._"[10,10,10,85,99]90)
\<comment> \<open>class field\<close>
\<comment> \<open>\<^term>\<open>{accC,statDeclC,stat}e..fn\<close>\<close>
\<comment> \<open>\<open>accC\<close>: accessing class (static class were\<close>
\<comment> \<open>the code is declared. Annotation only needed for\<close>
\<comment> \<open>evaluation to check accessibility)\<close>
\<comment> \<open>\<open>statDeclC\<close>: static declaration class of field\<close>
\<comment> \<open>\<open>stat\<close>: static or instance field?\<close>
\<comment> \<open>\<open>e\<close>: reference to object\<close>
\<comment> \<open>\<open>fn\<close>: field name\<close>
| AVar expr expr ("_.[_]"[90,10 ]90)
\<comment> \<open>array component\<close>
\<comment> \<open>\<^term>\<open>e1.[e2]\<close>: e1 array reference; e2 index\<close>
| InsInitV stmt var
\<comment> \<open>insertion of initialization before evaluation\<close>
\<comment> \<open>of var (technical term for smallstep semantics.)\<close>
and expr
= NewC qtname \<comment> \<open>class instance creation\<close>
| NewA ty expr ("New _[_]"[99,10 ]85)
\<comment> \<open>array creation\<close>
| Cast ty expr \<comment> \<open>type cast\<close>
| Inst expr ref_ty ("_ InstOf _"[85,99] 85)
\<comment> \<open>instanceof\<close>
| Lit val \<comment> \<open>literal value, references not allowed\<close>
| UnOp unop expr \<comment> \<open>unary operation\<close>
| BinOp binop expr expr \<comment> \<open>binary operation\<close>
| Super \<comment> \<open>special Super keyword\<close>
| Acc var \<comment> \<open>variable access\<close>
| Ass var expr ("_:=_" [90,85 ]85)
\<comment> \<open>variable assign\<close>
| Cond expr expr expr ("_ ? _ : _" [85,85,80]80) \<comment> \<open>conditional\<close>
| Call qtname ref_ty inv_mode expr mname "(ty list)" "(expr list)"
("{_,_,_}_\<cdot>_'( {_}_')"[10,10,10,85,99,10,10]85)
\<comment> \<open>method call\<close>
\<comment> \<open>\<^term>\<open>{accC,statT,mode}e\<cdot>mn({pTs}args)\<close> "\<close>
\<comment> \<open>\<open>accC\<close>: accessing class (static class were\<close>
\<comment> \<open>the call code is declared. Annotation only needed for\<close>
\<comment> \<open>evaluation to check accessibility)\<close>
\<comment> \<open>\<open>statT\<close>: static declaration class/interface of\<close>
\<comment> \<open>method\<close>
\<comment> \<open>\<open>mode\<close>: invocation mode\<close>
\<comment> \<open>\<open>e\<close>: reference to object\<close>
\<comment> \<open>\<open>mn\<close>: field name\<close>
\<comment> \<open>\<open>pTs\<close>: types of parameters\<close>
\<comment> \<open>\<open>args\<close>: the actual parameters/arguments\<close>
| Methd qtname sig \<comment> \<open>(folded) method (see below)\<close>
| Body qtname stmt \<comment> \<open>(unfolded) method body\<close>
| InsInitE stmt expr
\<comment> \<open>insertion of initialization before\<close>
\<comment> \<open>evaluation of expr (technical term for smallstep sem.)\<close>
| Callee locals expr \<comment> \<open>save callers locals in callee-Frame\<close>
\<comment> \<open>(technical term for smallstep semantics)\<close>
and stmt
= Skip \<comment> \<open>empty statement\<close>
| Expr expr \<comment> \<open>expression statement\<close>
| Lab jump stmt ("_\<bullet> _" [ 99,66]66)
\<comment> \<open>labeled statement; handles break\<close>
| Comp stmt stmt ("_;; _" [ 66,65]65)
| If' expr stmt stmt ("If'(_') _ Else _" [ 80,79,79]70)
| Loop label expr stmt ("_\<bullet> While'(_') _" [ 99,80,79]70)
| Jmp jump \<comment> \<open>break, continue, return\<close>
| Throw expr
| TryC stmt qtname vname stmt ("Try _ Catch'(_ _') _" [79,99,80,79]70)
\<comment> \<open>\<^term>\<open>Try c1 Catch(C vn) c2\<close>\<close>
\<comment> \<open>\<open>c1\<close>: block were exception may be thrown\<close>
\<comment> \<open>\<open>C\<close>: execption class to catch\<close>
\<comment> \<open>\<open>vn\<close>: local name for exception used in \<open>c2\<close>\<close>
\<comment> \<open>\<open>c2\<close>: block to execute when exception is cateched\<close>
| Fin stmt stmt ("_ Finally _" [ 79,79]70)
| FinA abopt stmt \<comment> \<open>Save abruption of first statement\<close>
\<comment> \<open>technical term for smallstep sem.)\<close>
| Init qtname \<comment> \<open>class initialization\<close>
class inj_term =
fixes inj_term:: "'a \<Rightarrow> term" ("\<langle>_\<rangle>" 1000)
inductive
da :: "env \<Rightarrow> lname set \<Rightarrow> term \<Rightarrow> assigned \<Rightarrow> bool" ("_\<turnstile> _ \<guillemotright>_\<guillemotright> _" [65,65,65,65] 71)
where
Skip: "Env\<turnstile> B \<guillemotright>\<langle>Skip\<rangle>\<guillemotright> \<lparr>nrm=B,brk=\<lambda> l. UNIV\<rparr>"
| Expr: "Env\<turnstile> B \<guillemotright>\<langle>e\<rangle>\<guillemotright> A
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>Expr e\<rangle>\<guillemotright> A"
| Lab: "\<lbrakk>Env\<turnstile> B \<guillemotright>\<langle>c\<rangle>\<guillemotright> C; nrm A = nrm C \<inter> (brk C) l; brk A = rmlab l (brk C)\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>Break l\<bullet> c\<rangle>\<guillemotright> A"
| Comp: "\<lbrakk>Env\<turnstile> B \<guillemotright>\<langle>c1\<rangle>\<guillemotright> C1; Env\<turnstile> nrm C1 \<guillemotright>\<langle>c2\<rangle>\<guillemotright> C2;
nrm A = nrm C2; brk A = (brk C1) \<Rightarrow>\<inter> (brk C2)\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>c1;; c2\<rangle>\<guillemotright> A"
| If: "\<lbrakk>Env\<turnstile> B \<guillemotright>\<langle>e\<rangle>\<guillemotright> E;
Env\<turnstile> (B \<union> assigns_if True e) \<guillemotright>\<langle>c1\<rangle>\<guillemotright> C1;
Env\<turnstile> (B \<union> assigns_if False e) \<guillemotright>\<langle>c2\<rangle>\<guillemotright> C2;
nrm A = nrm C1 \<inter> nrm C2;
brk A = brk C1 \<Rightarrow>\<inter> brk C2 \<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>If(e) c1 Else c2\<rangle>\<guillemotright> A"
\<comment> \<open>Note that \<^term>\<open>E\<close> is not further used, because we take the specialized
sets that also consider if the expression evaluates to True or False.
Inside of \<^term>\<open>e\<close> there is no {\tt break} or {\tt finally}, so the break
map of \<^term>\<open>E\<close> will be the trivial one. So
\<^term>\<open>Env\<turnstile>B \<guillemotright>\<langle>e\<rangle>\<guillemotright> E\<close> is just used to ensure the definite assignment in
expression \<^term>\<open>e\<close>.
Notice the implicit analysis of a constant boolean expression \<^term>\<open>e\<close>
in this rule. For example, if \<^term>\<open>e\<close> is constantly \<^term>\<open>True\<close> then
\<^term>\<open>assigns_if False e = UNIV\<close> and therefor \<^term>\<open>nrm C2=UNIV\<close>.
So finally \<^term>\<open>nrm A = nrm C1\<close>. For the break maps this trick
workd too, because the trivial break map will map all labels to
\<^term>\<open>UNIV\<close>. In the example, if no break occurs in \<^term>\<open>c2\<close> the break
maps will trivially map to \<^term>\<open>UNIV\<close> and if a break occurs it will map
to \<^term>\<open>UNIV\<close> too, because \<^term>\<open>assigns_if False e = UNIV\<close>. So
in the intersection of the break maps the path \<^term>\<open>c2\<close> will have no
contribution.\<close>
| Loop: "\<lbrakk>Env\<turnstile> B \<guillemotright>\<langle>e\<rangle>\<guillemotright> E;
Env\<turnstile> (B \<union> assigns_if True e) \<guillemotright>\<langle>c\<rangle>\<guillemotright> C;
nrm A = nrm C \<inter> (B \<union> assigns_if False e);
brk A = brk C\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>l\<bullet> While(e) c\<rangle>\<guillemotright> A"
\<comment> \<open>The \<open>Loop\<close> rule resembles some of the ideas of the \<open>If\<close> rule.
For the \<^term>\<open>nrm A\<close> the set \<^term>\<open>B \<union> assigns_if False e\<close>
will be \<^term>\<open>UNIV\<close> if the condition is constantly True. To normally exit
the while loop, we must consider the body \<^term>\<open>c\<close> to be completed
normally (\<^term>\<open>nrm C\<close>) or with a break. But in this model,
the label \<^term>\<open>l\<close> of the loop
only handles continue labels, not break labels. The break label will be
handled by an enclosing \<^term>\<open>Lab\<close> statement. So we don't have to
handle the breaks specially.\<close>
| Jmp: "\<lbrakk>jump=Ret \<longrightarrow> Result \<in> B;
nrm A = UNIV;
brk A = (case jump of
Break l \<Rightarrow> \<lambda> k. if k=l then B else UNIV
| Cont l \<Rightarrow> \<lambda> k. UNIV
| Ret \<Rightarrow> \<lambda> k. UNIV)\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>Jmp jump\<rangle>\<guillemotright> A"
\<comment> \<open>In case of a break to label \<^term>\<open>l\<close> the corresponding break set is all
variables assigned before the break. The assigned variables for normal
completion of the \<^term>\<open>Jmp\<close> is \<^term>\<open>UNIV\<close>, because the statement will
never complete normally. For continue and return the break map is the
trivial one. In case of a return we enshure that the result value is
assigned.\<close>
| Throw: "\<lbrakk>Env\<turnstile> B \<guillemotright>\<langle>e\<rangle>\<guillemotright> E; nrm A = UNIV; brk A = (\<lambda> l. UNIV)\<rbrakk>
\<Longrightarrow> Env\<turnstile> B \<guillemotright>\<langle>Throw e\<rangle>\<guillemotright> A"
| Try: "\<lbrakk>Env\<turnstile> B \<guillemotright>\<langle>c1\<rangle>\<guillemotright> C1;
Env\<lparr>lcl := (lcl Env)(VName vn\<mapsto>Class C)\<rparr>\<turnstile> (B \<union> {VName vn}) \<guillemotright>\<langle>c2\<rangle>\<guillemotright> C2;
nrm A = nrm C1 \<inter> nrm C2;
brk A = brk C1 \<Rightarrow>\<inter> brk C2\<rbrakk>
\<Longrightarrow> Env\<turnstile> B \<guillemotright>\<langle>Try c1 Catch(C vn) c2\<rangle>\<guillemotright> A"
| Fin: "\<lbrakk>Env\<turnstile> B \<guillemotright>\<langle>c1\<rangle>\<guillemotright> C1;
Env\<turnstile> B \<guillemotright>\<langle>c2\<rangle>\<guillemotright> C2;
nrm A = nrm C1 \<union> nrm C2;
brk A = ((brk C1) \<Rightarrow>\<union>\<^sub>\<forall> (nrm C2)) \<Rightarrow>\<inter> (brk C2)\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>c1 Finally c2\<rangle>\<guillemotright> A"
\<comment> \<open>The set of assigned variables before execution \<^term>\<open>c2\<close> are the same
as before execution \<^term>\<open>c1\<close>, because \<^term>\<open>c1\<close> could throw an exception
and so we can't guarantee that any variable will be assigned in \<^term>\<open>c1\<close>.
The \<open>Finally\<close> statement completes
normally if both \<^term>\<open>c1\<close> and \<^term>\<open>c2\<close> complete normally. If \<^term>\<open>c1\<close>
completes abruptly with a break, then \<^term>\<open>c2\<close> also will be executed
and may terminate normally or with a break. The overall break map then is
the intersection of the maps of both paths. If \<^term>\<open>c2\<close> terminates
normally we have to extend all break sets in \<^term>\<open>brk C1\<close> with
\<^term>\<open>nrm C2\<close> (\<open>\<Rightarrow>\<union>\<^sub>\<forall>\<close>). If \<^term>\<open>c2\<close> exits with a break this
break will appear in the overall result state. We don't know if
\<^term>\<open>c1\<close> completed normally or abruptly (maybe with an exception not only
a break) so \<^term>\<open>c1\<close> has no contribution to the break map following this
path.\<close>
\<comment> \<open>Evaluation of expressions and the break sets of definite assignment:
Thinking of a Java expression we assume that we can never have
a break statement inside of a expression. So for all expressions the
break sets could be set to the trivial one: \<^term>\<open>\<lambda> l. UNIV\<close>.
But we can't
trivially proof, that evaluating an expression will never result in a
break, allthough Java expressions allready syntactically don't allow
nested stetements in them. The reason are the nested class initialzation
statements which are inserted by the evaluation rules. So to proof the
absence of a break we need to ensure, that the initialization statements
will never end up in a break. In a wellfromed initialization statement,
of course, were breaks are nested correctly inside of \<^term>\<open>Lab\<close>
or \<^term>\<open>Loop\<close> statements evaluation of the whole initialization
statement will never result in a break, because this break will be
handled inside of the statement. But for simplicity we haven't added
the analysis of the correct nesting of breaks in the typing judgments
right now. So we have decided to adjust the rules of definite assignment
to fit to these circumstances. If an initialization is involved during
evaluation of the expression (evaluation rules \<open>FVar\<close>, \<open>NewC\<close>
and \<open>NewA\<close>\<close>
| Init: "Env\<turnstile> B \<guillemotright>\<langle>Init C\<rangle>\<guillemotright> \<lparr>nrm=B,brk=\<lambda> l. UNIV\<rparr>"
\<comment> \<open>Wellformedness of a program will ensure, that every static initialiser
is definetly assigned and the jumps are nested correctly. The case here
for \<^term>\<open>Init\<close> is just for convenience, to get a proper precondition
for the induction hypothesis in various proofs, so that we don't have to
expand the initialisation on every point where it is triggerred by the
evaluation rules.\<close>
| NewC: "Env\<turnstile> B \<guillemotright>\<langle>NewC C\<rangle>\<guillemotright> \<lparr>nrm=B,brk=\<lambda> l. UNIV\<rparr>"
| NewA: "Env\<turnstile> B \<guillemotright>\<langle>e\<rangle>\<guillemotright> A
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>New T[e]\<rangle>\<guillemotright> A"
| Cast: "Env\<turnstile> B \<guillemotright>\<langle>e\<rangle>\<guillemotright> A
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>Cast T e\<rangle>\<guillemotright> A"
| Inst: "Env\<turnstile> B \<guillemotright>\<langle>e\<rangle>\<guillemotright> A
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>e InstOf T\<rangle>\<guillemotright> A"
| Lit: "Env\<turnstile> B \<guillemotright>\<langle>Lit v\<rangle>\<guillemotright> \<lparr>nrm=B,brk=\<lambda> l. UNIV\<rparr>"
| UnOp: "Env\<turnstile> B \<guillemotright>\<langle>e\<rangle>\<guillemotright> A
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>UnOp unop e\<rangle>\<guillemotright> A"
| CondAnd: "\<lbrakk>Env\<turnstile> B \<guillemotright>\<langle>e1\<rangle>\<guillemotright> E1; Env\<turnstile> (B \<union> assigns_if True e1) \<guillemotright>\<langle>e2\<rangle>\<guillemotright> E2;
nrm A = B \<union> (assigns_if True (BinOp CondAnd e1 e2) \<inter>
assigns_if False (BinOp CondAnd e1 e2));
brk A = (\<lambda> l. UNIV) \<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>BinOp CondAnd e1 e2\<rangle>\<guillemotright> A"
| CondOr: "\<lbrakk>Env\<turnstile> B \<guillemotright>\<langle>e1\<rangle>\<guillemotright> E1; Env\<turnstile> (B \<union> assigns_if False e1) \<guillemotright>\<langle>e2\<rangle>\<guillemotright> E2;
nrm A = B \<union> (assigns_if True (BinOp CondOr e1 e2) \<inter>
assigns_if False (BinOp CondOr e1 e2));
brk A = (\<lambda> l. UNIV) \<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>BinOp CondOr e1 e2\<rangle>\<guillemotright> A"
| BinOp: "\<lbrakk>Env\<turnstile> B \<guillemotright>\<langle>e1\<rangle>\<guillemotright> E1; Env\<turnstile> nrm E1 \<guillemotright>\<langle>e2\<rangle>\<guillemotright> A;
binop \<noteq> CondAnd; binop \<noteq> CondOr\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>BinOp binop e1 e2\<rangle>\<guillemotright> A"
| Super: "This \<in> B
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>Super\<rangle>\<guillemotright> \<lparr>nrm=B,brk=\<lambda> l. UNIV\<rparr>"
| AccLVar: "\<lbrakk>vn \<in> B;
nrm A = B; brk A = (\<lambda> k. UNIV)\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>Acc (LVar vn)\<rangle>\<guillemotright> A"
\<comment> \<open>To properly access a local variable we have to test the definite
assignment here. The variable must occur in the set \<^term>\<open>B\<close>\<close>
| Acc: "\<lbrakk>\<forall> vn. v \<noteq> LVar vn;
Env\<turnstile> B \<guillemotright>\<langle>v\<rangle>\<guillemotright> A\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>Acc v\<rangle>\<guillemotright> A"
| AssLVar: "\<lbrakk>Env\<turnstile> B \<guillemotright>\<langle>e\<rangle>\<guillemotright> E; nrm A = nrm E \<union> {vn}; brk A = brk E\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>(LVar vn) := e\<rangle>\<guillemotright> A"
| Ass: "\<lbrakk>\<forall> vn. v \<noteq> LVar vn; Env\<turnstile> B \<guillemotright>\<langle>v\<rangle>\<guillemotright> V; Env\<turnstile> nrm V \<guillemotright>\<langle>e\<rangle>\<guillemotright> A\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>v := e\<rangle>\<guillemotright> A"
| CondBool: "\<lbrakk>Env\<turnstile>(c ? e1 : e2)\<Colon>-(PrimT Boolean);
Env\<turnstile> B \<guillemotright>\<langle>c\<rangle>\<guillemotright> C;
Env\<turnstile> (B \<union> assigns_if True c) \<guillemotright>\<langle>e1\<rangle>\<guillemotright> E1;
Env\<turnstile> (B \<union> assigns_if False c) \<guillemotright>\<langle>e2\<rangle>\<guillemotright> E2;
nrm A = B \<union> (assigns_if True (c ? e1 : e2) \<inter>
assigns_if False (c ? e1 : e2));
brk A = (\<lambda> l. UNIV)\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>c ? e1 : e2\<rangle>\<guillemotright> A"
| Cond: "\<lbrakk>\<not> Env\<turnstile>(c ? e1 : e2)\<Colon>-(PrimT Boolean);
Env\<turnstile> B \<guillemotright>\<langle>c\<rangle>\<guillemotright> C;
Env\<turnstile> (B \<union> assigns_if True c) \<guillemotright>\<langle>e1\<rangle>\<guillemotright> E1;
Env\<turnstile> (B \<union> assigns_if False c) \<guillemotright>\<langle>e2\<rangle>\<guillemotright> E2;
nrm A = nrm E1 \<inter> nrm E2; brk A = (\<lambda> l. UNIV)\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>c ? e1 : e2\<rangle>\<guillemotright> A"
| Call: "\<lbrakk>Env\<turnstile> B \<guillemotright>\<langle>e\<rangle>\<guillemotright> E; Env\<turnstile> nrm E \<guillemotright>\<langle>args\<rangle>\<guillemotright> A\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>{accC,statT,mode}e\<cdot>mn({pTs}args)\<rangle>\<guillemotright> A"
\<comment> \<open>The interplay of \<^term>\<open>Call\<close>, \<^term>\<open>Methd\<close> and \<^term>\<open>Body\<close>:
Why rules for \<^term>\<open>Methd\<close> and \<^term>\<open>Body\<close> at all? Note that a
Java source program will not include bare \<^term>\<open>Methd\<close> or \<^term>\<open>Body\<close>
terms. These terms are just introduced during evaluation. So definite
assignment of \<^term>\<open>Call\<close> does not consider \<^term>\<open>Methd\<close> or
\<^term>\<open>Body\<close> at all. So for definite assignment alone we could omit the
rules for \<^term>\<open>Methd\<close> and \<^term>\<open>Body\<close>.
But since evaluation of the method invocation is
split up into three rules we must ensure that we have enough information
about the call even in the \<^term>\<open>Body\<close> term to make sure that we can
proof type safety. Also we must be able transport this information
from \<^term>\<open>Call\<close> to \<^term>\<open>Methd\<close> and then further to \<^term>\<open>Body\<close>
during evaluation to establish the definite assignment of \<^term>\<open>Methd\<close>
during evaluation of \<^term>\<open>Call\<close>, and of \<^term>\<open>Body\<close> during evaluation
of \<^term>\<open>Methd\<close>. This is necessary since definite assignment will be
a precondition for each induction hypothesis coming out of the evaluation
rules, and therefor we have to establish the definite assignment of the
sub-evaluation during the type-safety proof. Note that well-typedness is
also a precondition for type-safety and so we can omit some assertion
that are already ensured by well-typedness.\<close>
| Methd: "\<lbrakk>methd (prg Env) D sig = Some m;
Env\<turnstile> B \<guillemotright>\<langle>Body (declclass m) (stmt (mbody (mthd m)))\<rangle>\<guillemotright> A
\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>Methd D sig\<rangle>\<guillemotright> A"
| Body: "\<lbrakk>Env\<turnstile> B \<guillemotright>\<langle>c\<rangle>\<guillemotright> C; jumpNestingOkS {Ret} c; Result \<in> nrm C;
nrm A = B; brk A = (\<lambda> l. UNIV)\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>Body D c\<rangle>\<guillemotright> A"
\<comment> \<open>Note that \<^term>\<open>A\<close> is not correlated to \<^term>\<open>C\<close>. If the body
statement returns abruptly with return, evaluation of \<^term>\<open>Body\<close>
will absorb this return and complete normally. So we cannot trivially
get the assigned variables of the body statement since it has not
completed normally or with a break.
If the body completes normally we guarantee that the result variable
is set with this rule. But if the body completes abruptly with a return
we can't guarantee that the result variable is set here, since
definite assignment only talks about normal completion and breaks. So
for a return the \<^term>\<open>Jump\<close> rule ensures that the result variable is
set and then this information must be carried over to the \<^term>\<open>Body\<close>
rule by the conformance predicate of the state.\<close>
| LVar: "Env\<turnstile> B \<guillemotright>\<langle>LVar vn\<rangle>\<guillemotright> \<lparr>nrm=B, brk=\<lambda> l. UNIV\<rparr>"
| FVar: "Env\<turnstile> B \<guillemotright>\<langle>e\<rangle>\<guillemotright> A
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>{accC,statDeclC,stat}e..fn\<rangle>\<guillemotright> A"
| AVar: "\<lbrakk>Env\<turnstile> B \<guillemotright>\<langle>e1\<rangle>\<guillemotright> E1; Env\<turnstile> nrm E1 \<guillemotright>\<langle>e2\<rangle>\<guillemotright> A\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>e1.[e2]\<rangle>\<guillemotright> A"
| Nil: "Env\<turnstile> B \<guillemotright>\<langle>[]::expr list\<rangle>\<guillemotright> \<lparr>nrm=B, brk=\<lambda> l. UNIV\<rparr>"
| Cons: "\<lbrakk>Env\<turnstile> B \<guillemotright>\<langle>e::expr\<rangle>\<guillemotright> E; Env\<turnstile> nrm E \<guillemotright>\<langle>es\<rangle>\<guillemotright> A\<rbrakk>
\<Longrightarrow>
Env\<turnstile> B \<guillemotright>\<langle>e#es\<rangle>\<guillemotright> A"
|
###output
\<lbrakk> ?H1 x_1 x_2 (?H2 (?H3 x_3 x_4)) x_5; \<And>y_0. \<lbrakk> ?H1 x_1 x_2 (?H2 x_3) y_0; ?H1 x_1 (?H4 y_0) (?H2 x_4) x_5\<rbrakk> \<Longrightarrow> x_6\<rbrakk> \<Longrightarrow> x_6###end
|
Complex
|
Complex.sgn_cis
|
lemma sgn_cis [simp]: "sgn (cis a) = cis a"
|
sgn (cis ?a) = cis ?a
|
?H1 (?H2 x_1) = ?H2 x_1
|
[
"Complex.cis",
"Groups.sgn_class.sgn"
] |
[
"real \\<Rightarrow> complex",
"'a \\<Rightarrow> 'a"
] |
[
"primcorec cis :: \"real \\<Rightarrow> complex\"\n where\n \"Re (cis a) = cos a\"\n | \"Im (cis a) = sin a\"",
"class sgn =\n fixes sgn :: \"'a \\<Rightarrow> 'a\""
] |
template
|
###lemma
sgn (cis ?a) = cis ?a
###symbols
Complex.cis :::: real \<Rightarrow> complex
Groups.sgn_class.sgn :::: 'a \<Rightarrow> 'a
###defs
primcorec cis :: "real \<Rightarrow> complex"
where
"Re (cis a) = cos a"
| "Im (cis a) = sin a"
class sgn =
fixes sgn :: "'a \<Rightarrow> 'a"
|
###output
?H1 (?H2 x_1) = ?H2 x_1###end
|
Topological_Spaces
|
Topological_Spaces.connected_Ici
|
lemma connected_Ici[simp]: "connected {a..}"
for a :: "'a::linear_continuum_topology"
|
connected { ?a..}
|
?H1 (?H2 x_1)
|
[
"Set_Interval.ord_class.atLeast",
"Topological_Spaces.topological_space_class.connected"
] |
[
"'a \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> bool"
] |
[
"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
connected { ?a..}
###symbols
Set_Interval.ord_class.atLeast :::: 'a \<Rightarrow> 'a set
Topological_Spaces.topological_space_class.connected :::: 'a set \<Rightarrow> bool
###defs
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
?H1 (?H2 x_1)###end
|
Nominal/Nominal
|
Nominal.at_ds8_aux
|
lemma at_ds8_aux:
fixes pi :: "'x prm"
and a :: "'x"
and b :: "'x"
and c :: "'x"
assumes at: "at TYPE('x)"
shows "pi\<bullet>(swap (a,b) c) = swap (pi\<bullet>a,pi\<bullet>b) (pi\<bullet>c)"
|
at TYPE(?'x) \<Longrightarrow> ?pi \<bullet> swap (?a, ?b) ?c = swap (?pi \<bullet> ?a, ?pi \<bullet> ?b) (?pi \<bullet> ?c)
|
?H1 TYPE(?'x) \<Longrightarrow> ?H2 x_1 (?H3 (x_2, x_3) x_4) = ?H3 (?H2 x_1 x_2, ?H2 x_1 x_3) (?H2 x_1 x_4)
|
[
"Nominal.swap",
"Nominal.perm",
"Nominal.at"
] |
[
"'a \\<times> 'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<times> 'a) list \\<Rightarrow> 'b \\<Rightarrow> 'b",
"'a itself \\<Rightarrow> bool"
] |
[
"consts \n perm :: \"'x prm \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixr \\<open>\\<bullet>\\<close> 80)\n swap :: \"('x \\<times> 'x) \\<Rightarrow> 'x \\<Rightarrow> 'x\"",
"definition\n \"at TYPE('x) \\<equiv> \n (\\<forall>(x::'x). ([]::'x prm)\\<bullet>x = x) \\<and>\n (\\<forall>(a::'x) (b::'x) (pi::'x prm) (x::'x). ((a,b)#(pi::'x prm))\\<bullet>x = swap (a,b) (pi\\<bullet>x)) \\<and> \n (\\<forall>(a::'x) (b::'x) (c::'x). swap (a,b) c = (if a=c then b else (if b=c then a else c))) \\<and> \n (infinite (UNIV::'x set))\""
] |
template
|
###lemma
at TYPE(?'x) \<Longrightarrow> ?pi \<bullet> swap (?a, ?b) ?c = swap (?pi \<bullet> ?a, ?pi \<bullet> ?b) (?pi \<bullet> ?c)
###symbols
Nominal.swap :::: 'a \<times> 'a \<Rightarrow> 'a \<Rightarrow> 'a
Nominal.perm :::: ('a \<times> 'a) list \<Rightarrow> 'b \<Rightarrow> 'b
Nominal.at :::: 'a itself \<Rightarrow> bool
###defs
consts
perm :: "'x prm \<Rightarrow> 'a \<Rightarrow> 'a" (infixr \<open>\<bullet>\<close> 80)
swap :: "('x \<times> 'x) \<Rightarrow> 'x \<Rightarrow> 'x"
definition
"at TYPE('x) \<equiv>
(\<forall>(x::'x). ([]::'x prm)\<bullet>x = x) \<and>
(\<forall>(a::'x) (b::'x) (pi::'x prm) (x::'x). ((a,b)#(pi::'x prm))\<bullet>x = swap (a,b) (pi\<bullet>x)) \<and>
(\<forall>(a::'x) (b::'x) (c::'x). swap (a,b) c = (if a=c then b else (if b=c then a else c))) \<and>
(infinite (UNIV::'x set))"
|
###output
?H1 TYPE(?'x) \<Longrightarrow> ?H2 x_1 (?H3 (x_2, x_3) x_4) = ?H3 (?H2 x_1 x_2, ?H2 x_1 x_3) (?H2 x_1 x_4)###end
|
Computational_Algebra/Formal_Power_Series
|
Formal_Power_Series.radical_fps_exp
|
lemma radical_fps_exp:
assumes r: "r (Suc k) 1 = 1"
shows "fps_radical r (Suc k) (fps_exp (c::'a::field_char_0)) = fps_exp (c / of_nat (Suc k))"
|
?r (Suc ?k) (1:: ?'a) = (1:: ?'a) \<Longrightarrow> fps_radical ?r (Suc ?k) (fps_exp ?c) = fps_exp (?c / of_nat (Suc ?k))
|
x_1 (?H1 x_2) ?H2 = ?H2 \<Longrightarrow> ?H3 x_1 (?H1 x_2) (?H4 x_3) = ?H4 (?H5 x_3 (?H6 (?H1 x_2)))
|
[
"Nat.semiring_1_class.of_nat",
"Fields.inverse_class.inverse_divide",
"Formal_Power_Series.fps_exp",
"Formal_Power_Series.fps_radical",
"Groups.one_class.one",
"Nat.Suc"
] |
[
"nat \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a fps",
"(nat \\<Rightarrow> 'a \\<Rightarrow> 'a) \\<Rightarrow> nat \\<Rightarrow> 'a fps \\<Rightarrow> 'a fps",
"'a",
"nat \\<Rightarrow> nat"
] |
[
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"definition \"fps_exp x = Abs_fps (\\<lambda>n. x^n / of_nat (fact n))\"",
"definition \"fps_radical r n a = Abs_fps (radical r n a)\"",
"class one =\n fixes one :: 'a (\"1\")",
"definition Suc :: \"nat \\<Rightarrow> nat\"\n where \"Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))\""
] |
template
|
###lemma
?r (Suc ?k) (1:: ?'a) = (1:: ?'a) \<Longrightarrow> fps_radical ?r (Suc ?k) (fps_exp ?c) = fps_exp (?c / of_nat (Suc ?k))
###symbols
Nat.semiring_1_class.of_nat :::: nat \<Rightarrow> 'a
Fields.inverse_class.inverse_divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Formal_Power_Series.fps_exp :::: 'a \<Rightarrow> 'a fps
Formal_Power_Series.fps_radical :::: (nat \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> nat \<Rightarrow> 'a fps \<Rightarrow> 'a fps
Groups.one_class.one :::: 'a
Nat.Suc :::: nat \<Rightarrow> nat
###defs
class inverse = divide +
fixes inverse :: "'a \<Rightarrow> 'a"
begin
definition "fps_exp x = Abs_fps (\<lambda>n. x^n / of_nat (fact n))"
definition "fps_radical r n a = Abs_fps (radical r n a)"
class one =
fixes one :: 'a ("1")
definition Suc :: "nat \<Rightarrow> nat"
where "Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))"
|
###output
x_1 (?H1 x_2) ?H2 = ?H2 \<Longrightarrow> ?H3 x_1 (?H1 x_2) (?H4 x_3) = ?H4 (?H5 x_3 (?H6 (?H1 x_2)))###end
|
Nonstandard_Analysis/NSA
|
NSA.hrabs_le_Infinitesimal
|
lemma hrabs_le_Infinitesimal: "e \<in> Infinitesimal \<Longrightarrow> \<bar>x\<bar> \<le> e \<Longrightarrow> x \<in> Infinitesimal"
for x :: hypreal
|
?e \<in> Infinitesimal \<Longrightarrow> \<bar> ?x\<bar> \<le> ?e \<Longrightarrow> ?x \<in> Infinitesimal
|
\<lbrakk>x_1 \<in> ?H1; ?H2 x_2 \<le> x_1\<rbrakk> \<Longrightarrow> x_2 \<in> ?H1
|
[
"Groups.abs_class.abs",
"NSA.Infinitesimal"
] |
[
"'a \\<Rightarrow> 'a",
"'a star set"
] |
[
"class abs =\n fixes abs :: \"'a \\<Rightarrow> 'a\" (\"\\<bar>_\\<bar>\")",
"definition Infinitesimal :: \"('a::real_normed_vector) star set\"\n where \"Infinitesimal = {x. \\<forall>r \\<in> Reals. 0 < r \\<longrightarrow> hnorm x < r}\""
] |
template
|
###lemma
?e \<in> Infinitesimal \<Longrightarrow> \<bar> ?x\<bar> \<le> ?e \<Longrightarrow> ?x \<in> Infinitesimal
###symbols
Groups.abs_class.abs :::: 'a \<Rightarrow> 'a
NSA.Infinitesimal :::: 'a star set
###defs
class abs =
fixes abs :: "'a \<Rightarrow> 'a" ("\<bar>_\<bar>")
definition Infinitesimal :: "('a::real_normed_vector) star set"
where "Infinitesimal = {x. \<forall>r \<in> Reals. 0 < r \<longrightarrow> hnorm x < r}"
|
###output
\<lbrakk>x_1 \<in> ?H1; ?H2 x_2 \<le> x_1\<rbrakk> \<Longrightarrow> x_2 \<in> ?H1###end
|
Bit_Operations
|
Bit_Operations.not_negative_int_iff
|
lemma not_negative_int_iff [simp]:
\<open>NOT k < 0 \<longleftrightarrow> k \<ge> 0\<close> for k :: int
|
(not ?k < 0) = (0 \<le> ?k)
|
(?H1 x_1 < ?H2) = (?H2 \<le> x_1)
|
[
"Groups.zero_class.zero",
"Bit_Operations.ring_bit_operations_class.not"
] |
[
"'a",
"'a \\<Rightarrow> 'a"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"class ring_bit_operations = semiring_bit_operations + ring_parity +\n fixes not :: \\<open>'a \\<Rightarrow> 'a\\<close> (\\<open>NOT\\<close>)\n assumes not_eq_complement: \\<open>NOT a = - a - 1\\<close>\nbegin"
] |
template
|
###lemma
(not ?k < 0) = (0 \<le> ?k)
###symbols
Groups.zero_class.zero :::: 'a
Bit_Operations.ring_bit_operations_class.not :::: 'a \<Rightarrow> 'a
###defs
class zero =
fixes zero :: 'a ("0")
class ring_bit_operations = semiring_bit_operations + ring_parity +
fixes not :: \<open>'a \<Rightarrow> 'a\<close> (\<open>NOT\<close>)
assumes not_eq_complement: \<open>NOT a = - a - 1\<close>
begin
|
###output
(?H1 x_1 < ?H2) = (?H2 \<le> x_1)###end
|
Combinatorics/Orbits
|
Orbits.orbit_altdef_permutation
|
lemma orbit_altdef_permutation:
assumes "permutation f" shows "orbit f s = {(f ^^ n) s | n. True}"
|
permutation ?f \<Longrightarrow> orbit ?f ?s = {(?f ^^ n) ?s |n. True}
|
?H1 x_1 \<Longrightarrow> ?H2 x_1 x_2 = ?H3 (\<lambda>y_0. \<exists>y_1. y_0 = ?H4 x_1 y_1 x_2 \<and> True)
|
[
"Nat.compower",
"Set.Collect",
"Orbits.orbit",
"Permutations.permutation"
] |
[
"'a \\<Rightarrow> nat \\<Rightarrow> 'a",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'a) \\<Rightarrow> bool"
] |
[
"abbreviation compower :: \"'a \\<Rightarrow> nat \\<Rightarrow> 'a\" (infixr \"^^\" 80)\n where \"f ^^ n \\<equiv> compow n f\"",
"inductive_set orbit :: \"('a \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> 'a set\" for f x where\n base: \"f x \\<in> orbit f x\" |\n step: \"y \\<in> orbit f x \\<Longrightarrow> f y \\<in> orbit f x\"",
"definition \"permutation p \\<longleftrightarrow> (\\<exists>n. swapidseq n p)\""
] |
template
|
###lemma
permutation ?f \<Longrightarrow> orbit ?f ?s = {(?f ^^ n) ?s |n. True}
###symbols
Nat.compower :::: 'a \<Rightarrow> nat \<Rightarrow> 'a
Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set
Orbits.orbit :::: ('a \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> 'a set
Permutations.permutation :::: ('a \<Rightarrow> 'a) \<Rightarrow> bool
###defs
abbreviation compower :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^^" 80)
where "f ^^ n \<equiv> compow n f"
inductive_set orbit :: "('a \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> 'a set" for f x where
base: "f x \<in> orbit f x" |
step: "y \<in> orbit f x \<Longrightarrow> f y \<in> orbit f x"
definition "permutation p \<longleftrightarrow> (\<exists>n. swapidseq n p)"
|
###output
?H1 x_1 \<Longrightarrow> ?H2 x_1 x_2 = ?H3 (\<lambda>y_0. \<exists>y_1. y_0 = ?H4 x_1 y_1 x_2 \<and> True)###end
|
Set
|
Set.vimageE
|
lemma vimageE [elim!]: "a \<in> f -` B \<Longrightarrow> (\<And>x. f a = x \<Longrightarrow> x \<in> B \<Longrightarrow> P) \<Longrightarrow> P"
|
?a \<in> ?f -` ?B \<Longrightarrow> (\<And>x. ?f ?a = x \<Longrightarrow> x \<in> ?B \<Longrightarrow> ?P) \<Longrightarrow> ?P
|
\<lbrakk>x_1 \<in> ?H1 x_2 x_3; \<And>y_0. \<lbrakk>x_2 x_1 = y_0; y_0 \<in> x_3\<rbrakk> \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_4
|
[
"Set.vimage"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set \\<Rightarrow> 'a set"
] |
[
"definition vimage :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set \\<Rightarrow> 'a set\" (infixr \"-`\" 90)\n where \"f -` B \\<equiv> {x. f x \\<in> B}\""
] |
template
|
###lemma
?a \<in> ?f -` ?B \<Longrightarrow> (\<And>x. ?f ?a = x \<Longrightarrow> x \<in> ?B \<Longrightarrow> ?P) \<Longrightarrow> ?P
###symbols
Set.vimage :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b set \<Rightarrow> 'a set
###defs
definition vimage :: "('a \<Rightarrow> 'b) \<Rightarrow> 'b set \<Rightarrow> 'a set" (infixr "-`" 90)
where "f -` B \<equiv> {x. f x \<in> B}"
|
###output
\<lbrakk>x_1 \<in> ?H1 x_2 x_3; \<And>y_0. \<lbrakk>x_2 x_1 = y_0; y_0 \<in> x_3\<rbrakk> \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_4###end
|
Library/RBT_Set
|
RBT_Set.Min_fin_set_fold
|
lemma Min_fin_set_fold [code]:
"Min (Set t) =
(if RBT.is_empty t
then Code.abort (STR ''not_non_empty_tree'') (\<lambda>_. Min (Set t))
else r_min_opt t)"
|
Min (RBT_Set.Set ?t) = (if RBT.is_empty ?t then Code.abort STR ''not_non_empty_tree'' (\<lambda>_. Min (RBT_Set.Set ?t)) else r_min_opt ?t)
|
?H1 (?H2 x_1) = (if ?H3 x_1 then ?H4 (?H5 False True True True False True True (?H5 True True True True False True True (?H5 False False True False True True True (?H5 True True True True True False True (?H5 False True True True False True True (?H5 True True True True False True True (?H5 False True True True False True True (?H5 True True True True True False True (?H5 True False True False False True True (?H5 True False True True False True True (?H5 False False False False True True True (?H5 False False True False True True True (?H5 True False False True True True True (?H5 True True True True True False True (?H5 False False True False True True True (?H5 False True False False True True True (?H5 True False True False False True True (?H5 True False True False False True True ?H6)))))))))))))))))) (\<lambda>y_0. ?H1 (?H2 x_1)) else ?H7 x_1)
|
[
"RBT_Set.r_min_opt",
"String.empty_literal",
"String.Literal",
"String.Code.abort",
"RBT.is_empty",
"RBT_Set.Set",
"Lattices_Big.linorder_class.Min"
] |
[
"('a, unit) RBT.rbt \\<Rightarrow> 'a",
"String.literal",
"bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> String.literal \\<Rightarrow> String.literal",
"String.literal \\<Rightarrow> (unit \\<Rightarrow> 'a) \\<Rightarrow> 'a",
"('a, 'b) RBT.rbt \\<Rightarrow> bool",
"('a, unit) RBT.rbt \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a"
] |
[
"abbreviation (output) empty_literal :: String.literal\n where \"empty_literal \\<equiv> 0\"",
"definition is_empty :: \"('a::linorder, 'b) rbt \\<Rightarrow> bool\" where\n [code]: \"is_empty t = (case impl_of t of RBT_Impl.Empty \\<Rightarrow> True | _ \\<Rightarrow> False)\"",
"definition Set :: \"('a::linorder, unit) rbt \\<Rightarrow> 'a set\" \n where \"Set t = {x . RBT.lookup t x = Some ()}\""
] |
template
|
###lemma
Min (RBT_Set.Set ?t) = (if RBT.is_empty ?t then Code.abort STR ''not_non_empty_tree'' (\<lambda>_. Min (RBT_Set.Set ?t)) else r_min_opt ?t)
###symbols
RBT_Set.r_min_opt :::: ('a, unit) RBT.rbt \<Rightarrow> 'a
String.empty_literal :::: String.literal
String.Literal :::: bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> String.literal \<Rightarrow> String.literal
String.Code.abort :::: String.literal \<Rightarrow> (unit \<Rightarrow> 'a) \<Rightarrow> 'a
RBT.is_empty :::: ('a, 'b) RBT.rbt \<Rightarrow> bool
RBT_Set.Set :::: ('a, unit) RBT.rbt \<Rightarrow> 'a set
Lattices_Big.linorder_class.Min :::: 'a set \<Rightarrow> 'a
###defs
abbreviation (output) empty_literal :: String.literal
where "empty_literal \<equiv> 0"
definition is_empty :: "('a::linorder, 'b) rbt \<Rightarrow> bool" where
[code]: "is_empty t = (case impl_of t of RBT_Impl.Empty \<Rightarrow> True | _ \<Rightarrow> False)"
definition Set :: "('a::linorder, unit) rbt \<Rightarrow> 'a set"
where "Set t = {x . RBT.lookup t x = Some ()}"
|
###output
?H1 (?H2 x_1) = (if ?H3 x_1 then ?H4 (?H5 False True True True False True True (?H5 True True True True False True True (?H5 False False True False True True True (?H5 True True True True True False True (?H5 False True True True False True True (?H5 True True True True False True True (?H5 False True True True False True True (?H5 True True True True True False True (?H5 True False True False False True True (?H5 True False True True False True True (?H5 False False False False True True True (?H5 False False True False True True True (?H5 True False False True True True True (?H5 True True True True True False True (?H5 False False True False True True True (?H5 False True False False True True True (?H5 True False True False False True True (?H5 True False True False False True True ?H6)))))))))))))))))) (\<lambda>y_0. ?H1 (?H2 x_1)) else ?H7 x_1)###end
|
Analysis/Measure_Space
|
Measure_Space.enn2real_plus
|
lemma enn2real_plus:"a < top \<Longrightarrow> b < top \<Longrightarrow> enn2real (a + b) = enn2real a + enn2real b"
|
?a < top \<Longrightarrow> ?b < top \<Longrightarrow> enn2real (?a + ?b) = enn2real ?a + enn2real ?b
|
\<lbrakk>x_1 < ?H1; x_2 < ?H1\<rbrakk> \<Longrightarrow> ?H2 (?H3 x_1 x_2) = ?H3 (?H2 x_1) (?H2 x_2)
|
[
"Groups.plus_class.plus",
"Extended_Nonnegative_Real.enn2real",
"Orderings.top_class.top"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"ennreal \\<Rightarrow> real",
"'a"
] |
[
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"definition \"enn2real x = real_of_ereal (enn2ereal x)\"",
"class top =\n fixes top :: 'a (\"\\<top>\")"
] |
template
|
###lemma
?a < top \<Longrightarrow> ?b < top \<Longrightarrow> enn2real (?a + ?b) = enn2real ?a + enn2real ?b
###symbols
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Extended_Nonnegative_Real.enn2real :::: ennreal \<Rightarrow> real
Orderings.top_class.top :::: 'a
###defs
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
definition "enn2real x = real_of_ereal (enn2ereal x)"
class top =
fixes top :: 'a ("\<top>")
|
###output
\<lbrakk>x_1 < ?H1; x_2 < ?H1\<rbrakk> \<Longrightarrow> ?H2 (?H3 x_1 x_2) = ?H3 (?H2 x_1) (?H2 x_2)###end
|
HOLCF/Tr
|
Transfer.transfer_raw(8)
| null |
Transfer.Rel (rel_fun (rel_fun ?R (=)) (rel_fun (rel_u ?R) (=))) pred_u pred_u
|
?H1 (?H2 (?H2 x_1 (=)) (?H2 (?H3 x_1) (=))) ?H4 ?H4
|
[
"Up.u.pred_u",
"Up.u.rel_u",
"BNF_Def.rel_fun",
"Transfer.Rel"
] |
[
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a\\<^sub>\\<bottom> \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a\\<^sub>\\<bottom> \\<Rightarrow> 'b\\<^sub>\\<bottom> \\<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"
] |
[
"datatype 'a u (\"(_\\<^sub>\\<bottom>)\" [1000] 999) = Ibottom | Iup 'a",
"datatype 'a u (\"(_\\<^sub>\\<bottom>)\" [1000] 999) = Ibottom | Iup '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))\"",
"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 (rel_fun ?R (=)) (rel_fun (rel_u ?R) (=))) pred_u pred_u
###symbols
Up.u.pred_u :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a\<^sub>\<bottom> \<Rightarrow> bool
Up.u.rel_u :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a\<^sub>\<bottom> \<Rightarrow> 'b\<^sub>\<bottom> \<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
datatype 'a u ("(_\<^sub>\<bottom>)" [1000] 999) = Ibottom | Iup 'a
datatype 'a u ("(_\<^sub>\<bottom>)" [1000] 999) = Ibottom | Iup '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))"
definition Rel :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool"
where "Rel r \<equiv> r"
|
###output
?H1 (?H2 (?H2 x_1 (=)) (?H2 (?H3 x_1) (=))) ?H4 ?H4###end
|
List
|
List.zip_Cons1
|
lemma zip_Cons1:
"zip (x#xs) ys = (case ys of [] \<Rightarrow> [] | y#ys \<Rightarrow> (x,y)#zip xs ys)"
|
zip (?x # ?xs) ?ys = (case ?ys of [] \<Rightarrow> [] | y # ys \<Rightarrow> (?x, y) # zip ?xs ys)
|
?H1 (?H2 x_1 x_2) x_3 = ?H3 ?H4 (\<lambda>y_0 y_1. ?H2 (x_1, y_0) (?H1 x_2 y_1)) x_3
|
[
"List.list.Nil",
"List.list.case_list",
"List.list.Cons",
"List.zip"
] |
[
"'a list",
"'a \\<Rightarrow> ('b \\<Rightarrow> 'b list \\<Rightarrow> 'a) \\<Rightarrow> 'b list \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a list \\<Rightarrow> 'a list",
"'a list \\<Rightarrow> 'b list \\<Rightarrow> ('a \\<times> '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 [] = []\"",
"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 [] = []\"",
"primrec zip :: \"'a list \\<Rightarrow> 'b list \\<Rightarrow> ('a \\<times> 'b) list\" where\n\"zip xs [] = []\" |\nzip_Cons: \"zip xs (y # ys) =\n (case xs of [] \\<Rightarrow> [] | z # zs \\<Rightarrow> (z, y) # zip zs ys)\"\n \\<comment> \\<open>Warning: simpset does not contain this definition, but separate\n theorems for \\<open>xs = []\\<close> and \\<open>xs = z # zs\\<close>\\<close>"
] |
template
|
###lemma
zip (?x # ?xs) ?ys = (case ?ys of [] \<Rightarrow> [] | y # ys \<Rightarrow> (?x, y) # zip ?xs ys)
###symbols
List.list.Nil :::: 'a list
List.list.case_list :::: 'a \<Rightarrow> ('b \<Rightarrow> 'b list \<Rightarrow> 'a) \<Rightarrow> 'b list \<Rightarrow> 'a
List.list.Cons :::: 'a \<Rightarrow> 'a list \<Rightarrow> 'a list
List.zip :::: 'a list \<Rightarrow> 'b list \<Rightarrow> ('a \<times> '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 [] = []"
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 [] = []"
primrec zip :: "'a list \<Rightarrow> 'b list \<Rightarrow> ('a \<times> 'b) list" where
"zip xs [] = []" |
zip_Cons: "zip xs (y # ys) =
(case xs of [] \<Rightarrow> [] | z # zs \<Rightarrow> (z, y) # zip zs ys)"
\<comment> \<open>Warning: simpset does not contain this definition, but separate
theorems for \<open>xs = []\<close> and \<open>xs = z # zs\<close>\<close>
|
###output
?H1 (?H2 x_1 x_2) x_3 = ?H3 ?H4 (\<lambda>y_0 y_1. ?H2 (x_1, y_0) (?H1 x_2 y_1)) x_3###end
|
Library/Finite_Map
|
Finite_Map.fmrelI
|
lemma fmrelI[intro]:
assumes "\<And>x. rel_option R (fmlookup m x) (fmlookup n x)"
shows "fmrel R m n"
|
(\<And>x. rel_option ?R (fmlookup ?m x) (fmlookup ?n x)) \<Longrightarrow> fmrel ?R ?m ?n
|
(\<And>y_0. ?H1 x_1 (?H2 x_2 y_0) (?H2 x_3 y_0)) \<Longrightarrow> ?H3 x_1 x_2 x_3
|
[
"Finite_Map.fmap.fmrel",
"Finite_Map.fmap.fmlookup",
"Option.option.rel_option"
] |
[
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c, 'a) fmap \\<Rightarrow> ('c, 'b) fmap \\<Rightarrow> bool",
"('a, 'b) fmap \\<Rightarrow> 'a \\<Rightarrow> 'b option",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a option \\<Rightarrow> 'b option \\<Rightarrow> bool"
] |
[
"typedef ('a, 'b) fmap = \"{m. finite (dom m)} :: ('a \\<rightharpoonup> 'b) set\"\n morphisms fmlookup Abs_fmap",
"typedef ('a, 'b) fmap = \"{m. finite (dom m)} :: ('a \\<rightharpoonup> 'b) set\"\n morphisms fmlookup Abs_fmap",
"datatype 'a option =\n None\n | Some (the: 'a)"
] |
template
|
###lemma
(\<And>x. rel_option ?R (fmlookup ?m x) (fmlookup ?n x)) \<Longrightarrow> fmrel ?R ?m ?n
###symbols
Finite_Map.fmap.fmrel :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c, 'a) fmap \<Rightarrow> ('c, 'b) fmap \<Rightarrow> bool
Finite_Map.fmap.fmlookup :::: ('a, 'b) fmap \<Rightarrow> 'a \<Rightarrow> 'b option
Option.option.rel_option :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a option \<Rightarrow> 'b option \<Rightarrow> bool
###defs
typedef ('a, 'b) fmap = "{m. finite (dom m)} :: ('a \<rightharpoonup> 'b) set"
morphisms fmlookup Abs_fmap
typedef ('a, 'b) fmap = "{m. finite (dom m)} :: ('a \<rightharpoonup> 'b) set"
morphisms fmlookup Abs_fmap
datatype 'a option =
None
| Some (the: 'a)
|
###output
(\<And>y_0. ?H1 x_1 (?H2 x_2 y_0) (?H2 x_3 y_0)) \<Longrightarrow> ?H3 x_1 x_2 x_3###end
|
List
|
List.lex_transI
| null |
trans ?r \<Longrightarrow> trans (lex ?r)
|
?H1 x_1 \<Longrightarrow> ?H1 (?H2 x_1)
|
[
"List.lex",
"Relation.trans"
] |
[
"('a \\<times> 'a) set \\<Rightarrow> ('a list \\<times> 'a list) set",
"('a \\<times> 'a) set \\<Rightarrow> bool"
] |
[
"definition lex :: \"('a \\<times> 'a) set \\<Rightarrow> ('a list \\<times> 'a list) set\" where\n\"lex r = (\\<Union>n. lexn r n)\" \\<comment> \\<open>Holds only between lists of the same length\\<close>",
"abbreviation trans :: \"'a rel \\<Rightarrow> bool\" where\n \"trans \\<equiv> trans_on UNIV\""
] |
template
|
###lemma
trans ?r \<Longrightarrow> trans (lex ?r)
###symbols
List.lex :::: ('a \<times> 'a) set \<Rightarrow> ('a list \<times> 'a list) set
Relation.trans :::: ('a \<times> 'a) set \<Rightarrow> bool
###defs
definition lex :: "('a \<times> 'a) set \<Rightarrow> ('a list \<times> 'a list) set" where
"lex r = (\<Union>n. lexn r n)" \<comment> \<open>Holds only between lists of the same length\<close>
abbreviation trans :: "'a rel \<Rightarrow> bool" where
"trans \<equiv> trans_on UNIV"
|
###output
?H1 x_1 \<Longrightarrow> ?H1 (?H2 x_1)###end
|
Nominal/Examples/Pattern
|
Pattern.psubst_fresh(1)
|
lemma psubst_fresh:
assumes "x \<in> set (map fst \<theta>)" and "\<forall>(y, t)\<in>set \<theta>. x \<sharp> t"
shows "x \<sharp> \<theta>\<lparr>t\<rparr>" and "x \<sharp> \<theta>\<lparr>t'\<rparr>\<^sub>b"
|
?x \<in> set (map fst ?\<theta>) \<Longrightarrow> \<forall>(y, t)\<in>set ?\<theta>. ?x \<sharp> t \<Longrightarrow> ?x \<sharp> ?\<theta>\<lparr> ?t\<rparr>
|
\<lbrakk>x_1 \<in> ?H1 (?H2 ?H3 x_2); Ball (?H1 x_2) (?H4 (\<lambda>y_0. ?H5 x_1))\<rbrakk> \<Longrightarrow> ?H5 x_1 (?H6 x_2 x_3)
|
[
"Pattern.psubst",
"Nominal.fresh",
"Product_Type.prod.case_prod",
"Product_Type.prod.fst",
"List.list.map",
"List.list.set"
] |
[
"(name \\<times> trm) list \\<Rightarrow> trm \\<Rightarrow> trm",
"'a \\<Rightarrow> 'b \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> 'c) \\<Rightarrow> 'a \\<times> 'b \\<Rightarrow> 'c",
"'a \\<times> 'b \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a list \\<Rightarrow> 'b list",
"'a list \\<Rightarrow> 'a set"
] |
[
"definition fresh :: \"'x \\<Rightarrow> 'a \\<Rightarrow> bool\" (\\<open>_ \\<sharp> _\\<close> [80,80] 80) where\n \"a \\<sharp> x \\<longleftrightarrow> a \\<notin> supp x\"",
"definition \"prod = {f. \\<exists>a b. f = Pair_Rep (a::'a) (b::'b)}\"",
"definition \"prod = {f. \\<exists>a b. f = Pair_Rep (a::'a) (b::'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 [] = []\""
] |
template
|
###lemma
?x \<in> set (map fst ?\<theta>) \<Longrightarrow> \<forall>(y, t)\<in>set ?\<theta>. ?x \<sharp> t \<Longrightarrow> ?x \<sharp> ?\<theta>\<lparr> ?t\<rparr>
###symbols
Pattern.psubst :::: (name \<times> trm) list \<Rightarrow> trm \<Rightarrow> trm
Nominal.fresh :::: 'a \<Rightarrow> 'b \<Rightarrow> bool
Product_Type.prod.case_prod :::: ('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'a \<times> 'b \<Rightarrow> 'c
Product_Type.prod.fst :::: 'a \<times> 'b \<Rightarrow> 'a
List.list.map :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a list \<Rightarrow> 'b list
List.list.set :::: 'a list \<Rightarrow> 'a set
###defs
definition fresh :: "'x \<Rightarrow> 'a \<Rightarrow> bool" (\<open>_ \<sharp> _\<close> [80,80] 80) where
"a \<sharp> x \<longleftrightarrow> a \<notin> supp x"
definition "prod = {f. \<exists>a b. f = Pair_Rep (a::'a) (b::'b)}"
definition "prod = {f. \<exists>a b. f = Pair_Rep (a::'a) (b::'b)}"
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 [] = []"
|
###output
\<lbrakk>x_1 \<in> ?H1 (?H2 ?H3 x_2); Ball (?H1 x_2) (?H4 (\<lambda>y_0. ?H5 x_1))\<rbrakk> \<Longrightarrow> ?H5 x_1 (?H6 x_2 x_3)###end
|
Complex_Analysis/Complex_Analysis
|
Complex_Analysis_Basics.holomorphic_onI
| null |
(\<And>x. x \<in> ?s \<Longrightarrow> ?f field_differentiable at x within ?s) \<Longrightarrow> ?f holomorphic_on ?s
|
(\<And>y_0. y_0 \<in> x_1 \<Longrightarrow> ?H1 x_2 (?H2 y_0 x_1)) \<Longrightarrow> ?H3 x_2 x_1
|
[
"Complex_Analysis_Basics.holomorphic_on",
"Topological_Spaces.topological_space_class.at_within",
"Derivative.field_differentiable"
] |
[
"(complex \\<Rightarrow> complex) \\<Rightarrow> complex set \\<Rightarrow> bool",
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a filter",
"('a \\<Rightarrow> 'a) \\<Rightarrow> 'a filter \\<Rightarrow> bool"
] |
[
"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
(\<And>x. x \<in> ?s \<Longrightarrow> ?f field_differentiable at x within ?s) \<Longrightarrow> ?f holomorphic_on ?s
###symbols
Complex_Analysis_Basics.holomorphic_on :::: (complex \<Rightarrow> complex) \<Rightarrow> complex set \<Rightarrow> bool
Topological_Spaces.topological_space_class.at_within :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a filter
Derivative.field_differentiable :::: ('a \<Rightarrow> 'a) \<Rightarrow> 'a filter \<Rightarrow> bool
###defs
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
(\<And>y_0. y_0 \<in> x_1 \<Longrightarrow> ?H1 x_2 (?H2 y_0 x_1)) \<Longrightarrow> ?H3 x_2 x_1###end
|
Analysis/Tagged_Division
|
Tagged_Division.gauge_modify
|
lemma gauge_modify:
assumes "(\<forall>S. open S \<longrightarrow> open {x. f(x) \<in> S})" "gauge d"
shows "gauge (\<lambda>x. {y. f y \<in> d (f x)})"
|
\<forall>S. open S \<longrightarrow> open {x. ?f x \<in> S} \<Longrightarrow> gauge ?d \<Longrightarrow> gauge (\<lambda>x. {y. ?f y \<in> ?d (?f x)})
|
\<lbrakk>\<forall>y_0. ?H1 y_0 \<longrightarrow> ?H1 (?H2 (\<lambda>y_1. x_1 y_1 \<in> y_0)); ?H3 x_2\<rbrakk> \<Longrightarrow> ?H3 (\<lambda>y_2. ?H2 (\<lambda>y_3. x_1 y_3 \<in> x_2 (x_1 y_2)))
|
[
"Tagged_Division.gauge",
"Set.Collect",
"Topological_Spaces.open_class.open"
] |
[
"('a \\<Rightarrow> 'a set) \\<Rightarrow> bool",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> bool"
] |
[
"class \"open\" =\n fixes \"open\" :: \"'a set \\<Rightarrow> bool\""
] |
template
|
###lemma
\<forall>S. open S \<longrightarrow> open {x. ?f x \<in> S} \<Longrightarrow> gauge ?d \<Longrightarrow> gauge (\<lambda>x. {y. ?f y \<in> ?d (?f x)})
###symbols
Tagged_Division.gauge :::: ('a \<Rightarrow> 'a set) \<Rightarrow> bool
Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set
Topological_Spaces.open_class.open :::: 'a set \<Rightarrow> bool
###defs
class "open" =
fixes "open" :: "'a set \<Rightarrow> bool"
|
###output
\<lbrakk>\<forall>y_0. ?H1 y_0 \<longrightarrow> ?H1 (?H2 (\<lambda>y_1. x_1 y_1 \<in> y_0)); ?H3 x_2\<rbrakk> \<Longrightarrow> ?H3 (\<lambda>y_2. ?H2 (\<lambda>y_3. x_1 y_3 \<in> x_2 (x_1 y_2)))###end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.