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
Matrix_LP/ComputeNumeral
ComputeNumeral.compute_numeral(18)
null
(True \<longrightarrow> ?P) = ?P
(True \<longrightarrow> x_1) = x_1
[]
[]
[]
template
###lemma (True \<longrightarrow> ?P) = ?P ###symbols ###defs
###output (True \<longrightarrow> x_1) = x_1###end
Predicate_Compile_Examples/Predicate_Compile_Tests
Predicate_Compile_Tests.is_D_or_E_iE
null
pred.eval (is_D_or_E_i ?x) ?y \<Longrightarrow> (is_D_or_E ?x \<Longrightarrow> ?P) \<Longrightarrow> ?P
\<lbrakk> ?H1 (?H2 x_1) x_2; ?H3 x_1 \<Longrightarrow> x_3\<rbrakk> \<Longrightarrow> x_3
[ "Predicate_Compile_Tests.is_D_or_E", "Predicate_Compile_Tests.is_D_or_E_i", "Predicate.pred.eval" ]
[ "Predicate_Compile_Tests.char \\<Rightarrow> bool", "Predicate_Compile_Tests.char \\<Rightarrow> unit Predicate.pred", "'a Predicate.pred \\<Rightarrow> 'a \\<Rightarrow> bool" ]
[ "inductive is_D_or_E\nwhere\n \"(x = D) \\<or> (x = E) ==> is_D_or_E x\"", "datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: \"'a \\<Rightarrow> bool\")" ]
template
###lemma pred.eval (is_D_or_E_i ?x) ?y \<Longrightarrow> (is_D_or_E ?x \<Longrightarrow> ?P) \<Longrightarrow> ?P ###symbols Predicate_Compile_Tests.is_D_or_E :::: Predicate_Compile_Tests.char \<Rightarrow> bool Predicate_Compile_Tests.is_D_or_E_i :::: Predicate_Compile_Tests.char \<Rightarrow> unit Predicate.pred Predicate.pred.eval :::: 'a Predicate.pred \<Rightarrow> 'a \<Rightarrow> bool ###defs inductive is_D_or_E where "(x = D) \<or> (x = E) ==> is_D_or_E x" datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: "'a \<Rightarrow> bool")
###output \<lbrakk> ?H1 (?H2 x_1) x_2; ?H3 x_1 \<Longrightarrow> x_3\<rbrakk> \<Longrightarrow> x_3###end
Map
Map.map_comp_None_iff
lemma map_comp_None_iff: "((m1 \<circ>\<^sub>m m2) k = None) = (m2 k = None \<or> (\<exists>k'. m2 k = Some k' \<and> m1 k' = None)) "
((?m1.0 \<circ>\<^sub>m ?m2.0) ?k = None) = (?m2.0 ?k = None \<or> (\<exists>k'. ?m2.0 ?k = Some k' \<and> ?m1.0 k' = None))
(?H1 x_1 x_2 x_3 = ?H2) = (x_2 x_3 = ?H2 \<or> (\<exists>y_0. x_2 x_3 = ?H3 y_0 \<and> x_1 y_0 = ?H2))
[ "Option.option.Some", "Option.option.None", "Map.map_comp" ]
[ "'a \\<Rightarrow> 'a option", "'a option", "('a \\<Rightarrow> 'b option) \\<Rightarrow> ('c \\<Rightarrow> 'a option) \\<Rightarrow> 'c \\<Rightarrow> 'b option" ]
[ "datatype 'a option =\n None\n | Some (the: 'a)", "datatype 'a option =\n None\n | Some (the: 'a)", "definition\n map_comp :: \"('b \\<rightharpoonup> 'c) \\<Rightarrow> ('a \\<rightharpoonup> 'b) \\<Rightarrow> ('a \\<rightharpoonup> 'c)\" (infixl \"\\<circ>\\<^sub>m\" 55) where\n \"f \\<circ>\\<^sub>m g = (\\<lambda>k. case g k of None \\<Rightarrow> None | Some v \\<Rightarrow> f v)\"" ]
template
###lemma ((?m1.0 \<circ>\<^sub>m ?m2.0) ?k = None) = (?m2.0 ?k = None \<or> (\<exists>k'. ?m2.0 ?k = Some k' \<and> ?m1.0 k' = None)) ###symbols Option.option.Some :::: 'a \<Rightarrow> 'a option Option.option.None :::: 'a option Map.map_comp :::: ('a \<Rightarrow> 'b option) \<Rightarrow> ('c \<Rightarrow> 'a option) \<Rightarrow> 'c \<Rightarrow> 'b option ###defs datatype 'a option = None | Some (the: 'a) datatype 'a option = None | Some (the: 'a) definition map_comp :: "('b \<rightharpoonup> 'c) \<Rightarrow> ('a \<rightharpoonup> 'b) \<Rightarrow> ('a \<rightharpoonup> 'c)" (infixl "\<circ>\<^sub>m" 55) where "f \<circ>\<^sub>m g = (\<lambda>k. case g k of None \<Rightarrow> None | Some v \<Rightarrow> f v)"
###output (?H1 x_1 x_2 x_3 = ?H2) = (x_2 x_3 = ?H2 \<or> (\<exists>y_0. x_2 x_3 = ?H3 y_0 \<and> x_1 y_0 = ?H2))###end
Analysis/Weierstrass_Theorems
Weierstrass_Theorems.Stone_Weierstrass_real_polynomial_function
lemma Stone_Weierstrass_real_polynomial_function: fixes f :: "'a::euclidean_space \<Rightarrow> real" assumes "compact S" "continuous_on S f" "0 < e" obtains g where "real_polynomial_function g" "\<And>x. x \<in> S \<Longrightarrow> \<bar>f x - g x\<bar> < e"
compact ?S \<Longrightarrow> continuous_on ?S ?f \<Longrightarrow> 0 < ?e \<Longrightarrow> (\<And>g. real_polynomial_function g \<Longrightarrow> (\<And>x. x \<in> ?S \<Longrightarrow> \<bar> ?f x - g x\<bar> < ?e) \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
\<lbrakk> ?H1 x_1; ?H2 x_1 x_2; ?H3 < x_3; \<And>y_0. \<lbrakk> ?H4 y_0; \<And>y_1. y_1 \<in> x_1 \<Longrightarrow> ?H5 (?H6 (x_2 y_1) (y_0 y_1)) < x_3\<rbrakk> \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_4
[ "Groups.minus_class.minus", "Groups.abs_class.abs", "Weierstrass_Theorems.real_polynomial_function", "Groups.zero_class.zero", "Topological_Spaces.continuous_on", "Topological_Spaces.topological_space_class.compact" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a", "('a \\<Rightarrow> real) \\<Rightarrow> bool", "'a", "'a set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool", "'a set \\<Rightarrow> bool" ]
[ "class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)", "class abs =\n fixes abs :: \"'a \\<Rightarrow> 'a\" (\"\\<bar>_\\<bar>\")", "inductive real_polynomial_function :: \"('a::real_normed_vector \\<Rightarrow> real) \\<Rightarrow> bool\" where\n linear: \"bounded_linear f \\<Longrightarrow> real_polynomial_function f\"\n | const: \"real_polynomial_function (\\<lambda>x. c)\"\n | add: \"\\<lbrakk>real_polynomial_function f; real_polynomial_function g\\<rbrakk> \\<Longrightarrow> real_polynomial_function (\\<lambda>x. f x + g x)\"\n | mult: \"\\<lbrakk>real_polynomial_function f; real_polynomial_function g\\<rbrakk> \\<Longrightarrow> real_polynomial_function (\\<lambda>x. f x * g x)\"", "class zero =\n fixes zero :: 'a (\"0\")", "definition continuous_on :: \"'a set \\<Rightarrow> ('a::topological_space \\<Rightarrow> 'b::topological_space) \\<Rightarrow> bool\"\n where \"continuous_on s f \\<longleftrightarrow> (\\<forall>x\\<in>s. (f \\<longlongrightarrow> f x) (at x within s))\"", "class topological_space = \"open\" +\n assumes open_UNIV [simp, intro]: \"open UNIV\"\n assumes open_Int [intro]: \"open S \\<Longrightarrow> open T \\<Longrightarrow> open (S \\<inter> T)\"\n assumes open_Union [intro]: \"\\<forall>S\\<in>K. open S \\<Longrightarrow> open (\\<Union>K)\"\nbegin" ]
template
###lemma compact ?S \<Longrightarrow> continuous_on ?S ?f \<Longrightarrow> 0 < ?e \<Longrightarrow> (\<And>g. real_polynomial_function g \<Longrightarrow> (\<And>x. x \<in> ?S \<Longrightarrow> \<bar> ?f x - g x\<bar> < ?e) \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis ###symbols Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Groups.abs_class.abs :::: 'a \<Rightarrow> 'a Weierstrass_Theorems.real_polynomial_function :::: ('a \<Rightarrow> real) \<Rightarrow> bool Groups.zero_class.zero :::: 'a Topological_Spaces.continuous_on :::: 'a set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool Topological_Spaces.topological_space_class.compact :::: 'a set \<Rightarrow> bool ###defs class minus = fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65) class abs = fixes abs :: "'a \<Rightarrow> 'a" ("\<bar>_\<bar>") inductive real_polynomial_function :: "('a::real_normed_vector \<Rightarrow> real) \<Rightarrow> bool" where linear: "bounded_linear f \<Longrightarrow> real_polynomial_function f" | const: "real_polynomial_function (\<lambda>x. c)" | add: "\<lbrakk>real_polynomial_function f; real_polynomial_function g\<rbrakk> \<Longrightarrow> real_polynomial_function (\<lambda>x. f x + g x)" | mult: "\<lbrakk>real_polynomial_function f; real_polynomial_function g\<rbrakk> \<Longrightarrow> real_polynomial_function (\<lambda>x. f x * g x)" class zero = fixes zero :: 'a ("0") definition continuous_on :: "'a set \<Rightarrow> ('a::topological_space \<Rightarrow> 'b::topological_space) \<Rightarrow> bool" where "continuous_on s f \<longleftrightarrow> (\<forall>x\<in>s. (f \<longlongrightarrow> f x) (at x within s))" class topological_space = "open" + assumes open_UNIV [simp, intro]: "open UNIV" assumes open_Int [intro]: "open S \<Longrightarrow> open T \<Longrightarrow> open (S \<inter> T)" assumes open_Union [intro]: "\<forall>S\<in>K. open S \<Longrightarrow> open (\<Union>K)" begin
###output \<lbrakk> ?H1 x_1; ?H2 x_1 x_2; ?H3 < x_3; \<And>y_0. \<lbrakk> ?H4 y_0; \<And>y_1. y_1 \<in> x_1 \<Longrightarrow> ?H5 (?H6 (x_2 y_1) (y_0 y_1)) < x_3\<rbrakk> \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_4###end
Analysis/Change_Of_Vars
Change_Of_Vars.measurable_shear_interval
null
?m \<noteq> ?n \<Longrightarrow> cbox ?a ?b \<noteq> {} \<Longrightarrow> 0 \<le> ?a $ ?n \<Longrightarrow> (\<lambda>x. \<chi>i. if i = ?m then x $ ?m + x $ ?n else x $ i) ` cbox ?a ?b \<in> lmeasurable
\<lbrakk>x_1 \<noteq> x_2; ?H1 x_3 x_4 \<noteq> ?H2; ?H3 \<le> ?H4 x_3 x_2\<rbrakk> \<Longrightarrow> ?H5 (\<lambda>y_0. ?H6 (\<lambda>y_1. if y_1 = x_1 then ?H7 (?H4 y_0 x_1) (?H4 y_0 x_2) else ?H4 y_0 y_1)) (?H1 x_3 x_4) \<in> ?H8
[ "Lebesgue_Measure.lmeasurable", "Groups.plus_class.plus", "Finite_Cartesian_Product.vec.vec_lambda", "Set.image", "Finite_Cartesian_Product.vec.vec_nth", "Groups.zero_class.zero", "Set.empty", "Topology_Euclidean_Space.cbox" ]
[ "'a set set", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "('a \\<Rightarrow> 'b) \\<Rightarrow> ('b, 'a) vec", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set", "('a, 'b) vec \\<Rightarrow> 'b \\<Rightarrow> 'a", "'a", "'a set", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a set" ]
[ "class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)", "definition \"vec x = (\\<chi> i. 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}\"", "definition \"vec x = (\\<chi> i. x)\"", "class zero =\n fixes zero :: 'a (\"0\")", "abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"" ]
template
###lemma ?m \<noteq> ?n \<Longrightarrow> cbox ?a ?b \<noteq> {} \<Longrightarrow> 0 \<le> ?a $ ?n \<Longrightarrow> (\<lambda>x. \<chi>i. if i = ?m then x $ ?m + x $ ?n else x $ i) ` cbox ?a ?b \<in> lmeasurable ###symbols Lebesgue_Measure.lmeasurable :::: 'a set set Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Finite_Cartesian_Product.vec.vec_lambda :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('b, 'a) vec Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set Finite_Cartesian_Product.vec.vec_nth :::: ('a, 'b) vec \<Rightarrow> 'b \<Rightarrow> 'a Groups.zero_class.zero :::: 'a Set.empty :::: 'a set Topology_Euclidean_Space.cbox :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a set ###defs class plus = fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65) definition "vec x = (\<chi> i. 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}" definition "vec x = (\<chi> i. x)" class zero = fixes zero :: 'a ("0") abbreviation empty :: "'a set" ("{}") where "{} \<equiv> bot"
###output \<lbrakk>x_1 \<noteq> x_2; ?H1 x_3 x_4 \<noteq> ?H2; ?H3 \<le> ?H4 x_3 x_2\<rbrakk> \<Longrightarrow> ?H5 (\<lambda>y_0. ?H6 (\<lambda>y_1. if y_1 = x_1 then ?H7 (?H4 y_0 x_1) (?H4 y_0 x_2) else ?H4 y_0 y_1)) (?H1 x_3 x_4) \<in> ?H8###end
Analysis/Cartesian_Space
Cartesian_Space.matrix_vector_mul(1)
lemma matrix_vector_mul[simp]: "Vector_Spaces.linear (*s) (*s) g \<Longrightarrow> (\<lambda>y. matrix g *v y) = g" "linear f \<Longrightarrow> (\<lambda>x. matrix f *v x) = f" "bounded_linear f \<Longrightarrow> (\<lambda>x. matrix f *v x) = f" for f :: "real^'n \<Rightarrow> real ^'m"
Vector_Spaces.linear (*s) (*s) ?g \<Longrightarrow> (*v) (matrix ?g) = ?g
?H1 ?H2 ?H2 x_1 \<Longrightarrow> ?H3 (?H4 x_1) = x_1
[ "Finite_Cartesian_Product.matrix", "Finite_Cartesian_Product.matrix_vector_mult", "Finite_Cartesian_Product.vector_scalar_mult", "Vector_Spaces.linear" ]
[ "(('a, 'b) vec \\<Rightarrow> ('a, 'c) vec) \\<Rightarrow> (('a, 'b) vec, 'c) vec", "(('a, 'b) vec, 'c) vec \\<Rightarrow> ('a, 'b) vec \\<Rightarrow> ('a, 'c) vec", "'a \\<Rightarrow> ('a, 'b) vec \\<Rightarrow> ('a, 'b) vec", "('a \\<Rightarrow> 'b \\<Rightarrow> 'b) \\<Rightarrow> ('a \\<Rightarrow> 'c \\<Rightarrow> 'c) \\<Rightarrow> ('b \\<Rightarrow> 'c) \\<Rightarrow> bool" ]
[ "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 Vector_Spaces.linear (*s) (*s) ?g \<Longrightarrow> (*v) (matrix ?g) = ?g ###symbols Finite_Cartesian_Product.matrix :::: (('a, 'b) vec \<Rightarrow> ('a, 'c) vec) \<Rightarrow> (('a, 'b) vec, 'c) vec Finite_Cartesian_Product.matrix_vector_mult :::: (('a, 'b) vec, 'c) vec \<Rightarrow> ('a, 'b) vec \<Rightarrow> ('a, 'c) vec Finite_Cartesian_Product.vector_scalar_mult :::: 'a \<Rightarrow> ('a, 'b) vec \<Rightarrow> ('a, 'b) vec Vector_Spaces.linear :::: ('a \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'c \<Rightarrow> 'c) \<Rightarrow> ('b \<Rightarrow> 'c) \<Rightarrow> bool ###defs 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 ?H2 x_1 \<Longrightarrow> ?H3 (?H4 x_1) = x_1###end
Transitive_Closure
Transitive_Closure.rtrancl_reflcl_absorb
lemma rtrancl_reflcl_absorb[simp]: "(R\<^sup>*)\<^sup>= = R\<^sup>*"
(?R\<^sup>*)\<^sup>= = ?R\<^sup>*
?H1 (?H2 x_1) = ?H2 x_1
[ "Transitive_Closure.rtrancl", "Transitive_Closure.reflcl" ]
[ "('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set", "('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set" ]
[ "inductive_set rtrancl :: \"('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set\" (\"(_\\<^sup>*)\" [1000] 999)\n for r :: \"('a \\<times> 'a) set\"\n where\n rtrancl_refl [intro!, Pure.intro!, simp]: \"(a, a) \\<in> r\\<^sup>*\"\n | rtrancl_into_rtrancl [Pure.intro]: \"(a, b) \\<in> r\\<^sup>* \\<Longrightarrow> (b, c) \\<in> r \\<Longrightarrow> (a, c) \\<in> r\\<^sup>*\"", "abbreviation reflcl :: \"('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set\" (\"(_\\<^sup>=)\" [1000] 999)\n where \"r\\<^sup>= \\<equiv> r \\<union> Id\"" ]
template
###lemma (?R\<^sup>*)\<^sup>= = ?R\<^sup>* ###symbols Transitive_Closure.rtrancl :::: ('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set Transitive_Closure.reflcl :::: ('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set ###defs inductive_set rtrancl :: "('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set" ("(_\<^sup>*)" [1000] 999) for r :: "('a \<times> 'a) set" where rtrancl_refl [intro!, Pure.intro!, simp]: "(a, a) \<in> r\<^sup>*" | rtrancl_into_rtrancl [Pure.intro]: "(a, b) \<in> r\<^sup>* \<Longrightarrow> (b, c) \<in> r \<Longrightarrow> (a, c) \<in> r\<^sup>*" abbreviation reflcl :: "('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set" ("(_\<^sup>=)" [1000] 999) where "r\<^sup>= \<equiv> r \<union> Id"
###output ?H1 (?H2 x_1) = ?H2 x_1###end
Proofs/Lambda/Standardization
Standardization.lemma4
lemma lemma4: assumes r: "r \<rightarrow>\<^sub>s r'" shows "r' \<rightarrow>\<^sub>\<beta> r'' \<Longrightarrow> r \<rightarrow>\<^sub>s r''"
?r \<rightarrow>\<^sub>s ?r' \<Longrightarrow> ?r' \<rightarrow>\<^sub>\<beta> ?r'' \<Longrightarrow> ?r \<rightarrow>\<^sub>s ?r''
\<lbrakk> ?H1 x_1 x_2; ?H2 x_2 x_3\<rbrakk> \<Longrightarrow> ?H1 x_1 x_3
[ "Lambda.beta", "Standardization.sred" ]
[ "dB \\<Rightarrow> dB \\<Rightarrow> bool", "dB \\<Rightarrow> dB \\<Rightarrow> bool" ]
[ "inductive beta :: \"[dB, dB] => bool\" (infixl \"\\<rightarrow>\\<^sub>\\<beta>\" 50)\n where\n beta [simp, intro!]: \"Abs s \\<degree> t \\<rightarrow>\\<^sub>\\<beta> s[t/0]\"\n | appL [simp, intro!]: \"s \\<rightarrow>\\<^sub>\\<beta> t ==> s \\<degree> u \\<rightarrow>\\<^sub>\\<beta> t \\<degree> u\"\n | appR [simp, intro!]: \"s \\<rightarrow>\\<^sub>\\<beta> t ==> u \\<degree> s \\<rightarrow>\\<^sub>\\<beta> u \\<degree> t\"\n | abs [simp, intro!]: \"s \\<rightarrow>\\<^sub>\\<beta> t ==> Abs s \\<rightarrow>\\<^sub>\\<beta> Abs t\"" ]
template
###lemma ?r \<rightarrow>\<^sub>s ?r' \<Longrightarrow> ?r' \<rightarrow>\<^sub>\<beta> ?r'' \<Longrightarrow> ?r \<rightarrow>\<^sub>s ?r'' ###symbols Lambda.beta :::: dB \<Rightarrow> dB \<Rightarrow> bool Standardization.sred :::: dB \<Rightarrow> dB \<Rightarrow> bool ###defs inductive beta :: "[dB, dB] => bool" (infixl "\<rightarrow>\<^sub>\<beta>" 50) where beta [simp, intro!]: "Abs s \<degree> t \<rightarrow>\<^sub>\<beta> s[t/0]" | appL [simp, intro!]: "s \<rightarrow>\<^sub>\<beta> t ==> s \<degree> u \<rightarrow>\<^sub>\<beta> t \<degree> u" | appR [simp, intro!]: "s \<rightarrow>\<^sub>\<beta> t ==> u \<degree> s \<rightarrow>\<^sub>\<beta> u \<degree> t" | abs [simp, intro!]: "s \<rightarrow>\<^sub>\<beta> t ==> Abs s \<rightarrow>\<^sub>\<beta> Abs t"
###output \<lbrakk> ?H1 x_1 x_2; ?H2 x_2 x_3\<rbrakk> \<Longrightarrow> ?H1 x_1 x_3###end
Real_Asymp/Multiseries_Expansion
Multiseries_Expansion.expands_to_add
lemma expands_to_add: "basis_wf basis \<Longrightarrow> (f expands_to F) basis \<Longrightarrow> (g expands_to G) basis \<Longrightarrow> ((\<lambda>x. f x + g x) expands_to F + G) basis"
basis_wf ?basis \<Longrightarrow> (?f expands_to ?F) ?basis \<Longrightarrow> (?g expands_to ?G) ?basis \<Longrightarrow> ((\<lambda>x. ?f x + ?g x) expands_to ?F + ?G) ?basis
\<lbrakk> ?H1 x_1; ?H2 x_2 x_3 x_1; ?H2 x_4 x_5 x_1\<rbrakk> \<Longrightarrow> ?H2 (\<lambda>y_0. ?H3 (x_2 y_0) (x_4 y_0)) (?H3 x_3 x_5) x_1
[ "Groups.plus_class.plus", "Multiseries_Expansion.expands_to", "Multiseries_Expansion.basis_wf" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "(real \\<Rightarrow> real) \\<Rightarrow> 'a \\<Rightarrow> (real \\<Rightarrow> real) list \\<Rightarrow> bool", "(real \\<Rightarrow> real) list \\<Rightarrow> bool" ]
[ "class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)", "inductive expands_to :: \"(real \\<Rightarrow> real) \\<Rightarrow> 'a :: multiseries \\<Rightarrow> basis \\<Rightarrow> bool\" \n (infix \"(expands'_to)\" 50) where\n \"is_expansion F basis \\<Longrightarrow> eventually (\\<lambda>x. eval F x = f x) at_top \\<Longrightarrow> (f expands_to F) basis\"", "definition basis_wf :: \"basis \\<Rightarrow> bool\" where\n \"basis_wf basis \\<longleftrightarrow> (\\<forall>f\\<in>set basis. filterlim f at_top at_top) \\<and> \n sorted_wrt (\\<lambda>f g. (\\<lambda>x. ln (g x)) \\<in> o(\\<lambda>x. ln (f x))) basis\"" ]
template
###lemma basis_wf ?basis \<Longrightarrow> (?f expands_to ?F) ?basis \<Longrightarrow> (?g expands_to ?G) ?basis \<Longrightarrow> ((\<lambda>x. ?f x + ?g x) expands_to ?F + ?G) ?basis ###symbols Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Multiseries_Expansion.expands_to :::: (real \<Rightarrow> real) \<Rightarrow> 'a \<Rightarrow> (real \<Rightarrow> real) list \<Rightarrow> bool Multiseries_Expansion.basis_wf :::: (real \<Rightarrow> real) list \<Rightarrow> bool ###defs class plus = fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65) inductive expands_to :: "(real \<Rightarrow> real) \<Rightarrow> 'a :: multiseries \<Rightarrow> basis \<Rightarrow> bool" (infix "(expands'_to)" 50) where "is_expansion F basis \<Longrightarrow> eventually (\<lambda>x. eval F x = f x) at_top \<Longrightarrow> (f expands_to F) basis" definition basis_wf :: "basis \<Rightarrow> bool" where "basis_wf basis \<longleftrightarrow> (\<forall>f\<in>set basis. filterlim f at_top at_top) \<and> sorted_wrt (\<lambda>f g. (\<lambda>x. ln (g x)) \<in> o(\<lambda>x. ln (f x))) basis"
###output \<lbrakk> ?H1 x_1; ?H2 x_2 x_3 x_1; ?H2 x_4 x_5 x_1\<rbrakk> \<Longrightarrow> ?H2 (\<lambda>y_0. ?H3 (x_2 y_0) (x_4 y_0)) (?H3 x_3 x_5) x_1###end
Data_Structures/Array_Braun
Array_Braun.list_add_lo
lemma list_add_lo: "braun t \<Longrightarrow> list (add_lo a t) = a # list t"
braun ?t \<Longrightarrow> list (add_lo ?a ?t) = ?a # list ?t
?H1 x_1 \<Longrightarrow> ?H2 (?H3 x_2 x_1) = ?H4 x_2 (?H2 x_1)
[ "List.list.Cons", "Array_Braun.add_lo", "Array_Braun.list", "Braun_Tree.braun" ]
[ "'a \\<Rightarrow> 'a list \\<Rightarrow> 'a list", "'a \\<Rightarrow> 'a tree \\<Rightarrow> 'a tree", "'a tree \\<Rightarrow> 'a list", "'a tree \\<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 [] = []\"", "fun add_lo where\n \"add_lo x Leaf = Node Leaf x Leaf\" |\n \"add_lo x (Node l a r) = Node (add_lo a r) x l\"", "fun list :: \"'a tree \\<Rightarrow> 'a list\" where\n \"list Leaf = []\" |\n \"list (Node l x r) = x # splice (list l) (list r)\"", "fun braun :: \"'a tree \\<Rightarrow> bool\" where\n\"braun Leaf = True\" |\n\"braun (Node l x r) = ((size l = size r \\<or> size l = size r + 1) \\<and> braun l \\<and> braun r)\"" ]
template
###lemma braun ?t \<Longrightarrow> list (add_lo ?a ?t) = ?a # list ?t ###symbols List.list.Cons :::: 'a \<Rightarrow> 'a list \<Rightarrow> 'a list Array_Braun.add_lo :::: 'a \<Rightarrow> 'a tree \<Rightarrow> 'a tree Array_Braun.list :::: 'a tree \<Rightarrow> 'a list Braun_Tree.braun :::: 'a tree \<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 [] = []" fun add_lo where "add_lo x Leaf = Node Leaf x Leaf" | "add_lo x (Node l a r) = Node (add_lo a r) x l" fun list :: "'a tree \<Rightarrow> 'a list" where "list Leaf = []" | "list (Node l x r) = x # splice (list l) (list r)" fun braun :: "'a tree \<Rightarrow> bool" where "braun Leaf = True" | "braun (Node l x r) = ((size l = size r \<or> size l = size r + 1) \<and> braun l \<and> braun r)"
###output ?H1 x_1 \<Longrightarrow> ?H2 (?H3 x_2 x_1) = ?H4 x_2 (?H2 x_1)###end
Analysis/Starlike
Starlike.rel_interior_sum_gen
lemma rel_interior_sum_gen: fixes S :: "'a \<Rightarrow> 'n::euclidean_space set" assumes "\<And>i. i\<in>I \<Longrightarrow> convex (S i)" shows "rel_interior (sum S I) = sum (\<lambda>i. rel_interior (S i)) I"
(\<And>i. i \<in> ?I \<Longrightarrow> convex (?S i)) \<Longrightarrow> rel_interior (sum ?S ?I) = (\<Sum>i\<in> ?I. rel_interior (?S i))
(\<And>y_0. y_0 \<in> x_1 \<Longrightarrow> ?H1 (x_2 y_0)) \<Longrightarrow> ?H2 (?H3 x_2 x_1) = ?H3 (\<lambda>y_1. ?H2 (x_2 y_1)) x_1
[ "Groups_Big.comm_monoid_add_class.sum", "Convex_Euclidean_Space.rel_interior", "Convex.convex" ]
[ "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b", "'a set \\<Rightarrow> 'a set", "'a set \\<Rightarrow> bool" ]
[]
template
###lemma (\<And>i. i \<in> ?I \<Longrightarrow> convex (?S i)) \<Longrightarrow> rel_interior (sum ?S ?I) = (\<Sum>i\<in> ?I. rel_interior (?S i)) ###symbols Groups_Big.comm_monoid_add_class.sum :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b Convex_Euclidean_Space.rel_interior :::: 'a set \<Rightarrow> 'a set Convex.convex :::: 'a set \<Rightarrow> bool ###defs
###output (\<And>y_0. y_0 \<in> x_1 \<Longrightarrow> ?H1 (x_2 y_0)) \<Longrightarrow> ?H2 (?H3 x_2 x_1) = ?H3 (\<lambda>y_1. ?H2 (x_2 y_1)) x_1###end
Analysis/Poly_Roots
Poly_Roots.polyfun_rootbound_card
null
\<exists>k\<le> ?n. ?c k \<noteq> (0:: ?'a) \<Longrightarrow> card {z. (\<Sum>i\<le> ?n. ?c i * z ^ i) = (0:: ?'a)} \<le> ?n
\<exists>y_0\<le>x_1. x_2 y_0 \<noteq> ?H1 \<Longrightarrow> ?H2 (?H3 (\<lambda>y_1. ?H4 (\<lambda>y_2. ?H5 (x_2 y_2) (?H6 y_1 y_2)) (?H7 x_1) = ?H1)) \<le> x_1
[ "Set_Interval.ord_class.atMost", "Power.power_class.power", "Groups.times_class.times", "Groups_Big.comm_monoid_add_class.sum", "Set.Collect", "Finite_Set.card", "Groups.zero_class.zero" ]
[ "'a \\<Rightarrow> 'a set", "'a \\<Rightarrow> nat \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b", "('a \\<Rightarrow> bool) \\<Rightarrow> 'a set", "'a set \\<Rightarrow> nat", "'a" ]
[ "primrec power :: \"'a \\<Rightarrow> nat \\<Rightarrow> 'a\" (infixr \"^\" 80)\n where\n power_0: \"a ^ 0 = 1\"\n | power_Suc: \"a ^ Suc n = a * a ^ n\"", "class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)", "class zero =\n fixes zero :: 'a (\"0\")" ]
template
###lemma \<exists>k\<le> ?n. ?c k \<noteq> (0:: ?'a) \<Longrightarrow> card {z. (\<Sum>i\<le> ?n. ?c i * z ^ i) = (0:: ?'a)} \<le> ?n ###symbols Set_Interval.ord_class.atMost :::: 'a \<Rightarrow> 'a set Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Groups_Big.comm_monoid_add_class.sum :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set Finite_Set.card :::: 'a set \<Rightarrow> nat Groups.zero_class.zero :::: 'a ###defs primrec power :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^" 80) where power_0: "a ^ 0 = 1" | power_Suc: "a ^ Suc n = a * a ^ n" class times = fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70) class zero = fixes zero :: 'a ("0")
###output \<exists>y_0\<le>x_1. x_2 y_0 \<noteq> ?H1 \<Longrightarrow> ?H2 (?H3 (\<lambda>y_1. ?H4 (\<lambda>y_2. ?H5 (x_2 y_2) (?H6 y_1 y_2)) (?H7 x_1) = ?H1)) \<le> x_1###end
Nominal/Examples/Class1
Class1.interesting_subst1
lemma interesting_subst1: assumes a: "x\<noteq>y" "x\<sharp>P" "y\<sharp>P" shows "N{y:=<c>.P}{x:=<c>.P} = N{x:=<c>.Ax y c}{y:=<c>.P}"
?x \<noteq> ?y \<Longrightarrow> ?x \<sharp> ?P \<Longrightarrow> ?y \<sharp> ?P \<Longrightarrow> ?N{ ?y:=< ?c>. ?P}{ ?x:=< ?c>. ?P} = ?N{ ?x:=< ?c>.Ax ?y ?c}{ ?y:=< ?c>. ?P}
\<lbrakk>x_1 \<noteq> x_2; ?H1 x_1 x_3; ?H1 x_2 x_3\<rbrakk> \<Longrightarrow> ?H2 (?H2 x_4 x_2 x_5 x_3) x_1 x_5 x_3 = ?H2 (?H2 x_4 x_1 x_5 (?H3 x_2 x_5)) x_2 x_5 x_3
[ "Class1.trm.Ax", "Class1.substn", "Nominal.fresh" ]
[ "name \\<Rightarrow> coname \\<Rightarrow> trm", "trm \\<Rightarrow> name \\<Rightarrow> coname \\<Rightarrow> trm \\<Rightarrow> trm", "'a \\<Rightarrow> 'b \\<Rightarrow> bool" ]
[ "definition fresh :: \"'x \\<Rightarrow> 'a \\<Rightarrow> bool\" (\\<open>_ \\<sharp> _\\<close> [80,80] 80) where\n \"a \\<sharp> x \\<longleftrightarrow> a \\<notin> supp x\"" ]
template
###lemma ?x \<noteq> ?y \<Longrightarrow> ?x \<sharp> ?P \<Longrightarrow> ?y \<sharp> ?P \<Longrightarrow> ?N{ ?y:=< ?c>. ?P}{ ?x:=< ?c>. ?P} = ?N{ ?x:=< ?c>.Ax ?y ?c}{ ?y:=< ?c>. ?P} ###symbols Class1.trm.Ax :::: name \<Rightarrow> coname \<Rightarrow> trm Class1.substn :::: trm \<Rightarrow> name \<Rightarrow> coname \<Rightarrow> trm \<Rightarrow> trm Nominal.fresh :::: 'a \<Rightarrow> 'b \<Rightarrow> bool ###defs definition fresh :: "'x \<Rightarrow> 'a \<Rightarrow> bool" (\<open>_ \<sharp> _\<close> [80,80] 80) where "a \<sharp> x \<longleftrightarrow> a \<notin> supp x"
###output \<lbrakk>x_1 \<noteq> x_2; ?H1 x_1 x_3; ?H1 x_2 x_3\<rbrakk> \<Longrightarrow> ?H2 (?H2 x_4 x_2 x_5 x_3) x_1 x_5 x_3 = ?H2 (?H2 x_4 x_1 x_5 (?H3 x_2 x_5)) x_2 x_5 x_3###end
HOLCF/Tr
Transfer.funpow_transfer
null
rel_fun (=) (rel_fun (rel_fun ?A ?A) (rel_fun ?A ?A)) compow compow
?H1 (=) (?H1 (?H1 x_1 x_1) (?H1 x_1 x_1)) ?H2 ?H2
[ "Nat.compow", "BNF_Def.rel_fun" ]
[ "nat \\<Rightarrow> 'a \\<Rightarrow> 'a", "('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'c) \\<Rightarrow> ('b \\<Rightarrow> 'd) \\<Rightarrow> bool" ]
[ "consts compow :: \"nat \\<Rightarrow> 'a \\<Rightarrow> 'a\"", "definition\n rel_fun :: \"('a \\<Rightarrow> 'c \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'd) \\<Rightarrow> bool\"\nwhere\n \"rel_fun A B = (\\<lambda>f g. \\<forall>x y. A x y \\<longrightarrow> B (f x) (g y))\"" ]
template
###lemma rel_fun (=) (rel_fun (rel_fun ?A ?A) (rel_fun ?A ?A)) compow compow ###symbols Nat.compow :::: nat \<Rightarrow> 'a \<Rightarrow> 'a BNF_Def.rel_fun :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'c) \<Rightarrow> ('b \<Rightarrow> 'd) \<Rightarrow> bool ###defs consts compow :: "nat \<Rightarrow> 'a \<Rightarrow> 'a" definition rel_fun :: "('a \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'd) \<Rightarrow> bool" where "rel_fun A B = (\<lambda>f g. \<forall>x y. A x y \<longrightarrow> B (f x) (g y))"
###output ?H1 (=) (?H1 (?H1 x_1 x_1) (?H1 x_1 x_1)) ?H2 ?H2###end
Predicate_Compile_Examples/Predicate_Compile_Tests
Predicate_Compile_Tests.maxP_intro_1
null
?f \<le> ?e \<Longrightarrow> maxP ?f ?e ?e
x_1 \<le> x_2 \<Longrightarrow> ?H1 x_1 x_2 x_2
[ "Predicate_Compile_Tests.maxP" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> bool" ]
[]
template
###lemma ?f \<le> ?e \<Longrightarrow> maxP ?f ?e ?e ###symbols Predicate_Compile_Tests.maxP :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool ###defs
###output x_1 \<le> x_2 \<Longrightarrow> ?H1 x_1 x_2 x_2###end
MicroJava/DFA/Kildall
Kildall.termination_lemma
lemma termination_lemma: assumes semilat: "semilat (A, r, f)" shows "\<lbrakk> ss \<in> list n A; \<forall>(q,t)\<in>set qs. q<n \<and> t\<in>A; p\<in>w \<rbrakk> \<Longrightarrow> ss <[r] merges f qs ss \<or> merges f qs ss = ss \<and> {q. \<exists>t. (q,t)\<in>set qs \<and> t +_f ss!q \<noteq> ss!q} Un (w-{p}) < w" (is "PROP ?P")
semilat (?A, ?r, ?f) \<Longrightarrow> ?ss \<in> list ?n ?A \<Longrightarrow> \<forall>(q, t)\<in>set ?qs. q < ?n \<and> t \<in> ?A \<Longrightarrow> ?p \<in> ?w \<Longrightarrow> ?ss <[ ?r] merges ?f ?qs ?ss \<or> merges ?f ?qs ?ss = ?ss \<and> {q. \<exists>t. (q, t) \<in> set ?qs \<and> t \<squnion>\<^bsub> ?f\<^esub> ?ss ! q \<noteq> ?ss ! q} \<union> (?w - { ?p}) \<subset> ?w
\<lbrakk> ?H1 (x_1, x_2, x_3); x_4 \<in> ?H2 x_5 x_1; Ball (?H3 x_6) (?H4 (\<lambda>y_0 y_1. y_0 < x_5 \<and> y_1 \<in> x_1)); x_7 \<in> x_8\<rbrakk> \<Longrightarrow> ?H5 x_4 x_2 (?H6 x_3 x_6 x_4) \<or> ?H6 x_3 x_6 x_4 = x_4 \<and> ?H7 (?H8 (?H9 (\<lambda>y_2. \<exists>y_3. (y_2, y_3) \<in> ?H3 x_6 \<and> ?H10 y_3 x_3 (?H11 x_4 y_2) \<noteq> ?H11 x_4 y_2)) (?H12 x_8 (?H13 x_7 ?H14))) x_8
[ "Set.empty", "Set.insert", "Groups.minus_class.minus", "List.nth", "Semilat.plussub", "Set.Collect", "Set.union", "Set.subset", "Kildall.merges", "Listn.lesssublist_syntax", "Product_Type.prod.case_prod", "List.list.set", "Listn.list", "Semilat.semilat" ]
[ "'a set", "'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a list \\<Rightarrow> nat \\<Rightarrow> 'a", "'a \\<Rightarrow> ('a \\<Rightarrow> 'b \\<Rightarrow> 'c) \\<Rightarrow> 'b \\<Rightarrow> 'c", "('a \\<Rightarrow> bool) \\<Rightarrow> 'a set", "'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set", "'a set \\<Rightarrow> 'a set \\<Rightarrow> bool", "('a \\<Rightarrow> 'a \\<Rightarrow> 'a) \\<Rightarrow> (nat \\<times> 'a) list \\<Rightarrow> 'a list \\<Rightarrow> 'a list", "'a list \\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> bool", "('a \\<Rightarrow> 'b \\<Rightarrow> 'c) \\<Rightarrow> 'a \\<times> 'b \\<Rightarrow> 'c", "'a list \\<Rightarrow> 'a set", "nat \\<Rightarrow> 'a set \\<Rightarrow> 'a list set", "'a set \\<times> ('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<times> ('a \\<Rightarrow> '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}\"", "class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)", "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 union :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<union>\" 65)\n where \"union \\<equiv> sup\"", "abbreviation subset :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset \\<equiv> less\"", "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 [] = []\"" ]
template
###lemma semilat (?A, ?r, ?f) \<Longrightarrow> ?ss \<in> list ?n ?A \<Longrightarrow> \<forall>(q, t)\<in>set ?qs. q < ?n \<and> t \<in> ?A \<Longrightarrow> ?p \<in> ?w \<Longrightarrow> ?ss <[ ?r] merges ?f ?qs ?ss \<or> merges ?f ?qs ?ss = ?ss \<and> {q. \<exists>t. (q, t) \<in> set ?qs \<and> t \<squnion>\<^bsub> ?f\<^esub> ?ss ! q \<noteq> ?ss ! q} \<union> (?w - { ?p}) \<subset> ?w ###symbols Set.empty :::: 'a set Set.insert :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a set Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a List.nth :::: 'a list \<Rightarrow> nat \<Rightarrow> 'a Semilat.plussub :::: 'a \<Rightarrow> ('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'b \<Rightarrow> 'c Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set Set.union :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set Set.subset :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool Kildall.merges :::: ('a \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> (nat \<times> 'a) list \<Rightarrow> 'a list \<Rightarrow> 'a list Listn.lesssublist_syntax :::: 'a list \<Rightarrow> ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> bool Product_Type.prod.case_prod :::: ('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'a \<times> 'b \<Rightarrow> 'c List.list.set :::: 'a list \<Rightarrow> 'a set Listn.list :::: nat \<Rightarrow> 'a set \<Rightarrow> 'a list set Semilat.semilat :::: 'a set \<times> ('a \<Rightarrow> 'a \<Rightarrow> bool) \<times> ('a \<Rightarrow> '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}" class minus = fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65) 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 union :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<union>" 65) where "union \<equiv> sup" abbreviation subset :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool" where "subset \<equiv> less" 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 [] = []"
###output \<lbrakk> ?H1 (x_1, x_2, x_3); x_4 \<in> ?H2 x_5 x_1; Ball (?H3 x_6) (?H4 (\<lambda>y_0 y_1. y_0 < x_5 \<and> y_1 \<in> x_1)); x_7 \<in> x_8\<rbrakk> \<Longrightarrow> ?H5 x_4 x_2 (?H6 x_3 x_6 x_4) \<or> ?H6 x_3 x_6 x_4 = x_4 \<and> ?H7 (?H8 (?H9 (\<lambda>y_2. \<exists>y_3. (y_2, y_3) \<in> ?H3 x_6 \<and> ?H10 y_3 x_3 (?H11 x_4 y_2) \<noteq> ?H11 x_4 y_2)) (?H12 x_8 (?H13 x_7 ?H14))) x_8###end
SPARK/Examples/RIPEMD-160/F
Factorial.fact_ge_Suc_0_nat
null
Suc 0 \<le> fact ?n
?H1 ?H2 \<le> ?H3 x_1
[ "Factorial.semiring_char_0_class.fact", "Groups.zero_class.zero", "Nat.Suc" ]
[ "nat \\<Rightarrow> 'a", "'a", "nat \\<Rightarrow> nat" ]
[ "class zero =\n fixes zero :: 'a (\"0\")", "definition Suc :: \"nat \\<Rightarrow> nat\"\n where \"Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))\"" ]
template
###lemma Suc 0 \<le> fact ?n ###symbols Factorial.semiring_char_0_class.fact :::: nat \<Rightarrow> 'a Groups.zero_class.zero :::: 'a Nat.Suc :::: nat \<Rightarrow> nat ###defs class zero = fixes zero :: 'a ("0") definition Suc :: "nat \<Rightarrow> nat" where "Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))"
###output ?H1 ?H2 \<le> ?H3 x_1###end
Analysis/Abstract_Topology
Abstract_Topology.continuous_map_image_closure_subset
lemma continuous_map_image_closure_subset: assumes "continuous_map X Y f" shows "f ` (X closure_of S) \<subseteq> Y closure_of f ` S"
continuous_map ?X ?Y ?f \<Longrightarrow> ?f ` (?X closure_of ?S) \<subseteq> ?Y closure_of ?f ` ?S
?H1 x_1 x_2 x_3 \<Longrightarrow> ?H2 (?H3 x_3 (?H4 x_1 x_4)) (?H4 x_2 (?H3 x_3 x_4))
[ "Abstract_Topology.closure_of", "Set.image", "Set.subset_eq", "Abstract_Topology.continuous_map" ]
[ "'a topology \\<Rightarrow> 'a set \\<Rightarrow> 'a set", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set", "'a set \\<Rightarrow> 'a set \\<Rightarrow> bool", "'a topology \\<Rightarrow> 'b topology \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool" ]
[ "definition closure_of :: \"'a topology \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixr \"closure'_of\" 80)\n where \"X closure_of S \\<equiv> {x \\<in> topspace X. \\<forall>T. x \\<in> T \\<and> openin X T \\<longrightarrow> (\\<exists>y \\<in> S. y \\<in> T)}\"", "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_map where\n \"continuous_map X Y f \\<equiv>\n f \\<in> topspace X \\<rightarrow> topspace Y \\<and>\n (\\<forall>U. openin Y U \\<longrightarrow> openin X {x \\<in> topspace X. f x \\<in> U})\"" ]
template
###lemma continuous_map ?X ?Y ?f \<Longrightarrow> ?f ` (?X closure_of ?S) \<subseteq> ?Y closure_of ?f ` ?S ###symbols Abstract_Topology.closure_of :::: 'a topology \<Rightarrow> '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 Abstract_Topology.continuous_map :::: 'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool ###defs definition closure_of :: "'a topology \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixr "closure'_of" 80) where "X closure_of S \<equiv> {x \<in> topspace X. \<forall>T. x \<in> T \<and> openin X T \<longrightarrow> (\<exists>y \<in> S. y \<in> T)}" 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_map where "continuous_map X Y f \<equiv> f \<in> topspace X \<rightarrow> topspace Y \<and> (\<forall>U. openin Y U \<longrightarrow> openin X {x \<in> topspace X. f x \<in> U})"
###output ?H1 x_1 x_2 x_3 \<Longrightarrow> ?H2 (?H3 x_3 (?H4 x_1 x_4)) (?H4 x_2 (?H3 x_3 x_4))###end
MicroJava/DFA/Opt
Option.combine_options_simps(2)
null
combine_options ?f ?x None = ?x
?H1 x_1 x_2 ?H2 = x_2
[ "Option.option.None", "Option.combine_options" ]
[ "'a option", "('a \\<Rightarrow> 'a \\<Rightarrow> 'a) \\<Rightarrow> 'a option \\<Rightarrow> 'a option \\<Rightarrow> 'a option" ]
[ "datatype 'a option =\n None\n | Some (the: 'a)", "definition combine_options :: \"('a \\<Rightarrow> 'a \\<Rightarrow> 'a) \\<Rightarrow> 'a option \\<Rightarrow> 'a option \\<Rightarrow> 'a option\"\n where \"combine_options f x y = \n (case x of None \\<Rightarrow> y | Some x \\<Rightarrow> (case y of None \\<Rightarrow> Some x | Some y \\<Rightarrow> Some (f x y)))\"" ]
template
###lemma combine_options ?f ?x None = ?x ###symbols Option.option.None :::: 'a option Option.combine_options :::: ('a \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> 'a option \<Rightarrow> 'a option \<Rightarrow> 'a option ###defs datatype 'a option = None | Some (the: 'a) definition combine_options :: "('a \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> 'a option \<Rightarrow> 'a option \<Rightarrow> 'a option" where "combine_options f x y = (case x of None \<Rightarrow> y | Some x \<Rightarrow> (case y of None \<Rightarrow> Some x | Some y \<Rightarrow> Some (f x y)))"
###output ?H1 x_1 x_2 ?H2 = x_2###end
Analysis/Complex_Analysis_Basics
Complex_Analysis_Basics.analytic_on_compose
lemma analytic_on_compose: assumes f: "f analytic_on S" and g: "g analytic_on (f ` S)" shows "(g \<circ> f) analytic_on S"
?f analytic_on ?S \<Longrightarrow> ?g analytic_on ?f ` ?S \<Longrightarrow> ?g \<circ> ?f analytic_on ?S
\<lbrakk> ?H1 x_1 x_2; ?H1 x_3 (?H2 x_1 x_2)\<rbrakk> \<Longrightarrow> ?H1 (?H3 x_3 x_1) x_2
[ "Fun.comp", "Set.image", "Complex_Analysis_Basics.analytic_on" ]
[ "('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'a) \\<Rightarrow> 'c \\<Rightarrow> 'b", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set", "(complex \\<Rightarrow> complex) \\<Rightarrow> complex set \\<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 image :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set\" (infixr \"`\" 90)\n where \"f ` A = {y. \\<exists>x\\<in>A. y = f x}\"" ]
template
###lemma ?f analytic_on ?S \<Longrightarrow> ?g analytic_on ?f ` ?S \<Longrightarrow> ?g \<circ> ?f analytic_on ?S ###symbols Fun.comp :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'a) \<Rightarrow> 'c \<Rightarrow> 'b Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set Complex_Analysis_Basics.analytic_on :::: (complex \<Rightarrow> complex) \<Rightarrow> complex set \<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 image :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set" (infixr "`" 90) where "f ` A = {y. \<exists>x\<in>A. y = f x}"
###output \<lbrakk> ?H1 x_1 x_2; ?H1 x_3 (?H2 x_1 x_2)\<rbrakk> \<Longrightarrow> ?H1 (?H3 x_3 x_1) x_2###end
Analysis/Cartesian_Euclidean_Space
Cartesian_Euclidean_Space.matrix_vector_mult_linear_continuous_on
null
continuous_on ?S ((*v) ?A)
?H1 x_1 (?H2 x_2)
[ "Finite_Cartesian_Product.matrix_vector_mult", "Topological_Spaces.continuous_on" ]
[ "(('a, 'b) vec, 'c) vec \\<Rightarrow> ('a, 'b) vec \\<Rightarrow> ('a, 'c) vec", "'a set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<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 continuous_on ?S ((*v) ?A) ###symbols Finite_Cartesian_Product.matrix_vector_mult :::: (('a, 'b) vec, 'c) vec \<Rightarrow> ('a, 'b) vec \<Rightarrow> ('a, 'c) vec Topological_Spaces.continuous_on :::: 'a set \<Rightarrow> ('a \<Rightarrow> 'b) \<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 ?H1 x_1 (?H2 x_2)###end
IMP/Hoare_Examples
Hoare_Examples.sum_via_bigstep
lemma sum_via_bigstep: assumes "(''y'' ::= N 0;; wsum, s) \<Rightarrow> t" shows "t ''y'' = sum (s ''x'')"
(''y'' ::= N 0;; wsum, ?s) \<Rightarrow> ?t \<Longrightarrow> ?t ''y'' = Hoare_Examples.sum (?s ''x'')
?H1 (?H2 (?H3 (?H4 (?H5 True False False True True True True False) ?H6) (?H7 ?H8)) ?H9, x_1) x_2 \<Longrightarrow> x_2 (?H4 (?H5 True False False True True True True False) ?H6) = ?H10 (x_1 (?H4 (?H5 False False False True True True True False) ?H6))
[ "Hoare_Examples.sum", "Hoare_Examples.wsum", "Groups.zero_class.zero", "AExp.aexp.N", "List.list.Nil", "String.char.Char", "List.list.Cons", "Com.com.Assign", "Com.com.Seq", "Big_Step.big_step" ]
[ "int \\<Rightarrow> int", "com", "'a", "int \\<Rightarrow> aexp", "'a list", "bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> bool \\<Rightarrow> char", "'a \\<Rightarrow> 'a list \\<Rightarrow> 'a list", "char list \\<Rightarrow> aexp \\<Rightarrow> com", "com \\<Rightarrow> com \\<Rightarrow> com", "com \\<times> (char list \\<Rightarrow> int) \\<Rightarrow> (char list \\<Rightarrow> int) \\<Rightarrow> bool" ]
[ "fun sum :: \"int \\<Rightarrow> int\" where\n\"sum i = (if i \\<le> 0 then 0 else sum (i - 1) + i)\"", "abbreviation \"wsum ==\n WHILE Less (N 0) (V ''x'')\n DO (''y'' ::= Plus (V ''y'') (V ''x'');;\n ''x'' ::= Plus (V ''x'') (N (- 1)))\"", "class zero =\n fixes zero :: 'a (\"0\")", "datatype aexp = N int | V vname | Plus aexp aexp", "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 char =\n Char (digit0: bool) (digit1: bool) (digit2: bool) (digit3: bool)\n (digit4: bool) (digit5: bool) (digit6: bool) (digit7: 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 [] = []\"", "datatype\n com = SKIP \n | Assign vname aexp (\"_ ::= _\" [1000, 61] 61)\n | Seq com com (\"_;;/ _\" [60, 61] 60)\n | If bexp com com (\"(IF _/ THEN _/ ELSE _)\" [0, 0, 61] 61)\n | While bexp com (\"(WHILE _/ DO _)\" [0, 61] 61)", "datatype\n com = SKIP \n | Assign vname aexp (\"_ ::= _\" [1000, 61] 61)\n | Seq com com (\"_;;/ _\" [60, 61] 60)\n | If bexp com com (\"(IF _/ THEN _/ ELSE _)\" [0, 0, 61] 61)\n | While bexp com (\"(WHILE _/ DO _)\" [0, 61] 61)", "inductive\n big_step :: \"com \\<times> state \\<Rightarrow> state \\<Rightarrow> bool\" (infix \"\\<Rightarrow>\" 55)\nwhere\nSkip: \"(SKIP,s) \\<Rightarrow> s\" |\nAssign: \"(x ::= a,s) \\<Rightarrow> s(x := aval a s)\" |\nSeq: \"\\<lbrakk> (c\\<^sub>1,s\\<^sub>1) \\<Rightarrow> s\\<^sub>2; (c\\<^sub>2,s\\<^sub>2) \\<Rightarrow> s\\<^sub>3 \\<rbrakk> \\<Longrightarrow> (c\\<^sub>1;;c\\<^sub>2, s\\<^sub>1) \\<Rightarrow> s\\<^sub>3\" |\nIfTrue: \"\\<lbrakk> bval b s; (c\\<^sub>1,s) \\<Rightarrow> t \\<rbrakk> \\<Longrightarrow> (IF b THEN c\\<^sub>1 ELSE c\\<^sub>2, s) \\<Rightarrow> t\" |\nIfFalse: \"\\<lbrakk> \\<not>bval b s; (c\\<^sub>2,s) \\<Rightarrow> t \\<rbrakk> \\<Longrightarrow> (IF b THEN c\\<^sub>1 ELSE c\\<^sub>2, s) \\<Rightarrow> t\" |\nWhileFalse: \"\\<not>bval b s \\<Longrightarrow> (WHILE b DO c,s) \\<Rightarrow> s\" |\nWhileTrue:\n\"\\<lbrakk> bval b s\\<^sub>1; (c,s\\<^sub>1) \\<Rightarrow> s\\<^sub>2; (WHILE b DO c, s\\<^sub>2) \\<Rightarrow> s\\<^sub>3 \\<rbrakk> \n\\<Longrightarrow> (WHILE b DO c, s\\<^sub>1) \\<Rightarrow> s\\<^sub>3\"" ]
template
###lemma (''y'' ::= N 0;; wsum, ?s) \<Rightarrow> ?t \<Longrightarrow> ?t ''y'' = Hoare_Examples.sum (?s ''x'') ###symbols Hoare_Examples.sum :::: int \<Rightarrow> int Hoare_Examples.wsum :::: com Groups.zero_class.zero :::: 'a AExp.aexp.N :::: int \<Rightarrow> aexp List.list.Nil :::: 'a list String.char.Char :::: bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> bool \<Rightarrow> char List.list.Cons :::: 'a \<Rightarrow> 'a list \<Rightarrow> 'a list Com.com.Assign :::: char list \<Rightarrow> aexp \<Rightarrow> com Com.com.Seq :::: com \<Rightarrow> com \<Rightarrow> com Big_Step.big_step :::: com \<times> (char list \<Rightarrow> int) \<Rightarrow> (char list \<Rightarrow> int) \<Rightarrow> bool ###defs fun sum :: "int \<Rightarrow> int" where "sum i = (if i \<le> 0 then 0 else sum (i - 1) + i)" abbreviation "wsum == WHILE Less (N 0) (V ''x'') DO (''y'' ::= Plus (V ''y'') (V ''x'');; ''x'' ::= Plus (V ''x'') (N (- 1)))" class zero = fixes zero :: 'a ("0") datatype aexp = N int | V vname | Plus aexp aexp 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 char = Char (digit0: bool) (digit1: bool) (digit2: bool) (digit3: bool) (digit4: bool) (digit5: bool) (digit6: bool) (digit7: bool) 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 com = SKIP | Assign vname aexp ("_ ::= _" [1000, 61] 61) | Seq com com ("_;;/ _" [60, 61] 60) | If bexp com com ("(IF _/ THEN _/ ELSE _)" [0, 0, 61] 61) | While bexp com ("(WHILE _/ DO _)" [0, 61] 61) datatype com = SKIP | Assign vname aexp ("_ ::= _" [1000, 61] 61) | Seq com com ("_;;/ _" [60, 61] 60) | If bexp com com ("(IF _/ THEN _/ ELSE _)" [0, 0, 61] 61) | While bexp com ("(WHILE _/ DO _)" [0, 61] 61) inductive big_step :: "com \<times> state \<Rightarrow> state \<Rightarrow> bool" (infix "\<Rightarrow>" 55) where Skip: "(SKIP,s) \<Rightarrow> s" | Assign: "(x ::= a,s) \<Rightarrow> s(x := aval a s)" | Seq: "\<lbrakk> (c\<^sub>1,s\<^sub>1) \<Rightarrow> s\<^sub>2; (c\<^sub>2,s\<^sub>2) \<Rightarrow> s\<^sub>3 \<rbrakk> \<Longrightarrow> (c\<^sub>1;;c\<^sub>2, s\<^sub>1) \<Rightarrow> s\<^sub>3" | IfTrue: "\<lbrakk> bval b s; (c\<^sub>1,s) \<Rightarrow> t \<rbrakk> \<Longrightarrow> (IF b THEN c\<^sub>1 ELSE c\<^sub>2, s) \<Rightarrow> t" | IfFalse: "\<lbrakk> \<not>bval b s; (c\<^sub>2,s) \<Rightarrow> t \<rbrakk> \<Longrightarrow> (IF b THEN c\<^sub>1 ELSE c\<^sub>2, s) \<Rightarrow> t" | WhileFalse: "\<not>bval b s \<Longrightarrow> (WHILE b DO c,s) \<Rightarrow> s" | WhileTrue: "\<lbrakk> bval b s\<^sub>1; (c,s\<^sub>1) \<Rightarrow> s\<^sub>2; (WHILE b DO c, s\<^sub>2) \<Rightarrow> s\<^sub>3 \<rbrakk> \<Longrightarrow> (WHILE b DO c, s\<^sub>1) \<Rightarrow> s\<^sub>3"
###output ?H1 (?H2 (?H3 (?H4 (?H5 True False False True True True True False) ?H6) (?H7 ?H8)) ?H9, x_1) x_2 \<Longrightarrow> x_2 (?H4 (?H5 True False False True True True True False) ?H6) = ?H10 (x_1 (?H4 (?H5 False False False True True True True False) ?H6))###end
Algebra/Group
Group.units_of_carrier
lemma units_of_carrier: "carrier (units_of G) = Units G"
carrier (units_of ?G) = Units ?G
?H1 (?H2 x_1) = ?H3 x_1
[ "Group.Units", "Group.units_of", "Congruence.partial_object.carrier" ]
[ "('a, 'b) monoid_scheme \\<Rightarrow> 'a set", "('a, 'b) monoid_scheme \\<Rightarrow> 'a monoid", "('a, 'b) partial_object_scheme \\<Rightarrow> 'a set" ]
[ "definition\n Units :: \"_ => 'a set\"\n \\<comment> \\<open>The set of invertible elements\\<close>\n where \"Units G = {y. y \\<in> carrier G \\<and> (\\<exists>x \\<in> carrier G. x \\<otimes>\\<^bsub>G\\<^esub> y = \\<one>\\<^bsub>G\\<^esub> \\<and> y \\<otimes>\\<^bsub>G\\<^esub> x = \\<one>\\<^bsub>G\\<^esub>)}\"", "definition units_of :: \"('a, 'b) monoid_scheme \\<Rightarrow> 'a monoid\"\n where \"units_of G =\n \\<lparr>carrier = Units G, Group.monoid.mult = Group.monoid.mult G, one = one G\\<rparr>\"" ]
template
###lemma carrier (units_of ?G) = Units ?G ###symbols Group.Units :::: ('a, 'b) monoid_scheme \<Rightarrow> 'a set Group.units_of :::: ('a, 'b) monoid_scheme \<Rightarrow> 'a monoid Congruence.partial_object.carrier :::: ('a, 'b) partial_object_scheme \<Rightarrow> 'a set ###defs definition Units :: "_ => 'a set" \<comment> \<open>The set of invertible elements\<close> where "Units G = {y. y \<in> carrier G \<and> (\<exists>x \<in> carrier G. x \<otimes>\<^bsub>G\<^esub> y = \<one>\<^bsub>G\<^esub> \<and> y \<otimes>\<^bsub>G\<^esub> x = \<one>\<^bsub>G\<^esub>)}" definition units_of :: "('a, 'b) monoid_scheme \<Rightarrow> 'a monoid" where "units_of G = \<lparr>carrier = Units G, Group.monoid.mult = Group.monoid.mult G, one = one G\<rparr>"
###output ?H1 (?H2 x_1) = ?H3 x_1###end
UNITY/Comp/Alloc
Alloc.rename_Client_Bounded
lemma rename_Client_Bounded: "i \<in> I ==> rename sysOfClient (plam x: I. rename client_map Client) \<in> UNIV guarantees Always {s. \<forall>elt \<in> set ((ask o sub i o client) s). elt \<le> NbT}"
?i \<in> ?I \<Longrightarrow> rename sysOfClient (plam x: ?I. rename client_map Client) \<in> UNIV guarantees Always {s. \<forall>elt\<in>set ((ask \<circ> sub ?i \<circ> client) s). elt \<le> NbT}
x_1 \<in> x_2 \<Longrightarrow> ?H1 ?H2 (?H3 x_2 (\<lambda>y_0. ?H1 ?H4 ?H5)) \<in> ?H6 ?H7 (?H8 (?H9 (\<lambda>y_1. \<forall>y_2\<in> ?H10 (?H11 (?H11 ?H12 (?H13 x_1)) ?H14 y_1). y_2 \<le> ?H15)))
[ "AllocBase.NbT", "Alloc.systemState.client", "Lift_prog.sub", "Alloc.clientState.ask", "Fun.comp", "List.list.set", "Set.Collect", "Constrains.Always", "Set.UNIV", "Guar.guar", "Alloc.Client", "Alloc.client_map", "PPROD.PLam", "Alloc.sysOfClient", "Rename.rename" ]
[ "nat", "('a, 'b) systemState_scheme \\<Rightarrow> nat \\<Rightarrow> clientState", "'a \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> 'b", "'a clientState_scheme \\<Rightarrow> nat list", "('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'a) \\<Rightarrow> 'c \\<Rightarrow> 'b", "'a list \\<Rightarrow> 'a set", "('a \\<Rightarrow> bool) \\<Rightarrow> 'a set", "'a set \\<Rightarrow> 'a program set", "'a set", "'a program set \\<Rightarrow> 'a program set \\<Rightarrow> 'a program set", "'a clientState_d program", "'a clientState_d \\<Rightarrow> clientState \\<times> 'a", "nat set \\<Rightarrow> (nat \\<Rightarrow> ('a \\<times> (nat \\<Rightarrow> 'a) \\<times> 'b) program) \\<Rightarrow> ((nat \\<Rightarrow> 'a) \\<times> 'b) program", "(nat \\<Rightarrow> clientState) \\<times> 'a allocState_d \\<Rightarrow> 'a systemState", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a program \\<Rightarrow> 'b program" ]
[ "definition sub :: \"['a, 'a=>'b] => 'b\" where\n \"sub == %i f. f i\"", "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))\"", "datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"", "definition Always :: \"'a set => 'a program set\" where\n \"Always A == {F. Init F \\<subseteq> A} \\<inter> Stable A\"", "abbreviation UNIV :: \"'a set\"\n where \"UNIV \\<equiv> top\"", "definition guar :: \"['a program set, 'a program set] => 'a program set\" (infixl \"guarantees\" 55) where\n (*higher than membership, lower than Co*)\n \"X guarantees Y == {F. \\<forall>G. F ok G --> F\\<squnion>G \\<in> X --> F\\<squnion>G \\<in> Y}\"", "definition PLam :: \"[nat set, nat => ('b * ((nat=>'b) * 'c)) program]\n => ((nat=>'b) * 'c) program\" where\n \"PLam I F == \\<Squnion>i \\<in> I. lift i (F i)\"", "definition rename :: \"['a => 'b, 'a program] => 'b program\" where\n \"rename h == extend (%(x,u::unit). h x)\"" ]
template
###lemma ?i \<in> ?I \<Longrightarrow> rename sysOfClient (plam x: ?I. rename client_map Client) \<in> UNIV guarantees Always {s. \<forall>elt\<in>set ((ask \<circ> sub ?i \<circ> client) s). elt \<le> NbT} ###symbols AllocBase.NbT :::: nat Alloc.systemState.client :::: ('a, 'b) systemState_scheme \<Rightarrow> nat \<Rightarrow> clientState Lift_prog.sub :::: 'a \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'b Alloc.clientState.ask :::: 'a clientState_scheme \<Rightarrow> nat list Fun.comp :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'a) \<Rightarrow> 'c \<Rightarrow> 'b List.list.set :::: 'a list \<Rightarrow> 'a set Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set Constrains.Always :::: 'a set \<Rightarrow> 'a program set Set.UNIV :::: 'a set Guar.guar :::: 'a program set \<Rightarrow> 'a program set \<Rightarrow> 'a program set Alloc.Client :::: 'a clientState_d program Alloc.client_map :::: 'a clientState_d \<Rightarrow> clientState \<times> 'a PPROD.PLam :::: nat set \<Rightarrow> (nat \<Rightarrow> ('a \<times> (nat \<Rightarrow> 'a) \<times> 'b) program) \<Rightarrow> ((nat \<Rightarrow> 'a) \<times> 'b) program Alloc.sysOfClient :::: (nat \<Rightarrow> clientState) \<times> 'a allocState_d \<Rightarrow> 'a systemState Rename.rename :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a program \<Rightarrow> 'b program ###defs definition sub :: "['a, 'a=>'b] => 'b" where "sub == %i f. f i" 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))" datatype (set: 'a) list = Nil ("[]") | Cons (hd: 'a) (tl: "'a list") (infixr "#" 65) for map: map rel: list_all2 pred: list_all where "tl [] = []" definition Always :: "'a set => 'a program set" where "Always A == {F. Init F \<subseteq> A} \<inter> Stable A" abbreviation UNIV :: "'a set" where "UNIV \<equiv> top" definition guar :: "['a program set, 'a program set] => 'a program set" (infixl "guarantees" 55) where (*higher than membership, lower than Co*) "X guarantees Y == {F. \<forall>G. F ok G --> F\<squnion>G \<in> X --> F\<squnion>G \<in> Y}" definition PLam :: "[nat set, nat => ('b * ((nat=>'b) * 'c)) program] => ((nat=>'b) * 'c) program" where "PLam I F == \<Squnion>i \<in> I. lift i (F i)" definition rename :: "['a => 'b, 'a program] => 'b program" where "rename h == extend (%(x,u::unit). h x)"
###output x_1 \<in> x_2 \<Longrightarrow> ?H1 ?H2 (?H3 x_2 (\<lambda>y_0. ?H1 ?H4 ?H5)) \<in> ?H6 ?H7 (?H8 (?H9 (\<lambda>y_1. \<forall>y_2\<in> ?H10 (?H11 (?H11 ?H12 (?H13 x_1)) ?H14 y_1). y_2 \<le> ?H15)))###end
Analysis/Arcwise_Connected
Arcwise_Connected.segment_to_point_exists
lemma segment_to_point_exists: fixes S :: "'a :: euclidean_space set" assumes "closed S" "S \<noteq> {}" obtains b where "b \<in> S" "open_segment a b \<inter> S = {}"
closed ?S \<Longrightarrow> ?S \<noteq> {} \<Longrightarrow> (\<And>b. b \<in> ?S \<Longrightarrow> open_segment ?a b \<inter> ?S = {} \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
\<lbrakk> ?H1 x_1; x_1 \<noteq> ?H2; \<And>y_0. \<lbrakk>y_0 \<in> x_1; ?H3 (?H4 x_2 y_0) x_1 = ?H2\<rbrakk> \<Longrightarrow> x_3\<rbrakk> \<Longrightarrow> x_3
[ "Line_Segment.open_segment", "Set.inter", "Set.empty", "Topological_Spaces.topological_space_class.closed" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a set", "'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set", "'a set", "'a set \\<Rightarrow> bool" ]
[ "abbreviation inter :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<inter>\" 70)\n where \"(\\<inter>) \\<equiv> inf\"", "abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"", "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> ?S \<noteq> {} \<Longrightarrow> (\<And>b. b \<in> ?S \<Longrightarrow> open_segment ?a b \<inter> ?S = {} \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis ###symbols Line_Segment.open_segment :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a set Set.inter :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set Set.empty :::: 'a set Topological_Spaces.topological_space_class.closed :::: 'a set \<Rightarrow> bool ###defs abbreviation inter :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<inter>" 70) where "(\<inter>) \<equiv> inf" abbreviation empty :: "'a set" ("{}") where "{} \<equiv> bot" 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_1 \<noteq> ?H2; \<And>y_0. \<lbrakk>y_0 \<in> x_1; ?H3 (?H4 x_2 y_0) x_1 = ?H2\<rbrakk> \<Longrightarrow> x_3\<rbrakk> \<Longrightarrow> x_3###end
Hoare_Parallel/OG_Tactics
OG_Tactics.AnnBasic_assertions
lemma AnnBasic_assertions: "\<lbrakk>interfree_aux(None, r, Some a); interfree_aux(None, q, Some a)\<rbrakk> \<Longrightarrow> interfree_aux(Some (AnnBasic r f), q, Some a)"
interfree_aux (None, ?r, Some ?a) \<Longrightarrow> interfree_aux (None, ?q, Some ?a) \<Longrightarrow> interfree_aux (Some (AnnBasic ?r ?f), ?q, Some ?a)
\<lbrakk> ?H1 (?H2, x_1, ?H3 x_2); ?H1 (?H2, x_3, ?H3 x_2)\<rbrakk> \<Longrightarrow> ?H1 (?H3 (?H4 x_1 x_4), x_3, ?H3 x_2)
[ "OG_Com.ann_com.AnnBasic", "Option.option.Some", "Option.option.None", "OG_Hoare.interfree_aux" ]
[ "'a set \\<Rightarrow> ('a \\<Rightarrow> 'a) \\<Rightarrow> 'a ann_com", "'a \\<Rightarrow> 'a option", "'a option", "'a ann_com option \\<times> 'a set \\<times> 'a ann_com option \\<Rightarrow> bool" ]
[ "datatype 'a ann_com =\n AnnBasic \"('a assn)\" \"('a \\<Rightarrow> 'a)\"\n | AnnSeq \"('a ann_com)\" \"('a ann_com)\"\n | AnnCond1 \"('a assn)\" \"('a bexp)\" \"('a ann_com)\" \"('a ann_com)\"\n | AnnCond2 \"('a assn)\" \"('a bexp)\" \"('a ann_com)\"\n | AnnWhile \"('a assn)\" \"('a bexp)\" \"('a assn)\" \"('a ann_com)\"\n | AnnAwait \"('a assn)\" \"('a bexp)\" \"('a com)\"\nand 'a com =\n Parallel \"('a ann_com option \\<times> 'a assn) list\"\n | Basic \"('a \\<Rightarrow> 'a)\"\n | Seq \"('a com)\" \"('a com)\"\n | Cond \"('a bexp)\" \"('a com)\" \"('a com)\"\n | While \"('a bexp)\" \"('a assn)\" \"('a com)\"", "datatype 'a option =\n None\n | Some (the: 'a)", "datatype 'a option =\n None\n | Some (the: 'a)", "definition interfree_aux :: \"('a ann_com_op \\<times> 'a assn \\<times> 'a ann_com_op) \\<Rightarrow> bool\" where\n \"interfree_aux \\<equiv> \\<lambda>(co, q, co'). co'= None \\<or>\n (\\<forall>(r,a) \\<in> atomics (the co'). \\<parallel>= (q \\<inter> r) a q \\<and>\n (co = None \\<or> (\\<forall>p \\<in> assertions (the co). \\<parallel>= (p \\<inter> r) a p)))\"" ]
template
###lemma interfree_aux (None, ?r, Some ?a) \<Longrightarrow> interfree_aux (None, ?q, Some ?a) \<Longrightarrow> interfree_aux (Some (AnnBasic ?r ?f), ?q, Some ?a) ###symbols OG_Com.ann_com.AnnBasic :::: 'a set \<Rightarrow> ('a \<Rightarrow> 'a) \<Rightarrow> 'a ann_com Option.option.Some :::: 'a \<Rightarrow> 'a option Option.option.None :::: 'a option OG_Hoare.interfree_aux :::: 'a ann_com option \<times> 'a set \<times> 'a ann_com option \<Rightarrow> bool ###defs datatype 'a ann_com = AnnBasic "('a assn)" "('a \<Rightarrow> 'a)" | AnnSeq "('a ann_com)" "('a ann_com)" | AnnCond1 "('a assn)" "('a bexp)" "('a ann_com)" "('a ann_com)" | AnnCond2 "('a assn)" "('a bexp)" "('a ann_com)" | AnnWhile "('a assn)" "('a bexp)" "('a assn)" "('a ann_com)" | AnnAwait "('a assn)" "('a bexp)" "('a com)" and 'a com = Parallel "('a ann_com option \<times> 'a assn) list" | Basic "('a \<Rightarrow> 'a)" | Seq "('a com)" "('a com)" | Cond "('a bexp)" "('a com)" "('a com)" | While "('a bexp)" "('a assn)" "('a com)" datatype 'a option = None | Some (the: 'a) datatype 'a option = None | Some (the: 'a) definition interfree_aux :: "('a ann_com_op \<times> 'a assn \<times> 'a ann_com_op) \<Rightarrow> bool" where "interfree_aux \<equiv> \<lambda>(co, q, co'). co'= None \<or> (\<forall>(r,a) \<in> atomics (the co'). \<parallel>= (q \<inter> r) a q \<and> (co = None \<or> (\<forall>p \<in> assertions (the co). \<parallel>= (p \<inter> r) a p)))"
###output \<lbrakk> ?H1 (?H2, x_1, ?H3 x_2); ?H1 (?H2, x_3, ?H3 x_2)\<rbrakk> \<Longrightarrow> ?H1 (?H3 (?H4 x_1 x_4), x_3, ?H3 x_2)###end
List
List.filter_transfer
lemma filter_transfer [transfer_rule]: "((A ===> (=)) ===> list_all2 A ===> list_all2 A) filter filter"
rel_fun (rel_fun ?A (=)) (rel_fun (list_all2 ?A) (list_all2 ?A)) filter filter
?H1 (?H1 x_1 (=)) (?H1 (?H2 x_1) (?H2 x_1)) ?H3 ?H3
[ "List.filter", "List.list.list_all2", "BNF_Def.rel_fun" ]
[ "('a \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> 'a list", "('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> 'b list \\<Rightarrow> bool", "('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'c) \\<Rightarrow> ('b \\<Rightarrow> 'd) \\<Rightarrow> bool" ]
[ "primrec filter:: \"('a \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> 'a list\" where\n\"filter P [] = []\" |\n\"filter P (x # xs) = (if P x then x # filter P xs else filter P xs)\"", "datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"", "definition\n rel_fun :: \"('a \\<Rightarrow> 'c \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'd) \\<Rightarrow> bool\"\nwhere\n \"rel_fun A B = (\\<lambda>f g. \\<forall>x y. A x y \\<longrightarrow> B (f x) (g y))\"" ]
template
###lemma rel_fun (rel_fun ?A (=)) (rel_fun (list_all2 ?A) (list_all2 ?A)) filter filter ###symbols List.filter :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> 'a list List.list.list_all2 :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> 'b list \<Rightarrow> bool BNF_Def.rel_fun :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'c) \<Rightarrow> ('b \<Rightarrow> 'd) \<Rightarrow> bool ###defs primrec filter:: "('a \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> 'a list" where "filter P [] = []" | "filter P (x # xs) = (if P x then x # filter P xs else filter P xs)" datatype (set: 'a) list = Nil ("[]") | Cons (hd: 'a) (tl: "'a list") (infixr "#" 65) for map: map rel: list_all2 pred: list_all where "tl [] = []" definition rel_fun :: "('a \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'd) \<Rightarrow> bool" where "rel_fun A B = (\<lambda>f g. \<forall>x y. A x y \<longrightarrow> B (f x) (g y))"
###output ?H1 (?H1 x_1 (=)) (?H1 (?H2 x_1) (?H2 x_1)) ?H3 ?H3###end
Auth/Guard/P1
P1.chain_guard_Nonce_neq
lemma chain_guard_Nonce_neq [intro]: "n \<noteq> ofr \<Longrightarrow> chain B ofr A' L C \<in> guard n {priK A}"
?n \<noteq> ?ofr \<Longrightarrow> chain ?B ?ofr ?A' ?L ?C \<in> guard ?n {priEK ?A}
x_1 \<noteq> x_2 \<Longrightarrow> ?H1 x_3 x_2 x_4 x_5 x_6 \<in> ?H2 x_1 (?H3 (?H4 x_7) ?H5)
[ "Set.empty", "Public.priEK", "Set.insert", "Guard.guard", "P1.chain" ]
[ "'a set", "agent \\<Rightarrow> nat", "'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set", "nat \\<Rightarrow> nat set \\<Rightarrow> msg set", "agent \\<Rightarrow> nat \\<Rightarrow> agent \\<Rightarrow> msg \\<Rightarrow> agent \\<Rightarrow> msg" ]
[ "abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"", "abbreviation\n (*BEWARE!! priEK, priSK DON'T WORK with inj, range, image, etc.*)\n priEK :: \"agent \\<Rightarrow> key\" where\n \"priEK A == privateKey Encryption A\"", "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 guard :: \"nat \\<Rightarrow> key set \\<Rightarrow> msg set\"\n for n :: nat and Ks :: \"key set\"\nwhere\n No_Nonce [intro]: \"Nonce n \\<notin> parts {X} \\<Longrightarrow> X \\<in> guard n Ks\"\n| Guard_Nonce [intro]: \"invKey K \\<in> Ks \\<Longrightarrow> Crypt K X \\<in> guard n Ks\"\n| Crypt [intro]: \"X \\<in> guard n Ks \\<Longrightarrow> Crypt K X \\<in> guard n Ks\"\n| Pair [intro]: \"\\<lbrakk>X \\<in> guard n Ks; Y \\<in> guard n Ks\\<rbrakk> \\<Longrightarrow> \\<lbrace>X,Y\\<rbrace> \\<in> guard n Ks\"" ]
template
###lemma ?n \<noteq> ?ofr \<Longrightarrow> chain ?B ?ofr ?A' ?L ?C \<in> guard ?n {priEK ?A} ###symbols Set.empty :::: 'a set Public.priEK :::: agent \<Rightarrow> nat Set.insert :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a set Guard.guard :::: nat \<Rightarrow> nat set \<Rightarrow> msg set P1.chain :::: agent \<Rightarrow> nat \<Rightarrow> agent \<Rightarrow> msg \<Rightarrow> agent \<Rightarrow> msg ###defs abbreviation empty :: "'a set" ("{}") where "{} \<equiv> bot" abbreviation (*BEWARE!! priEK, priSK DON'T WORK with inj, range, image, etc.*) priEK :: "agent \<Rightarrow> key" where "priEK A == privateKey Encryption A" definition insert :: "'a \<Rightarrow> 'a set \<Rightarrow> 'a set" where insert_compr: "insert a B = {x. x = a \<or> x \<in> B}" inductive_set guard :: "nat \<Rightarrow> key set \<Rightarrow> msg set" for n :: nat and Ks :: "key set" where No_Nonce [intro]: "Nonce n \<notin> parts {X} \<Longrightarrow> X \<in> guard n Ks" | Guard_Nonce [intro]: "invKey K \<in> Ks \<Longrightarrow> Crypt K X \<in> guard n Ks" | Crypt [intro]: "X \<in> guard n Ks \<Longrightarrow> Crypt K X \<in> guard n Ks" | Pair [intro]: "\<lbrakk>X \<in> guard n Ks; Y \<in> guard n Ks\<rbrakk> \<Longrightarrow> \<lbrace>X,Y\<rbrace> \<in> guard n Ks"
###output x_1 \<noteq> x_2 \<Longrightarrow> ?H1 x_3 x_2 x_4 x_5 x_6 \<in> ?H2 x_1 (?H3 (?H4 x_7) ?H5)###end
Analysis/Line_Segment
Line_Segment.dist_midpoint(4)
lemma dist_midpoint: fixes a b :: "'a::real_normed_vector" shows "dist a (midpoint a b) = (dist a b) / 2" (is ?t1) "dist b (midpoint a b) = (dist a b) / 2" (is ?t2) "dist (midpoint a b) a = (dist a b) / 2" (is ?t3) "dist (midpoint a b) b = (dist a b) / 2" (is ?t4)
dist (midpoint ?a ?b) ?b = dist ?a ?b / 2
?H1 (?H2 x_1 x_2) x_2 = ?H3 (?H1 x_1 x_2) (?H4 (?H5 ?H6))
[ "Num.num.One", "Num.num.Bit0", "Num.numeral_class.numeral", "Fields.inverse_class.inverse_divide", "Line_Segment.midpoint", "Real_Vector_Spaces.dist_class.dist" ]
[ "num", "num \\<Rightarrow> num", "num \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> real" ]
[ "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 dist =\n fixes dist :: \"'a \\<Rightarrow> 'a \\<Rightarrow> real\"" ]
template
###lemma dist (midpoint ?a ?b) ?b = dist ?a ?b / 2 ###symbols 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 Line_Segment.midpoint :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Real_Vector_Spaces.dist_class.dist :::: 'a \<Rightarrow> 'a \<Rightarrow> real ###defs datatype num = One | Bit0 num | Bit1 num datatype num = One | Bit0 num | Bit1 num primrec numeral :: "num \<Rightarrow> 'a" where numeral_One: "numeral One = 1" | numeral_Bit0: "numeral (Bit0 n) = numeral n + numeral n" | numeral_Bit1: "numeral (Bit1 n) = numeral n + numeral n + 1" class inverse = divide + fixes inverse :: "'a \<Rightarrow> 'a" begin class dist = fixes dist :: "'a \<Rightarrow> 'a \<Rightarrow> real"
###output ?H1 (?H2 x_1 x_2) x_2 = ?H3 (?H1 x_1 x_2) (?H4 (?H5 ?H6))###end
Transcendental
Transcendental.sinh_real_pos_iff
lemma sinh_real_pos_iff [simp]: "sinh (x :: real) > 0 \<longleftrightarrow> x > 0"
(0 < sinh ?x) = (0 < ?x)
(?H1 < ?H2 x_1) = (?H1 < x_1)
[ "Transcendental.sinh", "Groups.zero_class.zero" ]
[ "'a \\<Rightarrow> 'a", "'a" ]
[ "definition sinh :: \"'a :: {banach, real_normed_algebra_1} \\<Rightarrow> 'a\" where\n \"sinh x = (exp x - exp (-x)) /\\<^sub>R 2\"", "class zero =\n fixes zero :: 'a (\"0\")" ]
template
###lemma (0 < sinh ?x) = (0 < ?x) ###symbols Transcendental.sinh :::: 'a \<Rightarrow> 'a Groups.zero_class.zero :::: 'a ###defs definition sinh :: "'a :: {banach, real_normed_algebra_1} \<Rightarrow> 'a" where "sinh x = (exp x - exp (-x)) /\<^sub>R 2" class zero = fixes zero :: 'a ("0")
###output (?H1 < ?H2 x_1) = (?H1 < x_1)###end
Transfer
Transfer.transfer_raw(225)
null
Transfer.Rel (rel_fun (rel_fun ?S1a (rel_fun ?S1c (=))) (rel_fun (rel_fun ?S2a (rel_fun ?S2c (=))) (rel_fun (rel_sum ?S1a ?S2a) (rel_fun (rel_sum ?S1c ?S2c) (=))))) rel_sum rel_sum
?H1 (?H2 (?H2 x_1 (?H2 x_2 (=))) (?H2 (?H2 x_3 (?H2 x_4 (=))) (?H2 (?H3 x_1 x_3) (?H2 (?H3 x_2 x_4) (=))))) ?H3 ?H3
[ "BNF_Def.rel_sum", "BNF_Def.rel_fun", "Transfer.Rel" ]
[ "('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> 'a + 'c \\<Rightarrow> 'b + 'd \\<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" ]
[ "inductive\n rel_sum :: \"('a \\<Rightarrow> 'c \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> 'a + 'b \\<Rightarrow> 'c + 'd \\<Rightarrow> bool\" for R1 R2\nwhere\n \"R1 a c \\<Longrightarrow> rel_sum R1 R2 (Inl a) (Inl c)\"\n| \"R2 b d \\<Longrightarrow> rel_sum R1 R2 (Inr b) (Inr d)\"", "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 ?S1a (rel_fun ?S1c (=))) (rel_fun (rel_fun ?S2a (rel_fun ?S2c (=))) (rel_fun (rel_sum ?S1a ?S2a) (rel_fun (rel_sum ?S1c ?S2c) (=))))) rel_sum rel_sum ###symbols BNF_Def.rel_sum :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> 'a + 'c \<Rightarrow> 'b + 'd \<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 inductive rel_sum :: "('a \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> 'a + 'b \<Rightarrow> 'c + 'd \<Rightarrow> bool" for R1 R2 where "R1 a c \<Longrightarrow> rel_sum R1 R2 (Inl a) (Inl c)" | "R2 b d \<Longrightarrow> rel_sum R1 R2 (Inr b) (Inr d)" 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 x_2 (=))) (?H2 (?H2 x_3 (?H2 x_4 (=))) (?H2 (?H3 x_1 x_3) (?H2 (?H3 x_2 x_4) (=))))) ?H3 ?H3###end
Library/Sublist
Sublist.Cons_parallelI2
lemma Cons_parallelI2: "\<lbrakk> a = b; as \<parallel> bs \<rbrakk> \<Longrightarrow> a # as \<parallel> b # bs"
?a = ?b \<Longrightarrow> ?as \<parallel> ?bs \<Longrightarrow> ?a # ?as \<parallel> ?b # ?bs
\<lbrakk>x_1 = x_2; ?H1 x_3 x_4\<rbrakk> \<Longrightarrow> ?H1 (?H2 x_1 x_3) (?H2 x_2 x_4)
[ "List.list.Cons", "Sublist.parallel" ]
[ "'a \\<Rightarrow> 'a list \\<Rightarrow> 'a list", "'a list \\<Rightarrow> 'a list \\<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 [] = []\"", "definition parallel :: \"'a list \\<Rightarrow> 'a list \\<Rightarrow> bool\" (infixl \"\\<parallel>\" 50)\n where \"(xs \\<parallel> ys) = (\\<not> prefix xs ys \\<and> \\<not> prefix ys xs)\"" ]
template
###lemma ?a = ?b \<Longrightarrow> ?as \<parallel> ?bs \<Longrightarrow> ?a # ?as \<parallel> ?b # ?bs ###symbols List.list.Cons :::: 'a \<Rightarrow> 'a list \<Rightarrow> 'a list Sublist.parallel :::: 'a list \<Rightarrow> 'a list \<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 [] = []" definition parallel :: "'a list \<Rightarrow> 'a list \<Rightarrow> bool" (infixl "\<parallel>" 50) where "(xs \<parallel> ys) = (\<not> prefix xs ys \<and> \<not> prefix ys xs)"
###output \<lbrakk>x_1 = x_2; ?H1 x_3 x_4\<rbrakk> \<Longrightarrow> ?H1 (?H2 x_1 x_3) (?H2 x_2 x_4)###end
Library/Word
Word.unat_plus_if'
lemma unat_plus_if': \<open>unat (a + b) = (if unat a + unat b < 2 ^ LENGTH('a) then unat a + unat b else unat a + unat b - 2 ^ LENGTH('a))\<close> for a b :: \<open>'a::len word\<close>
unat (?a + ?b) = (if unat ?a + unat ?b < 2 ^ LENGTH(?'a) then unat ?a + unat ?b else unat ?a + unat ?b - 2 ^ LENGTH(?'a))
?H1 (?H2 x_1 x_2) = (if ?H2 (?H1 x_1) (?H1 x_2) < ?H3 (?H4 (?H5 ?H6)) (?H7 TYPE(?'a)) then ?H2 (?H1 x_1) (?H1 x_2) else ?H8 (?H2 (?H1 x_1) (?H1 x_2)) (?H3 (?H4 (?H5 ?H6)) (?H7 TYPE(?'a))))
[ "Groups.minus_class.minus", "Type_Length.len0_class.len_of", "Num.num.One", "Num.num.Bit0", "Num.numeral_class.numeral", "Power.power_class.power", "Groups.plus_class.plus", "Word.unat" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a itself \\<Rightarrow> nat", "num", "num \\<Rightarrow> num", "num \\<Rightarrow> 'a", "'a \\<Rightarrow> nat \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a word \\<Rightarrow> nat" ]
[ "class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)", "class len0 =\n fixes len_of :: \"'a itself \\<Rightarrow> nat\"", "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\"", "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)", "abbreviation unat :: \\<open>'a::len word \\<Rightarrow> nat\\<close>\n where \\<open>unat \\<equiv> unsigned\\<close>" ]
template
###lemma unat (?a + ?b) = (if unat ?a + unat ?b < 2 ^ LENGTH(?'a) then unat ?a + unat ?b else unat ?a + unat ?b - 2 ^ LENGTH(?'a)) ###symbols Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Type_Length.len0_class.len_of :::: 'a itself \<Rightarrow> nat Num.num.One :::: num Num.num.Bit0 :::: num \<Rightarrow> num Num.numeral_class.numeral :::: num \<Rightarrow> 'a Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Word.unat :::: 'a word \<Rightarrow> nat ###defs class minus = fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65) class len0 = fixes len_of :: "'a itself \<Rightarrow> nat" 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" 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) abbreviation unat :: \<open>'a::len word \<Rightarrow> nat\<close> where \<open>unat \<equiv> unsigned\<close>
###output ?H1 (?H2 x_1 x_2) = (if ?H2 (?H1 x_1) (?H1 x_2) < ?H3 (?H4 (?H5 ?H6)) (?H7 TYPE(?'a)) then ?H2 (?H1 x_1) (?H1 x_2) else ?H8 (?H2 (?H1 x_1) (?H1 x_2)) (?H3 (?H4 (?H5 ?H6)) (?H7 TYPE(?'a))))###end
Probability/SPMF
SPMF.map_spmf_mono
lemma map_spmf_mono [partial_function_mono]: "mono_spmf B \<Longrightarrow> mono_spmf (\<lambda>g. map_spmf f (B g))"
monotone spmf.le_fun (ord_spmf (=)) ?B \<Longrightarrow> monotone spmf.le_fun (ord_spmf (=)) (\<lambda>g. map_spmf ?f (?B g))
?H1 ?H2 (?H3 (=)) x_1 \<Longrightarrow> ?H1 ?H2 (?H3 (=)) (\<lambda>y_0. ?H4 x_2 (x_1 y_0))
[ "SPMF.map_spmf", "SPMF.ord_spmf", "SPMF.spmf.le_fun", "Fun.monotone" ]
[ "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a spmf \\<Rightarrow> 'b spmf", "('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> 'a spmf \\<Rightarrow> 'a spmf \\<Rightarrow> bool", "('b \\<Rightarrow> 'a spmf) \\<Rightarrow> ('b \\<Rightarrow> 'a spmf) \\<Rightarrow> bool", "('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool" ]
[ "abbreviation map_spmf :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a spmf \\<Rightarrow> 'b spmf\"\n where \"map_spmf f \\<equiv> map_pmf (map_option f)\"", "abbreviation ord_spmf :: \"('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> 'a spmf \\<Rightarrow> 'a spmf \\<Rightarrow> bool\"\n where \"ord_spmf ord \\<equiv> rel_pmf (ord_option ord)\"", "abbreviation spmf :: \"'a spmf \\<Rightarrow> 'a \\<Rightarrow> real\"\n where \"spmf p x \\<equiv> pmf p (Some x)\"", "abbreviation monotone :: \"('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool\"\n where \"monotone \\<equiv> monotone_on UNIV\"" ]
template
###lemma monotone spmf.le_fun (ord_spmf (=)) ?B \<Longrightarrow> monotone spmf.le_fun (ord_spmf (=)) (\<lambda>g. map_spmf ?f (?B g)) ###symbols SPMF.map_spmf :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a spmf \<Rightarrow> 'b spmf SPMF.ord_spmf :::: ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> 'a spmf \<Rightarrow> 'a spmf \<Rightarrow> bool SPMF.spmf.le_fun :::: ('b \<Rightarrow> 'a spmf) \<Rightarrow> ('b \<Rightarrow> 'a spmf) \<Rightarrow> bool Fun.monotone :::: ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool ###defs abbreviation map_spmf :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a spmf \<Rightarrow> 'b spmf" where "map_spmf f \<equiv> map_pmf (map_option f)" abbreviation ord_spmf :: "('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> 'a spmf \<Rightarrow> 'a spmf \<Rightarrow> bool" where "ord_spmf ord \<equiv> rel_pmf (ord_option ord)" abbreviation spmf :: "'a spmf \<Rightarrow> 'a \<Rightarrow> real" where "spmf p x \<equiv> pmf p (Some x)" abbreviation monotone :: "('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool" where "monotone \<equiv> monotone_on UNIV"
###output ?H1 ?H2 (?H3 (=)) x_1 \<Longrightarrow> ?H1 ?H2 (?H3 (=)) (\<lambda>y_0. ?H4 x_2 (x_1 y_0))###end
ex/Tree23
Tree23.bal_del0
lemma bal_del0: "bal t \<Longrightarrow> bal (del0 k t)"
bal ?t \<Longrightarrow> bal (del0 ?k ?t)
?H1 x_1 \<Longrightarrow> ?H1 (?H2 x_2 x_1)
[ "Tree23.del0", "Tree23.bal" ]
[ "int \\<Rightarrow> 'a tree23 \\<Rightarrow> 'a tree23", "'a tree23 \\<Rightarrow> bool" ]
[ "definition del0 :: \"key \\<Rightarrow> 'a tree23 \\<Rightarrow> 'a tree23\" where\n\"del0 k t = (case del (Some k) t of None \\<Rightarrow> t | Some(_,(_,t')) \\<Rightarrow> t')\"", "fun bal :: \"'a tree23 \\<Rightarrow> bool\" where\n\"bal Empty = True\" |\n\"bal (Branch2 l _ r) = (bal l & bal r & height l = height r)\" |\n\"bal (Branch3 l _ m _ r) = (bal l & bal m & bal r & height l = height m & height m = height r)\"" ]
template
###lemma bal ?t \<Longrightarrow> bal (del0 ?k ?t) ###symbols Tree23.del0 :::: int \<Rightarrow> 'a tree23 \<Rightarrow> 'a tree23 Tree23.bal :::: 'a tree23 \<Rightarrow> bool ###defs definition del0 :: "key \<Rightarrow> 'a tree23 \<Rightarrow> 'a tree23" where "del0 k t = (case del (Some k) t of None \<Rightarrow> t | Some(_,(_,t')) \<Rightarrow> t')" fun bal :: "'a tree23 \<Rightarrow> bool" where "bal Empty = True" | "bal (Branch2 l _ r) = (bal l & bal r & height l = height r)" | "bal (Branch3 l _ m _ r) = (bal l & bal m & bal r & height l = height m & height m = height r)"
###output ?H1 x_1 \<Longrightarrow> ?H1 (?H2 x_2 x_1)###end
Number_Theory/Pocklington
Pocklington.pocklington_lemma
lemma pocklington_lemma: fixes p :: nat assumes n: "n \<ge> 2" and nqr: "n - 1 = q * r" and an: "[a^ (n - 1) = 1] (mod n)" and aq: "\<forall>p. prime p \<and> p dvd q \<longrightarrow> coprime (a ^ ((n - 1) div p) - 1) n" and pp: "prime p" and pn: "p dvd n" shows "[p = 1] (mod q)"
2 \<le> ?n \<Longrightarrow> ?n - 1 = ?q * ?r \<Longrightarrow> [ ?a ^ (?n - 1) = 1] (mod ?n) \<Longrightarrow> \<forall>p. prime p \<and> p dvd ?q \<longrightarrow> coprime (?a ^ ((?n - 1) div p) - 1) ?n \<Longrightarrow> prime ?p \<Longrightarrow> ?p dvd ?n \<Longrightarrow> [ ?p = 1] (mod ?q)
\<lbrakk> ?H1 (?H2 ?H3) \<le> x_1; ?H4 x_1 ?H5 = ?H6 x_2 x_3; ?H7 (?H8 x_4 (?H4 x_1 ?H5)) ?H5 x_1; \<forall>y_0. ?H9 y_0 \<and> ?H10 y_0 x_2 \<longrightarrow> ?H11 (?H4 (?H8 x_4 (?H12 (?H4 x_1 ?H5) y_0)) ?H5) x_1; ?H9 x_5; ?H10 x_5 x_1\<rbrakk> \<Longrightarrow> ?H7 x_5 ?H5 x_2
[ "Rings.divide_class.divide", "Rings.algebraic_semidom_class.coprime", "Rings.dvd_class.dvd", "Factorial_Ring.normalization_semidom_class.prime", "Power.power_class.power", "Cong.unique_euclidean_semiring_class.cong", "Groups.times_class.times", "Groups.one_class.one", "Groups.minus_class.minus", "Num.num.One", "Num.num.Bit0", "Num.numeral_class.numeral" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> bool", "'a \\<Rightarrow> 'a \\<Rightarrow> bool", "'a \\<Rightarrow> bool", "'a \\<Rightarrow> nat \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> bool", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "num", "num \\<Rightarrow> num", "num \\<Rightarrow> 'a" ]
[ "class divide =\n fixes divide :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"div\" 70)", "class algebraic_semidom = semidom_divide\nbegin", "definition dvd :: \"'a \\<Rightarrow> 'a \\<Rightarrow> bool\" (infix \"dvd\" 50)\n where \"b dvd a \\<longleftrightarrow> (\\<exists>k. a = b * k)\"", "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 times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)", "class one =\n fixes one :: 'a (\"1\")", "class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)", "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\"" ]
template
###lemma 2 \<le> ?n \<Longrightarrow> ?n - 1 = ?q * ?r \<Longrightarrow> [ ?a ^ (?n - 1) = 1] (mod ?n) \<Longrightarrow> \<forall>p. prime p \<and> p dvd ?q \<longrightarrow> coprime (?a ^ ((?n - 1) div p) - 1) ?n \<Longrightarrow> prime ?p \<Longrightarrow> ?p dvd ?n \<Longrightarrow> [ ?p = 1] (mod ?q) ###symbols Rings.divide_class.divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Rings.algebraic_semidom_class.coprime :::: 'a \<Rightarrow> 'a \<Rightarrow> bool Rings.dvd_class.dvd :::: 'a \<Rightarrow> 'a \<Rightarrow> bool Factorial_Ring.normalization_semidom_class.prime :::: 'a \<Rightarrow> bool Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a Cong.unique_euclidean_semiring_class.cong :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Groups.one_class.one :::: 'a Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Num.num.One :::: num Num.num.Bit0 :::: num \<Rightarrow> num Num.numeral_class.numeral :::: num \<Rightarrow> 'a ###defs class divide = fixes divide :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "div" 70) class algebraic_semidom = semidom_divide begin definition dvd :: "'a \<Rightarrow> 'a \<Rightarrow> bool" (infix "dvd" 50) where "b dvd a \<longleftrightarrow> (\<exists>k. a = b * k)" primrec power :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^" 80) where power_0: "a ^ 0 = 1" | power_Suc: "a ^ Suc n = a * a ^ n" class times = fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70) class one = fixes one :: 'a ("1") class minus = fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65) 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"
###output \<lbrakk> ?H1 (?H2 ?H3) \<le> x_1; ?H4 x_1 ?H5 = ?H6 x_2 x_3; ?H7 (?H8 x_4 (?H4 x_1 ?H5)) ?H5 x_1; \<forall>y_0. ?H9 y_0 \<and> ?H10 y_0 x_2 \<longrightarrow> ?H11 (?H4 (?H8 x_4 (?H12 (?H4 x_1 ?H5) y_0)) ?H5) x_1; ?H9 x_5; ?H10 x_5 x_1\<rbrakk> \<Longrightarrow> ?H7 x_5 ?H5 x_2###end
HOLCF/Tutorial/New_Domain
New_Domain.ltree_induct
lemma ltree_induct: fixes P :: "'a ltree \<Rightarrow> bool" assumes adm: "adm P" assumes bot: "P \<bottom>" assumes Leaf: "\<And>x. P (Leaf\<cdot>x)" assumes Branch: "\<And>f l. \<forall>x. P (f\<cdot>x) \<Longrightarrow> P (Branch\<cdot>(llist_map\<cdot>f\<cdot>l))" shows "P x"
adm ?P \<Longrightarrow> ?P \<bottom> \<Longrightarrow> (\<And>x. ?P (Leaf\<cdot>x)) \<Longrightarrow> (\<And>f l. \<forall>x. ?P (f\<cdot>x) \<Longrightarrow> ?P (Branch\<cdot>(llist_map\<cdot>f\<cdot>l))) \<Longrightarrow> ?P ?x
\<lbrakk> ?H1 x_1; x_1 ?H2; \<And>y_0. x_1 (?H3 ?H4 y_0); \<And>y_1 y_2. \<forall>y_3. x_1 (?H3 y_1 y_3) \<Longrightarrow> x_1 (?H3 ?H5 (?H3 (?H3 ?H6 y_1) y_2))\<rbrakk> \<Longrightarrow> x_1 x_2
[ "New_Domain.llist_map", "New_Domain.ltree.Branch", "New_Domain.ltree.Leaf", "Cfun.cfun.Rep_cfun", "Pcpo.pcpo_class.bottom", "Adm.adm" ]
[ "('a \\<rightarrow> 'a) \\<rightarrow> 'a llist \\<rightarrow> 'a llist", "'a ltree llist \\<rightarrow> 'a ltree", "'a \\<rightarrow> 'a ltree", "('a \\<rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> 'b", "'a", "('a \\<Rightarrow> bool) \\<Rightarrow> bool" ]
[ "class pcpo = cpo +\n assumes least: \"\\<exists>x. \\<forall>y. x \\<sqsubseteq> y\"\nbegin", "definition adm :: \"('a::cpo \\<Rightarrow> bool) \\<Rightarrow> bool\"\n where \"adm P \\<longleftrightarrow> (\\<forall>Y. chain Y \\<longrightarrow> (\\<forall>i. P (Y i)) \\<longrightarrow> P (\\<Squnion>i. Y i))\"" ]
template
###lemma adm ?P \<Longrightarrow> ?P \<bottom> \<Longrightarrow> (\<And>x. ?P (Leaf\<cdot>x)) \<Longrightarrow> (\<And>f l. \<forall>x. ?P (f\<cdot>x) \<Longrightarrow> ?P (Branch\<cdot>(llist_map\<cdot>f\<cdot>l))) \<Longrightarrow> ?P ?x ###symbols New_Domain.llist_map :::: ('a \<rightarrow> 'a) \<rightarrow> 'a llist \<rightarrow> 'a llist New_Domain.ltree.Branch :::: 'a ltree llist \<rightarrow> 'a ltree New_Domain.ltree.Leaf :::: 'a \<rightarrow> 'a ltree Cfun.cfun.Rep_cfun :::: ('a \<rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b Pcpo.pcpo_class.bottom :::: 'a Adm.adm :::: ('a \<Rightarrow> bool) \<Rightarrow> bool ###defs class pcpo = cpo + assumes least: "\<exists>x. \<forall>y. x \<sqsubseteq> y" begin definition adm :: "('a::cpo \<Rightarrow> bool) \<Rightarrow> bool" where "adm P \<longleftrightarrow> (\<forall>Y. chain Y \<longrightarrow> (\<forall>i. P (Y i)) \<longrightarrow> P (\<Squnion>i. Y i))"
###output \<lbrakk> ?H1 x_1; x_1 ?H2; \<And>y_0. x_1 (?H3 ?H4 y_0); \<And>y_1 y_2. \<forall>y_3. x_1 (?H3 y_1 y_3) \<Longrightarrow> x_1 (?H3 ?H5 (?H3 (?H3 ?H6 y_1) y_2))\<rbrakk> \<Longrightarrow> x_1 x_2###end
GCD
GCD.dvd_lcm_I1_int
lemma dvd_lcm_I1_int [simp]: "i dvd m \<Longrightarrow> i dvd lcm m n" for i m n :: int
?i dvd ?m \<Longrightarrow> ?i dvd lcm ?m ?n
?H1 x_1 x_2 \<Longrightarrow> ?H1 x_1 (?H2 x_2 x_3)
[ "GCD.gcd_class.lcm", "Rings.dvd_class.dvd" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> bool" ]
[ "class gcd = zero + one + dvd +\n fixes gcd :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\"\n and lcm :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\"", "definition dvd :: \"'a \\<Rightarrow> 'a \\<Rightarrow> bool\" (infix \"dvd\" 50)\n where \"b dvd a \\<longleftrightarrow> (\\<exists>k. a = b * k)\"" ]
template
###lemma ?i dvd ?m \<Longrightarrow> ?i dvd lcm ?m ?n ###symbols GCD.gcd_class.lcm :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Rings.dvd_class.dvd :::: 'a \<Rightarrow> 'a \<Rightarrow> bool ###defs class gcd = zero + one + dvd + fixes gcd :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" and lcm :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" 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 \<Longrightarrow> ?H1 x_1 (?H2 x_2 x_3)###end
HOLCF/Lift
Lift.DefE
lemma DefE: "Def x = \<bottom> \<Longrightarrow> R"
Def ?x = \<bottom> \<Longrightarrow> ?R
?H1 x_1 = ?H2 \<Longrightarrow> x_2
[ "Pcpo.pcpo_class.bottom", "Lift.Def" ]
[ "'a", "'a \\<Rightarrow> 'a lift" ]
[ "class pcpo = cpo +\n assumes least: \"\\<exists>x. \\<forall>y. x \\<sqsubseteq> y\"\nbegin", "definition\n Def :: \"'a \\<Rightarrow> 'a lift\" where\n \"Def x = Abs_lift (up\\<cdot>(Discr x))\"" ]
template
###lemma Def ?x = \<bottom> \<Longrightarrow> ?R ###symbols Pcpo.pcpo_class.bottom :::: 'a Lift.Def :::: 'a \<Rightarrow> 'a lift ###defs class pcpo = cpo + assumes least: "\<exists>x. \<forall>y. x \<sqsubseteq> y" begin definition Def :: "'a \<Rightarrow> 'a lift" where "Def x = Abs_lift (up\<cdot>(Discr x))"
###output ?H1 x_1 = ?H2 \<Longrightarrow> x_2###end
Analysis/Infinite_Set_Sum
Infinite_Set_Sum.abs_summable_on_diff
lemma abs_summable_on_diff [intro]: assumes "f abs_summable_on A" and "g abs_summable_on A" shows "(\<lambda>x. f x - g x) abs_summable_on A"
?f abs_summable_on ?A \<Longrightarrow> ?g abs_summable_on ?A \<Longrightarrow> (\<lambda>x. ?f x - ?g x) abs_summable_on ?A
\<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.minus_class.minus", "Infinite_Set_Sum.abs_summable_on" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> bool" ]
[ "class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)" ]
template
###lemma ?f abs_summable_on ?A \<Longrightarrow> ?g abs_summable_on ?A \<Longrightarrow> (\<lambda>x. ?f x - ?g x) abs_summable_on ?A ###symbols Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Infinite_Set_Sum.abs_summable_on :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> bool ###defs class minus = fixes minus :: "'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
Analysis/Arcwise_Connected
Arcwise_Connected.dense_accessible_frontier_points_connected
lemma dense_accessible_frontier_points_connected: fixes S :: "'a::{complete_space,real_normed_vector} set" assumes "open S" "connected S" "x \<in> S" "V \<noteq> {}" and ope: "openin (top_of_set (frontier S)) V" obtains g where "arc g" "g ` {0..<1} \<subseteq> S" "pathstart g = x" "pathfinish g \<in> V"
open ?S \<Longrightarrow> connected ?S \<Longrightarrow> ?x \<in> ?S \<Longrightarrow> ?V \<noteq> {} \<Longrightarrow> openin (top_of_set (frontier ?S)) ?V \<Longrightarrow> (\<And>g. arc g \<Longrightarrow> g ` {0..<1} \<subseteq> ?S \<Longrightarrow> pathstart g = ?x \<Longrightarrow> pathfinish g \<in> ?V \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
\<lbrakk> ?H1 x_1; ?H2 x_1; x_2 \<in> x_1; x_3 \<noteq> ?H3; ?H4 (?H5 (?H6 x_1)) x_3; \<And>y_0. \<lbrakk> ?H7 y_0; ?H8 (?H9 y_0 (?H10 ?H11 ?H12)) x_1; ?H13 y_0 = x_2; ?H14 y_0 \<in> x_3\<rbrakk> \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_4
[ "Path_Connected.pathfinish", "Path_Connected.pathstart", "Groups.one_class.one", "Groups.zero_class.zero", "Set_Interval.ord_class.atLeastLessThan", "Set.image", "Set.subset_eq", "Path_Connected.arc", "Elementary_Topology.frontier", "Abstract_Topology.top_of_set", "Abstract_Topology.topology.openin", "Set.empty", "Topological_Spaces.topological_space_class.connected", "Topological_Spaces.open_class.open" ]
[ "(real \\<Rightarrow> 'a) \\<Rightarrow> 'a", "(real \\<Rightarrow> 'a) \\<Rightarrow> 'a", "'a", "'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a set", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set", "'a set \\<Rightarrow> 'a set \\<Rightarrow> bool", "(real \\<Rightarrow> 'a) \\<Rightarrow> bool", "'a set \\<Rightarrow> 'a set", "'a set \\<Rightarrow> 'a topology", "'a topology \\<Rightarrow> 'a set \\<Rightarrow> bool", "'a set", "'a set \\<Rightarrow> bool", "'a set \\<Rightarrow> bool" ]
[ "class one =\n fixes one :: 'a (\"1\")", "class zero =\n fixes zero :: 'a (\"0\")", "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\"", "abbreviation top_of_set :: \"'a::topological_space set \\<Rightarrow> 'a topology\"\n where \"top_of_set \\<equiv> subtopology (topology open)\"", "abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"", "class topological_space = \"open\" +\n assumes open_UNIV [simp, intro]: \"open UNIV\"\n assumes open_Int [intro]: \"open S \\<Longrightarrow> open T \\<Longrightarrow> open (S \\<inter> T)\"\n assumes open_Union [intro]: \"\\<forall>S\\<in>K. open S \\<Longrightarrow> open (\\<Union>K)\"\nbegin", "class \"open\" =\n fixes \"open\" :: \"'a set \\<Rightarrow> bool\"" ]
template
###lemma open ?S \<Longrightarrow> connected ?S \<Longrightarrow> ?x \<in> ?S \<Longrightarrow> ?V \<noteq> {} \<Longrightarrow> openin (top_of_set (frontier ?S)) ?V \<Longrightarrow> (\<And>g. arc g \<Longrightarrow> g ` {0..<1} \<subseteq> ?S \<Longrightarrow> pathstart g = ?x \<Longrightarrow> pathfinish g \<in> ?V \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis ###symbols Path_Connected.pathfinish :::: (real \<Rightarrow> 'a) \<Rightarrow> 'a Path_Connected.pathstart :::: (real \<Rightarrow> 'a) \<Rightarrow> 'a Groups.one_class.one :::: 'a Groups.zero_class.zero :::: 'a Set_Interval.ord_class.atLeastLessThan :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a set Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool Path_Connected.arc :::: (real \<Rightarrow> 'a) \<Rightarrow> bool Elementary_Topology.frontier :::: 'a set \<Rightarrow> 'a set Abstract_Topology.top_of_set :::: 'a set \<Rightarrow> 'a topology Abstract_Topology.topology.openin :::: 'a topology \<Rightarrow> 'a set \<Rightarrow> bool Set.empty :::: 'a set Topological_Spaces.topological_space_class.connected :::: 'a set \<Rightarrow> bool Topological_Spaces.open_class.open :::: 'a set \<Rightarrow> bool ###defs class one = fixes one :: 'a ("1") class zero = fixes zero :: 'a ("0") 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" abbreviation top_of_set :: "'a::topological_space set \<Rightarrow> 'a topology" where "top_of_set \<equiv> subtopology (topology open)" abbreviation empty :: "'a set" ("{}") where "{} \<equiv> bot" class topological_space = "open" + assumes open_UNIV [simp, intro]: "open UNIV" assumes open_Int [intro]: "open S \<Longrightarrow> open T \<Longrightarrow> open (S \<inter> T)" assumes open_Union [intro]: "\<forall>S\<in>K. open S \<Longrightarrow> open (\<Union>K)" begin class "open" = fixes "open" :: "'a set \<Rightarrow> bool"
###output \<lbrakk> ?H1 x_1; ?H2 x_1; x_2 \<in> x_1; x_3 \<noteq> ?H3; ?H4 (?H5 (?H6 x_1)) x_3; \<And>y_0. \<lbrakk> ?H7 y_0; ?H8 (?H9 y_0 (?H10 ?H11 ?H12)) x_1; ?H13 y_0 = x_2; ?H14 y_0 \<in> x_3\<rbrakk> \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_4###end
Library/Finite_Map
Finite_Map.fmimage_restrict_fset
lemma fmimage_restrict_fset[simp]: "fmimage (fmrestrict_fset B m) A = fmimage m (A |\<inter>| B)"
fmimage (fmrestrict_fset ?B ?m) ?A = fmimage ?m (?A |\<inter>| ?B)
?H1 (?H2 x_1 x_2) x_3 = ?H1 x_2 (?H3 x_3 x_1)
[ "FSet.finter", "Finite_Map.fmrestrict_fset", "Finite_Map.fmimage" ]
[ "'a fset \\<Rightarrow> 'a fset \\<Rightarrow> 'a fset", "'a fset \\<Rightarrow> ('a, 'b) fmap \\<Rightarrow> ('a, 'b) fmap", "('a, 'b) fmap \\<Rightarrow> 'a fset \\<Rightarrow> 'b fset" ]
[ "abbreviation finter :: \"'a fset \\<Rightarrow> 'a fset \\<Rightarrow> 'a fset\" (infixl \"|\\<inter>|\" 65) where \"xs |\\<inter>| ys \\<equiv> inf xs ys\"" ]
template
###lemma fmimage (fmrestrict_fset ?B ?m) ?A = fmimage ?m (?A |\<inter>| ?B) ###symbols FSet.finter :::: 'a fset \<Rightarrow> 'a fset \<Rightarrow> 'a fset Finite_Map.fmrestrict_fset :::: 'a fset \<Rightarrow> ('a, 'b) fmap \<Rightarrow> ('a, 'b) fmap Finite_Map.fmimage :::: ('a, 'b) fmap \<Rightarrow> 'a fset \<Rightarrow> 'b fset ###defs abbreviation finter :: "'a fset \<Rightarrow> 'a fset \<Rightarrow> 'a fset" (infixl "|\<inter>|" 65) where "xs |\<inter>| ys \<equiv> inf xs ys"
###output ?H1 (?H2 x_1 x_2) x_3 = ?H1 x_2 (?H3 x_3 x_1)###end
Bali/Decl
Decl.memberid_pair_simp1
lemma memberid_pair_simp1: "memberid p = memberid (snd p)"
memberid ?p = memberid (snd ?p)
?H1 x_1 = ?H1 (?H2 x_1)
[ "Product_Type.prod.snd", "Decl.has_memberid_class.memberid" ]
[ "'a \\<times> 'b \\<Rightarrow> 'b", "'a \\<Rightarrow> memberid" ]
[ "definition \"prod = {f. \\<exists>a b. f = Pair_Rep (a::'a) (b::'b)}\"", "class has_memberid =\n fixes memberid :: \"'a \\<Rightarrow> memberid\"" ]
template
###lemma memberid ?p = memberid (snd ?p) ###symbols Product_Type.prod.snd :::: 'a \<times> 'b \<Rightarrow> 'b Decl.has_memberid_class.memberid :::: 'a \<Rightarrow> memberid ###defs definition "prod = {f. \<exists>a b. f = Pair_Rep (a::'a) (b::'b)}" class has_memberid = fixes memberid :: "'a \<Rightarrow> memberid"
###output ?H1 x_1 = ?H1 (?H2 x_1)###end
Analysis/Fashoda_Theorem
Fashoda_Theorem.fashoda_interlace
null
path ?f \<Longrightarrow> path ?g \<Longrightarrow> path_image ?f \<subseteq> cbox ?a ?b \<Longrightarrow> path_image ?g \<subseteq> cbox ?a ?b \<Longrightarrow> pathstart ?f $ 2 = ?a $ 2 \<Longrightarrow> pathfinish ?f $ 2 = ?a $ 2 \<Longrightarrow> pathstart ?g $ 2 = ?a $ 2 \<Longrightarrow> pathfinish ?g $ 2 = ?a $ 2 \<Longrightarrow> pathstart ?f $ 1 < pathstart ?g $ 1 \<Longrightarrow> pathstart ?g $ 1 < pathfinish ?f $ 1 \<Longrightarrow> pathfinish ?f $ 1 < pathfinish ?g $ 1 \<Longrightarrow> (\<And>z. z \<in> path_image ?f \<Longrightarrow> z \<in> path_image ?g \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
\<lbrakk> ?H1 x_1; ?H1 x_2; ?H2 (?H3 x_1) (?H4 x_3 x_4); ?H2 (?H3 x_2) (?H4 x_3 x_4); ?H5 (?H6 x_1) (?H7 (?H8 ?H9)) = ?H5 x_3 (?H7 (?H8 ?H9)); ?H5 (?H10 x_1) (?H7 (?H8 ?H9)) = ?H5 x_3 (?H7 (?H8 ?H9)); ?H5 (?H6 x_2) (?H7 (?H8 ?H9)) = ?H5 x_3 (?H7 (?H8 ?H9)); ?H5 (?H10 x_2) (?H7 (?H8 ?H9)) = ?H5 x_3 (?H7 (?H8 ?H9)); ?H5 (?H6 x_1) ?H11 < ?H5 (?H6 x_2) ?H11; ?H5 (?H6 x_2) ?H11 < ?H5 (?H10 x_1) ?H11; ?H5 (?H10 x_1) ?H11 < ?H5 (?H10 x_2) ?H11; \<And>y_0. \<lbrakk>y_0 \<in> ?H3 x_1; y_0 \<in> ?H3 x_2\<rbrakk> \<Longrightarrow> x_5\<rbrakk> \<Longrightarrow> x_5
[ "Groups.one_class.one", "Path_Connected.pathfinish", "Num.num.One", "Num.num.Bit0", "Num.numeral_class.numeral", "Path_Connected.pathstart", "Finite_Cartesian_Product.vec.vec_nth", "Topology_Euclidean_Space.cbox", "Path_Connected.path_image", "Set.subset_eq", "Path_Connected.path" ]
[ "'a", "(real \\<Rightarrow> 'a) \\<Rightarrow> 'a", "num", "num \\<Rightarrow> num", "num \\<Rightarrow> 'a", "(real \\<Rightarrow> 'a) \\<Rightarrow> 'a", "('a, 'b) vec \\<Rightarrow> 'b \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a set", "(real \\<Rightarrow> 'a) \\<Rightarrow> 'a set", "'a set \\<Rightarrow> 'a set \\<Rightarrow> bool", "(real \\<Rightarrow> 'a) \\<Rightarrow> bool" ]
[ "class one =\n fixes one :: 'a (\"1\")", "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\"", "definition \"vec x = (\\<chi> i. x)\"", "abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\"" ]
template
###lemma path ?f \<Longrightarrow> path ?g \<Longrightarrow> path_image ?f \<subseteq> cbox ?a ?b \<Longrightarrow> path_image ?g \<subseteq> cbox ?a ?b \<Longrightarrow> pathstart ?f $ 2 = ?a $ 2 \<Longrightarrow> pathfinish ?f $ 2 = ?a $ 2 \<Longrightarrow> pathstart ?g $ 2 = ?a $ 2 \<Longrightarrow> pathfinish ?g $ 2 = ?a $ 2 \<Longrightarrow> pathstart ?f $ 1 < pathstart ?g $ 1 \<Longrightarrow> pathstart ?g $ 1 < pathfinish ?f $ 1 \<Longrightarrow> pathfinish ?f $ 1 < pathfinish ?g $ 1 \<Longrightarrow> (\<And>z. z \<in> path_image ?f \<Longrightarrow> z \<in> path_image ?g \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis ###symbols Groups.one_class.one :::: 'a Path_Connected.pathfinish :::: (real \<Rightarrow> 'a) \<Rightarrow> 'a Num.num.One :::: num Num.num.Bit0 :::: num \<Rightarrow> num Num.numeral_class.numeral :::: num \<Rightarrow> 'a Path_Connected.pathstart :::: (real \<Rightarrow> 'a) \<Rightarrow> 'a Finite_Cartesian_Product.vec.vec_nth :::: ('a, 'b) vec \<Rightarrow> 'b \<Rightarrow> 'a Topology_Euclidean_Space.cbox :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a set Path_Connected.path_image :::: (real \<Rightarrow> 'a) \<Rightarrow> 'a set Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool Path_Connected.path :::: (real \<Rightarrow> 'a) \<Rightarrow> bool ###defs class one = fixes one :: 'a ("1") 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" definition "vec x = (\<chi> i. x)" abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool" where "subset_eq \<equiv> less_eq"
###output \<lbrakk> ?H1 x_1; ?H1 x_2; ?H2 (?H3 x_1) (?H4 x_3 x_4); ?H2 (?H3 x_2) (?H4 x_3 x_4); ?H5 (?H6 x_1) (?H7 (?H8 ?H9)) = ?H5 x_3 (?H7 (?H8 ?H9)); ?H5 (?H10 x_1) (?H7 (?H8 ?H9)) = ?H5 x_3 (?H7 (?H8 ?H9)); ?H5 (?H6 x_2) (?H7 (?H8 ?H9)) = ?H5 x_3 (?H7 (?H8 ?H9)); ?H5 (?H10 x_2) (?H7 (?H8 ?H9)) = ?H5 x_3 (?H7 (?H8 ?H9)); ?H5 (?H6 x_1) ?H11 < ?H5 (?H6 x_2) ?H11; ?H5 (?H6 x_2) ?H11 < ?H5 (?H10 x_1) ?H11; ?H5 (?H10 x_1) ?H11 < ?H5 (?H10 x_2) ?H11; \<And>y_0. \<lbrakk>y_0 \<in> ?H3 x_1; y_0 \<in> ?H3 x_2\<rbrakk> \<Longrightarrow> x_5\<rbrakk> \<Longrightarrow> x_5###end
Hoare_Parallel/OG_Tran
OG_Tran.L3_5v_lemma5
lemma L3_5v_lemma5 [rule_format]: "\<forall>s. (fwhile b c k, s) -P*\<rightarrow> (Parallel Ts, t) \<longrightarrow> All_None Ts \<longrightarrow> (While b i c, s) -P*\<rightarrow> (Parallel Ts,t)"
(fwhile ?b ?c ?k, ?s) -P*\<rightarrow> (Parallel ?Ts, ?t) \<Longrightarrow> All_None ?Ts \<Longrightarrow> (While ?b ?i ?c, ?s) -P*\<rightarrow> (Parallel ?Ts, ?t)
\<lbrakk> ?H1 (?H2 x_1 x_2 x_3, x_4) (?H3 x_5, x_6); ?H4 x_5\<rbrakk> \<Longrightarrow> ?H1 (?H5 x_1 x_7 x_2, x_4) (?H3 x_5, x_6)
[ "OG_Com.com.While", "OG_Tran.All_None", "OG_Com.com.Parallel", "OG_Tran.fwhile", "OG_Tran.transitions" ]
[ "'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a com \\<Rightarrow> 'a com", "('a ann_com option \\<times> 'a set) list \\<Rightarrow> bool", "('a ann_com option \\<times> 'a set) list \\<Rightarrow> 'a com", "'a set \\<Rightarrow> 'a com \\<Rightarrow> nat \\<Rightarrow> 'a com", "'a com \\<times> 'a \\<Rightarrow> 'a com \\<times> 'a \\<Rightarrow> bool" ]
[ "definition All_None :: \"'a ann_triple_op list \\<Rightarrow> bool\" where\n \"All_None Ts \\<equiv> \\<forall>(c, q) \\<in> set Ts. c = None\"", "primrec fwhile :: \"'a bexp \\<Rightarrow> 'a com \\<Rightarrow> nat \\<Rightarrow> 'a com\" where\n \"fwhile b c 0 = \\<Omega>\"\n | \"fwhile b c (Suc n) = Cond b (Seq c (fwhile b c n)) (Basic id)\"" ]
template
###lemma (fwhile ?b ?c ?k, ?s) -P*\<rightarrow> (Parallel ?Ts, ?t) \<Longrightarrow> All_None ?Ts \<Longrightarrow> (While ?b ?i ?c, ?s) -P*\<rightarrow> (Parallel ?Ts, ?t) ###symbols OG_Com.com.While :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a com \<Rightarrow> 'a com OG_Tran.All_None :::: ('a ann_com option \<times> 'a set) list \<Rightarrow> bool OG_Com.com.Parallel :::: ('a ann_com option \<times> 'a set) list \<Rightarrow> 'a com OG_Tran.fwhile :::: 'a set \<Rightarrow> 'a com \<Rightarrow> nat \<Rightarrow> 'a com OG_Tran.transitions :::: 'a com \<times> 'a \<Rightarrow> 'a com \<times> 'a \<Rightarrow> bool ###defs definition All_None :: "'a ann_triple_op list \<Rightarrow> bool" where "All_None Ts \<equiv> \<forall>(c, q) \<in> set Ts. c = None" primrec fwhile :: "'a bexp \<Rightarrow> 'a com \<Rightarrow> nat \<Rightarrow> 'a com" where "fwhile b c 0 = \<Omega>" | "fwhile b c (Suc n) = Cond b (Seq c (fwhile b c n)) (Basic id)"
###output \<lbrakk> ?H1 (?H2 x_1 x_2 x_3, x_4) (?H3 x_5, x_6); ?H4 x_5\<rbrakk> \<Longrightarrow> ?H1 (?H5 x_1 x_7 x_2, x_4) (?H3 x_5, x_6)###end
Nominal/Nominal
Nominal.pt_bij2
lemma pt_bij2: fixes pi :: "'x prm" and x :: "'a" and y :: "'a" assumes pt: "pt TYPE('a) TYPE('x)" and at: "at TYPE('x)" and a: "x = (rev pi)\<bullet>y" shows "(pi\<bullet>x)=y"
pt TYPE(?'a) TYPE(?'x) \<Longrightarrow> at TYPE(?'x) \<Longrightarrow> ?x = rev ?pi \<bullet> ?y \<Longrightarrow> ?pi \<bullet> ?x = ?y
\<lbrakk> ?H1 TYPE(?'a) TYPE(?'x); ?H2 TYPE(?'x); x_1 = ?H3 (?H4 x_2) x_3\<rbrakk> \<Longrightarrow> ?H3 x_2 x_1 = x_3
[ "List.rev", "Nominal.perm", "Nominal.at", "Nominal.pt" ]
[ "'a list \\<Rightarrow> 'a list", "('a \\<times> 'a) list \\<Rightarrow> 'b \\<Rightarrow> 'b", "'a itself \\<Rightarrow> bool", "'a itself \\<Rightarrow> 'b itself \\<Rightarrow> bool" ]
[ "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\"", "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))\"", "definition\n \"pt TYPE('a) TYPE('x) \\<equiv> \n (\\<forall>(x::'a). ([]::'x prm)\\<bullet>x = x) \\<and> \n (\\<forall>(pi1::'x prm) (pi2::'x prm) (x::'a). (pi1@pi2)\\<bullet>x = pi1\\<bullet>(pi2\\<bullet>x)) \\<and> \n (\\<forall>(pi1::'x prm) (pi2::'x prm) (x::'a). pi1 \\<triangleq> pi2 \\<longrightarrow> pi1\\<bullet>x = pi2\\<bullet>x)\"" ]
template
###lemma pt TYPE(?'a) TYPE(?'x) \<Longrightarrow> at TYPE(?'x) \<Longrightarrow> ?x = rev ?pi \<bullet> ?y \<Longrightarrow> ?pi \<bullet> ?x = ?y ###symbols List.rev :::: 'a list \<Rightarrow> 'a list Nominal.perm :::: ('a \<times> 'a) list \<Rightarrow> 'b \<Rightarrow> 'b Nominal.at :::: 'a itself \<Rightarrow> bool Nominal.pt :::: 'a itself \<Rightarrow> 'b itself \<Rightarrow> bool ###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" 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))" definition "pt TYPE('a) TYPE('x) \<equiv> (\<forall>(x::'a). ([]::'x prm)\<bullet>x = x) \<and> (\<forall>(pi1::'x prm) (pi2::'x prm) (x::'a). (pi1@pi2)\<bullet>x = pi1\<bullet>(pi2\<bullet>x)) \<and> (\<forall>(pi1::'x prm) (pi2::'x prm) (x::'a). pi1 \<triangleq> pi2 \<longrightarrow> pi1\<bullet>x = pi2\<bullet>x)"
###output \<lbrakk> ?H1 TYPE(?'a) TYPE(?'x); ?H2 TYPE(?'x); x_1 = ?H3 (?H4 x_2) x_3\<rbrakk> \<Longrightarrow> ?H3 x_2 x_1 = x_3###end
Bali/Trans
Transfer.right_total_Domainp_transfer
null
right_total ?B \<Longrightarrow> rel_fun (rel_fun ?A (rel_fun ?B (=))) (rel_fun ?A (=)) (\<lambda>T x. \<exists>y\<in>Collect (Domainp ?B). T x y) Domainp
?H1 x_1 \<Longrightarrow> ?H2 (?H2 x_2 (?H2 x_1 (=))) (?H2 x_2 (=)) (\<lambda>y_0 y_1. \<exists>y_2\<in> ?H3 (?H4 x_1). y_0 y_1 y_2) ?H4
[ "Relation.Domainp", "Set.Collect", "BNF_Def.rel_fun", "Transfer.right_total" ]
[ "('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> bool", "('a \\<Rightarrow> bool) \\<Rightarrow> 'a set", "('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" ]
[ "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 right_total :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool\"\n where \"right_total R \\<longleftrightarrow> (\\<forall>y. \\<exists>x. R x y)\"" ]
template
###lemma right_total ?B \<Longrightarrow> rel_fun (rel_fun ?A (rel_fun ?B (=))) (rel_fun ?A (=)) (\<lambda>T x. \<exists>y\<in>Collect (Domainp ?B). T x y) Domainp ###symbols Relation.Domainp :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> bool Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set 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.right_total :::: ('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 right_total :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool" where "right_total R \<longleftrightarrow> (\<forall>y. \<exists>x. R x y)"
###output ?H1 x_1 \<Longrightarrow> ?H2 (?H2 x_2 (?H2 x_1 (=))) (?H2 x_2 (=)) (\<lambda>y_0 y_1. \<exists>y_2\<in> ?H3 (?H4 x_1). y_0 y_1 y_2) ?H4###end
Bali/Trans
Transitive_Closure.tranclD
null
(?x, ?y) \<in> ?R\<^sup>+ \<Longrightarrow> \<exists>z. (?x, z) \<in> ?R \<and> (z, ?y) \<in> ?R\<^sup>*
(x_1, x_2) \<in> ?H1 x_3 \<Longrightarrow> \<exists>y_0. (x_1, y_0) \<in> x_3 \<and> (y_0, x_2) \<in> ?H2 x_3
[ "Transitive_Closure.rtrancl", "Transitive_Closure.trancl" ]
[ "('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set", "('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set" ]
[ "inductive_set rtrancl :: \"('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set\" (\"(_\\<^sup>*)\" [1000] 999)\n for r :: \"('a \\<times> 'a) set\"\n where\n rtrancl_refl [intro!, Pure.intro!, simp]: \"(a, a) \\<in> r\\<^sup>*\"\n | rtrancl_into_rtrancl [Pure.intro]: \"(a, b) \\<in> r\\<^sup>* \\<Longrightarrow> (b, c) \\<in> r \\<Longrightarrow> (a, c) \\<in> r\\<^sup>*\"", "inductive_set trancl :: \"('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set\" (\"(_\\<^sup>+)\" [1000] 999)\n for r :: \"('a \\<times> 'a) set\"\n where\n r_into_trancl [intro, Pure.intro]: \"(a, b) \\<in> r \\<Longrightarrow> (a, b) \\<in> r\\<^sup>+\"\n | trancl_into_trancl [Pure.intro]: \"(a, b) \\<in> r\\<^sup>+ \\<Longrightarrow> (b, c) \\<in> r \\<Longrightarrow> (a, c) \\<in> r\\<^sup>+\"" ]
template
###lemma (?x, ?y) \<in> ?R\<^sup>+ \<Longrightarrow> \<exists>z. (?x, z) \<in> ?R \<and> (z, ?y) \<in> ?R\<^sup>* ###symbols Transitive_Closure.rtrancl :::: ('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set Transitive_Closure.trancl :::: ('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set ###defs inductive_set rtrancl :: "('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set" ("(_\<^sup>*)" [1000] 999) for r :: "('a \<times> 'a) set" where rtrancl_refl [intro!, Pure.intro!, simp]: "(a, a) \<in> r\<^sup>*" | rtrancl_into_rtrancl [Pure.intro]: "(a, b) \<in> r\<^sup>* \<Longrightarrow> (b, c) \<in> r \<Longrightarrow> (a, c) \<in> r\<^sup>*" inductive_set trancl :: "('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set" ("(_\<^sup>+)" [1000] 999) for r :: "('a \<times> 'a) set" where r_into_trancl [intro, Pure.intro]: "(a, b) \<in> r \<Longrightarrow> (a, b) \<in> r\<^sup>+" | trancl_into_trancl [Pure.intro]: "(a, b) \<in> r\<^sup>+ \<Longrightarrow> (b, c) \<in> r \<Longrightarrow> (a, c) \<in> r\<^sup>+"
###output (x_1, x_2) \<in> ?H1 x_3 \<Longrightarrow> \<exists>y_0. (x_1, y_0) \<in> x_3 \<and> (y_0, x_2) \<in> ?H2 x_3###end
Library/FSet
FSet.fcard_funion_fsubset
lemma fcard_funion_fsubset: "B |\<subseteq>| A \<Longrightarrow> fcard (A |-| B) = fcard A - fcard B"
?B |\<subseteq>| ?A \<Longrightarrow> fcard (?A |-| ?B) = fcard ?A - fcard ?B
?H1 x_1 x_2 \<Longrightarrow> ?H2 (?H3 x_2 x_1) = ?H4 (?H2 x_2) (?H2 x_1)
[ "Groups.minus_class.minus", "FSet.fminus", "FSet.fcard", "FSet.fsubset_eq" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a fset \\<Rightarrow> 'a fset \\<Rightarrow> 'a fset", "'a fset \\<Rightarrow> nat", "'a fset \\<Rightarrow> 'a fset \\<Rightarrow> bool" ]
[ "class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)", "abbreviation fminus :: \"'a fset \\<Rightarrow> 'a fset \\<Rightarrow> 'a fset\" (infixl \"|-|\" 65) where \"xs |-| ys \\<equiv> minus xs ys\"", "abbreviation fsubset_eq :: \"'a fset \\<Rightarrow> 'a fset \\<Rightarrow> bool\" (infix \"|\\<subseteq>|\" 50) where \"xs |\\<subseteq>| ys \\<equiv> xs \\<le> ys\"" ]
template
###lemma ?B |\<subseteq>| ?A \<Longrightarrow> fcard (?A |-| ?B) = fcard ?A - fcard ?B ###symbols Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a FSet.fminus :::: 'a fset \<Rightarrow> 'a fset \<Rightarrow> 'a fset FSet.fcard :::: 'a fset \<Rightarrow> nat FSet.fsubset_eq :::: 'a fset \<Rightarrow> 'a fset \<Rightarrow> bool ###defs class minus = fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65) abbreviation fminus :: "'a fset \<Rightarrow> 'a fset \<Rightarrow> 'a fset" (infixl "|-|" 65) where "xs |-| ys \<equiv> minus xs ys" abbreviation fsubset_eq :: "'a fset \<Rightarrow> 'a fset \<Rightarrow> bool" (infix "|\<subseteq>|" 50) where "xs |\<subseteq>| ys \<equiv> xs \<le> ys"
###output ?H1 x_1 x_2 \<Longrightarrow> ?H2 (?H3 x_2 x_1) = ?H4 (?H2 x_2) (?H2 x_1)###end
Nominal/Examples/Class2
Class2.NEG_elim(2)
lemma NEG_elim: shows "M \<in> \<parallel><B>\<parallel> \<Longrightarrow> M \<in> NEGc B (\<parallel>(B)\<parallel>)" and "N \<in> \<parallel>(B)\<parallel> \<Longrightarrow> N \<in> NEGn B (\<parallel><B>\<parallel>)"
?N \<in> \<parallel>(?B)\<parallel> \<Longrightarrow> ?N \<in> NEGn ?B (\<parallel>< ?B>\<parallel>)
x_1 \<in> ?H1 x_2 \<Longrightarrow> x_1 \<in> ?H2 x_2 (?H3 x_2)
[ "Class2.CANDc", "Class2.NEGn", "Class2.CANDn" ]
[ "ty \\<Rightarrow> ctrm set", "ty \\<Rightarrow> ctrm set \\<Rightarrow> ntrm set", "ty \\<Rightarrow> ntrm set" ]
[]
template
###lemma ?N \<in> \<parallel>(?B)\<parallel> \<Longrightarrow> ?N \<in> NEGn ?B (\<parallel>< ?B>\<parallel>) ###symbols Class2.CANDc :::: ty \<Rightarrow> ctrm set Class2.NEGn :::: ty \<Rightarrow> ctrm set \<Rightarrow> ntrm set Class2.CANDn :::: ty \<Rightarrow> ntrm set ###defs
###output x_1 \<in> ?H1 x_2 \<Longrightarrow> x_1 \<in> ?H2 x_2 (?H3 x_2)###end
UNITY/Lift_prog
Lift_prog.bij_drop_map
lemma bij_drop_map [iff]: "bij (drop_map i)"
bij (drop_map ?i)
?H1 (?H2 x_1)
[ "Lift_prog.drop_map", "Fun.bij" ]
[ "nat \\<Rightarrow> (nat \\<Rightarrow> 'a) \\<times> 'b \\<Rightarrow> 'a \\<times> (nat \\<Rightarrow> 'a) \\<times> 'b", "('a \\<Rightarrow> 'b) \\<Rightarrow> bool" ]
[ "definition drop_map :: \"[nat, (nat=>'b) * 'c] => 'b * ((nat=>'b) * 'c)\" where\n \"drop_map i == %(g, uu). (g i, (delete_map i g, uu))\"", "abbreviation bij :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> bool\"\n where \"bij f \\<equiv> bij_betw f UNIV UNIV\"" ]
template
###lemma bij (drop_map ?i) ###symbols Lift_prog.drop_map :::: nat \<Rightarrow> (nat \<Rightarrow> 'a) \<times> 'b \<Rightarrow> 'a \<times> (nat \<Rightarrow> 'a) \<times> 'b Fun.bij :::: ('a \<Rightarrow> 'b) \<Rightarrow> bool ###defs definition drop_map :: "[nat, (nat=>'b) * 'c] => 'b * ((nat=>'b) * 'c)" where "drop_map i == %(g, uu). (g i, (delete_map i g, uu))" abbreviation bij :: "('a \<Rightarrow> 'b) \<Rightarrow> bool" where "bij f \<equiv> bij_betw f UNIV UNIV"
###output ?H1 (?H2 x_1)###end
Library/Complete_Partial_Order2
Complete_Partial_Order2.cont_intro(3)
null
monotone ?orda ?ordb ?F \<Longrightarrow> monotone ?orda ?ordb ?G \<Longrightarrow> monotone ?orda ?ordb (\<lambda>f. if ?c then ?F f else ?G f)
\<lbrakk> ?H1 x_1 x_2 x_3; ?H1 x_1 x_2 x_4\<rbrakk> \<Longrightarrow> ?H1 x_1 x_2 (\<lambda>y_0. if x_5 then x_3 y_0 else x_4 y_0)
[ "Fun.monotone" ]
[ "('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool" ]
[ "abbreviation monotone :: \"('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool\"\n where \"monotone \\<equiv> monotone_on UNIV\"" ]
template
###lemma monotone ?orda ?ordb ?F \<Longrightarrow> monotone ?orda ?ordb ?G \<Longrightarrow> monotone ?orda ?ordb (\<lambda>f. if ?c then ?F f else ?G f) ###symbols Fun.monotone :::: ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool ###defs abbreviation monotone :: "('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool" where "monotone \<equiv> monotone_on UNIV"
###output \<lbrakk> ?H1 x_1 x_2 x_3; ?H1 x_1 x_2 x_4\<rbrakk> \<Longrightarrow> ?H1 x_1 x_2 (\<lambda>y_0. if x_5 then x_3 y_0 else x_4 y_0)###end
Computational_Algebra/Polynomial
Polynomial.pseudo_divmod_eq_div_mod
lemma pseudo_divmod_eq_div_mod: \<open>pseudo_divmod f g = (f div g, f mod g)\<close> if \<open>lead_coeff g = 1\<close>
lead_coeff ?g = (1:: ?'a) \<Longrightarrow> pseudo_divmod ?f ?g = (?f div ?g, ?f mod ?g)
?H1 x_1 = ?H2 \<Longrightarrow> ?H3 x_2 x_1 = (?H4 x_2 x_1, ?H5 x_2 x_1)
[ "Rings.modulo_class.modulo", "Rings.divide_class.divide", "Polynomial.pseudo_divmod", "Groups.one_class.one", "Polynomial.lead_coeff" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a poly \\<Rightarrow> 'a poly \\<Rightarrow> 'a poly \\<times> 'a poly", "'a", "'a poly \\<Rightarrow> 'a" ]
[ "class modulo = dvd + divide +\n fixes modulo :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"mod\" 70)", "class divide =\n fixes divide :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"div\" 70)", "definition pseudo_divmod :: \"'a :: comm_ring_1 poly \\<Rightarrow> 'a poly \\<Rightarrow> 'a poly \\<times> 'a poly\"\n where \"pseudo_divmod p q \\<equiv>\n if q = 0 then (0, p)\n else\n pseudo_divmod_main (coeff q (degree q)) 0 p q (degree p)\n (1 + length (coeffs p) - length (coeffs q))\"", "class one =\n fixes one :: 'a (\"1\")", "abbreviation lead_coeff:: \"'a::zero poly \\<Rightarrow> 'a\"\n where \"lead_coeff p \\<equiv> coeff p (degree p)\"" ]
template
###lemma lead_coeff ?g = (1:: ?'a) \<Longrightarrow> pseudo_divmod ?f ?g = (?f div ?g, ?f mod ?g) ###symbols Rings.modulo_class.modulo :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Rings.divide_class.divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Polynomial.pseudo_divmod :::: 'a poly \<Rightarrow> 'a poly \<Rightarrow> 'a poly \<times> 'a poly Groups.one_class.one :::: 'a Polynomial.lead_coeff :::: 'a poly \<Rightarrow> 'a ###defs class modulo = dvd + divide + fixes modulo :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "mod" 70) class divide = fixes divide :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "div" 70) definition pseudo_divmod :: "'a :: comm_ring_1 poly \<Rightarrow> 'a poly \<Rightarrow> 'a poly \<times> 'a poly" where "pseudo_divmod p q \<equiv> if q = 0 then (0, p) else pseudo_divmod_main (coeff q (degree q)) 0 p q (degree p) (1 + length (coeffs p) - length (coeffs q))" class one = fixes one :: 'a ("1") abbreviation lead_coeff:: "'a::zero poly \<Rightarrow> 'a" where "lead_coeff p \<equiv> coeff p (degree p)"
###output ?H1 x_1 = ?H2 \<Longrightarrow> ?H3 x_2 x_1 = (?H4 x_2 x_1, ?H5 x_2 x_1)###end
Analysis/Abstract_Topological_Spaces
Abstract_Topological_Spaces.quasi_eq_connected_component_of
lemma quasi_eq_connected_component_of: "finite(connected_components_of X) \<or> finite(quasi_components_of X) \<or> locally_connected_space X \<or> compact_space X \<and> (Hausdorff_space X \<or> regular_space X \<or> normal_space X) \<Longrightarrow> quasi_component_of X x = connected_component_of X x"
finite (connected_components_of ?X) \<or> finite (quasi_components_of ?X) \<or> locally_connected_space ?X \<or> compact_space ?X \<and> (Hausdorff_space ?X \<or> regular_space ?X \<or> normal_space ?X) \<Longrightarrow> quasi_component_of ?X ?x = connected_component_of ?X ?x
?H1 (?H2 x_1) \<or> ?H1 (?H3 x_1) \<or> ?H4 x_1 \<or> ?H5 x_1 \<and> (?H6 x_1 \<or> ?H7 x_1 \<or> ?H8 x_1) \<Longrightarrow> ?H9 x_1 x_2 = ?H10 x_1 x_2
[ "Abstract_Topology_2.connected_component_of", "Abstract_Topological_Spaces.quasi_component_of", "Abstract_Topological_Spaces.normal_space", "Abstract_Topological_Spaces.regular_space", "T1_Spaces.Hausdorff_space", "Abstract_Topology.compact_space", "Locally.locally_connected_space", "Abstract_Topological_Spaces.quasi_components_of", "Abstract_Topology_2.connected_components_of", "Finite_Set.finite" ]
[ "'a topology \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> bool", "'a topology \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> bool", "'a topology \\<Rightarrow> bool", "'a topology \\<Rightarrow> bool", "'a topology \\<Rightarrow> bool", "'a topology \\<Rightarrow> bool", "'a topology \\<Rightarrow> bool", "'a topology \\<Rightarrow> 'a set set", "'a topology \\<Rightarrow> 'a set set", "'a set \\<Rightarrow> bool" ]
[ "definition connected_component_of :: \"'a topology \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> bool\"\n where \"connected_component_of X x y \\<equiv>\n \\<exists>T. connectedin X T \\<and> x \\<in> T \\<and> y \\<in> T\"", "definition quasi_component_of :: \"'a topology \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> bool\"\n where\n \"quasi_component_of X x y \\<equiv>\n x \\<in> topspace X \\<and> y \\<in> topspace X \\<and>\n (\\<forall>T. closedin X T \\<and> openin X T \\<longrightarrow> (x \\<in> T \\<longleftrightarrow> y \\<in> T))\"", "definition normal_space \n where \"normal_space X \\<equiv>\n \\<forall>S T. closedin X S \\<and> closedin X T \\<and> disjnt S T \n \\<longrightarrow> (\\<exists>U V. openin X U \\<and> openin X V \\<and> S \\<subseteq> U \\<and> T \\<subseteq> V \\<and> disjnt U V)\"", "definition regular_space \n where \"regular_space X \\<equiv>\n \\<forall>C a. closedin X C \\<and> a \\<in> topspace X - C\n \\<longrightarrow> (\\<exists>U V. openin X U \\<and> openin X V \\<and> a \\<in> U \\<and> C \\<subseteq> V \\<and> disjnt U V)\"", "definition Hausdorff_space\n where\n \"Hausdorff_space X \\<equiv>\n \\<forall>x y. x \\<in> topspace X \\<and> y \\<in> topspace X \\<and> (x \\<noteq> y)\n \\<longrightarrow> (\\<exists>U V. openin X U \\<and> openin X V \\<and> x \\<in> U \\<and> y \\<in> V \\<and> disjnt U V)\"", "definition compact_space where\n \"compact_space X \\<equiv> compactin X (topspace X)\"", "definition locally_connected_space \n where \"locally_connected_space X \\<equiv> neighbourhood_base_of (connectedin X) X\"", "definition quasi_components_of :: \"'a topology \\<Rightarrow> ('a set) set\"\n where\n \"quasi_components_of X = quasi_component_of_set X ` topspace X\"", "definition connected_components_of :: \"'a topology \\<Rightarrow> ('a set) set\"\n where \"connected_components_of X \\<equiv> connected_component_of_set X ` topspace X\"", "class finite =\n assumes finite_UNIV: \"finite (UNIV :: 'a set)\"\nbegin" ]
template
###lemma finite (connected_components_of ?X) \<or> finite (quasi_components_of ?X) \<or> locally_connected_space ?X \<or> compact_space ?X \<and> (Hausdorff_space ?X \<or> regular_space ?X \<or> normal_space ?X) \<Longrightarrow> quasi_component_of ?X ?x = connected_component_of ?X ?x ###symbols Abstract_Topology_2.connected_component_of :::: 'a topology \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool Abstract_Topological_Spaces.quasi_component_of :::: 'a topology \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool Abstract_Topological_Spaces.normal_space :::: 'a topology \<Rightarrow> bool Abstract_Topological_Spaces.regular_space :::: 'a topology \<Rightarrow> bool T1_Spaces.Hausdorff_space :::: 'a topology \<Rightarrow> bool Abstract_Topology.compact_space :::: 'a topology \<Rightarrow> bool Locally.locally_connected_space :::: 'a topology \<Rightarrow> bool Abstract_Topological_Spaces.quasi_components_of :::: 'a topology \<Rightarrow> 'a set set Abstract_Topology_2.connected_components_of :::: 'a topology \<Rightarrow> 'a set set Finite_Set.finite :::: 'a set \<Rightarrow> bool ###defs definition connected_component_of :: "'a topology \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool" where "connected_component_of X x y \<equiv> \<exists>T. connectedin X T \<and> x \<in> T \<and> y \<in> T" definition quasi_component_of :: "'a topology \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool" where "quasi_component_of X x y \<equiv> x \<in> topspace X \<and> y \<in> topspace X \<and> (\<forall>T. closedin X T \<and> openin X T \<longrightarrow> (x \<in> T \<longleftrightarrow> y \<in> T))" definition normal_space where "normal_space X \<equiv> \<forall>S T. closedin X S \<and> closedin X T \<and> disjnt S T \<longrightarrow> (\<exists>U V. openin X U \<and> openin X V \<and> S \<subseteq> U \<and> T \<subseteq> V \<and> disjnt U V)" definition regular_space where "regular_space X \<equiv> \<forall>C a. closedin X C \<and> a \<in> topspace X - C \<longrightarrow> (\<exists>U V. openin X U \<and> openin X V \<and> a \<in> U \<and> C \<subseteq> V \<and> disjnt U V)" definition Hausdorff_space where "Hausdorff_space X \<equiv> \<forall>x y. x \<in> topspace X \<and> y \<in> topspace X \<and> (x \<noteq> y) \<longrightarrow> (\<exists>U V. openin X U \<and> openin X V \<and> x \<in> U \<and> y \<in> V \<and> disjnt U V)" definition compact_space where "compact_space X \<equiv> compactin X (topspace X)" definition locally_connected_space where "locally_connected_space X \<equiv> neighbourhood_base_of (connectedin X) X" definition quasi_components_of :: "'a topology \<Rightarrow> ('a set) set" where "quasi_components_of X = quasi_component_of_set X ` topspace X" definition connected_components_of :: "'a topology \<Rightarrow> ('a set) set" where "connected_components_of X \<equiv> connected_component_of_set X ` topspace X" class finite = assumes finite_UNIV: "finite (UNIV :: 'a set)" begin
###output ?H1 (?H2 x_1) \<or> ?H1 (?H3 x_1) \<or> ?H4 x_1 \<or> ?H5 x_1 \<and> (?H6 x_1 \<or> ?H7 x_1 \<or> ?H8 x_1) \<Longrightarrow> ?H9 x_1 x_2 = ?H10 x_1 x_2###end
HOLCF/IOA/CompoScheds
CompoScheds.mkex2_unfold
lemma mkex2_unfold: "mkex2 A B = (LAM sch exA exB. (\<lambda>s t. case sch of nil \<Rightarrow> nil | x ## xs \<Rightarrow> (case x of UU \<Rightarrow> UU | Def y \<Rightarrow> (if y \<in> act A then (if y \<in> act B then (case HD \<cdot> exA of UU \<Rightarrow> UU | Def a \<Rightarrow> (case HD \<cdot> exB of UU \<Rightarrow> UU | Def b \<Rightarrow> (y, (snd a, snd b)) \<leadsto> (mkex2 A B \<cdot> xs \<cdot> (TL \<cdot> exA) \<cdot> (TL \<cdot> exB)) (snd a) (snd b))) else (case HD \<cdot> exA of UU \<Rightarrow> UU | Def a \<Rightarrow> (y, (snd a, t)) \<leadsto> (mkex2 A B \<cdot> xs \<cdot> (TL \<cdot> exA) \<cdot> exB) (snd a) t)) else (if y \<in> act B then (case HD \<cdot> exB of UU \<Rightarrow> UU | Def b \<Rightarrow> (y, (s, snd b)) \<leadsto> (mkex2 A B \<cdot> xs \<cdot> exA \<cdot> (TL \<cdot> exB)) s (snd b)) else UU)))))"
mkex2 ?A ?B = (\<Lambda> sch exA exB. (\<lambda>s t. case sch of nil \<Rightarrow> nil | x ## xs \<Rightarrow> case x of \<bottom> \<Rightarrow> \<bottom> | Def y \<Rightarrow> if y \<in> act ?A then if y \<in> act ?B then case HD\<cdot>exA of \<bottom> \<Rightarrow> \<bottom> | Def a \<Rightarrow> case HD\<cdot>exB of \<bottom> \<Rightarrow> \<bottom> | Def b \<Rightarrow> (y, snd a, snd b)\<leadsto>(mkex2 ?A ?B\<cdot>xs\<cdot>(TL\<cdot>exA)\<cdot>(TL\<cdot>exB)) (snd a) (snd b) else case HD\<cdot>exA of \<bottom> \<Rightarrow> \<bottom> | Def a \<Rightarrow> (y, snd a, t)\<leadsto>(mkex2 ?A ?B\<cdot>xs\<cdot>(TL\<cdot>exA)\<cdot>exB) (snd a) t else if y \<in> act ?B then case HD\<cdot>exB of \<bottom> \<Rightarrow> \<bottom> | Def b \<Rightarrow> (y, s, snd b)\<leadsto>(mkex2 ?A ?B\<cdot>xs\<cdot>exA\<cdot>(TL\<cdot>exB)) s (snd b) else \<bottom>))
?H1 x_1 x_2 = ?H2 (\<lambda>y_0. ?H2 (\<lambda>y_1. ?H2 (\<lambda>y_2 y_3 y_4. ?H3 (?H3 (?H3 ?H4 ?H5) (?H2 (\<lambda>y_5. ?H2 (\<lambda>y_6. ?H6 ?H7 (\<lambda>y_7. if y_7 \<in> ?H8 x_1 then if y_7 \<in> ?H8 x_2 then ?H6 ?H7 (\<lambda>y_8. ?H6 ?H7 (\<lambda>y_9. ?H9 (y_7, ?H10 y_8, ?H10 y_9) (?H3 (?H3 (?H3 (?H1 x_1 x_2) y_6) (?H3 ?H11 y_1)) (?H3 ?H11 y_2) (?H10 y_8) (?H10 y_9))) (?H3 ?H12 y_2)) (?H3 ?H12 y_1) else ?H6 ?H7 (\<lambda>y_10. ?H9 (y_7, ?H10 y_10, y_4) (?H3 (?H3 (?H3 (?H1 x_1 x_2) y_6) (?H3 ?H11 y_1)) y_2 (?H10 y_10) y_4)) (?H3 ?H12 y_1) else if y_7 \<in> ?H8 x_2 then ?H6 ?H7 (\<lambda>y_11. ?H9 (y_7, y_3, ?H10 y_11) (?H3 (?H3 (?H3 (?H1 x_1 x_2) y_6) y_1) (?H3 ?H11 y_2) y_3 (?H10 y_11))) (?H3 ?H12 y_2) else ?H7) y_5)))) y_0)))
[ "Seq.seq.HD", "Seq.seq.TL", "Product_Type.prod.snd", "Sequence.Consq_syn", "Automata.act", "Pcpo.pcpo_class.bottom", "Lift.lift.case_lift", "Seq.seq.nil", "Seq.seq.seq_case", "Cfun.cfun.Rep_cfun", "Cfun.cfun.Abs_cfun", "CompoScheds.mkex2" ]
[ "'a seq \\<rightarrow> 'a", "'a seq \\<rightarrow> 'a seq", "'a \\<times> 'b \\<Rightarrow> 'b", "'a \\<Rightarrow> 'a lift seq \\<Rightarrow> 'a lift seq", "('a set \\<times> 'a set \\<times> 'a set) \\<times> 'b set \\<times> ('b \\<times> 'a \\<times> 'b) set \\<times> 'a set set \\<times> 'a set set \\<Rightarrow> 'a set", "'a", "'a \\<Rightarrow> ('b \\<Rightarrow> 'a) \\<Rightarrow> 'b lift \\<Rightarrow> 'a", "'a seq", "'a \\<rightarrow> ('b \\<rightarrow> 'b seq \\<rightarrow> 'a) \\<rightarrow> 'b seq \\<rightarrow> 'a", "('a \\<rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> 'b", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a \\<rightarrow> 'b", "('a set \\<times> 'a set \\<times> 'a set) \\<times> 'b set \\<times> ('b \\<times> 'a \\<times> 'b) set \\<times> 'a set set \\<times> 'a set set \\<Rightarrow> ('a set \\<times> 'a set \\<times> 'a set) \\<times> 'c set \\<times> ('c \\<times> 'a \\<times> 'c) set \\<times> 'a set set \\<times> 'a set set \\<Rightarrow> 'a lift seq \\<rightarrow> ('a \\<times> 'b) lift seq \\<rightarrow> ('a \\<times> 'c) lift seq \\<rightarrow> 'b \\<Rightarrow> 'c \\<Rightarrow> ('a \\<times> 'b \\<times> 'c) lift seq" ]
[ "datatype 'a seq = Empty | Seq 'a \"'a seq\"", "datatype 'a seq = Empty | Seq 'a \"'a seq\"", "definition \"prod = {f. \\<exists>a b. f = Pair_Rep (a::'a) (b::'b)}\"", "class pcpo = cpo +\n assumes least: \"\\<exists>x. \\<forall>y. x \\<sqsubseteq> y\"\nbegin", "datatype 'a seq = Empty | Seq 'a \"'a seq\"", "datatype 'a seq = Empty | Seq 'a \"'a seq\"" ]
template
###lemma mkex2 ?A ?B = (\<Lambda> sch exA exB. (\<lambda>s t. case sch of nil \<Rightarrow> nil | x ## xs \<Rightarrow> case x of \<bottom> \<Rightarrow> \<bottom> | Def y \<Rightarrow> if y \<in> act ?A then if y \<in> act ?B then case HD\<cdot>exA of \<bottom> \<Rightarrow> \<bottom> | Def a \<Rightarrow> case HD\<cdot>exB of \<bottom> \<Rightarrow> \<bottom> | Def b \<Rightarrow> (y, snd a, snd b)\<leadsto>(mkex2 ?A ?B\<cdot>xs\<cdot>(TL\<cdot>exA)\<cdot>(TL\<cdot>exB)) (snd a) (snd b) else case HD\<cdot>exA of \<bottom> \<Rightarrow> \<bottom> | Def a \<Rightarrow> (y, snd a, t)\<leadsto>(mkex2 ?A ?B\<cdot>xs\<cdot>(TL\<cdot>exA)\<cdot>exB) (snd a) t else if y \<in> act ?B then case HD\<cdot>exB of \<bottom> \<Rightarrow> \<bottom> | Def b \<Rightarrow> (y, s, snd b)\<leadsto>(mkex2 ?A ?B\<cdot>xs\<cdot>exA\<cdot>(TL\<cdot>exB)) s (snd b) else \<bottom>)) ###symbols Seq.seq.HD :::: 'a seq \<rightarrow> 'a Seq.seq.TL :::: 'a seq \<rightarrow> 'a seq Product_Type.prod.snd :::: 'a \<times> 'b \<Rightarrow> 'b Sequence.Consq_syn :::: 'a \<Rightarrow> 'a lift seq \<Rightarrow> 'a lift seq Automata.act :::: ('a set \<times> 'a set \<times> 'a set) \<times> 'b set \<times> ('b \<times> 'a \<times> 'b) set \<times> 'a set set \<times> 'a set set \<Rightarrow> 'a set Pcpo.pcpo_class.bottom :::: 'a Lift.lift.case_lift :::: 'a \<Rightarrow> ('b \<Rightarrow> 'a) \<Rightarrow> 'b lift \<Rightarrow> 'a Seq.seq.nil :::: 'a seq Seq.seq.seq_case :::: 'a \<rightarrow> ('b \<rightarrow> 'b seq \<rightarrow> 'a) \<rightarrow> 'b seq \<rightarrow> 'a Cfun.cfun.Rep_cfun :::: ('a \<rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b Cfun.cfun.Abs_cfun :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a \<rightarrow> 'b CompoScheds.mkex2 :::: ('a set \<times> 'a set \<times> 'a set) \<times> 'b set \<times> ('b \<times> 'a \<times> 'b) set \<times> 'a set set \<times> 'a set set \<Rightarrow> ('a set \<times> 'a set \<times> 'a set) \<times> 'c set \<times> ('c \<times> 'a \<times> 'c) set \<times> 'a set set \<times> 'a set set \<Rightarrow> 'a lift seq \<rightarrow> ('a \<times> 'b) lift seq \<rightarrow> ('a \<times> 'c) lift seq \<rightarrow> 'b \<Rightarrow> 'c \<Rightarrow> ('a \<times> 'b \<times> 'c) lift seq ###defs datatype 'a seq = Empty | Seq 'a "'a seq" datatype 'a seq = Empty | Seq 'a "'a seq" definition "prod = {f. \<exists>a b. f = Pair_Rep (a::'a) (b::'b)}" class pcpo = cpo + assumes least: "\<exists>x. \<forall>y. x \<sqsubseteq> y" begin datatype 'a seq = Empty | Seq 'a "'a seq" datatype 'a seq = Empty | Seq 'a "'a seq"
###output ?H1 x_1 x_2 = ?H2 (\<lambda>y_0. ?H2 (\<lambda>y_1. ?H2 (\<lambda>y_2 y_3 y_4. ?H3 (?H3 (?H3 ?H4 ?H5) (?H2 (\<lambda>y_5. ?H2 (\<lambda>y_6. ?H6 ?H7 (\<lambda>y_7. if y_7 \<in> ?H8 x_1 then if y_7 \<in> ?H8 x_2 then ?H6 ?H7 (\<lambda>y_8. ?H6 ?H7 (\<lambda>y_9. ?H9 (y_7, ?H10 y_8, ?H10 y_9) (?H3 (?H3 (?H3 (?H1 x_1 x_2) y_6) (?H3 ?H11 y_1)) (?H3 ?H11 y_2) (?H10 y_8) (?H10 y_9))) (?H3 ?H12 y_2)) (?H3 ?H12 y_1) else ?H6 ?H7 (\<lambda>y_10. ?H9 (y_7, ?H10 y_10, y_4) (?H3 (?H3 (?H3 (?H1 x_1 x_2) y_6) (?H3 ?H11 y_1)) y_2 (?H10 y_10) y_4)) (?H3 ?H12 y_1) else if y_7 \<in> ?H8 x_2 then ?H6 ?H7 (\<lambda>y_11. ?H9 (y_7, y_3, ?H10 y_11) (?H3 (?H3 (?H3 (?H1 x_1 x_2) y_6) y_1) (?H3 ?H11 y_2) y_3 (?H10 y_11))) (?H3 ?H12 y_2) else ?H7) y_5)))) y_0)))###end
Library/Disjoint_Sets
Disjoint_Sets.disjoint_family_on_mono
lemma disjoint_family_on_mono: "A \<subseteq> B \<Longrightarrow> disjoint_family_on f B \<Longrightarrow> disjoint_family_on f A"
?A \<subseteq> ?B \<Longrightarrow> disjoint_family_on ?f ?B \<Longrightarrow> disjoint_family_on ?f ?A
\<lbrakk> ?H1 x_1 x_2; ?H2 x_3 x_2\<rbrakk> \<Longrightarrow> ?H2 x_3 x_1
[ "Disjoint_Sets.disjoint_family_on", "Set.subset_eq" ]
[ "('a \\<Rightarrow> 'b set) \\<Rightarrow> 'a set \\<Rightarrow> bool", "'a set \\<Rightarrow> 'a set \\<Rightarrow> bool" ]
[ "definition disjoint_family_on :: \"('i \\<Rightarrow> 'a set) \\<Rightarrow> 'i set \\<Rightarrow> bool\" where\n \"disjoint_family_on A S \\<longleftrightarrow> (\\<forall>m\\<in>S. \\<forall>n\\<in>S. m \\<noteq> n \\<longrightarrow> A m \\<inter> A n = {})\"", "abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\"" ]
template
###lemma ?A \<subseteq> ?B \<Longrightarrow> disjoint_family_on ?f ?B \<Longrightarrow> disjoint_family_on ?f ?A ###symbols Disjoint_Sets.disjoint_family_on :::: ('a \<Rightarrow> 'b set) \<Rightarrow> 'a set \<Rightarrow> bool Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool ###defs definition disjoint_family_on :: "('i \<Rightarrow> 'a set) \<Rightarrow> 'i set \<Rightarrow> bool" where "disjoint_family_on A S \<longleftrightarrow> (\<forall>m\<in>S. \<forall>n\<in>S. m \<noteq> n \<longrightarrow> A m \<inter> A n = {})" abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool" where "subset_eq \<equiv> less_eq"
###output \<lbrakk> ?H1 x_1 x_2; ?H2 x_3 x_2\<rbrakk> \<Longrightarrow> ?H2 x_3 x_1###end
Library/Extended_Real
Extended_Real.ereal_power_numeral
lemma ereal_power_numeral[simp]: "(numeral num :: ereal) ^ n = ereal (numeral num ^ n)"
numeral ?num ^ ?n = ereal (numeral ?num ^ ?n)
?H1 (?H2 x_1) x_2 = ?H3 (?H1 (?H2 x_1) x_2)
[ "Extended_Real.ereal.ereal", "Num.numeral_class.numeral", "Power.power_class.power" ]
[ "real \\<Rightarrow> ereal", "num \\<Rightarrow> 'a", "'a \\<Rightarrow> nat \\<Rightarrow> 'a" ]
[ "datatype ereal = ereal real | PInfty | MInfty", "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\"", "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 numeral ?num ^ ?n = ereal (numeral ?num ^ ?n) ###symbols Extended_Real.ereal.ereal :::: real \<Rightarrow> ereal Num.numeral_class.numeral :::: num \<Rightarrow> 'a Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a ###defs datatype ereal = ereal real | PInfty | MInfty 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" 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 = ?H3 (?H1 (?H2 x_1) x_2)###end
Fun
Fun.bij_betw_imp_inj_on
lemma bij_betw_imp_inj_on: "bij_betw f A B \<Longrightarrow> inj_on f A"
bij_betw ?f ?A ?B \<Longrightarrow> inj_on ?f ?A
?H1 x_1 x_2 x_3 \<Longrightarrow> ?H2 x_1 x_2
[ "Fun.inj_on", "Fun.bij_betw" ]
[ "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> bool", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set \\<Rightarrow> bool" ]
[ "definition inj_on :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> bool\" \\<comment> \\<open>injective\\<close>\n where \"inj_on f A \\<longleftrightarrow> (\\<forall>x\\<in>A. \\<forall>y\\<in>A. f x = f y \\<longrightarrow> x = y)\"", "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> inj_on ?f ?A ###symbols Fun.inj_on :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> bool Fun.bij_betw :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set \<Rightarrow> bool ###defs definition inj_on :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> bool" \<comment> \<open>injective\<close> where "inj_on f A \<longleftrightarrow> (\<forall>x\<in>A. \<forall>y\<in>A. f x = f y \<longrightarrow> x = y)" 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_1 x_2###end
TLA/Action
Action.actionD
lemma actionD [dest]: "\<turnstile> A \<Longrightarrow> (s,t) \<Turnstile> A"
\<turnstile> ?A \<Longrightarrow> ?A (?s, ?t)
?H1 x_1 \<Longrightarrow> x_1 (x_2, x_3)
[ "Intensional.Valid" ]
[ "('a \\<Rightarrow> bool) \\<Rightarrow> bool" ]
[ "definition Valid :: \"('w::world) form \\<Rightarrow> bool\"\n where \"Valid A \\<equiv> \\<forall>w. A w\"" ]
template
###lemma \<turnstile> ?A \<Longrightarrow> ?A (?s, ?t) ###symbols Intensional.Valid :::: ('a \<Rightarrow> bool) \<Rightarrow> bool ###defs definition Valid :: "('w::world) form \<Rightarrow> bool" where "Valid A \<equiv> \<forall>w. A w"
###output ?H1 x_1 \<Longrightarrow> x_1 (x_2, x_3)###end
Analysis/Sigma_Algebra
Sigma_Algebra.sigma_sets_UNION
lemma sigma_sets_UNION: "countable B \<Longrightarrow> (\<And>b. b \<in> B \<Longrightarrow> b \<in> sigma_sets X A) \<Longrightarrow> \<Union> B \<in> sigma_sets X A"
countable ?B \<Longrightarrow> (\<And>b. b \<in> ?B \<Longrightarrow> b \<in> sigma_sets ?X ?A) \<Longrightarrow> \<Union> ?B \<in> sigma_sets ?X ?A
\<lbrakk> ?H1 x_1; \<And>y_0. y_0 \<in> x_1 \<Longrightarrow> y_0 \<in> ?H2 x_2 x_3\<rbrakk> \<Longrightarrow> ?H3 x_1 \<in> ?H2 x_2 x_3
[ "Complete_Lattices.Union", "Sigma_Algebra.sigma_sets", "Countable_Set.countable" ]
[ "'a set set \\<Rightarrow> 'a set", "'a set \\<Rightarrow> 'a set set \\<Rightarrow> 'a set set", "'a set \\<Rightarrow> bool" ]
[ "abbreviation Union :: \"'a set set \\<Rightarrow> 'a set\" (\"\\<Union>\")\n where \"\\<Union>S \\<equiv> \\<Squnion>S\"", "definition countable :: \"'a set \\<Rightarrow> bool\" where\n \"countable S \\<longleftrightarrow> (\\<exists>f::'a \\<Rightarrow> nat. inj_on f S)\"" ]
template
###lemma countable ?B \<Longrightarrow> (\<And>b. b \<in> ?B \<Longrightarrow> b \<in> sigma_sets ?X ?A) \<Longrightarrow> \<Union> ?B \<in> sigma_sets ?X ?A ###symbols Complete_Lattices.Union :::: 'a set set \<Rightarrow> 'a set Sigma_Algebra.sigma_sets :::: 'a set \<Rightarrow> 'a set set \<Rightarrow> 'a set set Countable_Set.countable :::: 'a set \<Rightarrow> bool ###defs abbreviation Union :: "'a set set \<Rightarrow> 'a set" ("\<Union>") where "\<Union>S \<equiv> \<Squnion>S" definition countable :: "'a set \<Rightarrow> bool" where "countable S \<longleftrightarrow> (\<exists>f::'a \<Rightarrow> nat. inj_on f S)"
###output \<lbrakk> ?H1 x_1; \<And>y_0. y_0 \<in> x_1 \<Longrightarrow> y_0 \<in> ?H2 x_2 x_3\<rbrakk> \<Longrightarrow> ?H3 x_1 \<in> ?H2 x_2 x_3###end
Relation
Relation.transp_onI
lemma transp_onI: "(\<And>x y z. x \<in> A \<Longrightarrow> y \<in> A \<Longrightarrow> z \<in> A \<Longrightarrow> R x y \<Longrightarrow> R y z \<Longrightarrow> R x z) \<Longrightarrow> transp_on A R"
(\<And>x y z. x \<in> ?A \<Longrightarrow> y \<in> ?A \<Longrightarrow> z \<in> ?A \<Longrightarrow> ?R x y \<Longrightarrow> ?R y z \<Longrightarrow> ?R x z) \<Longrightarrow> transp_on ?A ?R
(\<And>y_0 y_1 y_2. \<lbrakk>y_0 \<in> x_1; y_1 \<in> x_1; y_2 \<in> x_1; x_2 y_0 y_1; x_2 y_1 y_2\<rbrakk> \<Longrightarrow> x_2 y_0 y_2) \<Longrightarrow> ?H1 x_1 x_2
[ "Relation.transp_on" ]
[ "'a set \\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> bool" ]
[ "definition transp_on :: \"'a set \\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> bool\" where\n \"transp_on A R \\<longleftrightarrow> (\\<forall>x \\<in> A. \\<forall>y \\<in> A. \\<forall>z \\<in> A. R x y \\<longrightarrow> R y z \\<longrightarrow> R x z)\"" ]
template
###lemma (\<And>x y z. x \<in> ?A \<Longrightarrow> y \<in> ?A \<Longrightarrow> z \<in> ?A \<Longrightarrow> ?R x y \<Longrightarrow> ?R y z \<Longrightarrow> ?R x z) \<Longrightarrow> transp_on ?A ?R ###symbols Relation.transp_on :::: 'a set \<Rightarrow> ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> bool ###defs definition transp_on :: "'a set \<Rightarrow> ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> bool" where "transp_on A R \<longleftrightarrow> (\<forall>x \<in> A. \<forall>y \<in> A. \<forall>z \<in> A. R x y \<longrightarrow> R y z \<longrightarrow> R x z)"
###output (\<And>y_0 y_1 y_2. \<lbrakk>y_0 \<in> x_1; y_1 \<in> x_1; y_2 \<in> x_1; x_2 y_0 y_1; x_2 y_1 y_2\<rbrakk> \<Longrightarrow> x_2 y_0 y_2) \<Longrightarrow> ?H1 x_1 x_2###end
Analysis/Affine
Affine.affine_dependent_explicit
null
affine_dependent ?p = (\<exists>S U. finite S \<and> S \<subseteq> ?p \<and> sum U S = 0 \<and> (\<exists>v\<in>S. U v \<noteq> 0) \<and> (\<Sum>v\<in>S. U v *\<^sub>R v) = (0:: ?'a))
?H1 x_1 = (\<exists>y_0 y_1. ?H2 y_0 \<and> ?H3 y_0 x_1 \<and> ?H4 y_1 y_0 = ?H5 \<and> (\<exists>y_2\<in>y_0. y_1 y_2 \<noteq> ?H5) \<and> ?H4 (\<lambda>y_3. ?H6 (y_1 y_3) y_3) y_0 = ?H5)
[ "Real_Vector_Spaces.scaleR_class.scaleR", "Groups.zero_class.zero", "Groups_Big.comm_monoid_add_class.sum", "Set.subset_eq", "Finite_Set.finite", "Affine.affine_dependent" ]
[ "real \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b", "'a set \\<Rightarrow> 'a set \\<Rightarrow> bool", "'a set \\<Rightarrow> bool", "'a set \\<Rightarrow> bool" ]
[ "class scaleR =\n fixes scaleR :: \"real \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixr \"*\\<^sub>R\" 75)\nbegin", "class zero =\n fixes zero :: 'a (\"0\")", "abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\"", "class finite =\n assumes finite_UNIV: \"finite (UNIV :: 'a set)\"\nbegin" ]
template
###lemma affine_dependent ?p = (\<exists>S U. finite S \<and> S \<subseteq> ?p \<and> sum U S = 0 \<and> (\<exists>v\<in>S. U v \<noteq> 0) \<and> (\<Sum>v\<in>S. U v *\<^sub>R v) = (0:: ?'a)) ###symbols Real_Vector_Spaces.scaleR_class.scaleR :::: real \<Rightarrow> 'a \<Rightarrow> 'a Groups.zero_class.zero :::: 'a Groups_Big.comm_monoid_add_class.sum :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool Finite_Set.finite :::: 'a set \<Rightarrow> bool Affine.affine_dependent :::: 'a set \<Rightarrow> bool ###defs class scaleR = fixes scaleR :: "real \<Rightarrow> 'a \<Rightarrow> 'a" (infixr "*\<^sub>R" 75) begin class zero = fixes zero :: 'a ("0") abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool" where "subset_eq \<equiv> less_eq" class finite = assumes finite_UNIV: "finite (UNIV :: 'a set)" begin
###output ?H1 x_1 = (\<exists>y_0 y_1. ?H2 y_0 \<and> ?H3 y_0 x_1 \<and> ?H4 y_1 y_0 = ?H5 \<and> (\<exists>y_2\<in>y_0. y_1 y_2 \<noteq> ?H5) \<and> ?H4 (\<lambda>y_3. ?H6 (y_1 y_3) y_3) y_0 = ?H5)###end
UNITY/Guar
Guar.uv1
lemma uv1: assumes "uv_prop X" and "finite GG" and "GG \<subseteq> X" and "OK GG (%G. G)" shows "(\<Squnion>G \<in> GG. G) \<in> X"
uv_prop ?X \<Longrightarrow> finite ?GG \<Longrightarrow> ?GG \<subseteq> ?X \<Longrightarrow> OK ?GG (\<lambda>G. G) \<Longrightarrow> (\<Squnion>G\<in> ?GG. G) \<in> ?X
\<lbrakk> ?H1 x_1; ?H2 x_2; ?H3 x_2 x_1; ?H4 x_2 (\<lambda>y_0. y_0)\<rbrakk> \<Longrightarrow> ?H5 x_2 (\<lambda>y_1. y_1) \<in> x_1
[ "Union.JOIN", "Union.OK", "Set.subset_eq", "Finite_Set.finite", "Guar.uv_prop" ]
[ "'a set \\<Rightarrow> ('a \\<Rightarrow> 'b program) \\<Rightarrow> 'b program", "'a set \\<Rightarrow> ('a \\<Rightarrow> 'b program) \\<Rightarrow> bool", "'a set \\<Rightarrow> 'a set \\<Rightarrow> bool", "'a set \\<Rightarrow> bool", "'a program set \\<Rightarrow> bool" ]
[ "definition\n JOIN :: \"['a set, 'a => 'b program] => 'b program\"\n where \"JOIN I F = mk_program (\\<Inter>i \\<in> I. Init (F i), \\<Union>i \\<in> I. Acts (F i),\n \\<Inter>i \\<in> I. AllowedActs (F i))\"", "definition\n OK :: \"['a set, 'a => 'b program] => bool\"\n where \"OK I F = (\\<forall>i \\<in> I. \\<forall>j \\<in> I-{i}. Acts (F i) \\<subseteq> AllowedActs (F j))\"", "abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\"", "class finite =\n assumes finite_UNIV: \"finite (UNIV :: 'a set)\"\nbegin", "definition uv_prop :: \"'a program set => bool\" where\n \"uv_prop X == SKIP \\<in> X & (\\<forall>F G. F ok G --> F \\<in> X & G \\<in> X --> (F\\<squnion>G) \\<in> X)\"" ]
template
###lemma uv_prop ?X \<Longrightarrow> finite ?GG \<Longrightarrow> ?GG \<subseteq> ?X \<Longrightarrow> OK ?GG (\<lambda>G. G) \<Longrightarrow> (\<Squnion>G\<in> ?GG. G) \<in> ?X ###symbols Union.JOIN :::: 'a set \<Rightarrow> ('a \<Rightarrow> 'b program) \<Rightarrow> 'b program Union.OK :::: 'a set \<Rightarrow> ('a \<Rightarrow> 'b program) \<Rightarrow> bool Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool Finite_Set.finite :::: 'a set \<Rightarrow> bool Guar.uv_prop :::: 'a program set \<Rightarrow> bool ###defs definition JOIN :: "['a set, 'a => 'b program] => 'b program" where "JOIN I F = mk_program (\<Inter>i \<in> I. Init (F i), \<Union>i \<in> I. Acts (F i), \<Inter>i \<in> I. AllowedActs (F i))" definition OK :: "['a set, 'a => 'b program] => bool" where "OK I F = (\<forall>i \<in> I. \<forall>j \<in> I-{i}. Acts (F i) \<subseteq> AllowedActs (F j))" abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool" where "subset_eq \<equiv> less_eq" class finite = assumes finite_UNIV: "finite (UNIV :: 'a set)" begin definition uv_prop :: "'a program set => bool" where "uv_prop X == SKIP \<in> X & (\<forall>F G. F ok G --> F \<in> X & G \<in> X --> (F\<squnion>G) \<in> X)"
###output \<lbrakk> ?H1 x_1; ?H2 x_2; ?H3 x_2 x_1; ?H4 x_2 (\<lambda>y_0. y_0)\<rbrakk> \<Longrightarrow> ?H5 x_2 (\<lambda>y_1. y_1) \<in> x_1###end
Library/Stream
Stream.sset_range
lemma sset_range: "sset s = range (snth s)"
sset ?s = range ((!!) ?s)
?H1 x_1 = ?H2 (?H3 x_1)
[ "Stream.snth", "Set.range", "Stream.stream.sset" ]
[ "'a stream \\<Rightarrow> nat \\<Rightarrow> 'a", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set", "'a stream \\<Rightarrow> 'a set" ]
[ "primrec snth :: \"'a stream \\<Rightarrow> nat \\<Rightarrow> 'a\" (infixl \\<open>!!\\<close> 100) where\n \"s !! 0 = shd s\"\n| \"s !! Suc n = stl s !! n\"", "abbreviation range :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set\" \\<comment> \\<open>of function\\<close>\n where \"range f \\<equiv> f ` UNIV\"", "codatatype (sset: 'a) stream =\n SCons (shd: 'a) (stl: \"'a stream\") (infixr \\<open>##\\<close> 65)\nfor\n map: smap\n rel: stream_all2" ]
template
###lemma sset ?s = range ((!!) ?s) ###symbols Stream.snth :::: 'a stream \<Rightarrow> nat \<Rightarrow> 'a Set.range :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b set Stream.stream.sset :::: 'a stream \<Rightarrow> 'a set ###defs primrec snth :: "'a stream \<Rightarrow> nat \<Rightarrow> 'a" (infixl \<open>!!\<close> 100) where "s !! 0 = shd s" | "s !! Suc n = stl s !! n" abbreviation range :: "('a \<Rightarrow> 'b) \<Rightarrow> 'b set" \<comment> \<open>of function\<close> where "range f \<equiv> f ` UNIV" codatatype (sset: 'a) stream = SCons (shd: 'a) (stl: "'a stream") (infixr \<open>##\<close> 65) for map: smap rel: stream_all2
###output ?H1 x_1 = ?H2 (?H3 x_1)###end
Bit_Operations
Bit_Operations.AND_upper1''
lemma AND_upper1'' [simp]: \<^marker>\<open>contributor \<open>Stefan Berghofer\<close>\<close> \<open>y AND x < z\<close> if \<open>0 \<le> y\<close> \<open>y < z\<close> for x y z :: int
0 \<le> ?y \<Longrightarrow> ?y < ?z \<Longrightarrow> and ?y ?x < ?z
\<lbrakk> ?H1 \<le> x_1; x_1 < x_2\<rbrakk> \<Longrightarrow> ?H2 x_1 x_3 < x_2
[ "Bit_Operations.semiring_bit_operations_class.and", "Groups.zero_class.zero" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a" ]
[ "class semiring_bit_operations = semiring_bits +\n fixes \"and\" :: \\<open>'a \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close> (infixr \\<open>AND\\<close> 64)\n and or :: \\<open>'a \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close> (infixr \\<open>OR\\<close> 59)\n and xor :: \\<open>'a \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close> (infixr \\<open>XOR\\<close> 59)\n and mask :: \\<open>nat \\<Rightarrow> 'a\\<close>\n and set_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and unset_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and flip_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and push_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and drop_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and take_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n assumes and_rec: \\<open>a AND b = of_bool (odd a \\<and> odd b) + 2 * ((a div 2) AND (b div 2))\\<close>\n and or_rec: \\<open>a OR b = of_bool (odd a \\<or> odd b) + 2 * ((a div 2) OR (b div 2))\\<close>\n and xor_rec: \\<open>a XOR b = of_bool (odd a \\<noteq> odd b) + 2 * ((a div 2) XOR (b div 2))\\<close>\n and mask_eq_exp_minus_1: \\<open>mask n = 2 ^ n - 1\\<close>\n and set_bit_eq_or: \\<open>set_bit n a = a OR push_bit n 1\\<close>\n and unset_bit_eq_or_xor: \\<open>unset_bit n a = (a OR push_bit n 1) XOR push_bit n 1\\<close>\n and flip_bit_eq_xor: \\<open>flip_bit n a = a XOR push_bit n 1\\<close>\n and push_bit_eq_mult: \\<open>push_bit n a = a * 2 ^ n\\<close>\n and drop_bit_eq_div: \\<open>drop_bit n a = a div 2 ^ n\\<close>\n and take_bit_eq_mod: \\<open>take_bit n a = a mod 2 ^ n\\<close>\nbegin", "class zero =\n fixes zero :: 'a (\"0\")" ]
template
###lemma 0 \<le> ?y \<Longrightarrow> ?y < ?z \<Longrightarrow> and ?y ?x < ?z ###symbols Bit_Operations.semiring_bit_operations_class.and :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Groups.zero_class.zero :::: 'a ###defs class semiring_bit_operations = semiring_bits + fixes "and" :: \<open>'a \<Rightarrow> 'a \<Rightarrow> 'a\<close> (infixr \<open>AND\<close> 64) and or :: \<open>'a \<Rightarrow> 'a \<Rightarrow> 'a\<close> (infixr \<open>OR\<close> 59) and xor :: \<open>'a \<Rightarrow> 'a \<Rightarrow> 'a\<close> (infixr \<open>XOR\<close> 59) and mask :: \<open>nat \<Rightarrow> 'a\<close> and set_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close> and unset_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close> and flip_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close> and push_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close> and drop_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close> and take_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close> assumes and_rec: \<open>a AND b = of_bool (odd a \<and> odd b) + 2 * ((a div 2) AND (b div 2))\<close> and or_rec: \<open>a OR b = of_bool (odd a \<or> odd b) + 2 * ((a div 2) OR (b div 2))\<close> and xor_rec: \<open>a XOR b = of_bool (odd a \<noteq> odd b) + 2 * ((a div 2) XOR (b div 2))\<close> and mask_eq_exp_minus_1: \<open>mask n = 2 ^ n - 1\<close> and set_bit_eq_or: \<open>set_bit n a = a OR push_bit n 1\<close> and unset_bit_eq_or_xor: \<open>unset_bit n a = (a OR push_bit n 1) XOR push_bit n 1\<close> and flip_bit_eq_xor: \<open>flip_bit n a = a XOR push_bit n 1\<close> and push_bit_eq_mult: \<open>push_bit n a = a * 2 ^ n\<close> and drop_bit_eq_div: \<open>drop_bit n a = a div 2 ^ n\<close> and take_bit_eq_mod: \<open>take_bit n a = a mod 2 ^ n\<close> begin class zero = fixes zero :: 'a ("0")
###output \<lbrakk> ?H1 \<le> x_1; x_1 < x_2\<rbrakk> \<Longrightarrow> ?H2 x_1 x_3 < x_2###end
Hoare_Parallel/OG_Tactics
OG_Tactics.my_simp_list(61)
null
atom_com (While ?b ?i ?c) = atom_com ?c
?H1 (?H2 x_1 x_2 x_3) = ?H1 x_3
[ "OG_Com.com.While", "OG_Com.atom_com" ]
[ "'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a com \\<Rightarrow> 'a com", "'a com \\<Rightarrow> bool" ]
[ "primrec atom_com :: \"'a com \\<Rightarrow> bool\" where\n \"atom_com (Parallel Ts) = False\"\n| \"atom_com (Basic f) = True\"\n| \"atom_com (Seq c1 c2) = (atom_com c1 \\<and> atom_com c2)\"\n| \"atom_com (Cond b c1 c2) = (atom_com c1 \\<and> atom_com c2)\"\n| \"atom_com (While b i c) = atom_com c\"" ]
template
###lemma atom_com (While ?b ?i ?c) = atom_com ?c ###symbols OG_Com.com.While :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a com \<Rightarrow> 'a com OG_Com.atom_com :::: 'a com \<Rightarrow> bool ###defs primrec atom_com :: "'a com \<Rightarrow> bool" where "atom_com (Parallel Ts) = False" | "atom_com (Basic f) = True" | "atom_com (Seq c1 c2) = (atom_com c1 \<and> atom_com c2)" | "atom_com (Cond b c1 c2) = (atom_com c1 \<and> atom_com c2)" | "atom_com (While b i c) = atom_com c"
###output ?H1 (?H2 x_1 x_2 x_3) = ?H1 x_3###end
Decision_Procs/Cooper
Cooper.conj_qf
lemma conj_qf: "qfree p \<Longrightarrow> qfree q \<Longrightarrow> qfree (conj p q)"
qfree ?p \<Longrightarrow> qfree ?q \<Longrightarrow> qfree (Cooper.conj ?p ?q)
\<lbrakk> ?H1 x_1; ?H1 x_2\<rbrakk> \<Longrightarrow> ?H1 (?H2 x_1 x_2)
[ "Cooper.conj", "Cooper.qfree" ]
[ "fm \\<Rightarrow> fm \\<Rightarrow> fm", "fm \\<Rightarrow> bool" ]
[ "definition conj :: \"fm \\<Rightarrow> fm \\<Rightarrow> fm\"\n where \"conj p q =\n (if p = F \\<or> q = F then F\n else if p = T then q\n else if q = T then p\n else And p q)\"", "fun qfree :: \"fm \\<Rightarrow> bool\" \\<comment> \\<open>Quantifier freeness\\<close>\n where\n \"qfree (E p) \\<longleftrightarrow> False\"\n | \"qfree (A p) \\<longleftrightarrow> False\"\n | \"qfree (Not p) \\<longleftrightarrow> qfree p\"\n | \"qfree (And p q) \\<longleftrightarrow> qfree p \\<and> qfree q\"\n | \"qfree (Or p q) \\<longleftrightarrow> qfree p \\<and> qfree q\"\n | \"qfree (Imp p q) \\<longleftrightarrow> qfree p \\<and> qfree q\"\n | \"qfree (Iff p q) \\<longleftrightarrow> qfree p \\<and> qfree q\"\n | \"qfree p \\<longleftrightarrow> True\"" ]
template
###lemma qfree ?p \<Longrightarrow> qfree ?q \<Longrightarrow> qfree (Cooper.conj ?p ?q) ###symbols Cooper.conj :::: fm \<Rightarrow> fm \<Rightarrow> fm Cooper.qfree :::: fm \<Rightarrow> bool ###defs definition conj :: "fm \<Rightarrow> fm \<Rightarrow> fm" where "conj p q = (if p = F \<or> q = F then F else if p = T then q else if q = T then p else And p q)" fun qfree :: "fm \<Rightarrow> bool" \<comment> \<open>Quantifier freeness\<close> where "qfree (E p) \<longleftrightarrow> False" | "qfree (A p) \<longleftrightarrow> False" | "qfree (Not p) \<longleftrightarrow> qfree p" | "qfree (And p q) \<longleftrightarrow> qfree p \<and> qfree q" | "qfree (Or p q) \<longleftrightarrow> qfree p \<and> qfree q" | "qfree (Imp p q) \<longleftrightarrow> qfree p \<and> qfree q" | "qfree (Iff p q) \<longleftrightarrow> qfree p \<and> qfree q" | "qfree p \<longleftrightarrow> True"
###output \<lbrakk> ?H1 x_1; ?H1 x_2\<rbrakk> \<Longrightarrow> ?H1 (?H2 x_1 x_2)###end
Bali/DeclConcepts
DeclConcepts.is_static_fieldm_simp
lemma is_static_fieldm_simp[simp]: "is_static (fieldm n f) = is_static f"
is_static (fieldm ?n ?f) = is_static ?f
?H1 (?H2 x_1 x_2) = ?H1 x_2
[ "DeclConcepts.fieldm", "DeclConcepts.has_static_class.is_static" ]
[ "vname \\<Rightarrow> qtname \\<times> Decl.field \\<Rightarrow> qtname \\<times> memberdecl", "'a \\<Rightarrow> bool" ]
[ "definition\n fieldm :: \"vname \\<Rightarrow> (qtname \\<times> field) \\<Rightarrow> (qtname \\<times> memberdecl)\"\n where \"fieldm n f = (declclass f, fdecl (n, fld f))\"", "class has_static =\n fixes is_static :: \"'a \\<Rightarrow> bool\"" ]
template
###lemma is_static (fieldm ?n ?f) = is_static ?f ###symbols DeclConcepts.fieldm :::: vname \<Rightarrow> qtname \<times> Decl.field \<Rightarrow> qtname \<times> memberdecl DeclConcepts.has_static_class.is_static :::: 'a \<Rightarrow> bool ###defs definition fieldm :: "vname \<Rightarrow> (qtname \<times> field) \<Rightarrow> (qtname \<times> memberdecl)" where "fieldm n f = (declclass f, fdecl (n, fld f))" class has_static = fixes is_static :: "'a \<Rightarrow> bool"
###output ?H1 (?H2 x_1 x_2) = ?H1 x_2###end
Set
Set.UnE
lemma UnE [elim!]: "c \<in> A \<union> B \<Longrightarrow> (c \<in> A \<Longrightarrow> P) \<Longrightarrow> (c \<in> B \<Longrightarrow> P) \<Longrightarrow> P"
?c \<in> ?A \<union> ?B \<Longrightarrow> (?c \<in> ?A \<Longrightarrow> ?P) \<Longrightarrow> (?c \<in> ?B \<Longrightarrow> ?P) \<Longrightarrow> ?P
\<lbrakk>x_1 \<in> ?H1 x_2 x_3; x_1 \<in> x_2 \<Longrightarrow> x_4; x_1 \<in> x_3 \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_4
[ "Set.union" ]
[ "'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set" ]
[ "abbreviation union :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<union>\" 65)\n where \"union \\<equiv> sup\"" ]
template
###lemma ?c \<in> ?A \<union> ?B \<Longrightarrow> (?c \<in> ?A \<Longrightarrow> ?P) \<Longrightarrow> (?c \<in> ?B \<Longrightarrow> ?P) \<Longrightarrow> ?P ###symbols Set.union :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set ###defs abbreviation union :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<union>" 65) where "union \<equiv> sup"
###output \<lbrakk>x_1 \<in> ?H1 x_2 x_3; x_1 \<in> x_2 \<Longrightarrow> x_4; x_1 \<in> x_3 \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_4###end
UNITY/Transformers
Transformers.wens_single_finite_Suc
lemma wens_single_finite_Suc: "single_valued act ==> wens_single_finite act B (Suc k) = wens_single_finite act B k \<union> wp act (wens_single_finite act B k)"
single_valued ?act \<Longrightarrow> wens_single_finite ?act ?B (Suc ?k) = wens_single_finite ?act ?B ?k \<union> wp ?act (wens_single_finite ?act ?B ?k)
?H1 x_1 \<Longrightarrow> ?H2 x_1 x_2 (?H3 x_3) = ?H4 (?H2 x_1 x_2 x_3) (?H5 x_1 (?H2 x_1 x_2 x_3))
[ "Transformers.wp", "Set.union", "Nat.Suc", "Transformers.wens_single_finite", "Relation.single_valued" ]
[ "('a \\<times> 'a) set \\<Rightarrow> 'a set \\<Rightarrow> 'a set", "'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set", "nat \\<Rightarrow> nat", "('a \\<times> 'a) set \\<Rightarrow> 'a set \\<Rightarrow> nat \\<Rightarrow> 'a set", "('a \\<times> 'b) set \\<Rightarrow> bool" ]
[ "definition wp :: \"[('a*'a) set, 'a set] => 'a set\" where \n \\<comment> \\<open>Dijkstra's weakest-precondition operator (for an individual command)\\<close>\n \"wp act B == - (act\\<inverse> `` (-B))\"", "abbreviation union :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<union>\" 65)\n where \"union \\<equiv> sup\"", "definition Suc :: \"nat \\<Rightarrow> nat\"\n where \"Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))\"", "definition wens_single_finite :: \"[('a*'a) set, 'a set, nat] => 'a set\" where \n \"wens_single_finite act B k == \\<Union>i \\<in> atMost k. (wp act ^^ i) B\"", "definition single_valued :: \"('a \\<times> 'b) set \\<Rightarrow> bool\"\n where \"single_valued r \\<longleftrightarrow> (\\<forall>x y. (x, y) \\<in> r \\<longrightarrow> (\\<forall>z. (x, z) \\<in> r \\<longrightarrow> y = z))\"" ]
template
###lemma single_valued ?act \<Longrightarrow> wens_single_finite ?act ?B (Suc ?k) = wens_single_finite ?act ?B ?k \<union> wp ?act (wens_single_finite ?act ?B ?k) ###symbols Transformers.wp :::: ('a \<times> 'a) set \<Rightarrow> 'a set \<Rightarrow> 'a set Set.union :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set Nat.Suc :::: nat \<Rightarrow> nat Transformers.wens_single_finite :::: ('a \<times> 'a) set \<Rightarrow> 'a set \<Rightarrow> nat \<Rightarrow> 'a set Relation.single_valued :::: ('a \<times> 'b) set \<Rightarrow> bool ###defs definition wp :: "[('a*'a) set, 'a set] => 'a set" where \<comment> \<open>Dijkstra's weakest-precondition operator (for an individual command)\<close> "wp act B == - (act\<inverse> `` (-B))" abbreviation union :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<union>" 65) where "union \<equiv> sup" definition Suc :: "nat \<Rightarrow> nat" where "Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))" definition wens_single_finite :: "[('a*'a) set, 'a set, nat] => 'a set" where "wens_single_finite act B k == \<Union>i \<in> atMost k. (wp act ^^ i) B" definition single_valued :: "('a \<times> 'b) set \<Rightarrow> bool" where "single_valued r \<longleftrightarrow> (\<forall>x y. (x, y) \<in> r \<longrightarrow> (\<forall>z. (x, z) \<in> r \<longrightarrow> y = z))"
###output ?H1 x_1 \<Longrightarrow> ?H2 x_1 x_2 (?H3 x_3) = ?H4 (?H2 x_1 x_2 x_3) (?H5 x_1 (?H2 x_1 x_2 x_3))###end
Analysis/Elementary_Normed_Spaces
Elementary_Normed_Spaces.interior_translation_subtract
lemma interior_translation_subtract: "interior ((\<lambda>x. x - a) ` S) = (\<lambda>x. x - a) ` interior S" for S :: "'a::real_normed_vector set"
interior ((\<lambda>x. x - ?a) ` ?S) = (\<lambda>x. x - ?a) ` interior ?S
?H1 (?H2 (\<lambda>y_0. ?H3 y_0 x_1) x_2) = ?H2 (\<lambda>y_1. ?H3 y_1 x_1) (?H1 x_2)
[ "Groups.minus_class.minus", "Set.image", "Elementary_Topology.interior" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set", "'a set \\<Rightarrow> 'a set" ]
[ "class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)", "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}\"" ]
template
###lemma interior ((\<lambda>x. x - ?a) ` ?S) = (\<lambda>x. x - ?a) ` interior ?S ###symbols Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set Elementary_Topology.interior :::: 'a set \<Rightarrow> 'a set ###defs class minus = fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65) definition image :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set" (infixr "`" 90) where "f ` A = {y. \<exists>x\<in>A. y = f x}"
###output ?H1 (?H2 (\<lambda>y_0. ?H3 y_0 x_1) x_2) = ?H2 (\<lambda>y_1. ?H3 y_1 x_1) (?H1 x_2)###end
Proofs/Extraction/Euclid
Euclidean_Algorithm.prime_int_iff
null
prime ?p = (0 < ?p \<and> prime_elem ?p)
?H1 x_1 = (?H2 < x_1 \<and> ?H3 x_1)
[ "Factorial_Ring.comm_semiring_1_class.prime_elem", "Groups.zero_class.zero", "Factorial_Ring.normalization_semidom_class.prime" ]
[ "'a \\<Rightarrow> bool", "'a", "'a \\<Rightarrow> bool" ]
[ "class zero =\n fixes zero :: 'a (\"0\")" ]
template
###lemma prime ?p = (0 < ?p \<and> prime_elem ?p) ###symbols Factorial_Ring.comm_semiring_1_class.prime_elem :::: 'a \<Rightarrow> bool 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 = (?H2 < x_1 \<and> ?H3 x_1)###end
Real
Real.floor_divide_real_eq_div
lemma floor_divide_real_eq_div: assumes "0 \<le> b" shows "\<lfloor>a / real_of_int b\<rfloor> = \<lfloor>a\<rfloor> div b"
0 \<le> ?b \<Longrightarrow> \<lfloor> ?a / real_of_int ?b\<rfloor> = \<lfloor> ?a\<rfloor> div ?b
?H1 \<le> x_1 \<Longrightarrow> ?H2 (?H3 x_2 (?H4 x_1)) = ?H5 (?H2 x_2) x_1
[ "Rings.divide_class.divide", "Real.real_of_int", "Fields.inverse_class.inverse_divide", "Archimedean_Field.floor_ceiling_class.floor", "Groups.zero_class.zero" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "int \\<Rightarrow> real", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a \\<Rightarrow> int", "'a" ]
[ "class divide =\n fixes divide :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"div\" 70)", "abbreviation real_of_int :: \"int \\<Rightarrow> real\"\n where \"real_of_int \\<equiv> of_int\"", "class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin", "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)\"", "class zero =\n fixes zero :: 'a (\"0\")" ]
template
###lemma 0 \<le> ?b \<Longrightarrow> \<lfloor> ?a / real_of_int ?b\<rfloor> = \<lfloor> ?a\<rfloor> div ?b ###symbols Rings.divide_class.divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Real.real_of_int :::: int \<Rightarrow> real Fields.inverse_class.inverse_divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Archimedean_Field.floor_ceiling_class.floor :::: 'a \<Rightarrow> int Groups.zero_class.zero :::: 'a ###defs class divide = fixes divide :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "div" 70) abbreviation real_of_int :: "int \<Rightarrow> real" where "real_of_int \<equiv> of_int" class inverse = divide + fixes inverse :: "'a \<Rightarrow> 'a" begin 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)" class zero = fixes zero :: 'a ("0")
###output ?H1 \<le> x_1 \<Longrightarrow> ?H2 (?H3 x_2 (?H4 x_1)) = ?H5 (?H2 x_2) x_1###end
Complete_Lattices
Complete_Lattices.Inter_Un_subset
lemma Inter_Un_subset: "\<Inter>A \<union> \<Inter>B \<subseteq> \<Inter>(A \<inter> B)"
\<Inter> ?A \<union> \<Inter> ?B \<subseteq> \<Inter> (?A \<inter> ?B)
?H1 (?H2 (?H3 x_1) (?H3 x_2)) (?H3 (?H4 x_1 x_2))
[ "Set.inter", "Complete_Lattices.Inter", "Set.union", "Set.subset_eq" ]
[ "'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set", "'a set set \\<Rightarrow> 'a set", "'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set", "'a set \\<Rightarrow> 'a set \\<Rightarrow> bool" ]
[ "abbreviation inter :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<inter>\" 70)\n where \"(\\<inter>) \\<equiv> inf\"", "abbreviation Inter :: \"'a set set \\<Rightarrow> 'a set\" (\"\\<Inter>\")\n where \"\\<Inter>S \\<equiv> \\<Sqinter>S\"", "abbreviation union :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<union>\" 65)\n where \"union \\<equiv> sup\"", "abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\"" ]
template
###lemma \<Inter> ?A \<union> \<Inter> ?B \<subseteq> \<Inter> (?A \<inter> ?B) ###symbols Set.inter :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set Complete_Lattices.Inter :::: 'a set set \<Rightarrow> 'a set Set.union :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool ###defs abbreviation inter :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<inter>" 70) where "(\<inter>) \<equiv> inf" abbreviation Inter :: "'a set set \<Rightarrow> 'a set" ("\<Inter>") where "\<Inter>S \<equiv> \<Sqinter>S" abbreviation union :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<union>" 65) where "union \<equiv> sup" abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool" where "subset_eq \<equiv> less_eq"
###output ?H1 (?H2 (?H3 x_1) (?H3 x_2)) (?H3 (?H4 x_1 x_2))###end
Bali/TypeRel
TypeRel.subclseq_trans
lemma subclseq_trans: "\<lbrakk>G\<turnstile>A \<preceq>\<^sub>C B; G\<turnstile>B \<preceq>\<^sub>C C\<rbrakk> \<Longrightarrow> G\<turnstile>A \<preceq>\<^sub>C C"
?G\<turnstile> ?A\<preceq>\<^sub>C ?B \<Longrightarrow> ?G\<turnstile> ?B\<preceq>\<^sub>C ?C \<Longrightarrow> ?G\<turnstile> ?A\<preceq>\<^sub>C ?C
\<lbrakk> ?H1 x_1 x_2 x_3; ?H1 x_1 x_3 x_4\<rbrakk> \<Longrightarrow> ?H1 x_1 x_2 x_4
[ "Decl.subclseq_syntax" ]
[ "prog \\<Rightarrow> qtname \\<Rightarrow> qtname \\<Rightarrow> bool" ]
[ "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>*\"" ]
template
###lemma ?G\<turnstile> ?A\<preceq>\<^sub>C ?B \<Longrightarrow> ?G\<turnstile> ?B\<preceq>\<^sub>C ?C \<Longrightarrow> ?G\<turnstile> ?A\<preceq>\<^sub>C ?C ###symbols Decl.subclseq_syntax :::: prog \<Rightarrow> qtname \<Rightarrow> qtname \<Rightarrow> bool ###defs 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>*"
###output \<lbrakk> ?H1 x_1 x_2 x_3; ?H1 x_1 x_3 x_4\<rbrakk> \<Longrightarrow> ?H1 x_1 x_2 x_4###end
Fun_Def_Base
Fun_Def_Base.termination_simp(12)
null
(?m = ?n) = (nat_of_natural ?m = nat_of_natural ?n)
(x_1 = x_2) = (?H1 x_1 = ?H1 x_2)
[ "Code_Numeral.natural.nat_of_natural" ]
[ "natural \\<Rightarrow> nat" ]
[ "typedef natural = \"UNIV :: nat set\"\n morphisms nat_of_natural natural_of_nat" ]
template
###lemma (?m = ?n) = (nat_of_natural ?m = nat_of_natural ?n) ###symbols Code_Numeral.natural.nat_of_natural :::: natural \<Rightarrow> nat ###defs typedef natural = "UNIV :: nat set" morphisms nat_of_natural natural_of_nat
###output (x_1 = x_2) = (?H1 x_1 = ?H1 x_2)###end