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
|
|---|---|---|---|---|---|---|---|---|---|---|
Cardinals/Wellorder_Extension
|
Wellorder_Extension.downset_on_empty
|
lemma downset_on_empty [simp]: "downset_on {} p"
|
downset_on {} ?p
|
?H1 ?H2 x_1
|
[
"Set.empty",
"Wellorder_Extension.downset_on"
] |
[
"'a set",
"'a set \\<Rightarrow> ('a \\<times> 'a) set \\<Rightarrow> bool"
] |
[
"abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"",
"definition downset_on where\n \"downset_on A r = (\\<forall>x y. (x, y) \\<in> r \\<and> y \\<in> A \\<longrightarrow> x \\<in> A)\""
] |
template
|
###lemma
downset_on {} ?p
###symbols
Set.empty :::: 'a set
Wellorder_Extension.downset_on :::: 'a set \<Rightarrow> ('a \<times> 'a) set \<Rightarrow> bool
###defs
abbreviation empty :: "'a set" ("{}")
where "{} \<equiv> bot"
definition downset_on where
"downset_on A r = (\<forall>x y. (x, y) \<in> r \<and> y \<in> A \<longrightarrow> x \<in> A)"
|
###output
?H1 ?H2 x_1###end
|
Nominal/Nominal
|
Nominal.supports_finite
|
lemma supports_finite:
fixes S :: "'x set"
and x :: "'a"
assumes a1: "S supports x"
and a2: "finite S"
shows "finite ((supp x)::'x set)"
|
?S supports ?x \<Longrightarrow> finite ?S \<Longrightarrow> finite (supp ?x)
|
\<lbrakk> ?H1 x_1 x_2; ?H2 x_1\<rbrakk> \<Longrightarrow> ?H2 (?H3 x_2)
|
[
"Nominal.supp",
"Finite_Set.finite",
"Nominal.supports"
] |
[
"'a \\<Rightarrow> 'b set",
"'a set \\<Rightarrow> bool",
"'a set \\<Rightarrow> 'b \\<Rightarrow> bool"
] |
[
"definition supp :: \"'a \\<Rightarrow> ('x set)\" where \n \"supp x = {a . (infinite {b . [(a,b)]\\<bullet>x \\<noteq> x})}\"",
"class finite =\n assumes finite_UNIV: \"finite (UNIV :: 'a set)\"\nbegin",
"definition supports :: \"'x set \\<Rightarrow> 'a \\<Rightarrow> bool\" (infixl \\<open>supports\\<close> 80) where\n \"S supports x \\<longleftrightarrow> (\\<forall>a b. (a\\<notin>S \\<and> b\\<notin>S \\<longrightarrow> [(a,b)]\\<bullet>x=x))\""
] |
template
|
###lemma
?S supports ?x \<Longrightarrow> finite ?S \<Longrightarrow> finite (supp ?x)
###symbols
Nominal.supp :::: 'a \<Rightarrow> 'b set
Finite_Set.finite :::: 'a set \<Rightarrow> bool
Nominal.supports :::: 'a set \<Rightarrow> 'b \<Rightarrow> bool
###defs
definition supp :: "'a \<Rightarrow> ('x set)" where
"supp x = {a . (infinite {b . [(a,b)]\<bullet>x \<noteq> x})}"
class finite =
assumes finite_UNIV: "finite (UNIV :: 'a set)"
begin
definition supports :: "'x set \<Rightarrow> 'a \<Rightarrow> bool" (infixl \<open>supports\<close> 80) where
"S supports x \<longleftrightarrow> (\<forall>a b. (a\<notin>S \<and> b\<notin>S \<longrightarrow> [(a,b)]\<bullet>x=x))"
|
###output
\<lbrakk> ?H1 x_1 x_2; ?H2 x_1\<rbrakk> \<Longrightarrow> ?H2 (?H3 x_2)###end
|
Transitive_Closure
|
Transitive_Closure.rtrancl_induct
| null |
(?a, ?b) \<in> ?r\<^sup>* \<Longrightarrow> ?P ?a \<Longrightarrow> (\<And>y z. (?a, y) \<in> ?r\<^sup>* \<Longrightarrow> (y, z) \<in> ?r \<Longrightarrow> ?P y \<Longrightarrow> ?P z) \<Longrightarrow> ?P ?b
|
\<lbrakk>(x_1, x_2) \<in> ?H1 x_3; x_4 x_1; \<And>y_0 y_1. \<lbrakk>(x_1, y_0) \<in> ?H1 x_3; (y_0, y_1) \<in> x_3; x_4 y_0\<rbrakk> \<Longrightarrow> x_4 y_1\<rbrakk> \<Longrightarrow> x_4 x_2
|
[
"Transitive_Closure.rtrancl"
] |
[
"('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>*\""
] |
template
|
###lemma
(?a, ?b) \<in> ?r\<^sup>* \<Longrightarrow> ?P ?a \<Longrightarrow> (\<And>y z. (?a, y) \<in> ?r\<^sup>* \<Longrightarrow> (y, z) \<in> ?r \<Longrightarrow> ?P y \<Longrightarrow> ?P z) \<Longrightarrow> ?P ?b
###symbols
Transitive_Closure.rtrancl :::: ('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>*"
|
###output
\<lbrakk>(x_1, x_2) \<in> ?H1 x_3; x_4 x_1; \<And>y_0 y_1. \<lbrakk>(x_1, y_0) \<in> ?H1 x_3; (y_0, y_1) \<in> x_3; x_4 y_0\<rbrakk> \<Longrightarrow> x_4 y_1\<rbrakk> \<Longrightarrow> x_4 x_2###end
|
Probability/Probability
|
Probability_Measure.distributedI_real
| null |
sets ?M1.0 = sigma_sets (space ?M1.0) ?E \<Longrightarrow> Int_stable ?E \<Longrightarrow> range ?A \<subseteq> ?E \<Longrightarrow> \<Union> (range ?A) = space ?M1.0 \<Longrightarrow> (\<And>i. emeasure (distr ?M ?M1.0 ?X) (?A i) \<noteq> \<infinity>) \<Longrightarrow> ?X \<in> ?M \<rightarrow>\<^sub>M ?M1.0 \<Longrightarrow> ?f \<in> borel_measurable ?M1.0 \<Longrightarrow> AE x in ?M1.0. 0 \<le> ?f x \<Longrightarrow> (\<And>A. A \<in> ?E \<Longrightarrow> emeasure ?M (?X -` A \<inter> space ?M) = \<integral>\<^sup>+ x. ennreal (?f x * indicat_real A x) \<partial> ?M1.0) \<Longrightarrow> distributed ?M ?M1.0 ?X (\<lambda>x. ennreal (?f x))
|
\<lbrakk> ?H1 x_1 = ?H2 (?H3 x_1) x_2; ?H4 x_2; ?H5 (?H6 x_3) x_2; ?H7 (?H6 x_3) = ?H3 x_1; \<And>y_1. ?H8 (?H9 x_4 x_1 x_5) (x_3 y_1) \<noteq> ?H10; x_5 \<in> ?H11 x_4 x_1; x_6 \<in> ?H12 x_1; ?H13 x_1 (\<lambda>y_2. ?H14 \<le> x_6 y_2); \<And>y_3. y_3 \<in> x_2 \<Longrightarrow> ?H8 x_4 (?H15 (?H16 x_5 y_3) (?H3 x_4)) = ?H17 x_1 (\<lambda>y_4. ?H18 (?H19 (x_6 y_4) (?H20 y_3 y_4)))\<rbrakk> \<Longrightarrow> ?H21 x_4 x_1 x_5 (\<lambda>y_5. ?H18 (x_6 y_5))
|
[
"Probability_Measure.distributed",
"Indicator_Function.indicat_real",
"Groups.times_class.times",
"Extended_Nonnegative_Real.ennreal",
"Nonnegative_Lebesgue_Integration.nn_integral",
"Set.vimage",
"Set.inter",
"Groups.zero_class.zero",
"Measure_Space.almost_everywhere",
"Borel_Space.borel_measurable",
"Sigma_Algebra.measurable",
"Extended_Nat.infinity_class.infinity",
"Measure_Space.distr",
"Sigma_Algebra.emeasure",
"Complete_Lattices.Union",
"Set.range",
"Set.subset_eq",
"Sigma_Algebra.Int_stable",
"Sigma_Algebra.space",
"Sigma_Algebra.sigma_sets",
"Sigma_Algebra.sets"
] |
[
"'a measure \\<Rightarrow> 'b measure \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('b \\<Rightarrow> ennreal) \\<Rightarrow> bool",
"'a set \\<Rightarrow> 'a \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"real \\<Rightarrow> ennreal",
"'a measure \\<Rightarrow> ('a \\<Rightarrow> ennreal) \\<Rightarrow> ennreal",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"'a",
"'a measure \\<Rightarrow> ('a \\<Rightarrow> bool) \\<Rightarrow> bool",
"'a measure \\<Rightarrow> ('a \\<Rightarrow> 'b) set",
"'a measure \\<Rightarrow> 'b measure \\<Rightarrow> ('a \\<Rightarrow> 'b) set",
"'a",
"'a measure \\<Rightarrow> 'b measure \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> 'b measure",
"'a measure \\<Rightarrow> 'a set \\<Rightarrow> ennreal",
"'a set set \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool",
"'a set set \\<Rightarrow> bool",
"'a measure \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a set set \\<Rightarrow> 'a set set",
"'a measure \\<Rightarrow> 'a set set"
] |
[
"definition distributed :: \"'a measure \\<Rightarrow> 'b measure \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('b \\<Rightarrow> ennreal) \\<Rightarrow> bool\"\nwhere\n \"distributed M N X f \\<longleftrightarrow>\n distr M N X = density N f \\<and> f \\<in> borel_measurable N \\<and> X \\<in> measurable M N\"",
"abbreviation indicat_real :: \"'a set \\<Rightarrow> 'a \\<Rightarrow> real\" where \"indicat_real S \\<equiv> indicator S\"",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"typedef ennreal = \"{x :: ereal. 0 \\<le> x}\"\n morphisms enn2ereal e2ennreal'",
"definition vimage :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set \\<Rightarrow> 'a set\" (infixr \"-`\" 90)\n where \"f -` B \\<equiv> {x. f x \\<in> B}\"",
"abbreviation inter :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<inter>\" 70)\n where \"(\\<inter>) \\<equiv> inf\"",
"class zero =\n fixes zero :: 'a (\"0\")",
"abbreviation almost_everywhere :: \"'a measure \\<Rightarrow> ('a \\<Rightarrow> bool) \\<Rightarrow> bool\" where\n \"almost_everywhere M P \\<equiv> eventually P (ae_filter M)\"",
"abbreviation \"borel_measurable M \\<equiv> measurable M borel\"",
"class infinity =\n fixes infinity :: \"'a\" (\"\\<infinity>\")",
"abbreviation Union :: \"'a set set \\<Rightarrow> 'a set\" (\"\\<Union>\")\n where \"\\<Union>S \\<equiv> \\<Squnion>S\"",
"abbreviation range :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set\" \\<comment> \\<open>of function\\<close>\n where \"range f \\<equiv> f ` UNIV\"",
"abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\""
] |
template
|
###lemma
sets ?M1.0 = sigma_sets (space ?M1.0) ?E \<Longrightarrow> Int_stable ?E \<Longrightarrow> range ?A \<subseteq> ?E \<Longrightarrow> \<Union> (range ?A) = space ?M1.0 \<Longrightarrow> (\<And>i. emeasure (distr ?M ?M1.0 ?X) (?A i) \<noteq> \<infinity>) \<Longrightarrow> ?X \<in> ?M \<rightarrow>\<^sub>M ?M1.0 \<Longrightarrow> ?f \<in> borel_measurable ?M1.0 \<Longrightarrow> AE x in ?M1.0. 0 \<le> ?f x \<Longrightarrow> (\<And>A. A \<in> ?E \<Longrightarrow> emeasure ?M (?X -` A \<inter> space ?M) = \<integral>\<^sup>+ x. ennreal (?f x * indicat_real A x) \<partial> ?M1.0) \<Longrightarrow> distributed ?M ?M1.0 ?X (\<lambda>x. ennreal (?f x))
###symbols
Probability_Measure.distributed :::: 'a measure \<Rightarrow> 'b measure \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('b \<Rightarrow> ennreal) \<Rightarrow> bool
Indicator_Function.indicat_real :::: 'a set \<Rightarrow> 'a \<Rightarrow> real
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Extended_Nonnegative_Real.ennreal :::: real \<Rightarrow> ennreal
Nonnegative_Lebesgue_Integration.nn_integral :::: 'a measure \<Rightarrow> ('a \<Rightarrow> ennreal) \<Rightarrow> ennreal
Set.vimage :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b set \<Rightarrow> 'a set
Set.inter :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set
Groups.zero_class.zero :::: 'a
Measure_Space.almost_everywhere :::: 'a measure \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool
Borel_Space.borel_measurable :::: 'a measure \<Rightarrow> ('a \<Rightarrow> 'b) set
Sigma_Algebra.measurable :::: 'a measure \<Rightarrow> 'b measure \<Rightarrow> ('a \<Rightarrow> 'b) set
Extended_Nat.infinity_class.infinity :::: 'a
Measure_Space.distr :::: 'a measure \<Rightarrow> 'b measure \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'b measure
Sigma_Algebra.emeasure :::: 'a measure \<Rightarrow> 'a set \<Rightarrow> ennreal
Complete_Lattices.Union :::: 'a set set \<Rightarrow> 'a set
Set.range :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b set
Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
Sigma_Algebra.Int_stable :::: 'a set set \<Rightarrow> bool
Sigma_Algebra.space :::: 'a measure \<Rightarrow> 'a set
Sigma_Algebra.sigma_sets :::: 'a set \<Rightarrow> 'a set set \<Rightarrow> 'a set set
Sigma_Algebra.sets :::: 'a measure \<Rightarrow> 'a set set
###defs
definition distributed :: "'a measure \<Rightarrow> 'b measure \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('b \<Rightarrow> ennreal) \<Rightarrow> bool"
where
"distributed M N X f \<longleftrightarrow>
distr M N X = density N f \<and> f \<in> borel_measurable N \<and> X \<in> measurable M N"
abbreviation indicat_real :: "'a set \<Rightarrow> 'a \<Rightarrow> real" where "indicat_real S \<equiv> indicator S"
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
typedef ennreal = "{x :: ereal. 0 \<le> x}"
morphisms enn2ereal e2ennreal'
definition vimage :: "('a \<Rightarrow> 'b) \<Rightarrow> 'b set \<Rightarrow> 'a set" (infixr "-`" 90)
where "f -` B \<equiv> {x. f x \<in> B}"
abbreviation inter :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<inter>" 70)
where "(\<inter>) \<equiv> inf"
class zero =
fixes zero :: 'a ("0")
abbreviation almost_everywhere :: "'a measure \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool" where
"almost_everywhere M P \<equiv> eventually P (ae_filter M)"
abbreviation "borel_measurable M \<equiv> measurable M borel"
class infinity =
fixes infinity :: "'a" ("\<infinity>")
abbreviation Union :: "'a set set \<Rightarrow> 'a set" ("\<Union>")
where "\<Union>S \<equiv> \<Squnion>S"
abbreviation range :: "('a \<Rightarrow> 'b) \<Rightarrow> 'b set" \<comment> \<open>of function\<close>
where "range f \<equiv> f ` UNIV"
abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset_eq \<equiv> less_eq"
|
###output
\<lbrakk> ?H1 x_1 = ?H2 (?H3 x_1) x_2; ?H4 x_2; ?H5 (?H6 x_3) x_2; ?H7 (?H6 x_3) = ?H3 x_1; \<And>y_1. ?H8 (?H9 x_4 x_1 x_5) (x_3 y_1) \<noteq> ?H10; x_5 \<in> ?H11 x_4 x_1; x_6 \<in> ?H12 x_1; ?H13 x_1 (\<lambda>y_2. ?H14 \<le> x_6 y_2); \<And>y_3. y_3 \<in> x_2 \<Longrightarrow> ?H8 x_4 (?H15 (?H16 x_5 y_3) (?H3 x_4)) = ?H17 x_1 (\<lambda>y_4. ?H18 (?H19 (x_6 y_4) (?H20 y_3 y_4)))\<rbrakk> \<Longrightarrow> ?H21 x_4 x_1 x_5 (\<lambda>y_5. ?H18 (x_6 y_5))###end
|
Library/Extended_Nat
|
Extended_Nat.plus_enat_simps(3)
|
lemma plus_enat_simps [simp, code]:
fixes q :: enat
shows "enat m + enat n = enat (m + n)"
and "\<infinity> + q = \<infinity>"
and "q + \<infinity> = \<infinity>"
|
?q + \<infinity> = \<infinity>
|
?H1 x_1 ?H2 = ?H2
|
[
"Extended_Nat.infinity_class.infinity",
"Groups.plus_class.plus"
] |
[
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a"
] |
[
"class infinity =\n fixes infinity :: \"'a\" (\"\\<infinity>\")",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)"
] |
template
|
###lemma
?q + \<infinity> = \<infinity>
###symbols
Extended_Nat.infinity_class.infinity :::: 'a
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
###defs
class infinity =
fixes infinity :: "'a" ("\<infinity>")
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
|
###output
?H1 x_1 ?H2 = ?H2###end
|
Analysis/Weierstrass_Theorems
|
Weierstrass_Theorems.path_polynomial_function
|
lemma path_polynomial_function:
fixes g :: "real \<Rightarrow> 'b::euclidean_space"
shows "polynomial_function g \<Longrightarrow> path g"
|
polynomial_function ?g \<Longrightarrow> path ?g
|
?H1 x_1 \<Longrightarrow> ?H2 x_1
|
[
"Path_Connected.path",
"Weierstrass_Theorems.polynomial_function"
] |
[
"(real \\<Rightarrow> 'a) \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b) \\<Rightarrow> bool"
] |
[] |
template
|
###lemma
polynomial_function ?g \<Longrightarrow> path ?g
###symbols
Path_Connected.path :::: (real \<Rightarrow> 'a) \<Rightarrow> bool
Weierstrass_Theorems.polynomial_function :::: ('a \<Rightarrow> 'b) \<Rightarrow> bool
###defs
|
###output
?H1 x_1 \<Longrightarrow> ?H2 x_1###end
|
TLA/Intensional
|
Intensional.int_simps(20)
|
lemma int_simps:
"\<turnstile> (x=x) = #True"
"\<turnstile> (\<not>#True) = #False" "\<turnstile> (\<not>#False) = #True" "\<turnstile> (\<not>\<not> P) = P"
"\<turnstile> ((\<not>P) = P) = #False" "\<turnstile> (P = (\<not>P)) = #False"
"\<turnstile> (P \<noteq> Q) = (P = (\<not>Q))"
"\<turnstile> (#True=P) = P" "\<turnstile> (P=#True) = P"
"\<turnstile> (#True \<longrightarrow> P) = P" "\<turnstile> (#False \<longrightarrow> P) = #True"
"\<turnstile> (P \<longrightarrow> #True) = #True" "\<turnstile> (P \<longrightarrow> P) = #True"
"\<turnstile> (P \<longrightarrow> #False) = (\<not>P)" "\<turnstile> (P \<longrightarrow> \<not>P) = (\<not>P)"
"\<turnstile> (P \<and> #True) = P" "\<turnstile> (#True \<and> P) = P"
"\<turnstile> (P \<and> #False) = #False" "\<turnstile> (#False \<and> P) = #False"
"\<turnstile> (P \<and> P) = P" "\<turnstile> (P \<and> \<not>P) = #False" "\<turnstile> (\<not>P \<and> P) = #False"
"\<turnstile> (P \<or> #True) = #True" "\<turnstile> (#True \<or> P) = #True"
"\<turnstile> (P \<or> #False) = P" "\<turnstile> (#False \<or> P) = P"
"\<turnstile> (P \<or> P) = P" "\<turnstile> (P \<or> \<not>P) = #True" "\<turnstile> (\<not>P \<or> P) = #True"
"\<turnstile> (\<forall>x. P) = P" "\<turnstile> (\<exists>x. P) = P"
"\<turnstile> (\<not>Q \<longrightarrow> \<not>P) = (P \<longrightarrow> Q)"
"\<turnstile> (P\<or>Q \<longrightarrow> R) = ((P\<longrightarrow>R)\<and>(Q\<longrightarrow>R))"
|
\<turnstile> (?P \<and> ?P) = ?P
|
?H1 (?H2 (=) (?H2 (\<and>) x_1 x_1) x_1)
|
[
"Intensional.lift2",
"Intensional.Valid"
] |
[
"('a \\<Rightarrow> 'b \\<Rightarrow> 'c) \\<Rightarrow> ('d \\<Rightarrow> 'a) \\<Rightarrow> ('d \\<Rightarrow> 'b) \\<Rightarrow> 'd \\<Rightarrow> 'c",
"('a \\<Rightarrow> bool) \\<Rightarrow> bool"
] |
[
"definition lift2 :: \"['a \\<Rightarrow> 'b \\<Rightarrow> 'c, ('w::world,'a) expr, ('w,'b) expr] \\<Rightarrow> ('w,'c) expr\"\n where unl_lift2: \"lift2 f x y w \\<equiv> f (x w) (y w)\"",
"definition Valid :: \"('w::world) form \\<Rightarrow> bool\"\n where \"Valid A \\<equiv> \\<forall>w. A w\""
] |
template
|
###lemma
\<turnstile> (?P \<and> ?P) = ?P
###symbols
Intensional.lift2 :::: ('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> ('d \<Rightarrow> 'a) \<Rightarrow> ('d \<Rightarrow> 'b) \<Rightarrow> 'd \<Rightarrow> 'c
Intensional.Valid :::: ('a \<Rightarrow> bool) \<Rightarrow> bool
###defs
definition lift2 :: "['a \<Rightarrow> 'b \<Rightarrow> 'c, ('w::world,'a) expr, ('w,'b) expr] \<Rightarrow> ('w,'c) expr"
where unl_lift2: "lift2 f x y w \<equiv> f (x w) (y w)"
definition Valid :: "('w::world) form \<Rightarrow> bool"
where "Valid A \<equiv> \<forall>w. A w"
|
###output
?H1 (?H2 (=) (?H2 (\<and>) x_1 x_1) x_1)###end
|
Library/Nonpos_Ints
|
Nonpos_Ints.uminus_in_Nats_iff
|
lemma uminus_in_Nats_iff: "-x \<in> \<nat> \<longleftrightarrow> x \<in> \<int>\<^sub>\<le>\<^sub>0"
|
(- ?x \<in> \<nat>) = (?x \<in> \<int>\<^sub>\<le>\<^sub>0)
|
(?H1 x_1 \<in> ?H2) = (x_1 \<in> ?H3)
|
[
"Nonpos_Ints.nonpos_Ints",
"Nat.semiring_1_class.Nats",
"Groups.uminus_class.uminus"
] |
[
"'a set",
"'a set",
"'a \\<Rightarrow> 'a"
] |
[
"definition nonpos_Ints (\"\\<int>\\<^sub>\\<le>\\<^sub>0\") where \"\\<int>\\<^sub>\\<le>\\<^sub>0 = {of_int n |n. n \\<le> 0}\"",
"class uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)"
] |
template
|
###lemma
(- ?x \<in> \<nat>) = (?x \<in> \<int>\<^sub>\<le>\<^sub>0)
###symbols
Nonpos_Ints.nonpos_Ints :::: 'a set
Nat.semiring_1_class.Nats :::: 'a set
Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a
###defs
definition nonpos_Ints ("\<int>\<^sub>\<le>\<^sub>0") where "\<int>\<^sub>\<le>\<^sub>0 = {of_int n |n. n \<le> 0}"
class uminus =
fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80)
|
###output
(?H1 x_1 \<in> ?H2) = (x_1 \<in> ?H3)###end
|
Nonstandard_Analysis/HyperDef
|
HyperDef.Standard_scaleR
|
lemma Standard_scaleR [simp]: "x \<in> Standard \<Longrightarrow> scaleR r x \<in> Standard"
|
?x \<in> Standard \<Longrightarrow> ?r *\<^sub>R ?x \<in> Standard
|
x_1 \<in> ?H1 \<Longrightarrow> ?H2 x_2 x_1 \<in> ?H1
|
[
"Real_Vector_Spaces.scaleR_class.scaleR",
"StarDef.Standard"
] |
[
"real \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a star set"
] |
[
"class scaleR =\n fixes scaleR :: \"real \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixr \"*\\<^sub>R\" 75)\nbegin",
"definition Standard :: \"'a star set\"\n where \"Standard = range star_of\""
] |
template
|
###lemma
?x \<in> Standard \<Longrightarrow> ?r *\<^sub>R ?x \<in> Standard
###symbols
Real_Vector_Spaces.scaleR_class.scaleR :::: real \<Rightarrow> 'a \<Rightarrow> 'a
StarDef.Standard :::: 'a star set
###defs
class scaleR =
fixes scaleR :: "real \<Rightarrow> 'a \<Rightarrow> 'a" (infixr "*\<^sub>R" 75)
begin
definition Standard :: "'a star set"
where "Standard = range star_of"
|
###output
x_1 \<in> ?H1 \<Longrightarrow> ?H2 x_2 x_1 \<in> ?H1###end
|
Set
|
Set.insert_ident
|
lemma insert_ident: "x \<notin> A \<Longrightarrow> x \<notin> B \<Longrightarrow> insert x A = insert x B \<longleftrightarrow> A = B"
|
?x \<notin> ?A \<Longrightarrow> ?x \<notin> ?B \<Longrightarrow> (insert ?x ?A = insert ?x ?B) = (?A = ?B)
|
\<lbrakk> ?H1 x_1 x_2; ?H1 x_1 x_3\<rbrakk> \<Longrightarrow> (?H2 x_1 x_2 = ?H2 x_1 x_3) = (x_2 = x_3)
|
[
"Set.insert",
"Set.not_member"
] |
[
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"'a \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"definition insert :: \"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set\"\n where insert_compr: \"insert a B = {x. x = a \\<or> x \\<in> B}\"",
"abbreviation not_member\n where \"not_member x A \\<equiv> \\<not> (x \\<in> A)\" \\<comment> \\<open>non-membership\\<close>"
] |
template
|
###lemma
?x \<notin> ?A \<Longrightarrow> ?x \<notin> ?B \<Longrightarrow> (insert ?x ?A = insert ?x ?B) = (?A = ?B)
###symbols
Set.insert :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a set
Set.not_member :::: 'a \<Rightarrow> 'a set \<Rightarrow> bool
###defs
definition insert :: "'a \<Rightarrow> 'a set \<Rightarrow> 'a set"
where insert_compr: "insert a B = {x. x = a \<or> x \<in> B}"
abbreviation not_member
where "not_member x A \<equiv> \<not> (x \<in> A)" \<comment> \<open>non-membership\<close>
|
###output
\<lbrakk> ?H1 x_1 x_2; ?H1 x_1 x_3\<rbrakk> \<Longrightarrow> (?H2 x_1 x_2 = ?H2 x_1 x_3) = (x_2 = x_3)###end
|
Nominal/Examples/Height
|
Height.abs_fresh(1)
| null |
?b \<sharp> [ ?a]. ?x = (?b = ?a \<or> ?b \<sharp> ?x)
|
?H1 x_1 (?H2 x_2 x_3) = (x_1 = x_2 \<or> ?H1 x_1 x_3)
|
[
"Nominal.abs_fun",
"Nominal.fresh"
] |
[
"'a \\<Rightarrow> 'b \\<Rightarrow> 'a \\<Rightarrow> 'b noption",
"'a \\<Rightarrow> 'b \\<Rightarrow> bool"
] |
[
"definition abs_fun :: \"'x\\<Rightarrow>'a\\<Rightarrow>('x\\<Rightarrow>('a noption))\" (\\<open>[_]._\\<close> [100,100] 100) where \n \"[a].x \\<equiv> (\\<lambda>b. (if b=a then nSome(x) else (if b\\<sharp>x then nSome([(a,b)]\\<bullet>x) else nNone)))\"",
"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
?b \<sharp> [ ?a]. ?x = (?b = ?a \<or> ?b \<sharp> ?x)
###symbols
Nominal.abs_fun :::: 'a \<Rightarrow> 'b \<Rightarrow> 'a \<Rightarrow> 'b noption
Nominal.fresh :::: 'a \<Rightarrow> 'b \<Rightarrow> bool
###defs
definition abs_fun :: "'x\<Rightarrow>'a\<Rightarrow>('x\<Rightarrow>('a noption))" (\<open>[_]._\<close> [100,100] 100) where
"[a].x \<equiv> (\<lambda>b. (if b=a then nSome(x) else (if b\<sharp>x then nSome([(a,b)]\<bullet>x) else nNone)))"
definition fresh :: "'x \<Rightarrow> 'a \<Rightarrow> bool" (\<open>_ \<sharp> _\<close> [80,80] 80) where
"a \<sharp> x \<longleftrightarrow> a \<notin> supp x"
|
###output
?H1 x_1 (?H2 x_2 x_3) = (x_1 = x_2 \<or> ?H1 x_1 x_3)###end
|
Analysis/Further_Topology
|
Further_Topology.inessential_on_clopen_Union
|
lemma inessential_on_clopen_Union:
fixes \<F> :: "'a::euclidean_space set set"
assumes T: "path_connected T"
and "\<And>S. S \<in> \<F> \<Longrightarrow> closedin (top_of_set (\<Union>\<F>)) S"
and "\<And>S. S \<in> \<F> \<Longrightarrow> openin (top_of_set (\<Union>\<F>)) S"
and hom: "\<And>S. S \<in> \<F> \<Longrightarrow> \<exists>a. homotopic_with_canon (\<lambda>x. True) S T f (\<lambda>x. a)"
obtains a where "homotopic_with_canon (\<lambda>x. True) (\<Union>\<F>) T f (\<lambda>x. a)"
|
path_connected ?T \<Longrightarrow> (\<And>S. S \<in> ?\<F> \<Longrightarrow> closedin (top_of_set (\<Union> ?\<F>)) S) \<Longrightarrow> (\<And>S. S \<in> ?\<F> \<Longrightarrow> openin (top_of_set (\<Union> ?\<F>)) S) \<Longrightarrow> (\<And>S. S \<in> ?\<F> \<Longrightarrow> \<exists>a. homotopic_with_canon (\<lambda>x. True) S ?T ?f (\<lambda>x. a)) \<Longrightarrow> (\<And>a. homotopic_with_canon (\<lambda>x. True) (\<Union> ?\<F>) ?T ?f (\<lambda>x. a) \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
|
\<lbrakk> ?H1 x_1; \<And>y_0. y_0 \<in> x_2 \<Longrightarrow> ?H2 (?H3 (?H4 x_2)) y_0; \<And>y_1. y_1 \<in> x_2 \<Longrightarrow> ?H5 (?H3 (?H4 x_2)) y_1; \<And>y_2. y_2 \<in> x_2 \<Longrightarrow> \<exists>y_3. ?H6 (\<lambda>y_4. True) y_2 x_1 x_3 (\<lambda>y_5. y_3); \<And>y_6. ?H6 (\<lambda>y_7. True) (?H4 x_2) x_1 x_3 (\<lambda>y_8. y_6) \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_4
|
[
"Homotopy.homotopic_with_canon",
"Abstract_Topology.topology.openin",
"Complete_Lattices.Union",
"Abstract_Topology.top_of_set",
"Abstract_Topology.closedin",
"Path_Connected.path_connected"
] |
[
"(('a \\<Rightarrow> 'b) \\<Rightarrow> bool) \\<Rightarrow> 'a set \\<Rightarrow> 'b set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"'a topology \\<Rightarrow> 'a set \\<Rightarrow> bool",
"'a set set \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a topology",
"'a topology \\<Rightarrow> 'a set \\<Rightarrow> bool",
"'a set \\<Rightarrow> bool"
] |
[
"abbreviation homotopic_with_canon ::\n \"[('a::topological_space \\<Rightarrow> 'b::topological_space) \\<Rightarrow> bool, 'a set, 'b set, 'a \\<Rightarrow> 'b, 'a \\<Rightarrow> 'b] \\<Rightarrow> bool\"\nwhere\n \"homotopic_with_canon P S T p q \\<equiv> homotopic_with P (top_of_set S) (top_of_set T) p q\"",
"abbreviation Union :: \"'a set set \\<Rightarrow> 'a set\" (\"\\<Union>\")\n where \"\\<Union>S \\<equiv> \\<Squnion>S\"",
"abbreviation top_of_set :: \"'a::topological_space set \\<Rightarrow> 'a topology\"\n where \"top_of_set \\<equiv> subtopology (topology open)\""
] |
template
|
###lemma
path_connected ?T \<Longrightarrow> (\<And>S. S \<in> ?\<F> \<Longrightarrow> closedin (top_of_set (\<Union> ?\<F>)) S) \<Longrightarrow> (\<And>S. S \<in> ?\<F> \<Longrightarrow> openin (top_of_set (\<Union> ?\<F>)) S) \<Longrightarrow> (\<And>S. S \<in> ?\<F> \<Longrightarrow> \<exists>a. homotopic_with_canon (\<lambda>x. True) S ?T ?f (\<lambda>x. a)) \<Longrightarrow> (\<And>a. homotopic_with_canon (\<lambda>x. True) (\<Union> ?\<F>) ?T ?f (\<lambda>x. a) \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
###symbols
Homotopy.homotopic_with_canon :::: (('a \<Rightarrow> 'b) \<Rightarrow> bool) \<Rightarrow> 'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
Abstract_Topology.topology.openin :::: 'a topology \<Rightarrow> 'a set \<Rightarrow> bool
Complete_Lattices.Union :::: 'a set set \<Rightarrow> 'a set
Abstract_Topology.top_of_set :::: 'a set \<Rightarrow> 'a topology
Abstract_Topology.closedin :::: 'a topology \<Rightarrow> 'a set \<Rightarrow> bool
Path_Connected.path_connected :::: 'a set \<Rightarrow> bool
###defs
abbreviation homotopic_with_canon ::
"[('a::topological_space \<Rightarrow> 'b::topological_space) \<Rightarrow> bool, 'a set, 'b set, 'a \<Rightarrow> 'b, 'a \<Rightarrow> 'b] \<Rightarrow> bool"
where
"homotopic_with_canon P S T p q \<equiv> homotopic_with P (top_of_set S) (top_of_set T) p q"
abbreviation Union :: "'a set set \<Rightarrow> 'a set" ("\<Union>")
where "\<Union>S \<equiv> \<Squnion>S"
abbreviation top_of_set :: "'a::topological_space set \<Rightarrow> 'a topology"
where "top_of_set \<equiv> subtopology (topology open)"
|
###output
\<lbrakk> ?H1 x_1; \<And>y_0. y_0 \<in> x_2 \<Longrightarrow> ?H2 (?H3 (?H4 x_2)) y_0; \<And>y_1. y_1 \<in> x_2 \<Longrightarrow> ?H5 (?H3 (?H4 x_2)) y_1; \<And>y_2. y_2 \<in> x_2 \<Longrightarrow> \<exists>y_3. ?H6 (\<lambda>y_4. True) y_2 x_1 x_3 (\<lambda>y_5. y_3); \<And>y_6. ?H6 (\<lambda>y_7. True) (?H4 x_2) x_1 x_3 (\<lambda>y_8. y_6) \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_4###end
|
Nominal/Examples/Crary
|
Crary.fresh_eqvt
| null |
?pi \<bullet> ?a \<sharp> ?x = ?pi \<bullet> ?a \<sharp> ?pi \<bullet> ?x
|
?H1 x_1 (?H2 x_2 x_3) = ?H2 (?H1 x_1 x_2) (?H1 x_1 x_3)
|
[
"Nominal.fresh",
"Nominal.perm"
] |
[
"'a \\<Rightarrow> 'b \\<Rightarrow> bool",
"('a \\<times> 'a) list \\<Rightarrow> 'b \\<Rightarrow> 'b"
] |
[
"definition fresh :: \"'x \\<Rightarrow> 'a \\<Rightarrow> bool\" (\\<open>_ \\<sharp> _\\<close> [80,80] 80) where\n \"a \\<sharp> x \\<longleftrightarrow> a \\<notin> supp x\"",
"consts \n perm :: \"'x prm \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixr \\<open>\\<bullet>\\<close> 80)\n swap :: \"('x \\<times> 'x) \\<Rightarrow> 'x \\<Rightarrow> 'x\""
] |
template
|
###lemma
?pi \<bullet> ?a \<sharp> ?x = ?pi \<bullet> ?a \<sharp> ?pi \<bullet> ?x
###symbols
Nominal.fresh :::: 'a \<Rightarrow> 'b \<Rightarrow> bool
Nominal.perm :::: ('a \<times> 'a) list \<Rightarrow> 'b \<Rightarrow> 'b
###defs
definition fresh :: "'x \<Rightarrow> 'a \<Rightarrow> bool" (\<open>_ \<sharp> _\<close> [80,80] 80) where
"a \<sharp> x \<longleftrightarrow> a \<notin> supp x"
consts
perm :: "'x prm \<Rightarrow> 'a \<Rightarrow> 'a" (infixr \<open>\<bullet>\<close> 80)
swap :: "('x \<times> 'x) \<Rightarrow> 'x \<Rightarrow> 'x"
|
###output
?H1 x_1 (?H2 x_2 x_3) = ?H2 (?H1 x_1 x_2) (?H1 x_1 x_3)###end
|
Library/Extended_Real
|
Extended_Real.ereal_LimI_finite_iff
|
lemma ereal_LimI_finite_iff:
fixes x :: ereal
assumes "\<bar>x\<bar> \<noteq> \<infinity>"
shows "u \<longlonglongrightarrow> x \<longleftrightarrow> (\<forall>r. 0 < r \<longrightarrow> (\<exists>N. \<forall>n\<ge>N. u n < x + r \<and> x < u n + r))"
(is "?lhs \<longleftrightarrow> ?rhs")
|
\<bar> ?x\<bar> \<noteq> \<infinity> \<Longrightarrow> ?u \<longlonglongrightarrow> ?x = (\<forall>r>0. \<exists>N. \<forall>n\<ge>N. ?u n < ?x + r \<and> ?x < ?u n + r)
|
?H1 x_1 \<noteq> ?H2 \<Longrightarrow> ?H3 x_2 x_1 = (\<forall>y_0> ?H4. \<exists>y_1. \<forall>y_2\<ge>y_1. x_2 y_2 < ?H5 x_1 y_0 \<and> x_1 < ?H5 (x_2 y_2) y_0)
|
[
"Groups.plus_class.plus",
"Groups.zero_class.zero",
"Topological_Spaces.topological_space_class.LIMSEQ",
"Extended_Nat.infinity_class.infinity",
"Groups.abs_class.abs"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a",
"(nat \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> bool",
"'a",
"'a \\<Rightarrow> 'a"
] |
[
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"class zero =\n fixes zero :: 'a (\"0\")",
"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 infinity =\n fixes infinity :: \"'a\" (\"\\<infinity>\")",
"class abs =\n fixes abs :: \"'a \\<Rightarrow> 'a\" (\"\\<bar>_\\<bar>\")"
] |
template
|
###lemma
\<bar> ?x\<bar> \<noteq> \<infinity> \<Longrightarrow> ?u \<longlonglongrightarrow> ?x = (\<forall>r>0. \<exists>N. \<forall>n\<ge>N. ?u n < ?x + r \<and> ?x < ?u n + r)
###symbols
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.zero_class.zero :::: 'a
Topological_Spaces.topological_space_class.LIMSEQ :::: (nat \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> bool
Extended_Nat.infinity_class.infinity :::: 'a
Groups.abs_class.abs :::: 'a \<Rightarrow> 'a
###defs
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
class zero =
fixes zero :: 'a ("0")
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 infinity =
fixes infinity :: "'a" ("\<infinity>")
class abs =
fixes abs :: "'a \<Rightarrow> 'a" ("\<bar>_\<bar>")
|
###output
?H1 x_1 \<noteq> ?H2 \<Longrightarrow> ?H3 x_2 x_1 = (\<forall>y_0> ?H4. \<exists>y_1. \<forall>y_2\<ge>y_1. x_2 y_2 < ?H5 x_1 y_0 \<and> x_1 < ?H5 (x_2 y_2) y_0)###end
|
Analysis/Product_Topology
|
Product_Topology.homeomorphic_space_prod_topology_sing1
|
lemma homeomorphic_space_prod_topology_sing1:
"b \<in> topspace Y \<Longrightarrow> X homeomorphic_space (prod_topology X (subtopology Y {b}))"
|
?b \<in> topspace ?Y \<Longrightarrow> ?X homeomorphic_space prod_topology ?X (subtopology ?Y { ?b})
|
x_1 \<in> ?H1 x_2 \<Longrightarrow> ?H2 x_3 (?H3 x_3 (?H4 x_2 (?H5 x_1 ?H6)))
|
[
"Set.empty",
"Set.insert",
"Abstract_Topology.subtopology",
"Product_Topology.prod_topology",
"Abstract_Topology.homeomorphic_space",
"Abstract_Topology.topspace"
] |
[
"'a set",
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"'a topology \\<Rightarrow> 'a set \\<Rightarrow> 'a topology",
"'a topology \\<Rightarrow> 'b topology \\<Rightarrow> ('a \\<times> 'b) topology",
"'a topology \\<Rightarrow> 'b topology \\<Rightarrow> bool",
"'a topology \\<Rightarrow> 'a set"
] |
[
"abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"",
"definition insert :: \"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set\"\n where insert_compr: \"insert a B = {x. x = a \\<or> x \\<in> B}\"",
"definition prod_topology :: \"'a topology \\<Rightarrow> 'b topology \\<Rightarrow> ('a \\<times> 'b) topology\" where\n \"prod_topology X Y \\<equiv> topology (arbitrary union_of (\\<lambda>U. U \\<in> {S \\<times> T |S T. openin X S \\<and> openin Y T}))\"",
"definition homeomorphic_space (infixr \"homeomorphic'_space\" 50)\n where \"X homeomorphic_space Y \\<equiv> \\<exists>f g. homeomorphic_maps X Y f g\"",
"definition \"topspace T = \\<Union>{S. openin T S}\""
] |
template
|
###lemma
?b \<in> topspace ?Y \<Longrightarrow> ?X homeomorphic_space prod_topology ?X (subtopology ?Y { ?b})
###symbols
Set.empty :::: 'a set
Set.insert :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a set
Abstract_Topology.subtopology :::: 'a topology \<Rightarrow> 'a set \<Rightarrow> 'a topology
Product_Topology.prod_topology :::: 'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<times> 'b) topology
Abstract_Topology.homeomorphic_space :::: 'a topology \<Rightarrow> 'b topology \<Rightarrow> bool
Abstract_Topology.topspace :::: 'a topology \<Rightarrow> 'a set
###defs
abbreviation empty :: "'a set" ("{}")
where "{} \<equiv> bot"
definition insert :: "'a \<Rightarrow> 'a set \<Rightarrow> 'a set"
where insert_compr: "insert a B = {x. x = a \<or> x \<in> B}"
definition prod_topology :: "'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<times> 'b) topology" where
"prod_topology X Y \<equiv> topology (arbitrary union_of (\<lambda>U. U \<in> {S \<times> T |S T. openin X S \<and> openin Y T}))"
definition homeomorphic_space (infixr "homeomorphic'_space" 50)
where "X homeomorphic_space Y \<equiv> \<exists>f g. homeomorphic_maps X Y f g"
definition "topspace T = \<Union>{S. openin T S}"
|
###output
x_1 \<in> ?H1 x_2 \<Longrightarrow> ?H2 x_3 (?H3 x_3 (?H4 x_2 (?H5 x_1 ?H6)))###end
|
Library/Countable_Set_Type
|
Countable_Set_Type.cInt_cDiff
| null |
cDiff (cInt ?A ?B) ?C = cInt ?A (cDiff ?B ?C)
|
?H1 (?H2 x_1 x_2) x_3 = ?H2 x_1 (?H1 x_2 x_3)
|
[
"Countable_Set_Type.cInt",
"Countable_Set_Type.cDiff"
] |
[
"'a cset \\<Rightarrow> 'a cset \\<Rightarrow> 'a cset",
"'a cset \\<Rightarrow> 'a cset \\<Rightarrow> 'a cset"
] |
[
"abbreviation cInt :: \"'a cset \\<Rightarrow> 'a cset \\<Rightarrow> 'a cset\" where \"cInt xs ys \\<equiv> inf xs ys\"",
"abbreviation cDiff :: \"'a cset \\<Rightarrow> 'a cset \\<Rightarrow> 'a cset\" where \"cDiff xs ys \\<equiv> minus xs ys\""
] |
template
|
###lemma
cDiff (cInt ?A ?B) ?C = cInt ?A (cDiff ?B ?C)
###symbols
Countable_Set_Type.cInt :::: 'a cset \<Rightarrow> 'a cset \<Rightarrow> 'a cset
Countable_Set_Type.cDiff :::: 'a cset \<Rightarrow> 'a cset \<Rightarrow> 'a cset
###defs
abbreviation cInt :: "'a cset \<Rightarrow> 'a cset \<Rightarrow> 'a cset" where "cInt xs ys \<equiv> inf xs ys"
abbreviation cDiff :: "'a cset \<Rightarrow> 'a cset \<Rightarrow> 'a cset" where "cDiff xs ys \<equiv> minus xs ys"
|
###output
?H1 (?H2 x_1 x_2) x_3 = ?H2 x_1 (?H1 x_2 x_3)###end
|
Analysis/Cartesian_Space
|
Cartesian_Space.full_rank_surjective
|
lemma full_rank_surjective:
fixes A :: "real^'n^'m"
shows "rank A = CARD('m) \<longleftrightarrow> surj ((*v) A)"
|
(rank ?A = CARD(?'m)) = surj ((*v) ?A)
|
(?H1 x_1 = ?H2 ?H3) = ?H4 (?H5 x_1)
|
[
"Finite_Cartesian_Product.matrix_vector_mult",
"Fun.surj",
"Set.UNIV",
"Finite_Set.card",
"Cartesian_Space.rank"
] |
[
"(('a, 'b) vec, 'c) vec \\<Rightarrow> ('a, 'b) vec \\<Rightarrow> ('a, 'c) vec",
"('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"'a set",
"'a set \\<Rightarrow> nat",
"(('a, 'b) vec, 'c) vec \\<Rightarrow> nat"
] |
[
"abbreviation surj :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> bool\"\n where \"surj f \\<equiv> range f = UNIV\"",
"abbreviation UNIV :: \"'a set\"\n where \"UNIV \\<equiv> top\""
] |
template
|
###lemma
(rank ?A = CARD(?'m)) = surj ((*v) ?A)
###symbols
Finite_Cartesian_Product.matrix_vector_mult :::: (('a, 'b) vec, 'c) vec \<Rightarrow> ('a, 'b) vec \<Rightarrow> ('a, 'c) vec
Fun.surj :::: ('a \<Rightarrow> 'b) \<Rightarrow> bool
Set.UNIV :::: 'a set
Finite_Set.card :::: 'a set \<Rightarrow> nat
Cartesian_Space.rank :::: (('a, 'b) vec, 'c) vec \<Rightarrow> nat
###defs
abbreviation surj :: "('a \<Rightarrow> 'b) \<Rightarrow> bool"
where "surj f \<equiv> range f = UNIV"
abbreviation UNIV :: "'a set"
where "UNIV \<equiv> top"
|
###output
(?H1 x_1 = ?H2 ?H3) = ?H4 (?H5 x_1)###end
|
List
|
List.in_listspI
|
lemma in_listspI [intro!]: "\<forall>x\<in>set xs. A x \<Longrightarrow> listsp A xs"
|
\<forall>x\<in>set ?xs. ?A x \<Longrightarrow> listsp ?A ?xs
|
\<forall>y_0\<in> ?H1 x_1. x_2 y_0 \<Longrightarrow> ?H2 x_2 x_1
|
[
"List.listsp",
"List.list.set"
] |
[
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> bool",
"'a list \\<Rightarrow> 'a set"
] |
[
"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
\<forall>x\<in>set ?xs. ?A x \<Longrightarrow> listsp ?A ?xs
###symbols
List.listsp :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> bool
List.list.set :::: 'a list \<Rightarrow> 'a set
###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 [] = []"
|
###output
\<forall>y_0\<in> ?H1 x_1. x_2 y_0 \<Longrightarrow> ?H2 x_2 x_1###end
|
Transfer
|
Transfer.transfer_raw(203)
| null |
Transfer.Rel (rel_fun (rel_prod ?A ?B) ?B) snd snd
|
?H1 (?H2 (?H3 x_1 x_2) x_2) ?H4 ?H4
|
[
"Product_Type.prod.snd",
"Basic_BNFs.rel_prod",
"BNF_Def.rel_fun",
"Transfer.Rel"
] |
[
"'a \\<times> 'b \\<Rightarrow> 'b",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> 'a \\<times> 'c \\<Rightarrow> 'b \\<times> '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"
] |
[
"definition \"prod = {f. \\<exists>a b. f = Pair_Rep (a::'a) (b::'b)}\"",
"inductive\n rel_prod :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> 'a \\<times> 'c \\<Rightarrow> 'b \\<times> 'd \\<Rightarrow> bool\" for R1 R2\nwhere\n \"\\<lbrakk>R1 a b; R2 c d\\<rbrakk> \\<Longrightarrow> rel_prod R1 R2 (a, c) (b, 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_prod ?A ?B) ?B) snd snd
###symbols
Product_Type.prod.snd :::: 'a \<times> 'b \<Rightarrow> 'b
Basic_BNFs.rel_prod :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> 'a \<times> 'c \<Rightarrow> 'b \<times> '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
definition "prod = {f. \<exists>a b. f = Pair_Rep (a::'a) (b::'b)}"
inductive
rel_prod :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> 'a \<times> 'c \<Rightarrow> 'b \<times> 'd \<Rightarrow> bool" for R1 R2
where
"\<lbrakk>R1 a b; R2 c d\<rbrakk> \<Longrightarrow> rel_prod R1 R2 (a, c) (b, 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 (?H3 x_1 x_2) x_2) ?H4 ?H4###end
|
Number_Theory/Pocklington
|
Pocklington.finite_number_segment
|
lemma finite_number_segment: "card { m. 0 < m \<and> m < n } = n - 1"
|
card {m. 0 < m \<and> m < ?n} = ?n - 1
|
?H1 (?H2 (\<lambda>y_0. ?H3 < y_0 \<and> y_0 < x_1)) = ?H4 x_1 ?H5
|
[
"Groups.one_class.one",
"Groups.minus_class.minus",
"Groups.zero_class.zero",
"Set.Collect",
"Finite_Set.card"
] |
[
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> nat"
] |
[
"class one =\n fixes one :: 'a (\"1\")",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)",
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
card {m. 0 < m \<and> m < ?n} = ?n - 1
###symbols
Groups.one_class.one :::: 'a
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.zero_class.zero :::: 'a
Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set
Finite_Set.card :::: 'a set \<Rightarrow> nat
###defs
class one =
fixes one :: 'a ("1")
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
class zero =
fixes zero :: 'a ("0")
|
###output
?H1 (?H2 (\<lambda>y_0. ?H3 < y_0 \<and> y_0 < x_1)) = ?H4 x_1 ?H5###end
|
Bali/Trans
|
Transfer.transfer_start
| null |
?P \<Longrightarrow> Transfer.Rel (=) ?P ?Q \<Longrightarrow> ?Q
|
\<lbrakk>x_1; ?H1 (=) x_1 x_2\<rbrakk> \<Longrightarrow> x_2
|
[
"Transfer.Rel"
] |
[
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'b \\<Rightarrow> bool"
] |
[
"definition Rel :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'b \\<Rightarrow> bool\"\n where \"Rel r \\<equiv> r\""
] |
template
|
###lemma
?P \<Longrightarrow> Transfer.Rel (=) ?P ?Q \<Longrightarrow> ?Q
###symbols
Transfer.Rel :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool
###defs
definition Rel :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool"
where "Rel r \<equiv> r"
|
###output
\<lbrakk>x_1; ?H1 (=) x_1 x_2\<rbrakk> \<Longrightarrow> x_2###end
|
Analysis/Derivative
|
Derivative.field_differentiable_minus
|
lemma field_differentiable_minus [derivative_intros]:
"f field_differentiable F \<Longrightarrow> (\<lambda>z. - (f z)) field_differentiable F"
|
?f field_differentiable ?F \<Longrightarrow> (\<lambda>z. - ?f z) field_differentiable ?F
|
?H1 x_1 x_2 \<Longrightarrow> ?H1 (\<lambda>y_0. ?H2 (x_1 y_0)) x_2
|
[
"Groups.uminus_class.uminus",
"Derivative.field_differentiable"
] |
[
"'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'a) \\<Rightarrow> 'a filter \\<Rightarrow> bool"
] |
[
"class uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)"
] |
template
|
###lemma
?f field_differentiable ?F \<Longrightarrow> (\<lambda>z. - ?f z) field_differentiable ?F
###symbols
Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a
Derivative.field_differentiable :::: ('a \<Rightarrow> 'a) \<Rightarrow> 'a filter \<Rightarrow> bool
###defs
class uminus =
fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80)
|
###output
?H1 x_1 x_2 \<Longrightarrow> ?H1 (\<lambda>y_0. ?H2 (x_1 y_0)) x_2###end
|
Library/Countable_Set_Type
|
Countable_Set_Type.cDiff_idemp
| null |
cDiff (cDiff ?A ?B) ?B = cDiff ?A ?B
|
?H1 (?H1 x_1 x_2) x_2 = ?H1 x_1 x_2
|
[
"Countable_Set_Type.cDiff"
] |
[
"'a cset \\<Rightarrow> 'a cset \\<Rightarrow> 'a cset"
] |
[
"abbreviation cDiff :: \"'a cset \\<Rightarrow> 'a cset \\<Rightarrow> 'a cset\" where \"cDiff xs ys \\<equiv> minus xs ys\""
] |
template
|
###lemma
cDiff (cDiff ?A ?B) ?B = cDiff ?A ?B
###symbols
Countable_Set_Type.cDiff :::: 'a cset \<Rightarrow> 'a cset \<Rightarrow> 'a cset
###defs
abbreviation cDiff :: "'a cset \<Rightarrow> 'a cset \<Rightarrow> 'a cset" where "cDiff xs ys \<equiv> minus xs ys"
|
###output
?H1 (?H1 x_1 x_2) x_2 = ?H1 x_1 x_2###end
|
HOLCF/UpperPD
|
UpperPD.upper_le_minimal
|
lemma upper_le_minimal [simp]: "PDUnit compact_bot \<le>\<sharp> t"
|
PDUnit compact_bot \<le>\<sharp> ?t
|
?H1 (?H2 ?H3) x_1
|
[
"Universal.compact_bot",
"Compact_Basis.PDUnit",
"UpperPD.upper_le"
] |
[
"'a compact_basis",
"'a compact_basis \\<Rightarrow> 'a pd_basis",
"'a pd_basis \\<Rightarrow> 'a pd_basis \\<Rightarrow> bool"
] |
[
"definition\n compact_bot :: \"'a::pcpo compact_basis\" where\n \"compact_bot = Abs_compact_basis \\<bottom>\"",
"definition\n PDUnit :: \"'a compact_basis \\<Rightarrow> 'a pd_basis\" where\n \"PDUnit = (\\<lambda>x. Abs_pd_basis {x})\"",
"definition\n upper_le :: \"'a pd_basis \\<Rightarrow> 'a pd_basis \\<Rightarrow> bool\" (infix \"\\<le>\\<sharp>\" 50) where\n \"upper_le = (\\<lambda>u v. \\<forall>y\\<in>Rep_pd_basis v. \\<exists>x\\<in>Rep_pd_basis u. x \\<sqsubseteq> y)\""
] |
template
|
###lemma
PDUnit compact_bot \<le>\<sharp> ?t
###symbols
Universal.compact_bot :::: 'a compact_basis
Compact_Basis.PDUnit :::: 'a compact_basis \<Rightarrow> 'a pd_basis
UpperPD.upper_le :::: 'a pd_basis \<Rightarrow> 'a pd_basis \<Rightarrow> bool
###defs
definition
compact_bot :: "'a::pcpo compact_basis" where
"compact_bot = Abs_compact_basis \<bottom>"
definition
PDUnit :: "'a compact_basis \<Rightarrow> 'a pd_basis" where
"PDUnit = (\<lambda>x. Abs_pd_basis {x})"
definition
upper_le :: "'a pd_basis \<Rightarrow> 'a pd_basis \<Rightarrow> bool" (infix "\<le>\<sharp>" 50) where
"upper_le = (\<lambda>u v. \<forall>y\<in>Rep_pd_basis v. \<exists>x\<in>Rep_pd_basis u. x \<sqsubseteq> y)"
|
###output
?H1 (?H2 ?H3) x_1###end
|
Probability/Probability_Mass_Function
|
Probability_Mass_Function.map_pmf_cong
|
lemma map_pmf_cong: "p = q \<Longrightarrow> (\<And>x. x \<in> set_pmf q \<Longrightarrow> f x = g x) \<Longrightarrow> map_pmf f p = map_pmf g q"
|
?p = ?q \<Longrightarrow> (\<And>x. x \<in> set_pmf ?q \<Longrightarrow> ?f x = ?g x) \<Longrightarrow> map_pmf ?f ?p = map_pmf ?g ?q
|
\<lbrakk>x_1 = x_2; \<And>y_0. y_0 \<in> ?H1 x_2 \<Longrightarrow> x_3 y_0 = x_4 y_0\<rbrakk> \<Longrightarrow> ?H2 x_3 x_1 = ?H2 x_4 x_2
|
[
"Probability_Mass_Function.map_pmf",
"Probability_Mass_Function.set_pmf"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a pmf \\<Rightarrow> 'b pmf",
"'a pmf \\<Rightarrow> 'a set"
] |
[
"definition \"map_pmf f M = bind_pmf M (\\<lambda>x. return_pmf (f x))\""
] |
template
|
###lemma
?p = ?q \<Longrightarrow> (\<And>x. x \<in> set_pmf ?q \<Longrightarrow> ?f x = ?g x) \<Longrightarrow> map_pmf ?f ?p = map_pmf ?g ?q
###symbols
Probability_Mass_Function.map_pmf :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a pmf \<Rightarrow> 'b pmf
Probability_Mass_Function.set_pmf :::: 'a pmf \<Rightarrow> 'a set
###defs
definition "map_pmf f M = bind_pmf M (\<lambda>x. return_pmf (f x))"
|
###output
\<lbrakk>x_1 = x_2; \<And>y_0. y_0 \<in> ?H1 x_2 \<Longrightarrow> x_3 y_0 = x_4 y_0\<rbrakk> \<Longrightarrow> ?H2 x_3 x_1 = ?H2 x_4 x_2###end
|
Isar_Examples/Group
|
Groups.ac_simps(42)
| null |
lcm ?b (lcm ?a ?c) = lcm ?a (lcm ?b ?c)
|
?H1 x_1 (?H1 x_2 x_3) = ?H1 x_2 (?H1 x_1 x_3)
|
[
"GCD.gcd_class.lcm"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a"
] |
[
"class gcd = zero + one + dvd +\n fixes gcd :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\"\n and lcm :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\""
] |
template
|
###lemma
lcm ?b (lcm ?a ?c) = lcm ?a (lcm ?b ?c)
###symbols
GCD.gcd_class.lcm :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
###defs
class gcd = zero + one + dvd +
fixes gcd :: "'a \<Rightarrow> 'a \<Rightarrow> 'a"
and lcm :: "'a \<Rightarrow> 'a \<Rightarrow> 'a"
|
###output
?H1 x_1 (?H1 x_2 x_3) = ?H1 x_2 (?H1 x_1 x_3)###end
|
Real_Asymp/Multiseries_Expansion
|
Multiseries_Expansion.real_asymp_reify_simps(2)
| null |
cosh ?z = (exp ?z + exp (- ?z)) / (2:: ?'a)
|
?H1 x_1 = ?H2 (?H3 (?H4 x_1) (?H4 (?H5 x_1))) (?H6 (?H7 ?H8))
|
[
"Num.num.One",
"Num.num.Bit0",
"Num.numeral_class.numeral",
"Groups.uminus_class.uminus",
"Transcendental.exp",
"Groups.plus_class.plus",
"Fields.inverse_class.inverse_divide",
"Transcendental.cosh"
] |
[
"num",
"num \\<Rightarrow> num",
"num \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a"
] |
[
"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 uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)",
"definition exp :: \"'a \\<Rightarrow> 'a::{real_normed_algebra_1,banach}\"\n where \"exp = (\\<lambda>x. \\<Sum>n. x^n /\\<^sub>R fact n)\"",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"definition cosh :: \"'a :: {banach, real_normed_algebra_1} \\<Rightarrow> 'a\" where\n \"cosh x = (exp x + exp (-x)) /\\<^sub>R 2\""
] |
template
|
###lemma
cosh ?z = (exp ?z + exp (- ?z)) / (2:: ?'a)
###symbols
Num.num.One :::: num
Num.num.Bit0 :::: num \<Rightarrow> num
Num.numeral_class.numeral :::: num \<Rightarrow> 'a
Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a
Transcendental.exp :::: 'a \<Rightarrow> 'a
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Fields.inverse_class.inverse_divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Transcendental.cosh :::: 'a \<Rightarrow> 'a
###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 uminus =
fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80)
definition exp :: "'a \<Rightarrow> 'a::{real_normed_algebra_1,banach}"
where "exp = (\<lambda>x. \<Sum>n. x^n /\<^sub>R fact n)"
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
class inverse = divide +
fixes inverse :: "'a \<Rightarrow> 'a"
begin
definition cosh :: "'a :: {banach, real_normed_algebra_1} \<Rightarrow> 'a" where
"cosh x = (exp x + exp (-x)) /\<^sub>R 2"
|
###output
?H1 x_1 = ?H2 (?H3 (?H4 x_1) (?H4 (?H5 x_1))) (?H6 (?H7 ?H8))###end
|
List
|
List.lenlex_append2
|
lemma lenlex_append2 [simp]:
assumes "irrefl R"
shows "(us @ xs, us @ ys) \<in> lenlex R \<longleftrightarrow> (xs, ys) \<in> lenlex R"
|
irrefl ?R \<Longrightarrow> ((?us @ ?xs, ?us @ ?ys) \<in> lenlex ?R) = ((?xs, ?ys) \<in> lenlex ?R)
|
?H1 x_1 \<Longrightarrow> ((?H2 x_2 x_3, ?H2 x_2 x_4) \<in> ?H3 x_1) = ((x_3, x_4) \<in> ?H3 x_1)
|
[
"List.lenlex",
"List.append",
"Relation.irrefl"
] |
[
"('a \\<times> 'a) set \\<Rightarrow> ('a list \\<times> 'a list) set",
"'a list \\<Rightarrow> 'a list \\<Rightarrow> 'a list",
"('a \\<times> 'a) set \\<Rightarrow> bool"
] |
[
"definition lenlex :: \"('a \\<times> 'a) set => ('a list \\<times> 'a list) set\" where\n\"lenlex r = inv_image (less_than <*lex*> lex r) (\\<lambda>xs. (length xs, xs))\"\n \\<comment> \\<open>Compares lists by their length and then lexicographically\\<close>",
"primrec append :: \"'a list \\<Rightarrow> 'a list \\<Rightarrow> 'a list\" (infixr \"@\" 65) where\nappend_Nil: \"[] @ ys = ys\" |\nappend_Cons: \"(x#xs) @ ys = x # xs @ ys\"",
"abbreviation irrefl :: \"'a rel \\<Rightarrow> bool\" where\n \"irrefl \\<equiv> irrefl_on UNIV\""
] |
template
|
###lemma
irrefl ?R \<Longrightarrow> ((?us @ ?xs, ?us @ ?ys) \<in> lenlex ?R) = ((?xs, ?ys) \<in> lenlex ?R)
###symbols
List.lenlex :::: ('a \<times> 'a) set \<Rightarrow> ('a list \<times> 'a list) set
List.append :::: 'a list \<Rightarrow> 'a list \<Rightarrow> 'a list
Relation.irrefl :::: ('a \<times> 'a) set \<Rightarrow> bool
###defs
definition lenlex :: "('a \<times> 'a) set => ('a list \<times> 'a list) set" where
"lenlex r = inv_image (less_than <*lex*> lex r) (\<lambda>xs. (length xs, xs))"
\<comment> \<open>Compares lists by their length and then lexicographically\<close>
primrec append :: "'a list \<Rightarrow> 'a list \<Rightarrow> 'a list" (infixr "@" 65) where
append_Nil: "[] @ ys = ys" |
append_Cons: "(x#xs) @ ys = x # xs @ ys"
abbreviation irrefl :: "'a rel \<Rightarrow> bool" where
"irrefl \<equiv> irrefl_on UNIV"
|
###output
?H1 x_1 \<Longrightarrow> ((?H2 x_2 x_3, ?H2 x_2 x_4) \<in> ?H3 x_1) = ((x_3, x_4) \<in> ?H3 x_1)###end
|
Predicate_Compile_Examples/Predicate_Compile_Tests
|
Predicate_Compile_Tests.map_prods_hoaux_PPiii_PiiiI
| null |
map_prods_hoaux ?x ?xa \<Longrightarrow> pred.eval (map_prods_hoaux_PPiii_Piii ?x ?xa) ()
|
?H1 x_1 x_2 \<Longrightarrow> ?H2 (?H3 x_1 x_2) ?H4
|
[
"Product_Type.Unity",
"Predicate_Compile_Tests.map_prods_hoaux_PPiii_Piii",
"Predicate.pred.eval",
"Predicate_Compile_Tests.map_prods_hoaux"
] |
[
"unit",
"('a \\<times> 'b) \\<times> 'c \\<Rightarrow> 'a \\<times> 'b \\<times> 'c \\<Rightarrow> unit Predicate.pred",
"'a Predicate.pred \\<Rightarrow> 'a \\<Rightarrow> bool",
"('a \\<times> 'b) \\<times> 'c \\<Rightarrow> 'a \\<times> 'b \\<times> 'c \\<Rightarrow> bool"
] |
[
"definition Unity :: unit (\"'(')\")\n where \"() = Abs_unit True\"",
"datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: \"'a \\<Rightarrow> bool\")"
] |
template
|
###lemma
map_prods_hoaux ?x ?xa \<Longrightarrow> pred.eval (map_prods_hoaux_PPiii_Piii ?x ?xa) ()
###symbols
Product_Type.Unity :::: unit
Predicate_Compile_Tests.map_prods_hoaux_PPiii_Piii :::: ('a \<times> 'b) \<times> 'c \<Rightarrow> 'a \<times> 'b \<times> 'c \<Rightarrow> unit Predicate.pred
Predicate.pred.eval :::: 'a Predicate.pred \<Rightarrow> 'a \<Rightarrow> bool
Predicate_Compile_Tests.map_prods_hoaux :::: ('a \<times> 'b) \<times> 'c \<Rightarrow> 'a \<times> 'b \<times> 'c \<Rightarrow> bool
###defs
definition Unity :: unit ("'(')")
where "() = Abs_unit True"
datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: "'a \<Rightarrow> bool")
|
###output
?H1 x_1 x_2 \<Longrightarrow> ?H2 (?H3 x_1 x_2) ?H4###end
|
Deriv
|
Deriv.has_derivative_compose
|
lemma has_derivative_compose:
"(f has_derivative f') (at x within s) \<Longrightarrow> (g has_derivative g') (at (f x)) \<Longrightarrow>
((\<lambda>x. g (f x)) has_derivative (\<lambda>x. g' (f' x))) (at x within s)"
|
(?f has_derivative ?f') (at ?x within ?s) \<Longrightarrow> (?g has_derivative ?g') (at (?f ?x)) \<Longrightarrow> ((\<lambda>x. ?g (?f x)) has_derivative (\<lambda>x. ?g' (?f' x))) (at ?x within ?s)
|
\<lbrakk> ?H1 x_1 x_2 (?H2 x_3 x_4); ?H1 x_5 x_6 (?H3 (x_1 x_3))\<rbrakk> \<Longrightarrow> ?H1 (\<lambda>y_0. x_5 (x_1 y_0)) (\<lambda>y_1. x_6 (x_2 y_1)) (?H2 x_3 x_4)
|
[
"Topological_Spaces.topological_space_class.at",
"Topological_Spaces.topological_space_class.at_within",
"Deriv.has_derivative"
] |
[
"'a \\<Rightarrow> 'a filter",
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a filter",
"('a \\<Rightarrow> 'b) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> 'a filter \\<Rightarrow> bool"
] |
[
"class topological_space = \"open\" +\n assumes open_UNIV [simp, intro]: \"open UNIV\"\n assumes open_Int [intro]: \"open S \\<Longrightarrow> open T \\<Longrightarrow> open (S \\<inter> T)\"\n assumes open_Union [intro]: \"\\<forall>S\\<in>K. open S \\<Longrightarrow> open (\\<Union>K)\"\nbegin",
"class topological_space = \"open\" +\n assumes open_UNIV [simp, intro]: \"open UNIV\"\n assumes open_Int [intro]: \"open S \\<Longrightarrow> open T \\<Longrightarrow> open (S \\<inter> T)\"\n assumes open_Union [intro]: \"\\<forall>S\\<in>K. open S \\<Longrightarrow> open (\\<Union>K)\"\nbegin",
"definition has_derivative :: \"('a::real_normed_vector \\<Rightarrow> 'b::real_normed_vector) \\<Rightarrow>\n ('a \\<Rightarrow> 'b) \\<Rightarrow> 'a filter \\<Rightarrow> bool\" (infix \"(has'_derivative)\" 50)\n where \"(f has_derivative f') F \\<longleftrightarrow>\n bounded_linear f' \\<and>\n ((\\<lambda>y. ((f y - f (Lim F (\\<lambda>x. x))) - f' (y - Lim F (\\<lambda>x. x))) /\\<^sub>R norm (y - Lim F (\\<lambda>x. x))) \\<longlongrightarrow> 0) F\""
] |
template
|
###lemma
(?f has_derivative ?f') (at ?x within ?s) \<Longrightarrow> (?g has_derivative ?g') (at (?f ?x)) \<Longrightarrow> ((\<lambda>x. ?g (?f x)) has_derivative (\<lambda>x. ?g' (?f' x))) (at ?x within ?s)
###symbols
Topological_Spaces.topological_space_class.at :::: 'a \<Rightarrow> 'a filter
Topological_Spaces.topological_space_class.at_within :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a filter
Deriv.has_derivative :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'a filter \<Rightarrow> bool
###defs
class 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 topological_space = "open" +
assumes open_UNIV [simp, intro]: "open UNIV"
assumes open_Int [intro]: "open S \<Longrightarrow> open T \<Longrightarrow> open (S \<inter> T)"
assumes open_Union [intro]: "\<forall>S\<in>K. open S \<Longrightarrow> open (\<Union>K)"
begin
definition has_derivative :: "('a::real_normed_vector \<Rightarrow> 'b::real_normed_vector) \<Rightarrow>
('a \<Rightarrow> 'b) \<Rightarrow> 'a filter \<Rightarrow> bool" (infix "(has'_derivative)" 50)
where "(f has_derivative f') F \<longleftrightarrow>
bounded_linear f' \<and>
((\<lambda>y. ((f y - f (Lim F (\<lambda>x. x))) - f' (y - Lim F (\<lambda>x. x))) /\<^sub>R norm (y - Lim F (\<lambda>x. x))) \<longlongrightarrow> 0) F"
|
###output
\<lbrakk> ?H1 x_1 x_2 (?H2 x_3 x_4); ?H1 x_5 x_6 (?H3 (x_1 x_3))\<rbrakk> \<Longrightarrow> ?H1 (\<lambda>y_0. x_5 (x_1 y_0)) (\<lambda>y_1. x_6 (x_2 y_1)) (?H2 x_3 x_4)###end
|
HOLCF/Tr
|
Transitive_Closure.irrefl_tranclI
| null |
?r\<inverse> \<inter> ?r\<^sup>* = {} \<Longrightarrow> (?x, ?x) \<notin> ?r\<^sup>+
|
?H1 (?H2 x_1) (?H3 x_1) = ?H4 \<Longrightarrow> ?H5 (x_2, x_2) (?H6 x_1)
|
[
"Transitive_Closure.trancl",
"Set.not_member",
"Set.empty",
"Transitive_Closure.rtrancl",
"Relation.converse",
"Set.inter"
] |
[
"('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set",
"'a \\<Rightarrow> 'a set \\<Rightarrow> bool",
"'a set",
"('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set",
"('a \\<times> 'b) set \\<Rightarrow> ('b \\<times> 'a) set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set"
] |
[
"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>+\"",
"abbreviation not_member\n where \"not_member x A \\<equiv> \\<not> (x \\<in> A)\" \\<comment> \\<open>non-membership\\<close>",
"abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"",
"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 converse :: \"('a \\<times> 'b) set \\<Rightarrow> ('b \\<times> 'a) set\" (\"(_\\<inverse>)\" [1000] 999)\n for r :: \"('a \\<times> 'b) set\"\n where \"(a, b) \\<in> r \\<Longrightarrow> (b, a) \\<in> r\\<inverse>\"",
"abbreviation inter :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<inter>\" 70)\n where \"(\\<inter>) \\<equiv> inf\""
] |
template
|
###lemma
?r\<inverse> \<inter> ?r\<^sup>* = {} \<Longrightarrow> (?x, ?x) \<notin> ?r\<^sup>+
###symbols
Transitive_Closure.trancl :::: ('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set
Set.not_member :::: 'a \<Rightarrow> 'a set \<Rightarrow> bool
Set.empty :::: 'a set
Transitive_Closure.rtrancl :::: ('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set
Relation.converse :::: ('a \<times> 'b) set \<Rightarrow> ('b \<times> 'a) set
Set.inter :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set
###defs
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>+"
abbreviation not_member
where "not_member x A \<equiv> \<not> (x \<in> A)" \<comment> \<open>non-membership\<close>
abbreviation empty :: "'a set" ("{}")
where "{} \<equiv> bot"
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 converse :: "('a \<times> 'b) set \<Rightarrow> ('b \<times> 'a) set" ("(_\<inverse>)" [1000] 999)
for r :: "('a \<times> 'b) set"
where "(a, b) \<in> r \<Longrightarrow> (b, a) \<in> r\<inverse>"
abbreviation inter :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<inter>" 70)
where "(\<inter>) \<equiv> inf"
|
###output
?H1 (?H2 x_1) (?H3 x_1) = ?H4 \<Longrightarrow> ?H5 (x_2, x_2) (?H6 x_1)###end
|
SPARK/Examples/RIPEMD-160/F
|
Factorial.dvd_fact
| null |
1 \<le> ?m \<Longrightarrow> ?m \<le> ?n \<Longrightarrow> ?m dvd fact ?n
|
\<lbrakk> ?H1 \<le> x_1; x_1 \<le> x_2\<rbrakk> \<Longrightarrow> ?H2 x_1 (?H3 x_2)
|
[
"Factorial.semiring_char_0_class.fact",
"Rings.dvd_class.dvd",
"Groups.one_class.one"
] |
[
"nat \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> bool",
"'a"
] |
[
"definition dvd :: \"'a \\<Rightarrow> 'a \\<Rightarrow> bool\" (infix \"dvd\" 50)\n where \"b dvd a \\<longleftrightarrow> (\\<exists>k. a = b * k)\"",
"class one =\n fixes one :: 'a (\"1\")"
] |
template
|
###lemma
1 \<le> ?m \<Longrightarrow> ?m \<le> ?n \<Longrightarrow> ?m dvd fact ?n
###symbols
Factorial.semiring_char_0_class.fact :::: nat \<Rightarrow> 'a
Rings.dvd_class.dvd :::: 'a \<Rightarrow> 'a \<Rightarrow> bool
Groups.one_class.one :::: 'a
###defs
definition dvd :: "'a \<Rightarrow> 'a \<Rightarrow> bool" (infix "dvd" 50)
where "b dvd a \<longleftrightarrow> (\<exists>k. a = b * k)"
class one =
fixes one :: 'a ("1")
|
###output
\<lbrakk> ?H1 \<le> x_1; x_1 \<le> x_2\<rbrakk> \<Longrightarrow> ?H2 x_1 (?H3 x_2)###end
|
Conditionally_Complete_Lattices
|
Conditionally_Complete_Lattices.cSup_greaterThanLessThan
|
lemma cSup_greaterThanLessThan[simp]: "y < x \<Longrightarrow> Sup {y<..<x::'a::{conditionally_complete_linorder, dense_linorder}} = x"
|
?y < ?x \<Longrightarrow> Sup { ?y<..< ?x} = ?x
|
x_1 < x_2 \<Longrightarrow> ?H1 (?H2 x_1 x_2) = x_2
|
[
"Set_Interval.ord_class.greaterThanLessThan",
"Complete_Lattices.Sup_class.Sup"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a"
] |
[
"class Sup =\n fixes Sup :: \"'a set \\<Rightarrow> 'a\" (\"\\<Squnion> _\" [900] 900)"
] |
template
|
###lemma
?y < ?x \<Longrightarrow> Sup { ?y<..< ?x} = ?x
###symbols
Set_Interval.ord_class.greaterThanLessThan :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a set
Complete_Lattices.Sup_class.Sup :::: 'a set \<Rightarrow> 'a
###defs
class Sup =
fixes Sup :: "'a set \<Rightarrow> 'a" ("\<Squnion> _" [900] 900)
|
###output
x_1 < x_2 \<Longrightarrow> ?H1 (?H2 x_1 x_2) = x_2###end
|
Analysis/Henstock_Kurzweil_Integration
|
Henstock_Kurzweil_Integration.integral_reflect_real
|
lemma integral_reflect_real[simp]: "integral {-b .. -a} (\<lambda>x. f (-x)) = integral {a..b::real} f"
|
integral {- ?b..- ?a} (\<lambda>x. ?f (- x)) = integral { ?a.. ?b} ?f
|
?H1 (?H2 (?H3 x_1) (?H3 x_2)) (\<lambda>y_0. x_3 (?H3 y_0)) = ?H1 (?H2 x_2 x_1) x_3
|
[
"Groups.uminus_class.uminus",
"Set_Interval.ord_class.atLeastAtMost",
"Henstock_Kurzweil_Integration.integral"
] |
[
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> 'b"
] |
[
"class uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)",
"definition \"integral i f = (SOME y. (f has_integral y) i \\<or> \\<not> f integrable_on i \\<and> y=0)\""
] |
template
|
###lemma
integral {- ?b..- ?a} (\<lambda>x. ?f (- x)) = integral { ?a.. ?b} ?f
###symbols
Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a
Set_Interval.ord_class.atLeastAtMost :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a set
Henstock_Kurzweil_Integration.integral :::: 'a set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'b
###defs
class uminus =
fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80)
definition "integral i f = (SOME y. (f has_integral y) i \<or> \<not> f integrable_on i \<and> y=0)"
|
###output
?H1 (?H2 (?H3 x_1) (?H3 x_2)) (\<lambda>y_0. x_3 (?H3 y_0)) = ?H1 (?H2 x_2 x_1) x_3###end
|
Algebra/Complete_Lattice
|
Complete_Lattices.SUP2_I
| null |
?a \<in> ?A \<Longrightarrow> ?B ?a ?b ?c \<Longrightarrow> Sup (?B ` ?A) ?b ?c
|
\<lbrakk>x_1 \<in> x_2; x_3 x_1 x_4 x_5\<rbrakk> \<Longrightarrow> ?H1 (?H2 x_3 x_2) x_4 x_5
|
[
"Set.image",
"Complete_Lattices.Sup_class.Sup"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set",
"'a set \\<Rightarrow> 'a"
] |
[
"definition image :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set\" (infixr \"`\" 90)\n where \"f ` A = {y. \\<exists>x\\<in>A. y = f x}\"",
"class Sup =\n fixes Sup :: \"'a set \\<Rightarrow> 'a\" (\"\\<Squnion> _\" [900] 900)"
] |
template
|
###lemma
?a \<in> ?A \<Longrightarrow> ?B ?a ?b ?c \<Longrightarrow> Sup (?B ` ?A) ?b ?c
###symbols
Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set
Complete_Lattices.Sup_class.Sup :::: 'a set \<Rightarrow> 'a
###defs
definition image :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set" (infixr "`" 90)
where "f ` A = {y. \<exists>x\<in>A. y = f x}"
class Sup =
fixes Sup :: "'a set \<Rightarrow> 'a" ("\<Squnion> _" [900] 900)
|
###output
\<lbrakk>x_1 \<in> x_2; x_3 x_1 x_4 x_5\<rbrakk> \<Longrightarrow> ?H1 (?H2 x_3 x_2) x_4 x_5###end
|
Analysis/Topology_Euclidean_Space
|
Topology_Euclidean_Space.closed_hyperplane
|
lemma closed_hyperplane: "closed {x. inner a x = b}"
|
closed {x. ?a \<bullet> x = ?b}
|
?H1 (?H2 (\<lambda>y_0. ?H3 x_1 y_0 = x_2))
|
[
"Inner_Product.real_inner_class.inner",
"Set.Collect",
"Topological_Spaces.topological_space_class.closed"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> real",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> bool"
] |
[
"class real_inner = real_vector + sgn_div_norm + dist_norm + uniformity_dist + open_uniformity +\n fixes inner :: \"'a \\<Rightarrow> 'a \\<Rightarrow> real\"\n assumes inner_commute: \"inner x y = inner y x\"\n and inner_add_left: \"inner (x + y) z = inner x z + inner y z\"\n and inner_scaleR_left [simp]: \"inner (scaleR r x) y = r * (inner x y)\"\n and inner_ge_zero [simp]: \"0 \\<le> inner x x\"\n and inner_eq_zero_iff [simp]: \"inner x x = 0 \\<longleftrightarrow> x = 0\"\n and norm_eq_sqrt_inner: \"norm x = sqrt (inner x x)\"\nbegin",
"class 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 {x. ?a \<bullet> x = ?b}
###symbols
Inner_Product.real_inner_class.inner :::: 'a \<Rightarrow> 'a \<Rightarrow> real
Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set
Topological_Spaces.topological_space_class.closed :::: 'a set \<Rightarrow> bool
###defs
class real_inner = real_vector + sgn_div_norm + dist_norm + uniformity_dist + open_uniformity +
fixes inner :: "'a \<Rightarrow> 'a \<Rightarrow> real"
assumes inner_commute: "inner x y = inner y x"
and inner_add_left: "inner (x + y) z = inner x z + inner y z"
and inner_scaleR_left [simp]: "inner (scaleR r x) y = r * (inner x y)"
and inner_ge_zero [simp]: "0 \<le> inner x x"
and inner_eq_zero_iff [simp]: "inner x x = 0 \<longleftrightarrow> x = 0"
and norm_eq_sqrt_inner: "norm x = sqrt (inner x x)"
begin
class topological_space = "open" +
assumes open_UNIV [simp, intro]: "open UNIV"
assumes open_Int [intro]: "open S \<Longrightarrow> open T \<Longrightarrow> open (S \<inter> T)"
assumes open_Union [intro]: "\<forall>S\<in>K. open S \<Longrightarrow> open (\<Union>K)"
begin
|
###output
?H1 (?H2 (\<lambda>y_0. ?H3 x_1 y_0 = x_2))###end
|
Metis_Examples/Tarski
|
Tarski.CompleteLatticeI
|
lemma CompleteLatticeI:
"[| po \<in> PartialOrder; (\<forall>S. S \<subseteq> pset po --> (\<exists>L. isLub S po L));
(\<forall>S. S \<subseteq> pset po --> (\<exists>G. isGlb S po G))|]
==> po \<in> CompleteLattice"
|
?po \<in> PartialOrder \<Longrightarrow> \<forall>S\<subseteq>pset ?po. \<exists>L. isLub S ?po L \<Longrightarrow> \<forall>S\<subseteq>pset ?po. \<exists>G. isGlb S ?po G \<Longrightarrow> ?po \<in> CompleteLattice
|
\<lbrakk>x_1 \<in> ?H1; \<forall>y_0. ?H2 y_0 (?H3 x_1) \<longrightarrow> (\<exists>y_1. ?H4 y_0 x_1 y_1); \<forall>y_2. ?H2 y_2 (?H3 x_1) \<longrightarrow> (\<exists>y_3. ?H5 y_2 x_1 y_3)\<rbrakk> \<Longrightarrow> x_1 \<in> ?H6
|
[
"Tarski.CompleteLattice",
"Tarski.isGlb",
"Tarski.isLub",
"Tarski.potype.pset",
"Set.subset_eq",
"Tarski.PartialOrder"
] |
[
"'a potype set",
"'a set \\<Rightarrow> 'a potype \\<Rightarrow> 'a \\<Rightarrow> bool",
"'a set \\<Rightarrow> 'a potype \\<Rightarrow> 'a \\<Rightarrow> bool",
"('a, 'b) potype_scheme \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool",
"'a potype set"
] |
[
"definition CompleteLattice :: \"('a potype) set\" where\n \"CompleteLattice == {cl. cl \\<in> PartialOrder \\<and>\n (\\<forall>S. S \\<subseteq> pset cl \\<longrightarrow> (\\<exists>L. isLub S cl L)) \\<and>\n (\\<forall>S. S \\<subseteq> pset cl \\<longrightarrow> (\\<exists>G. isGlb S cl G))}\"",
"definition isGlb :: \"['a set, 'a potype, 'a] => bool\" where\n \"isGlb S po \\<equiv> \\<lambda>G. (G \\<in> pset po \\<and> (\\<forall>y\\<in>S. (G,y) \\<in> order po) \\<and>\n (\\<forall>z \\<in> pset po. (\\<forall>y\\<in>S. (z,y) \\<in> order po) \\<longrightarrow> (z,G) \\<in> order po))\"",
"definition isLub :: \"['a set, 'a potype, 'a] => bool\" where\n \"isLub S po \\<equiv> \\<lambda>L. (L \\<in> pset po \\<and> (\\<forall>y\\<in>S. (y,L) \\<in> order po) \\<and>\n (\\<forall>z\\<in>pset po. (\\<forall>y\\<in>S. (y,z) \\<in> order po) \\<longrightarrow> (L,z) \\<in> order po))\"",
"abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\"",
"definition PartialOrder :: \"('a potype) set\" where\n \"PartialOrder == {P. refl_on (pset P) (order P) & antisym (order P) &\n trans (order P)}\""
] |
template
|
###lemma
?po \<in> PartialOrder \<Longrightarrow> \<forall>S\<subseteq>pset ?po. \<exists>L. isLub S ?po L \<Longrightarrow> \<forall>S\<subseteq>pset ?po. \<exists>G. isGlb S ?po G \<Longrightarrow> ?po \<in> CompleteLattice
###symbols
Tarski.CompleteLattice :::: 'a potype set
Tarski.isGlb :::: 'a set \<Rightarrow> 'a potype \<Rightarrow> 'a \<Rightarrow> bool
Tarski.isLub :::: 'a set \<Rightarrow> 'a potype \<Rightarrow> 'a \<Rightarrow> bool
Tarski.potype.pset :::: ('a, 'b) potype_scheme \<Rightarrow> 'a set
Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
Tarski.PartialOrder :::: 'a potype set
###defs
definition CompleteLattice :: "('a potype) set" where
"CompleteLattice == {cl. cl \<in> PartialOrder \<and>
(\<forall>S. S \<subseteq> pset cl \<longrightarrow> (\<exists>L. isLub S cl L)) \<and>
(\<forall>S. S \<subseteq> pset cl \<longrightarrow> (\<exists>G. isGlb S cl G))}"
definition isGlb :: "['a set, 'a potype, 'a] => bool" where
"isGlb S po \<equiv> \<lambda>G. (G \<in> pset po \<and> (\<forall>y\<in>S. (G,y) \<in> order po) \<and>
(\<forall>z \<in> pset po. (\<forall>y\<in>S. (z,y) \<in> order po) \<longrightarrow> (z,G) \<in> order po))"
definition isLub :: "['a set, 'a potype, 'a] => bool" where
"isLub S po \<equiv> \<lambda>L. (L \<in> pset po \<and> (\<forall>y\<in>S. (y,L) \<in> order po) \<and>
(\<forall>z\<in>pset po. (\<forall>y\<in>S. (y,z) \<in> order po) \<longrightarrow> (L,z) \<in> order po))"
abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset_eq \<equiv> less_eq"
definition PartialOrder :: "('a potype) set" where
"PartialOrder == {P. refl_on (pset P) (order P) & antisym (order P) &
trans (order P)}"
|
###output
\<lbrakk>x_1 \<in> ?H1; \<forall>y_0. ?H2 y_0 (?H3 x_1) \<longrightarrow> (\<exists>y_1. ?H4 y_0 x_1 y_1); \<forall>y_2. ?H2 y_2 (?H3 x_1) \<longrightarrow> (\<exists>y_3. ?H5 y_2 x_1 y_3)\<rbrakk> \<Longrightarrow> x_1 \<in> ?H6###end
|
Analysis/Bochner_Integration
|
Bochner_Integration.integral_distr
|
lemma integral_distr:
fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
assumes g[measurable]: "g \<in> measurable M N" and f: "f \<in> borel_measurable N"
shows "integral\<^sup>L (distr M N g) f = integral\<^sup>L M (\<lambda>x. f (g x))"
|
?g \<in> ?M \<rightarrow>\<^sub>M ?N \<Longrightarrow> ?f \<in> borel_measurable ?N \<Longrightarrow> integral\<^sup>L (distr ?M ?N ?g) ?f = LINT x| ?M. ?f (?g x)
|
\<lbrakk>x_1 \<in> ?H1 x_2 x_3; x_4 \<in> ?H2 x_3\<rbrakk> \<Longrightarrow> ?H3 (?H4 x_2 x_3 x_1) x_4 = ?H3 x_2 (\<lambda>y_0. x_4 (x_1 y_0))
|
[
"Measure_Space.distr",
"Bochner_Integration.lebesgue_integral",
"Borel_Space.borel_measurable",
"Sigma_Algebra.measurable"
] |
[
"'a measure \\<Rightarrow> 'b measure \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> 'b measure",
"'a measure \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> 'b",
"'a measure \\<Rightarrow> ('a \\<Rightarrow> 'b) set",
"'a measure \\<Rightarrow> 'b measure \\<Rightarrow> ('a \\<Rightarrow> 'b) set"
] |
[
"abbreviation \"borel_measurable M \\<equiv> measurable M borel\""
] |
template
|
###lemma
?g \<in> ?M \<rightarrow>\<^sub>M ?N \<Longrightarrow> ?f \<in> borel_measurable ?N \<Longrightarrow> integral\<^sup>L (distr ?M ?N ?g) ?f = LINT x| ?M. ?f (?g x)
###symbols
Measure_Space.distr :::: 'a measure \<Rightarrow> 'b measure \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'b measure
Bochner_Integration.lebesgue_integral :::: 'a measure \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'b
Borel_Space.borel_measurable :::: 'a measure \<Rightarrow> ('a \<Rightarrow> 'b) set
Sigma_Algebra.measurable :::: 'a measure \<Rightarrow> 'b measure \<Rightarrow> ('a \<Rightarrow> 'b) set
###defs
abbreviation "borel_measurable M \<equiv> measurable M borel"
|
###output
\<lbrakk>x_1 \<in> ?H1 x_2 x_3; x_4 \<in> ?H2 x_3\<rbrakk> \<Longrightarrow> ?H3 (?H4 x_2 x_3 x_1) x_4 = ?H3 x_2 (\<lambda>y_0. x_4 (x_1 y_0))###end
|
Hilbert_Choice
|
Hilbert_Choice.choice
|
lemma choice: "\<forall>x. \<exists>y. Q x y \<Longrightarrow> \<exists>f. \<forall>x. Q x (f x)"
|
\<forall>x. \<exists>y. ?Q x y \<Longrightarrow> \<exists>f. \<forall>x. ?Q x (f x)
|
\<forall>y_0. \<exists>y_1. x_1 y_0 y_1 \<Longrightarrow> \<exists>y_2. \<forall>y_3. x_1 y_3 (y_2 y_3)
|
[] |
[] |
[] |
template
|
###lemma
\<forall>x. \<exists>y. ?Q x y \<Longrightarrow> \<exists>f. \<forall>x. ?Q x (f x)
###symbols
###defs
|
###output
\<forall>y_0. \<exists>y_1. x_1 y_0 y_1 \<Longrightarrow> \<exists>y_2. \<forall>y_3. x_1 y_3 (y_2 y_3)###end
|
Nat
|
Nat.comp_funpow
|
lemma comp_funpow: "comp f ^^ n = comp (f ^^ n)"
for f :: "'a \<Rightarrow> 'a"
|
(\<circ>) ?f ^^ ?n = (\<circ>) (?f ^^ ?n)
|
?H1 (?H2 x_1) x_2 = ?H2 (?H1 x_1 x_2)
|
[
"Fun.comp",
"Nat.compower"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'a) \\<Rightarrow> 'c \\<Rightarrow> 'b",
"'a \\<Rightarrow> nat \\<Rightarrow> 'a"
] |
[
"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))\"",
"abbreviation compower :: \"'a \\<Rightarrow> nat \\<Rightarrow> 'a\" (infixr \"^^\" 80)\n where \"f ^^ n \\<equiv> compow n f\""
] |
template
|
###lemma
(\<circ>) ?f ^^ ?n = (\<circ>) (?f ^^ ?n)
###symbols
Fun.comp :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'a) \<Rightarrow> 'c \<Rightarrow> 'b
Nat.compower :::: 'a \<Rightarrow> nat \<Rightarrow> 'a
###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))"
abbreviation compower :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^^" 80)
where "f ^^ n \<equiv> compow n f"
|
###output
?H1 (?H2 x_1) x_2 = ?H2 (?H1 x_1 x_2)###end
|
Bali/Decl
|
Decl.class_rec
|
lemma class_rec: "\<lbrakk>class G C = Some c; ws_prog G\<rbrakk> \<Longrightarrow>
class_rec G C t f =
f C c (if C = Object then t else class_rec G (super c) t f)"
|
class ?G ?C = Some ?c \<Longrightarrow> ws_prog ?G \<Longrightarrow> class_rec ?G ?C ?t ?f = ?f ?C ?c (if ?C = Object then ?t else class_rec ?G (super ?c) ?t ?f)
|
\<lbrakk> ?H1 x_1 x_2 = ?H2 x_3; ?H3 x_1\<rbrakk> \<Longrightarrow> ?H4 x_1 x_2 x_4 x_5 = x_5 x_2 x_3 (if x_2 = ?H5 then x_4 else ?H4 x_1 (?H6 x_3) x_4 x_5)
|
[
"Decl.class.super",
"Name.Object",
"Decl.class_rec",
"Decl.ws_prog",
"Option.option.Some",
"Decl.class"
] |
[
"'a class_scheme \\<Rightarrow> qtname",
"qtname",
"prog \\<Rightarrow> qtname \\<Rightarrow> 'a \\<Rightarrow> (qtname \\<Rightarrow> class \\<Rightarrow> 'a \\<Rightarrow> 'a) \\<Rightarrow> 'a",
"prog \\<Rightarrow> bool",
"'a \\<Rightarrow> 'a option",
"prog \\<Rightarrow> qtname \\<Rightarrow> class option"
] |
[
"abbreviation\n \"class\" :: \"prog \\<Rightarrow> (qtname, class) table\"\n where \"class G C == table_of (classes G) C\"",
"definition\n Object :: qtname\n where \"Object = \\<lparr>pid = java_lang, tid = Object'\\<rparr>\"",
"function\n class_rec :: \"prog \\<Rightarrow> qtname \\<Rightarrow> 'a \\<Rightarrow> (qtname \\<Rightarrow> class \\<Rightarrow> 'a \\<Rightarrow> 'a) \\<Rightarrow> 'a\"\nwhere\n[simp del]: \"class_rec G C t f = \n (case class G C of \n None \\<Rightarrow> undefined \n | Some c \\<Rightarrow> if ws_prog G \n then f C c \n (if C = Object then t \n else class_rec G (super c) t f)\n else undefined)\"",
"definition\n ws_prog :: \"prog \\<Rightarrow> bool\" where\n \"ws_prog G = ((\\<forall>(I,i)\\<in>set (ifaces G). ws_idecl G I (isuperIfs i)) \\<and> \n (\\<forall>(C,c)\\<in>set (classes G). ws_cdecl G C (super c)))\"",
"datatype 'a option =\n None\n | Some (the: 'a)",
"abbreviation\n \"class\" :: \"prog \\<Rightarrow> (qtname, class) table\"\n where \"class G C == table_of (classes G) C\""
] |
template
|
###lemma
class ?G ?C = Some ?c \<Longrightarrow> ws_prog ?G \<Longrightarrow> class_rec ?G ?C ?t ?f = ?f ?C ?c (if ?C = Object then ?t else class_rec ?G (super ?c) ?t ?f)
###symbols
Decl.class.super :::: 'a class_scheme \<Rightarrow> qtname
Name.Object :::: qtname
Decl.class_rec :::: prog \<Rightarrow> qtname \<Rightarrow> 'a \<Rightarrow> (qtname \<Rightarrow> class \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> 'a
Decl.ws_prog :::: prog \<Rightarrow> bool
Option.option.Some :::: 'a \<Rightarrow> 'a option
Decl.class :::: prog \<Rightarrow> qtname \<Rightarrow> class option
###defs
abbreviation
"class" :: "prog \<Rightarrow> (qtname, class) table"
where "class G C == table_of (classes G) C"
definition
Object :: qtname
where "Object = \<lparr>pid = java_lang, tid = Object'\<rparr>"
function
class_rec :: "prog \<Rightarrow> qtname \<Rightarrow> 'a \<Rightarrow> (qtname \<Rightarrow> class \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> 'a"
where
[simp del]: "class_rec G C t f =
(case class G C of
None \<Rightarrow> undefined
| Some c \<Rightarrow> if ws_prog G
then f C c
(if C = Object then t
else class_rec G (super c) t f)
else undefined)"
definition
ws_prog :: "prog \<Rightarrow> bool" where
"ws_prog G = ((\<forall>(I,i)\<in>set (ifaces G). ws_idecl G I (isuperIfs i)) \<and>
(\<forall>(C,c)\<in>set (classes G). ws_cdecl G C (super c)))"
datatype 'a option =
None
| Some (the: 'a)
abbreviation
"class" :: "prog \<Rightarrow> (qtname, class) table"
where "class G C == table_of (classes G) C"
|
###output
\<lbrakk> ?H1 x_1 x_2 = ?H2 x_3; ?H3 x_1\<rbrakk> \<Longrightarrow> ?H4 x_1 x_2 x_4 x_5 = x_5 x_2 x_3 (if x_2 = ?H5 then x_4 else ?H4 x_1 (?H6 x_3) x_4 x_5)###end
|
Library/Infinite_Set
|
Infinite_Set.finite_int_iff_bounded_le
| null |
finite ?S = (\<exists>k. abs ` ?S \<subseteq> {..k})
|
?H1 x_1 = (\<exists>y_0. ?H2 (?H3 ?H4 x_1) (?H5 y_0))
|
[
"Set_Interval.ord_class.atMost",
"Groups.abs_class.abs",
"Set.image",
"Set.subset_eq",
"Finite_Set.finite"
] |
[
"'a \\<Rightarrow> 'a set",
"'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool",
"'a set \\<Rightarrow> bool"
] |
[
"class abs =\n fixes abs :: \"'a \\<Rightarrow> 'a\" (\"\\<bar>_\\<bar>\")",
"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\"",
"class finite =\n assumes finite_UNIV: \"finite (UNIV :: 'a set)\"\nbegin"
] |
template
|
###lemma
finite ?S = (\<exists>k. abs ` ?S \<subseteq> {..k})
###symbols
Set_Interval.ord_class.atMost :::: 'a \<Rightarrow> 'a set
Groups.abs_class.abs :::: 'a \<Rightarrow> 'a
Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set
Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
Finite_Set.finite :::: 'a set \<Rightarrow> bool
###defs
class abs =
fixes abs :: "'a \<Rightarrow> 'a" ("\<bar>_\<bar>")
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"
class finite =
assumes finite_UNIV: "finite (UNIV :: 'a set)"
begin
|
###output
?H1 x_1 = (\<exists>y_0. ?H2 (?H3 ?H4 x_1) (?H5 y_0))###end
|
Library/Disjoint_Sets
|
Disjoint_Sets.disjoint_family_on_bisimulation
|
lemma disjoint_family_on_bisimulation:
assumes "disjoint_family_on f S"
and "\<And>n m. n \<in> S \<Longrightarrow> m \<in> S \<Longrightarrow> n \<noteq> m \<Longrightarrow> f n \<inter> f m = {} \<Longrightarrow> g n \<inter> g m = {}"
shows "disjoint_family_on g S"
|
disjoint_family_on ?f ?S \<Longrightarrow> (\<And>n m. n \<in> ?S \<Longrightarrow> m \<in> ?S \<Longrightarrow> n \<noteq> m \<Longrightarrow> ?f n \<inter> ?f m = {} \<Longrightarrow> ?g n \<inter> ?g m = {}) \<Longrightarrow> disjoint_family_on ?g ?S
|
\<lbrakk> ?H1 x_1 x_2; \<And>y_0 y_1. \<lbrakk>y_0 \<in> x_2; y_1 \<in> x_2; y_0 \<noteq> y_1; ?H2 (x_1 y_0) (x_1 y_1) = ?H3\<rbrakk> \<Longrightarrow> ?H2 (x_3 y_0) (x_3 y_1) = ?H3\<rbrakk> \<Longrightarrow> ?H1 x_3 x_2
|
[
"Set.empty",
"Set.inter",
"Disjoint_Sets.disjoint_family_on"
] |
[
"'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'b set) \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"",
"abbreviation inter :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<inter>\" 70)\n where \"(\\<inter>) \\<equiv> inf\"",
"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 = {})\""
] |
template
|
###lemma
disjoint_family_on ?f ?S \<Longrightarrow> (\<And>n m. n \<in> ?S \<Longrightarrow> m \<in> ?S \<Longrightarrow> n \<noteq> m \<Longrightarrow> ?f n \<inter> ?f m = {} \<Longrightarrow> ?g n \<inter> ?g m = {}) \<Longrightarrow> disjoint_family_on ?g ?S
###symbols
Set.empty :::: 'a set
Set.inter :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set
Disjoint_Sets.disjoint_family_on :::: ('a \<Rightarrow> 'b set) \<Rightarrow> 'a set \<Rightarrow> bool
###defs
abbreviation empty :: "'a set" ("{}")
where "{} \<equiv> bot"
abbreviation inter :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<inter>" 70)
where "(\<inter>) \<equiv> inf"
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 = {})"
|
###output
\<lbrakk> ?H1 x_1 x_2; \<And>y_0 y_1. \<lbrakk>y_0 \<in> x_2; y_1 \<in> x_2; y_0 \<noteq> y_1; ?H2 (x_1 y_0) (x_1 y_1) = ?H3\<rbrakk> \<Longrightarrow> ?H2 (x_3 y_0) (x_3 y_1) = ?H3\<rbrakk> \<Longrightarrow> ?H1 x_3 x_2###end
|
Analysis/Homotopy
|
Homotopy.homotopy_eqv_homotopic_triviality_null_imp
|
lemma homotopy_eqv_homotopic_triviality_null_imp:
fixes S :: "'a::real_normed_vector set"
and T :: "'b::real_normed_vector set"
and U :: "'c::real_normed_vector set"
assumes "S homotopy_eqv T"
and f: "continuous_on U f" "f \<in> U \<rightarrow> T"
and homSU: "\<And>f. \<lbrakk>continuous_on U f; f \<in> U \<rightarrow> S\<rbrakk>
\<Longrightarrow> \<exists>c. homotopic_with_canon (\<lambda>x. True) U S f (\<lambda>x. c)"
shows "\<exists>c. homotopic_with_canon (\<lambda>x. True) U T f (\<lambda>x. c)"
|
?S homotopy_eqv ?T \<Longrightarrow> continuous_on ?U ?f \<Longrightarrow> ?f \<in> ?U \<rightarrow> ?T \<Longrightarrow> (\<And>f. continuous_on ?U f \<Longrightarrow> f \<in> ?U \<rightarrow> ?S \<Longrightarrow> \<exists>c. homotopic_with_canon (\<lambda>x. True) ?U ?S f (\<lambda>x. c)) \<Longrightarrow> \<exists>c. homotopic_with_canon (\<lambda>x. True) ?U ?T ?f (\<lambda>x. c)
|
\<lbrakk> ?H1 x_1 x_2; ?H2 x_3 x_4; x_4 \<in> ?H3 x_3 x_2; \<And>y_0. \<lbrakk> ?H2 x_3 y_0; y_0 \<in> ?H3 x_3 x_1\<rbrakk> \<Longrightarrow> \<exists>y_1. ?H4 (\<lambda>y_2. True) x_3 x_1 y_0 (\<lambda>y_3. y_1)\<rbrakk> \<Longrightarrow> \<exists>y_4. ?H4 (\<lambda>y_5. True) x_3 x_2 x_4 (\<lambda>y_6. y_4)
|
[
"Homotopy.homotopic_with_canon",
"FuncSet.funcset",
"Topological_Spaces.continuous_on",
"Homotopy.homotopy_eqv"
] |
[
"(('a \\<Rightarrow> 'b) \\<Rightarrow> bool) \\<Rightarrow> 'a set \\<Rightarrow> 'b set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"'a set \\<Rightarrow> 'b set \\<Rightarrow> ('a \\<Rightarrow> 'b) set",
"'a set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"'a set \\<Rightarrow> 'b set \\<Rightarrow> bool"
] |
[
"abbreviation homotopic_with_canon ::\n \"[('a::topological_space \\<Rightarrow> 'b::topological_space) \\<Rightarrow> bool, 'a set, 'b set, 'a \\<Rightarrow> 'b, 'a \\<Rightarrow> 'b] \\<Rightarrow> bool\"\nwhere\n \"homotopic_with_canon P S T p q \\<equiv> homotopic_with P (top_of_set S) (top_of_set T) p q\"",
"abbreviation funcset :: \"'a set \\<Rightarrow> 'b set \\<Rightarrow> ('a \\<Rightarrow> 'b) set\" (infixr \"\\<rightarrow>\" 60)\n where \"A \\<rightarrow> B \\<equiv> Pi A (\\<lambda>_. B)\"",
"definition continuous_on :: \"'a set \\<Rightarrow> ('a::topological_space \\<Rightarrow> 'b::topological_space) \\<Rightarrow> bool\"\n where \"continuous_on s f \\<longleftrightarrow> (\\<forall>x\\<in>s. (f \\<longlongrightarrow> f x) (at x within s))\""
] |
template
|
###lemma
?S homotopy_eqv ?T \<Longrightarrow> continuous_on ?U ?f \<Longrightarrow> ?f \<in> ?U \<rightarrow> ?T \<Longrightarrow> (\<And>f. continuous_on ?U f \<Longrightarrow> f \<in> ?U \<rightarrow> ?S \<Longrightarrow> \<exists>c. homotopic_with_canon (\<lambda>x. True) ?U ?S f (\<lambda>x. c)) \<Longrightarrow> \<exists>c. homotopic_with_canon (\<lambda>x. True) ?U ?T ?f (\<lambda>x. c)
###symbols
Homotopy.homotopic_with_canon :::: (('a \<Rightarrow> 'b) \<Rightarrow> bool) \<Rightarrow> 'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
FuncSet.funcset :::: 'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<Rightarrow> 'b) set
Topological_Spaces.continuous_on :::: 'a set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
Homotopy.homotopy_eqv :::: 'a set \<Rightarrow> 'b set \<Rightarrow> bool
###defs
abbreviation homotopic_with_canon ::
"[('a::topological_space \<Rightarrow> 'b::topological_space) \<Rightarrow> bool, 'a set, 'b set, 'a \<Rightarrow> 'b, 'a \<Rightarrow> 'b] \<Rightarrow> bool"
where
"homotopic_with_canon P S T p q \<equiv> homotopic_with P (top_of_set S) (top_of_set T) p q"
abbreviation funcset :: "'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<Rightarrow> 'b) set" (infixr "\<rightarrow>" 60)
where "A \<rightarrow> B \<equiv> Pi A (\<lambda>_. B)"
definition continuous_on :: "'a set \<Rightarrow> ('a::topological_space \<Rightarrow> 'b::topological_space) \<Rightarrow> bool"
where "continuous_on s f \<longleftrightarrow> (\<forall>x\<in>s. (f \<longlongrightarrow> f x) (at x within s))"
|
###output
\<lbrakk> ?H1 x_1 x_2; ?H2 x_3 x_4; x_4 \<in> ?H3 x_3 x_2; \<And>y_0. \<lbrakk> ?H2 x_3 y_0; y_0 \<in> ?H3 x_3 x_1\<rbrakk> \<Longrightarrow> \<exists>y_1. ?H4 (\<lambda>y_2. True) x_3 x_1 y_0 (\<lambda>y_3. y_1)\<rbrakk> \<Longrightarrow> \<exists>y_4. ?H4 (\<lambda>y_5. True) x_3 x_2 x_4 (\<lambda>y_6. y_4)###end
|
Nominal/Examples/Class1
|
Class1.subst_fresh(8)
|
lemma subst_fresh:
fixes x::"name"
and c::"coname"
shows "x\<sharp>P \<Longrightarrow> x\<sharp>M{x:=<c>.P}"
and "b\<sharp>P \<Longrightarrow> b\<sharp>M{b:=(y).P}"
and "x\<sharp>(M,P) \<Longrightarrow> x\<sharp>M{y:=<c>.P}"
and "x\<sharp>M \<Longrightarrow> x\<sharp>M{c:=(x).P}"
and "x\<sharp>(M,P) \<Longrightarrow> x\<sharp>M{c:=(y).P}"
and "b\<sharp>(M,P) \<Longrightarrow> b\<sharp>M{c:=(y).P}"
and "b\<sharp>M \<Longrightarrow> b\<sharp>M{y:=<b>.P}"
and "b\<sharp>(M,P) \<Longrightarrow> b\<sharp>M{y:=<c>.P}"
|
?b \<sharp> (?M, ?P) \<Longrightarrow> ?b \<sharp> ?M{ ?y:=< ?c>. ?P}
|
?H1 x_1 (x_2, x_3) \<Longrightarrow> ?H1 x_1 (?H2 x_2 x_4 x_5 x_3)
|
[
"Class1.substn",
"Nominal.fresh"
] |
[
"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
?b \<sharp> (?M, ?P) \<Longrightarrow> ?b \<sharp> ?M{ ?y:=< ?c>. ?P}
###symbols
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
?H1 x_1 (x_2, x_3) \<Longrightarrow> ?H1 x_1 (?H2 x_2 x_4 x_5 x_3)###end
|
Decision_Procs/Approximation
|
Approximation.approximation_preproc_nat(6)
|
lemma approximation_preproc_nat[approximation_preproc]:
"real 0 = real_of_float 0"
"real 1 = real_of_float 1"
"real (i + j) = real i + real j"
"real (i - j) = max (real i - real j) 0"
"real (i * j) = real i * real j"
"real (i div j) = real_of_int (floor (real i / real j))"
"real (min i j) = min (real i) (real j)"
"real (max i j) = max (real i) (real j)"
"real (i ^ n) = (real i) ^ n"
"real (numeral a) = real_of_float (numeral a)"
"i mod j = i - i div j * j"
"n = m \<longleftrightarrow> real n = real m"
"n \<le> m \<longleftrightarrow> real n \<le> real m"
"n < m \<longleftrightarrow> real n < real m"
"n \<in> {m .. l} \<longleftrightarrow> real n \<in> {real m .. real l}"
|
real (?i div ?j) = real_of_int \<lfloor>real ?i / real ?j\<rfloor>
|
?H1 (?H2 x_1 x_2) = ?H3 (?H4 (?H5 (?H1 x_1) (?H1 x_2)))
|
[
"Fields.inverse_class.inverse_divide",
"Archimedean_Field.floor_ceiling_class.floor",
"Real.real_of_int",
"Rings.divide_class.divide",
"Real.real"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> int",
"int \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"nat \\<Rightarrow> real"
] |
[
"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)\"",
"abbreviation real_of_int :: \"int \\<Rightarrow> real\"\n where \"real_of_int \\<equiv> of_int\"",
"class divide =\n fixes divide :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"div\" 70)",
"abbreviation real :: \"nat \\<Rightarrow> real\"\n where \"real \\<equiv> of_nat\""
] |
template
|
###lemma
real (?i div ?j) = real_of_int \<lfloor>real ?i / real ?j\<rfloor>
###symbols
Fields.inverse_class.inverse_divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Archimedean_Field.floor_ceiling_class.floor :::: 'a \<Rightarrow> int
Real.real_of_int :::: int \<Rightarrow> real
Rings.divide_class.divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Real.real :::: nat \<Rightarrow> real
###defs
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)"
abbreviation real_of_int :: "int \<Rightarrow> real"
where "real_of_int \<equiv> of_int"
class divide =
fixes divide :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "div" 70)
abbreviation real :: "nat \<Rightarrow> real"
where "real \<equiv> of_nat"
|
###output
?H1 (?H2 x_1 x_2) = ?H3 (?H4 (?H5 (?H1 x_1) (?H1 x_2)))###end
|
SET_Protocol/Public_SET
|
Public_SET.analz_image_keys_simps(21)
| null |
(?P \<and> True) = ?P
|
(x_1 \<and> True) = x_1
|
[] |
[] |
[] |
template
|
###lemma
(?P \<and> True) = ?P
###symbols
###defs
|
###output
(x_1 \<and> True) = x_1###end
|
Computational_Algebra/Polynomial
|
Polynomial.degree_linear_power
|
lemma degree_linear_power: "degree ([:a, 1:] ^ n) = n"
for a :: "'a::comm_semiring_1"
|
degree ([: ?a, 1:: ?'a:] ^ ?n) = ?n
|
?H1 (?H2 (?H3 x_1 (?H3 ?H4 ?H5)) x_2) = x_2
|
[
"Groups.zero_class.zero",
"Groups.one_class.one",
"Polynomial.pCons",
"Power.power_class.power",
"Polynomial.degree"
] |
[
"'a",
"'a",
"'a \\<Rightarrow> 'a poly \\<Rightarrow> 'a poly",
"'a \\<Rightarrow> nat \\<Rightarrow> 'a",
"'a poly \\<Rightarrow> nat"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"class one =\n fixes one :: 'a (\"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\"",
"definition degree :: \"'a::zero poly \\<Rightarrow> nat\"\n where \"degree p = (LEAST n. \\<forall>i>n. coeff p i = 0)\""
] |
template
|
###lemma
degree ([: ?a, 1:: ?'a:] ^ ?n) = ?n
###symbols
Groups.zero_class.zero :::: 'a
Groups.one_class.one :::: 'a
Polynomial.pCons :::: 'a \<Rightarrow> 'a poly \<Rightarrow> 'a poly
Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a
Polynomial.degree :::: 'a poly \<Rightarrow> nat
###defs
class zero =
fixes zero :: 'a ("0")
class one =
fixes one :: 'a ("1")
primrec power :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^" 80)
where
power_0: "a ^ 0 = 1"
| power_Suc: "a ^ Suc n = a * a ^ n"
definition degree :: "'a::zero poly \<Rightarrow> nat"
where "degree p = (LEAST n. \<forall>i>n. coeff p i = 0)"
|
###output
?H1 (?H2 (?H3 x_1 (?H3 ?H4 ?H5)) x_2) = x_2###end
|
Computational_Algebra/Formal_Power_Series
|
Formal_Power_Series.fps_X_power_iff
|
lemma fps_X_power_iff: "fps_X ^ n = Abs_fps (\<lambda>m. if m = n then 1 else 0)"
|
fps_X ^ ?n = Abs_fps (\<lambda>m. if m = ?n then 1:: ?'a else (0:: ?'a))
|
?H1 ?H2 x_1 = ?H3 (\<lambda>y_0. if y_0 = x_1 then ?H4 else ?H5)
|
[
"Groups.zero_class.zero",
"Groups.one_class.one",
"Formal_Power_Series.fps.Abs_fps",
"Formal_Power_Series.fps_X",
"Power.power_class.power"
] |
[
"'a",
"'a",
"(nat \\<Rightarrow> 'a) \\<Rightarrow> 'a fps",
"'a fps",
"'a \\<Rightarrow> nat \\<Rightarrow> 'a"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"class one =\n fixes one :: 'a (\"1\")",
"definition \"fps_X = Abs_fps (\\<lambda>n. if n = 1 then 1 else 0)\"",
"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
fps_X ^ ?n = Abs_fps (\<lambda>m. if m = ?n then 1:: ?'a else (0:: ?'a))
###symbols
Groups.zero_class.zero :::: 'a
Groups.one_class.one :::: 'a
Formal_Power_Series.fps.Abs_fps :::: (nat \<Rightarrow> 'a) \<Rightarrow> 'a fps
Formal_Power_Series.fps_X :::: 'a fps
Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a
###defs
class zero =
fixes zero :: 'a ("0")
class one =
fixes one :: 'a ("1")
definition "fps_X = Abs_fps (\<lambda>n. if n = 1 then 1 else 0)"
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 = ?H3 (\<lambda>y_0. if y_0 = x_1 then ?H4 else ?H5)###end
|
Hilbert_Choice
|
Hilbert_Choice.infinite_imp_bij_betw2
|
lemma infinite_imp_bij_betw2:
assumes "\<not> finite A"
shows "\<exists>h. bij_betw h A (A \<union> {a})"
|
infinite ?A \<Longrightarrow> \<exists>h. bij_betw h ?A (?A \<union> { ?a})
|
?H1 x_1 \<Longrightarrow> \<exists>y_0. ?H2 y_0 x_1 (?H3 x_1 (?H4 x_2 ?H5))
|
[
"Set.empty",
"Set.insert",
"Set.union",
"Fun.bij_betw",
"Finite_Set.infinite"
] |
[
"'a set",
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set \\<Rightarrow> bool",
"'a set \\<Rightarrow> bool"
] |
[
"abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"",
"definition insert :: \"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set\"\n where insert_compr: \"insert a B = {x. x = a \\<or> x \\<in> B}\"",
"abbreviation union :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<union>\" 65)\n where \"union \\<equiv> sup\"",
"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\"",
"abbreviation infinite :: \"'a set \\<Rightarrow> bool\"\n where \"infinite S \\<equiv> \\<not> finite S\""
] |
template
|
###lemma
infinite ?A \<Longrightarrow> \<exists>h. bij_betw h ?A (?A \<union> { ?a})
###symbols
Set.empty :::: 'a set
Set.insert :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a set
Set.union :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set
Fun.bij_betw :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set \<Rightarrow> bool
Finite_Set.infinite :::: 'a set \<Rightarrow> bool
###defs
abbreviation empty :: "'a set" ("{}")
where "{} \<equiv> bot"
definition insert :: "'a \<Rightarrow> 'a set \<Rightarrow> 'a set"
where insert_compr: "insert a B = {x. x = a \<or> x \<in> B}"
abbreviation union :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<union>" 65)
where "union \<equiv> sup"
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"
abbreviation infinite :: "'a set \<Rightarrow> bool"
where "infinite S \<equiv> \<not> finite S"
|
###output
?H1 x_1 \<Longrightarrow> \<exists>y_0. ?H2 y_0 x_1 (?H3 x_1 (?H4 x_2 ?H5))###end
|
Hoare_Parallel/OG_Tran
|
OG_Tran.L3_5v_lemma1
|
lemma L3_5v_lemma1[rule_format]:
"(S,s) -Pn\<rightarrow> (T,t) \<longrightarrow> S=\<Omega> \<longrightarrow> (\<not>(\<exists>Rs. T=(Parallel Rs) \<and> All_None Rs))"
|
(?S, ?s) -P ?n\<rightarrow> (?T, ?t) \<Longrightarrow> ?S = \<Omega> \<Longrightarrow> \<nexists>Rs. ?T = Parallel Rs \<and> All_None Rs
|
\<lbrakk> ?H1 (x_1, x_2) x_3 (x_4, x_5); x_1 = ?H2\<rbrakk> \<Longrightarrow> \<nexists>y_0. x_4 = ?H3 y_0 \<and> ?H4 y_0
|
[
"OG_Tran.All_None",
"OG_Com.com.Parallel",
"OG_Tran.Omega",
"OG_Tran.transition_n"
] |
[
"('a ann_com option \\<times> 'a set) list \\<Rightarrow> bool",
"('a ann_com option \\<times> 'a set) list \\<Rightarrow> 'a com",
"'a com",
"'a com \\<times> 'a \\<Rightarrow> nat \\<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\"",
"abbreviation Omega :: \"'a com\" (\"\\<Omega>\" 63)\n where \"\\<Omega> \\<equiv> While UNIV UNIV (Basic id)\"",
"abbreviation\n transition_n :: \"('a com \\<times> 'a) \\<Rightarrow> nat \\<Rightarrow> ('a com \\<times> 'a) \\<Rightarrow> bool\"\n (\"_ -P_\\<rightarrow> _\"[81,81,81] 100) where\n \"con_0 -Pn\\<rightarrow> con_1 \\<equiv> (con_0, con_1) \\<in> transition ^^ n\""
] |
template
|
###lemma
(?S, ?s) -P ?n\<rightarrow> (?T, ?t) \<Longrightarrow> ?S = \<Omega> \<Longrightarrow> \<nexists>Rs. ?T = Parallel Rs \<and> All_None Rs
###symbols
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.Omega :::: 'a com
OG_Tran.transition_n :::: 'a com \<times> 'a \<Rightarrow> nat \<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"
abbreviation Omega :: "'a com" ("\<Omega>" 63)
where "\<Omega> \<equiv> While UNIV UNIV (Basic id)"
abbreviation
transition_n :: "('a com \<times> 'a) \<Rightarrow> nat \<Rightarrow> ('a com \<times> 'a) \<Rightarrow> bool"
("_ -P_\<rightarrow> _"[81,81,81] 100) where
"con_0 -Pn\<rightarrow> con_1 \<equiv> (con_0, con_1) \<in> transition ^^ n"
|
###output
\<lbrakk> ?H1 (x_1, x_2) x_3 (x_4, x_5); x_1 = ?H2\<rbrakk> \<Longrightarrow> \<nexists>y_0. x_4 = ?H3 y_0 \<and> ?H4 y_0###end
|
Library/Multiset_Order
|
Multiset_Order.le_multiset_empty_right
|
lemma le_multiset_empty_right[simp]: "\<not> M < {#}"
|
\<not> ?M < {#}
|
\<not> x_1 < ?H1
|
[
"Multiset.empty_mset"
] |
[
"'a multiset"
] |
[
"abbreviation empty_mset :: \\<open>'a multiset\\<close> (\\<open>{#}\\<close>)\n where \\<open>empty_mset \\<equiv> 0\\<close>"
] |
template
|
###lemma
\<not> ?M < {#}
###symbols
Multiset.empty_mset :::: 'a multiset
###defs
abbreviation empty_mset :: \<open>'a multiset\<close> (\<open>{#}\<close>)
where \<open>empty_mset \<equiv> 0\<close>
|
###output
\<not> x_1 < ?H1###end
|
Matrix_LP/Matrix
|
Matrix.max1
|
lemma max1: "!! a x y. (a::nat) <= x \<Longrightarrow> a <= max x y"
|
?a \<le> ?x \<Longrightarrow> ?a \<le> max ?x ?y
|
x_1 \<le> x_2 \<Longrightarrow> x_1 \<le> ?H1 x_2 x_3
|
[
"Orderings.ord_class.max"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a"
] |
[
"class ord =\n fixes less_eq :: \"'a \\<Rightarrow> 'a \\<Rightarrow> bool\"\n and less :: \"'a \\<Rightarrow> 'a \\<Rightarrow> bool\"\nbegin"
] |
template
|
###lemma
?a \<le> ?x \<Longrightarrow> ?a \<le> max ?x ?y
###symbols
Orderings.ord_class.max :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
###defs
class ord =
fixes less_eq :: "'a \<Rightarrow> 'a \<Rightarrow> bool"
and less :: "'a \<Rightarrow> 'a \<Rightarrow> bool"
begin
|
###output
x_1 \<le> x_2 \<Longrightarrow> x_1 \<le> ?H1 x_2 x_3###end
|
MicroJava/BV/Effect
|
Effect.appLoad
|
lemma appLoad[simp]:
"(app (Load idx) G maxs rT pc et (Some s)) = (\<exists>ST LT. s = (ST,LT) \<and> idx < length LT \<and> LT!idx \<noteq> Err \<and> length ST < maxs)"
|
app (Load ?idx) ?G ?maxs ?rT ?pc ?et (Some ?s) = (\<exists>ST LT. ?s = (ST, LT) \<and> ?idx < length LT \<and> LT ! ?idx \<noteq> Err \<and> length ST < ?maxs)
|
?H1 (?H2 x_1) x_2 x_3 x_4 x_5 x_6 (?H3 x_7) = (\<exists>y_0 y_1. x_7 = (y_0, y_1) \<and> x_1 < ?H4 y_1 \<and> ?H5 y_1 x_1 \<noteq> ?H6 \<and> ?H4 y_0 < x_3)
|
[
"Err.err.Err",
"List.nth",
"List.length",
"Option.option.Some",
"JVMInstructions.instr.Load",
"Effect.app"
] |
[
"'a err",
"'a list \\<Rightarrow> nat \\<Rightarrow> 'a",
"'a list \\<Rightarrow> nat",
"'a \\<Rightarrow> 'a option",
"nat \\<Rightarrow> instr",
"instr \\<Rightarrow> (nat \\<times> nat \\<times> instr list \\<times> (nat \\<times> nat \\<times> nat \\<times> cname) list) prog \\<Rightarrow> nat \\<Rightarrow> ty \\<Rightarrow> nat \\<Rightarrow> (nat \\<times> nat \\<times> nat \\<times> cname) list \\<Rightarrow> (ty list \\<times> ty err list) option \\<Rightarrow> bool"
] |
[
"primrec (nonexhaustive) nth :: \"'a list => nat => 'a\" (infixl \"!\" 100) where\nnth_Cons: \"(x # xs) ! n = (case n of 0 \\<Rightarrow> x | Suc k \\<Rightarrow> xs ! k)\"\n \\<comment> \\<open>Warning: simpset does not contain this definition, but separate\n theorems for \\<open>n = 0\\<close> and \\<open>n = Suc k\\<close>\\<close>",
"abbreviation length :: \"'a list \\<Rightarrow> nat\" where\n\"length \\<equiv> size\"",
"datatype 'a option =\n None\n | Some (the: 'a)"
] |
template
|
###lemma
app (Load ?idx) ?G ?maxs ?rT ?pc ?et (Some ?s) = (\<exists>ST LT. ?s = (ST, LT) \<and> ?idx < length LT \<and> LT ! ?idx \<noteq> Err \<and> length ST < ?maxs)
###symbols
Err.err.Err :::: 'a err
List.nth :::: 'a list \<Rightarrow> nat \<Rightarrow> 'a
List.length :::: 'a list \<Rightarrow> nat
Option.option.Some :::: 'a \<Rightarrow> 'a option
JVMInstructions.instr.Load :::: nat \<Rightarrow> instr
Effect.app :::: instr \<Rightarrow> (nat \<times> nat \<times> instr list \<times> (nat \<times> nat \<times> nat \<times> cname) list) prog \<Rightarrow> nat \<Rightarrow> ty \<Rightarrow> nat \<Rightarrow> (nat \<times> nat \<times> nat \<times> cname) list \<Rightarrow> (ty list \<times> ty err list) option \<Rightarrow> bool
###defs
primrec (nonexhaustive) nth :: "'a list => nat => 'a" (infixl "!" 100) where
nth_Cons: "(x # xs) ! n = (case n of 0 \<Rightarrow> x | Suc k \<Rightarrow> xs ! k)"
\<comment> \<open>Warning: simpset does not contain this definition, but separate
theorems for \<open>n = 0\<close> and \<open>n = Suc k\<close>\<close>
abbreviation length :: "'a list \<Rightarrow> nat" where
"length \<equiv> size"
datatype 'a option =
None
| Some (the: 'a)
|
###output
?H1 (?H2 x_1) x_2 x_3 x_4 x_5 x_6 (?H3 x_7) = (\<exists>y_0 y_1. x_7 = (y_0, y_1) \<and> x_1 < ?H4 y_1 \<and> ?H5 y_1 x_1 \<noteq> ?H6 \<and> ?H4 y_0 < x_3)###end
|
Nominal/Examples/CK_Machine
|
CK_Machine.perm_swap(2)
| null |
[(?a, ?b)] \<bullet> [(?b, ?a)] \<bullet> ?x = ?x
|
?H1 (?H2 (x_1, x_2) ?H3) (?H1 (?H2 (x_2, x_1) ?H3) x_3) = x_3
|
[
"List.list.Nil",
"List.list.Cons",
"Nominal.perm"
] |
[
"'a list",
"'a \\<Rightarrow> 'a list \\<Rightarrow> 'a list",
"('a \\<times> 'a) list \\<Rightarrow> 'b \\<Rightarrow> 'b"
] |
[
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"",
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"",
"consts \n perm :: \"'x prm \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixr \\<open>\\<bullet>\\<close> 80)\n swap :: \"('x \\<times> 'x) \\<Rightarrow> 'x \\<Rightarrow> 'x\""
] |
template
|
###lemma
[(?a, ?b)] \<bullet> [(?b, ?a)] \<bullet> ?x = ?x
###symbols
List.list.Nil :::: 'a list
List.list.Cons :::: 'a \<Rightarrow> 'a list \<Rightarrow> 'a list
Nominal.perm :::: ('a \<times> 'a) list \<Rightarrow> 'b \<Rightarrow> 'b
###defs
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
consts
perm :: "'x prm \<Rightarrow> 'a \<Rightarrow> 'a" (infixr \<open>\<bullet>\<close> 80)
swap :: "('x \<times> 'x) \<Rightarrow> 'x \<Rightarrow> 'x"
|
###output
?H1 (?H2 (x_1, x_2) ?H3) (?H1 (?H2 (x_2, x_1) ?H3) x_3) = x_3###end
|
Analysis/Elementary_Topology
|
Elementary_Topology.real_affinity_lt
|
lemma real_affinity_lt: "0 < m \<Longrightarrow> m * x + c < y \<longleftrightarrow> x < inverse m * y + - (c / m)"
for m :: "'a::linordered_field"
|
(0:: ?'a) < ?m \<Longrightarrow> (?m * ?x + ?c < ?y) = (?x < inverse ?m * ?y + - (?c / ?m))
|
?H1 < x_1 \<Longrightarrow> (?H2 (?H3 x_1 x_2) x_3 < x_4) = (x_2 < ?H2 (?H3 (?H4 x_1) x_4) (?H5 (?H6 x_3 x_1)))
|
[
"Fields.inverse_class.inverse_divide",
"Groups.uminus_class.uminus",
"Fields.inverse_class.inverse",
"Groups.times_class.times",
"Groups.plus_class.plus",
"Groups.zero_class.zero"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a"
] |
[
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"class uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)",
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
(0:: ?'a) < ?m \<Longrightarrow> (?m * ?x + ?c < ?y) = (?x < inverse ?m * ?y + - (?c / ?m))
###symbols
Fields.inverse_class.inverse_divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a
Fields.inverse_class.inverse :::: 'a \<Rightarrow> 'a
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.zero_class.zero :::: 'a
###defs
class inverse = divide +
fixes inverse :: "'a \<Rightarrow> 'a"
begin
class uminus =
fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80)
class inverse = divide +
fixes inverse :: "'a \<Rightarrow> 'a"
begin
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
class zero =
fixes zero :: 'a ("0")
|
###output
?H1 < x_1 \<Longrightarrow> (?H2 (?H3 x_1 x_2) x_3 < x_4) = (x_2 < ?H2 (?H3 (?H4 x_1) x_4) (?H5 (?H6 x_3 x_1)))###end
|
IMP/Complete_Lattice
|
Complete_Lattices.INTER_UNIV_conv(2)
| null |
(\<Inter> (?B ` ?A) = UNIV) = (\<forall>x\<in> ?A. ?B x = UNIV)
|
(?H1 (?H2 x_1 x_2) = ?H3) = (\<forall>y_1\<in>x_2. x_1 y_1 = ?H3)
|
[
"Set.UNIV",
"Set.image",
"Complete_Lattices.Inter"
] |
[
"'a set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set",
"'a set set \\<Rightarrow> 'a set"
] |
[
"abbreviation UNIV :: \"'a set\"\n where \"UNIV \\<equiv> top\"",
"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 Inter :: \"'a set set \\<Rightarrow> 'a set\" (\"\\<Inter>\")\n where \"\\<Inter>S \\<equiv> \\<Sqinter>S\""
] |
template
|
###lemma
(\<Inter> (?B ` ?A) = UNIV) = (\<forall>x\<in> ?A. ?B x = UNIV)
###symbols
Set.UNIV :::: 'a set
Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set
Complete_Lattices.Inter :::: 'a set set \<Rightarrow> 'a set
###defs
abbreviation UNIV :: "'a set"
where "UNIV \<equiv> top"
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 Inter :: "'a set set \<Rightarrow> 'a set" ("\<Inter>")
where "\<Inter>S \<equiv> \<Sqinter>S"
|
###output
(?H1 (?H2 x_1 x_2) = ?H3) = (\<forall>y_1\<in>x_2. x_1 y_1 = ?H3)###end
|
Transcendental
|
Transcendental.arctan_eq_iff
|
lemma arctan_eq_iff: "arctan x = arctan y \<longleftrightarrow> x = y"
|
(arctan ?x = arctan ?y) = (?x = ?y)
|
(?H1 x_1 = ?H1 x_2) = (x_1 = x_2)
|
[
"Transcendental.arctan"
] |
[
"real \\<Rightarrow> real"
] |
[
"definition arctan :: \"real \\<Rightarrow> real\"\n where \"arctan y = (THE x. -(pi/2) < x \\<and> x < pi/2 \\<and> tan x = y)\""
] |
template
|
###lemma
(arctan ?x = arctan ?y) = (?x = ?y)
###symbols
Transcendental.arctan :::: real \<Rightarrow> real
###defs
definition arctan :: "real \<Rightarrow> real"
where "arctan y = (THE x. -(pi/2) < x \<and> x < pi/2 \<and> tan x = y)"
|
###output
(?H1 x_1 = ?H1 x_2) = (x_1 = x_2)###end
|
Filter
|
Filter.filtermap_SUP
|
lemma filtermap_SUP: "filtermap f (\<Squnion>b\<in>B. F b) = (\<Squnion>b\<in>B. filtermap f (F b))"
|
filtermap ?f (Sup (?F ` ?B)) = (SUP b\<in> ?B. filtermap ?f (?F b))
|
?H1 x_1 (?H2 (?H3 x_2 x_3)) = ?H2 (?H3 (\<lambda>y_1. ?H1 x_1 (x_2 y_1)) x_3)
|
[
"Set.image",
"Complete_Lattices.Sup_class.Sup",
"Filter.filtermap"
] |
[
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set",
"'a set \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a filter \\<Rightarrow> 'b filter"
] |
[
"definition image :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set\" (infixr \"`\" 90)\n where \"f ` A = {y. \\<exists>x\\<in>A. y = f x}\"",
"class Sup =\n fixes Sup :: \"'a set \\<Rightarrow> 'a\" (\"\\<Squnion> _\" [900] 900)",
"definition filtermap :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a filter \\<Rightarrow> 'b filter\"\n where \"filtermap f F = Abs_filter (\\<lambda>P. eventually (\\<lambda>x. P (f x)) F)\""
] |
template
|
###lemma
filtermap ?f (Sup (?F ` ?B)) = (SUP b\<in> ?B. filtermap ?f (?F b))
###symbols
Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set
Complete_Lattices.Sup_class.Sup :::: 'a set \<Rightarrow> 'a
Filter.filtermap :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a filter \<Rightarrow> 'b filter
###defs
definition image :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set" (infixr "`" 90)
where "f ` A = {y. \<exists>x\<in>A. y = f x}"
class Sup =
fixes Sup :: "'a set \<Rightarrow> 'a" ("\<Squnion> _" [900] 900)
definition filtermap :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a filter \<Rightarrow> 'b filter"
where "filtermap f F = Abs_filter (\<lambda>P. eventually (\<lambda>x. P (f x)) F)"
|
###output
?H1 x_1 (?H2 (?H3 x_2 x_3)) = ?H2 (?H3 (\<lambda>y_1. ?H1 x_1 (x_2 y_1)) x_3)###end
|
Auth/Guard/GuardK
|
GuardK.mem_cnb_minus
|
lemma mem_cnb_minus: "x \<in> set l \<Longrightarrow> cnb l = crypt_nb x + (cnb l - crypt_nb x)"
|
?x \<in> set ?l \<Longrightarrow> cnb ?l = crypt_nb ?x + (cnb ?l - crypt_nb ?x)
|
x_1 \<in> ?H1 x_2 \<Longrightarrow> ?H2 x_2 = ?H3 (?H4 x_1) (?H5 (?H2 x_2) (?H4 x_1))
|
[
"Groups.minus_class.minus",
"GuardK.crypt_nb",
"Groups.plus_class.plus",
"GuardK.cnb",
"List.list.set"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"msg \\<Rightarrow> nat",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"msg list \\<Rightarrow> nat",
"'a list \\<Rightarrow> 'a set"
] |
[
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\""
] |
template
|
###lemma
?x \<in> set ?l \<Longrightarrow> cnb ?l = crypt_nb ?x + (cnb ?l - crypt_nb ?x)
###symbols
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
GuardK.crypt_nb :::: msg \<Rightarrow> nat
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
GuardK.cnb :::: msg list \<Rightarrow> nat
List.list.set :::: 'a list \<Rightarrow> 'a set
###defs
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
|
###output
x_1 \<in> ?H1 x_2 \<Longrightarrow> ?H2 x_2 = ?H3 (?H4 x_1) (?H5 (?H2 x_2) (?H4 x_1))###end
|
HOLCF/Cfun
|
Cfun.Rep_cfun_strict1
|
lemma Rep_cfun_strict1 [simp]: "\<bottom>\<cdot>x = \<bottom>"
|
\<bottom>\<cdot> ?x = \<bottom>
|
?H1 ?H2 x_1 = ?H2
|
[
"Pcpo.pcpo_class.bottom",
"Cfun.cfun.Rep_cfun"
] |
[
"'a",
"('a \\<rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> 'b"
] |
[
"class pcpo = cpo +\n assumes least: \"\\<exists>x. \\<forall>y. x \\<sqsubseteq> y\"\nbegin"
] |
template
|
###lemma
\<bottom>\<cdot> ?x = \<bottom>
###symbols
Pcpo.pcpo_class.bottom :::: 'a
Cfun.cfun.Rep_cfun :::: ('a \<rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b
###defs
class pcpo = cpo +
assumes least: "\<exists>x. \<forall>y. x \<sqsubseteq> y"
begin
|
###output
?H1 ?H2 x_1 = ?H2###end
|
Library/Infinite_Set
|
Infinite_Set.ALL_MOST
|
lemma ALL_MOST: "\<forall>x. P x \<Longrightarrow> \<forall>\<^sub>\<infinity>x. P x"
|
\<forall>x. ?P x \<Longrightarrow> \<forall>\<^sub>\<infinity>x. ?P x
|
\<forall>y_0. x_1 y_0 \<Longrightarrow> ?H1 x_1
|
[
"Filter.Alm_all"
] |
[
"('a \\<Rightarrow> bool) \\<Rightarrow> bool"
] |
[
"abbreviation Alm_all :: \"('a \\<Rightarrow> bool) \\<Rightarrow> bool\" (binder \"\\<forall>\\<^sub>\\<infinity>\" 10)\n where \"Alm_all P \\<equiv> eventually P cofinite\""
] |
template
|
###lemma
\<forall>x. ?P x \<Longrightarrow> \<forall>\<^sub>\<infinity>x. ?P x
###symbols
Filter.Alm_all :::: ('a \<Rightarrow> bool) \<Rightarrow> bool
###defs
abbreviation Alm_all :: "('a \<Rightarrow> bool) \<Rightarrow> bool" (binder "\<forall>\<^sub>\<infinity>" 10)
where "Alm_all P \<equiv> eventually P cofinite"
|
###output
\<forall>y_0. x_1 y_0 \<Longrightarrow> ?H1 x_1###end
|
Library/Word
|
Word.not_bit_length
|
lemma not_bit_length [simp]:
\<open>\<not> bit w LENGTH('a)\<close> for w :: \<open>'a::len word\<close>
|
\<not> bit ?w LENGTH(?'a)
|
\<not> ?H1 x_1 (?H2 TYPE(?'a))
|
[
"Type_Length.len0_class.len_of",
"Bit_Operations.semiring_bits_class.bit"
] |
[
"'a itself \\<Rightarrow> nat",
"'a \\<Rightarrow> nat \\<Rightarrow> bool"
] |
[
"class len0 =\n fixes len_of :: \"'a itself \\<Rightarrow> nat\"",
"class semiring_bits = semiring_parity + semiring_modulo_trivial +\n assumes bit_induct [case_names stable rec]:\n \\<open>(\\<And>a. a div 2 = a \\<Longrightarrow> P a)\n \\<Longrightarrow> (\\<And>a b. P a \\<Longrightarrow> (of_bool b + 2 * a) div 2 = a \\<Longrightarrow> P (of_bool b + 2 * a))\n \\<Longrightarrow> P a\\<close>\n assumes bits_mod_div_trivial [simp]: \\<open>a mod b div b = 0\\<close>\n and half_div_exp_eq: \\<open>a div 2 div 2 ^ n = a div 2 ^ Suc n\\<close>\n and even_double_div_exp_iff: \\<open>2 ^ Suc n \\<noteq> 0 \\<Longrightarrow> even (2 * a div 2 ^ Suc n) \\<longleftrightarrow> even (a div 2 ^ n)\\<close>\n fixes bit :: \\<open>'a \\<Rightarrow> nat \\<Rightarrow> bool\\<close>\n assumes bit_iff_odd: \\<open>bit a n \\<longleftrightarrow> odd (a div 2 ^ n)\\<close>\nbegin"
] |
template
|
###lemma
\<not> bit ?w LENGTH(?'a)
###symbols
Type_Length.len0_class.len_of :::: 'a itself \<Rightarrow> nat
Bit_Operations.semiring_bits_class.bit :::: 'a \<Rightarrow> nat \<Rightarrow> bool
###defs
class len0 =
fixes len_of :: "'a itself \<Rightarrow> nat"
class semiring_bits = semiring_parity + semiring_modulo_trivial +
assumes bit_induct [case_names stable rec]:
\<open>(\<And>a. a div 2 = a \<Longrightarrow> P a)
\<Longrightarrow> (\<And>a b. P a \<Longrightarrow> (of_bool b + 2 * a) div 2 = a \<Longrightarrow> P (of_bool b + 2 * a))
\<Longrightarrow> P a\<close>
assumes bits_mod_div_trivial [simp]: \<open>a mod b div b = 0\<close>
and half_div_exp_eq: \<open>a div 2 div 2 ^ n = a div 2 ^ Suc n\<close>
and even_double_div_exp_iff: \<open>2 ^ Suc n \<noteq> 0 \<Longrightarrow> even (2 * a div 2 ^ Suc n) \<longleftrightarrow> even (a div 2 ^ n)\<close>
fixes bit :: \<open>'a \<Rightarrow> nat \<Rightarrow> bool\<close>
assumes bit_iff_odd: \<open>bit a n \<longleftrightarrow> odd (a div 2 ^ n)\<close>
begin
|
###output
\<not> ?H1 x_1 (?H2 TYPE(?'a))###end
|
Library/RBT
|
RBT_Impl.map_inv2(2)
| null |
bheight (RBT_Impl.map ?f ?t) = bheight ?t
|
?H1 (?H2 x_1 x_2) = ?H1 x_2
|
[
"RBT_Impl.map",
"RBT_Impl.bheight"
] |
[
"('a \\<Rightarrow> 'b \\<Rightarrow> 'c) \\<Rightarrow> ('a, 'b) RBT_Impl.rbt \\<Rightarrow> ('a, 'c) RBT_Impl.rbt",
"('a, 'b) RBT_Impl.rbt \\<Rightarrow> nat"
] |
[
"primrec\n map :: \"('a \\<Rightarrow> 'b \\<Rightarrow> 'c) \\<Rightarrow> ('a, 'b) rbt \\<Rightarrow> ('a, 'c) rbt\"\nwhere\n \"map f Empty = Empty\"\n| \"map f (Branch c lt k v rt) = Branch c (map f lt) k (f k v) (map f rt)\"",
"primrec bheight :: \"('a,'b) rbt \\<Rightarrow> nat\"\nwhere\n \"bheight Empty = 0\"\n| \"bheight (Branch c lt k v rt) = (if c = B then Suc (bheight lt) else bheight lt)\""
] |
template
|
###lemma
bheight (RBT_Impl.map ?f ?t) = bheight ?t
###symbols
RBT_Impl.map :::: ('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> ('a, 'b) RBT_Impl.rbt \<Rightarrow> ('a, 'c) RBT_Impl.rbt
RBT_Impl.bheight :::: ('a, 'b) RBT_Impl.rbt \<Rightarrow> nat
###defs
primrec
map :: "('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> ('a, 'b) rbt \<Rightarrow> ('a, 'c) rbt"
where
"map f Empty = Empty"
| "map f (Branch c lt k v rt) = Branch c (map f lt) k (f k v) (map f rt)"
primrec bheight :: "('a,'b) rbt \<Rightarrow> nat"
where
"bheight Empty = 0"
| "bheight (Branch c lt k v rt) = (if c = B then Suc (bheight lt) else bheight lt)"
|
###output
?H1 (?H2 x_1 x_2) = ?H1 x_2###end
|
HOLCF/IOA/Automata
|
Automata.inpAAactB_is_inpBoroutB
|
lemma inpAAactB_is_inpBoroutB:
"compatible A B \<Longrightarrow> a \<in> inp A \<Longrightarrow> a \<in> act B \<Longrightarrow> a \<in> inp B \<or> a \<in> out B"
|
compatible ?A ?B \<Longrightarrow> ?a \<in> inp ?A \<Longrightarrow> ?a \<in> act ?B \<Longrightarrow> ?a \<in> inp ?B \<or> ?a \<in> out ?B
|
\<lbrakk> ?H1 x_1 x_2; x_3 \<in> ?H2 x_1; x_3 \<in> ?H3 x_2\<rbrakk> \<Longrightarrow> x_3 \<in> ?H2 x_2 \<or> x_3 \<in> ?H4 x_2
|
[
"Automata.out",
"Automata.act",
"Automata.inp",
"Automata.compatible"
] |
[
"('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 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 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 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> bool"
] |
[] |
template
|
###lemma
compatible ?A ?B \<Longrightarrow> ?a \<in> inp ?A \<Longrightarrow> ?a \<in> act ?B \<Longrightarrow> ?a \<in> inp ?B \<or> ?a \<in> out ?B
###symbols
Automata.out :::: ('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
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
Automata.inp :::: ('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
Automata.compatible :::: ('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> bool
###defs
|
###output
\<lbrakk> ?H1 x_1 x_2; x_3 \<in> ?H2 x_1; x_3 \<in> ?H3 x_2\<rbrakk> \<Longrightarrow> x_3 \<in> ?H2 x_2 \<or> x_3 \<in> ?H4 x_2###end
|
Complete_Lattices
|
Complete_Lattices.UNION_empty_conv(2)
|
lemma UNION_empty_conv:
"{} = (\<Union>x\<in>A. B x) \<longleftrightarrow> (\<forall>x\<in>A. B x = {})"
"(\<Union>x\<in>A. B x) = {} \<longleftrightarrow> (\<forall>x\<in>A. B x = {})"
|
(\<Union> (?B ` ?A) = {}) = (\<forall>x\<in> ?A. ?B x = {})
|
(?H1 (?H2 x_1 x_2) = ?H3) = (\<forall>y_1\<in>x_2. x_1 y_1 = ?H3)
|
[
"Set.empty",
"Set.image",
"Complete_Lattices.Union"
] |
[
"'a set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set",
"'a set set \\<Rightarrow> 'a set"
] |
[
"abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"",
"definition image :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set\" (infixr \"`\" 90)\n where \"f ` A = {y. \\<exists>x\\<in>A. y = f x}\"",
"abbreviation Union :: \"'a set set \\<Rightarrow> 'a set\" (\"\\<Union>\")\n where \"\\<Union>S \\<equiv> \\<Squnion>S\""
] |
template
|
###lemma
(\<Union> (?B ` ?A) = {}) = (\<forall>x\<in> ?A. ?B x = {})
###symbols
Set.empty :::: 'a set
Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set
Complete_Lattices.Union :::: 'a set set \<Rightarrow> 'a set
###defs
abbreviation empty :: "'a set" ("{}")
where "{} \<equiv> bot"
definition image :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set" (infixr "`" 90)
where "f ` A = {y. \<exists>x\<in>A. y = f x}"
abbreviation Union :: "'a set set \<Rightarrow> 'a set" ("\<Union>")
where "\<Union>S \<equiv> \<Squnion>S"
|
###output
(?H1 (?H2 x_1 x_2) = ?H3) = (\<forall>y_1\<in>x_2. x_1 y_1 = ?H3)###end
|
Inductive
|
Inductive.basic_monos(1)
| null |
?A \<subseteq> ?A
|
?H1 x_1 x_1
|
[
"Set.subset_eq"
] |
[
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\""
] |
template
|
###lemma
?A \<subseteq> ?A
###symbols
Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
###defs
abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset_eq \<equiv> less_eq"
|
###output
?H1 x_1 x_1###end
|
Nominal/Examples/Compile
|
Compile.fresh_left
| null |
?a \<sharp> ?pi \<bullet> ?x = rev ?pi \<bullet> ?a \<sharp> ?x
|
?H1 x_1 (?H2 x_2 x_3) = ?H1 (?H2 (?H3 x_2) x_1) x_3
|
[
"List.rev",
"Nominal.perm",
"Nominal.fresh"
] |
[
"'a list \\<Rightarrow> 'a list",
"('a \\<times> 'a) list \\<Rightarrow> 'b \\<Rightarrow> 'b",
"'a \\<Rightarrow> 'b \\<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 fresh :: \"'x \\<Rightarrow> 'a \\<Rightarrow> bool\" (\\<open>_ \\<sharp> _\\<close> [80,80] 80) where\n \"a \\<sharp> x \\<longleftrightarrow> a \\<notin> supp x\""
] |
template
|
###lemma
?a \<sharp> ?pi \<bullet> ?x = rev ?pi \<bullet> ?a \<sharp> ?x
###symbols
List.rev :::: 'a list \<Rightarrow> 'a list
Nominal.perm :::: ('a \<times> 'a) list \<Rightarrow> 'b \<Rightarrow> 'b
Nominal.fresh :::: 'a \<Rightarrow> 'b \<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 fresh :: "'x \<Rightarrow> 'a \<Rightarrow> bool" (\<open>_ \<sharp> _\<close> [80,80] 80) where
"a \<sharp> x \<longleftrightarrow> a \<notin> supp x"
|
###output
?H1 x_1 (?H2 x_2 x_3) = ?H1 (?H2 (?H3 x_2) x_1) x_3###end
|
Relation
|
Relation.Image_subset_eq
|
lemma Image_subset_eq: "r``A \<subseteq> B \<longleftrightarrow> A \<subseteq> - ((r\<inverse>) `` (- B))"
|
(?r `` ?A \<subseteq> ?B) = (?A \<subseteq> - ?r\<inverse> `` (- ?B))
|
?H1 (?H2 x_1 x_2) x_3 = ?H1 x_2 (?H3 (?H2 (?H4 x_1) (?H3 x_3)))
|
[
"Relation.converse",
"Groups.uminus_class.uminus",
"Relation.Image",
"Set.subset_eq"
] |
[
"('a \\<times> 'b) set \\<Rightarrow> ('b \\<times> 'a) set",
"'a \\<Rightarrow> 'a",
"('a \\<times> 'b) set \\<Rightarrow> 'a set \\<Rightarrow> 'b set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool"
] |
[
"inductive_set converse :: \"('a \\<times> 'b) set \\<Rightarrow> ('b \\<times> 'a) set\" (\"(_\\<inverse>)\" [1000] 999)\n for r :: \"('a \\<times> 'b) set\"\n where \"(a, b) \\<in> r \\<Longrightarrow> (b, a) \\<in> r\\<inverse>\"",
"class uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)",
"definition Image :: \"('a \\<times> 'b) set \\<Rightarrow> 'a set \\<Rightarrow> 'b set\" (infixr \"``\" 90)\n where \"r `` s = {y. \\<exists>x\\<in>s. (x, y) \\<in> r}\"",
"abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\""
] |
template
|
###lemma
(?r `` ?A \<subseteq> ?B) = (?A \<subseteq> - ?r\<inverse> `` (- ?B))
###symbols
Relation.converse :::: ('a \<times> 'b) set \<Rightarrow> ('b \<times> 'a) set
Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a
Relation.Image :::: ('a \<times> 'b) set \<Rightarrow> 'a set \<Rightarrow> 'b set
Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
###defs
inductive_set converse :: "('a \<times> 'b) set \<Rightarrow> ('b \<times> 'a) set" ("(_\<inverse>)" [1000] 999)
for r :: "('a \<times> 'b) set"
where "(a, b) \<in> r \<Longrightarrow> (b, a) \<in> r\<inverse>"
class uminus =
fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80)
definition Image :: "('a \<times> 'b) set \<Rightarrow> 'a set \<Rightarrow> 'b set" (infixr "``" 90)
where "r `` s = {y. \<exists>x\<in>s. (x, y) \<in> r}"
abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset_eq \<equiv> less_eq"
|
###output
?H1 (?H2 x_1 x_2) x_3 = ?H1 x_2 (?H3 (?H2 (?H4 x_1) (?H3 x_3)))###end
|
Nominal/Examples/Pattern
|
Pattern.alpha'
| null |
([ ?a]. ?x = [ ?b]. ?y) = (?a = ?b \<and> ?x = ?y \<or> ?a \<noteq> ?b \<and> [(?b, ?a)] \<bullet> ?x = ?y \<and> ?b \<sharp> ?x)
|
(?H1 x_1 x_2 = ?H1 x_3 x_4) = (x_1 = x_3 \<and> x_2 = x_4 \<or> x_1 \<noteq> x_3 \<and> ?H2 (?H3 (x_3, x_1) ?H4) x_2 = x_4 \<and> ?H5 x_3 x_2)
|
[
"Nominal.fresh",
"List.list.Nil",
"List.list.Cons",
"Nominal.perm",
"Nominal.abs_fun"
] |
[
"'a \\<Rightarrow> 'b \\<Rightarrow> bool",
"'a list",
"'a \\<Rightarrow> 'a list \\<Rightarrow> 'a list",
"('a \\<times> 'a) list \\<Rightarrow> 'b \\<Rightarrow> 'b",
"'a \\<Rightarrow> 'b \\<Rightarrow> 'a \\<Rightarrow> 'b noption"
] |
[
"definition fresh :: \"'x \\<Rightarrow> 'a \\<Rightarrow> bool\" (\\<open>_ \\<sharp> _\\<close> [80,80] 80) where\n \"a \\<sharp> x \\<longleftrightarrow> a \\<notin> supp 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 [] = []\"",
"datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"",
"consts \n perm :: \"'x prm \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixr \\<open>\\<bullet>\\<close> 80)\n swap :: \"('x \\<times> 'x) \\<Rightarrow> 'x \\<Rightarrow> 'x\"",
"definition abs_fun :: \"'x\\<Rightarrow>'a\\<Rightarrow>('x\\<Rightarrow>('a noption))\" (\\<open>[_]._\\<close> [100,100] 100) where \n \"[a].x \\<equiv> (\\<lambda>b. (if b=a then nSome(x) else (if b\\<sharp>x then nSome([(a,b)]\\<bullet>x) else nNone)))\""
] |
template
|
###lemma
([ ?a]. ?x = [ ?b]. ?y) = (?a = ?b \<and> ?x = ?y \<or> ?a \<noteq> ?b \<and> [(?b, ?a)] \<bullet> ?x = ?y \<and> ?b \<sharp> ?x)
###symbols
Nominal.fresh :::: 'a \<Rightarrow> 'b \<Rightarrow> bool
List.list.Nil :::: 'a list
List.list.Cons :::: 'a \<Rightarrow> 'a list \<Rightarrow> 'a list
Nominal.perm :::: ('a \<times> 'a) list \<Rightarrow> 'b \<Rightarrow> 'b
Nominal.abs_fun :::: 'a \<Rightarrow> 'b \<Rightarrow> 'a \<Rightarrow> 'b noption
###defs
definition fresh :: "'x \<Rightarrow> 'a \<Rightarrow> bool" (\<open>_ \<sharp> _\<close> [80,80] 80) where
"a \<sharp> x \<longleftrightarrow> a \<notin> supp 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 [] = []"
datatype (set: 'a) list =
Nil ("[]")
| Cons (hd: 'a) (tl: "'a list") (infixr "#" 65)
for
map: map
rel: list_all2
pred: list_all
where
"tl [] = []"
consts
perm :: "'x prm \<Rightarrow> 'a \<Rightarrow> 'a" (infixr \<open>\<bullet>\<close> 80)
swap :: "('x \<times> 'x) \<Rightarrow> 'x \<Rightarrow> 'x"
definition abs_fun :: "'x\<Rightarrow>'a\<Rightarrow>('x\<Rightarrow>('a noption))" (\<open>[_]._\<close> [100,100] 100) where
"[a].x \<equiv> (\<lambda>b. (if b=a then nSome(x) else (if b\<sharp>x then nSome([(a,b)]\<bullet>x) else nNone)))"
|
###output
(?H1 x_1 x_2 = ?H1 x_3 x_4) = (x_1 = x_3 \<and> x_2 = x_4 \<or> x_1 \<noteq> x_3 \<and> ?H2 (?H3 (x_3, x_1) ?H4) x_2 = x_4 \<and> ?H5 x_3 x_2)###end
|
Euclidean_Rings
|
Euclidean_Rings.mod_Suc_eq_mod_add3
|
lemma mod_Suc_eq_mod_add3 [simp]:
"m mod Suc (Suc (Suc n)) = m mod (3 + n)"
|
?m mod Suc (Suc (Suc ?n)) = ?m mod (3 + ?n)
|
?H1 x_1 (?H2 (?H2 (?H2 x_2))) = ?H1 x_1 (?H3 (?H4 (?H5 ?H6)) x_2)
|
[
"Num.num.One",
"Num.num.Bit1",
"Num.numeral_class.numeral",
"Groups.plus_class.plus",
"Nat.Suc",
"Rings.modulo_class.modulo"
] |
[
"num",
"num \\<Rightarrow> num",
"num \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"nat \\<Rightarrow> nat",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a"
] |
[
"datatype num = One | Bit0 num | Bit1 num",
"datatype num = One | Bit0 num | Bit1 num",
"primrec numeral :: \"num \\<Rightarrow> 'a\"\n where\n numeral_One: \"numeral One = 1\"\n | numeral_Bit0: \"numeral (Bit0 n) = numeral n + numeral n\"\n | numeral_Bit1: \"numeral (Bit1 n) = numeral n + numeral n + 1\"",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"definition Suc :: \"nat \\<Rightarrow> nat\"\n where \"Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))\"",
"class modulo = dvd + divide +\n fixes modulo :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"mod\" 70)"
] |
template
|
###lemma
?m mod Suc (Suc (Suc ?n)) = ?m mod (3 + ?n)
###symbols
Num.num.One :::: num
Num.num.Bit1 :::: num \<Rightarrow> num
Num.numeral_class.numeral :::: num \<Rightarrow> 'a
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Nat.Suc :::: nat \<Rightarrow> nat
Rings.modulo_class.modulo :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
###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 plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
definition Suc :: "nat \<Rightarrow> nat"
where "Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))"
class modulo = dvd + divide +
fixes modulo :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "mod" 70)
|
###output
?H1 x_1 (?H2 (?H2 (?H2 x_2))) = ?H1 x_1 (?H3 (?H4 (?H5 ?H6)) x_2)###end
|
Nominal/Examples/Crary
|
Crary.alg_equiv_inv_auto(6)
| null |
?\<Gamma> \<turnstile> Var ?x \<leftrightarrow> ?t : ?T \<Longrightarrow> (?t = Var ?x \<Longrightarrow> valid ?\<Gamma> \<Longrightarrow> (?x, ?T) \<in> set ?\<Gamma> \<Longrightarrow> ?P) \<Longrightarrow> ?P
|
\<lbrakk> ?H1 x_1 (?H2 x_2) x_3 x_4; \<lbrakk>x_3 = ?H2 x_2; ?H3 x_1; (x_2, x_4) \<in> ?H4 x_1\<rbrakk> \<Longrightarrow> x_5\<rbrakk> \<Longrightarrow> x_5
|
[
"List.list.set",
"Crary.valid",
"Crary.trm.Var",
"Crary.alg_path_equiv"
] |
[
"'a list \\<Rightarrow> 'a set",
"(name \\<times> ty) list \\<Rightarrow> bool",
"name \\<Rightarrow> trm",
"(name \\<times> ty) list \\<Rightarrow> trm \\<Rightarrow> trm \\<Rightarrow> ty \\<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 [] = []\""
] |
template
|
###lemma
?\<Gamma> \<turnstile> Var ?x \<leftrightarrow> ?t : ?T \<Longrightarrow> (?t = Var ?x \<Longrightarrow> valid ?\<Gamma> \<Longrightarrow> (?x, ?T) \<in> set ?\<Gamma> \<Longrightarrow> ?P) \<Longrightarrow> ?P
###symbols
List.list.set :::: 'a list \<Rightarrow> 'a set
Crary.valid :::: (name \<times> ty) list \<Rightarrow> bool
Crary.trm.Var :::: name \<Rightarrow> trm
Crary.alg_path_equiv :::: (name \<times> ty) list \<Rightarrow> trm \<Rightarrow> trm \<Rightarrow> ty \<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 [] = []"
|
###output
\<lbrakk> ?H1 x_1 (?H2 x_2) x_3 x_4; \<lbrakk>x_3 = ?H2 x_2; ?H3 x_1; (x_2, x_4) \<in> ?H4 x_1\<rbrakk> \<Longrightarrow> x_5\<rbrakk> \<Longrightarrow> x_5###end
|
Analysis/Topology_Euclidean_Space
|
Topology_Euclidean_Space.interior_halfspace_ge
|
lemma interior_halfspace_ge [simp]:
"a \<noteq> 0 \<Longrightarrow> interior {x. a \<bullet> x \<ge> b} = {x. a \<bullet> x > b}"
|
?a \<noteq> (0:: ?'a) \<Longrightarrow> interior {x. ?b \<le> ?a \<bullet> x} = {x. ?b < ?a \<bullet> x}
|
x_1 \<noteq> ?H1 \<Longrightarrow> ?H2 (?H3 (\<lambda>y_0. x_2 \<le> ?H4 x_1 y_0)) = ?H3 (\<lambda>y_1. x_2 < ?H4 x_1 y_1)
|
[
"Inner_Product.real_inner_class.inner",
"Set.Collect",
"Elementary_Topology.interior",
"Groups.zero_class.zero"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> real",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a set",
"'a"
] |
[
"class real_inner = real_vector + sgn_div_norm + dist_norm + uniformity_dist + open_uniformity +\n fixes inner :: \"'a \\<Rightarrow> 'a \\<Rightarrow> real\"\n assumes inner_commute: \"inner x y = inner y x\"\n and inner_add_left: \"inner (x + y) z = inner x z + inner y z\"\n and inner_scaleR_left [simp]: \"inner (scaleR r x) y = r * (inner x y)\"\n and inner_ge_zero [simp]: \"0 \\<le> inner x x\"\n and inner_eq_zero_iff [simp]: \"inner x x = 0 \\<longleftrightarrow> x = 0\"\n and norm_eq_sqrt_inner: \"norm x = sqrt (inner x x)\"\nbegin",
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
?a \<noteq> (0:: ?'a) \<Longrightarrow> interior {x. ?b \<le> ?a \<bullet> x} = {x. ?b < ?a \<bullet> x}
###symbols
Inner_Product.real_inner_class.inner :::: 'a \<Rightarrow> 'a \<Rightarrow> real
Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set
Elementary_Topology.interior :::: 'a set \<Rightarrow> 'a set
Groups.zero_class.zero :::: 'a
###defs
class real_inner = real_vector + sgn_div_norm + dist_norm + uniformity_dist + open_uniformity +
fixes inner :: "'a \<Rightarrow> 'a \<Rightarrow> real"
assumes inner_commute: "inner x y = inner y x"
and inner_add_left: "inner (x + y) z = inner x z + inner y z"
and inner_scaleR_left [simp]: "inner (scaleR r x) y = r * (inner x y)"
and inner_ge_zero [simp]: "0 \<le> inner x x"
and inner_eq_zero_iff [simp]: "inner x x = 0 \<longleftrightarrow> x = 0"
and norm_eq_sqrt_inner: "norm x = sqrt (inner x x)"
begin
class zero =
fixes zero :: 'a ("0")
|
###output
x_1 \<noteq> ?H1 \<Longrightarrow> ?H2 (?H3 (\<lambda>y_0. x_2 \<le> ?H4 x_1 y_0)) = ?H3 (\<lambda>y_1. x_2 < ?H4 x_1 y_1)###end
|
Homology/Brouwer_Degree
|
Brouwer_Degree.reduced_homology_group_nsphere_aux
|
lemma reduced_homology_group_nsphere_aux:
"if p = int n then reduced_homology_group n (nsphere n) \<cong> integer_group
else trivial_group(reduced_homology_group p (nsphere n))"
|
if ?p = int ?n then reduced_homology_group (int ?n) (nsphere ?n) \<cong> integer_group else trivial_group (reduced_homology_group ?p (nsphere ?n))
|
if x_1 = ?H1 x_2 then ?H2 (?H3 (?H1 x_2) (?H4 x_2)) ?H5 else ?H6 (?H3 x_1 (?H4 x_2))
|
[
"Elementary_Groups.trivial_group",
"Elementary_Groups.integer_group",
"Abstract_Euclidean_Space.nsphere",
"Brouwer_Degree.reduced_homology_group",
"Group.is_iso",
"Int.int"
] |
[
"('a, 'b) monoid_scheme \\<Rightarrow> bool",
"\\<lparr>carrier :: 'a set, mult :: int \\<Rightarrow> int \\<Rightarrow> int, one :: int\\<rparr>",
"nat \\<Rightarrow> (nat \\<Rightarrow> real) topology",
"int \\<Rightarrow> 'a topology \\<Rightarrow> (((nat \\<Rightarrow> real) \\<Rightarrow> 'a) \\<Rightarrow>\\<^sub>0 int) set monoid",
"('a, 'b) monoid_scheme \\<Rightarrow> ('c, 'd) monoid_scheme \\<Rightarrow> bool",
"nat \\<Rightarrow> int"
] |
[
"definition trivial_group :: \"('a, 'b) monoid_scheme \\<Rightarrow> bool\"\n where \"trivial_group G \\<equiv> group G \\<and> carrier G = {one G}\"",
"definition integer_group\n where \"integer_group = \\<lparr>carrier = UNIV, monoid.mult = (+), one = (0::int)\\<rparr>\"",
"definition nsphere where\n \"nsphere n \\<equiv> subtopology (Euclidean_space (Suc n)) { x. (\\<Sum>i\\<le>n. x i ^ 2) = 1 }\"",
"definition reduced_homology_group :: \"int \\<Rightarrow> 'a topology \\<Rightarrow> 'a chain set monoid\"\n where \"reduced_homology_group p X \\<equiv>\n subgroup_generated (homology_group p X)\n (kernel (homology_group p X) (homology_group p (discrete_topology {()}))\n (hom_induced p X {} (discrete_topology {()}) {} (\\<lambda>x. ())))\"",
"definition is_iso :: \"_ \\<Rightarrow> _ \\<Rightarrow> bool\" (infixr \"\\<cong>\" 60)\n where \"G \\<cong> H = (iso G H \\<noteq> {})\"",
"abbreviation int :: \"nat \\<Rightarrow> int\"\n where \"int \\<equiv> of_nat\""
] |
template
|
###lemma
if ?p = int ?n then reduced_homology_group (int ?n) (nsphere ?n) \<cong> integer_group else trivial_group (reduced_homology_group ?p (nsphere ?n))
###symbols
Elementary_Groups.trivial_group :::: ('a, 'b) monoid_scheme \<Rightarrow> bool
Elementary_Groups.integer_group :::: \<lparr>carrier :: 'a set, mult :: int \<Rightarrow> int \<Rightarrow> int, one :: int\<rparr>
Abstract_Euclidean_Space.nsphere :::: nat \<Rightarrow> (nat \<Rightarrow> real) topology
Brouwer_Degree.reduced_homology_group :::: int \<Rightarrow> 'a topology \<Rightarrow> (((nat \<Rightarrow> real) \<Rightarrow> 'a) \<Rightarrow>\<^sub>0 int) set monoid
Group.is_iso :::: ('a, 'b) monoid_scheme \<Rightarrow> ('c, 'd) monoid_scheme \<Rightarrow> bool
Int.int :::: nat \<Rightarrow> int
###defs
definition trivial_group :: "('a, 'b) monoid_scheme \<Rightarrow> bool"
where "trivial_group G \<equiv> group G \<and> carrier G = {one G}"
definition integer_group
where "integer_group = \<lparr>carrier = UNIV, monoid.mult = (+), one = (0::int)\<rparr>"
definition nsphere where
"nsphere n \<equiv> subtopology (Euclidean_space (Suc n)) { x. (\<Sum>i\<le>n. x i ^ 2) = 1 }"
definition reduced_homology_group :: "int \<Rightarrow> 'a topology \<Rightarrow> 'a chain set monoid"
where "reduced_homology_group p X \<equiv>
subgroup_generated (homology_group p X)
(kernel (homology_group p X) (homology_group p (discrete_topology {()}))
(hom_induced p X {} (discrete_topology {()}) {} (\<lambda>x. ())))"
definition is_iso :: "_ \<Rightarrow> _ \<Rightarrow> bool" (infixr "\<cong>" 60)
where "G \<cong> H = (iso G H \<noteq> {})"
abbreviation int :: "nat \<Rightarrow> int"
where "int \<equiv> of_nat"
|
###output
if x_1 = ?H1 x_2 then ?H2 (?H3 (?H1 x_2) (?H4 x_2)) ?H5 else ?H6 (?H3 x_1 (?H4 x_2))###end
|
Library/Quotient_Set
|
Quotient_Set.mem_prs
|
lemma mem_prs[quot_preserve]:
assumes "Quotient3 R Abs Rep"
shows "(Rep ---> (-`) Abs ---> id) (\<in>) = (\<in>)"
|
Quotient3 ?R ?Abs ?Rep \<Longrightarrow> (?Rep ---> (-`) ?Abs ---> id) (\<in>) = (\<in>)
|
?H1 x_1 x_2 x_3 \<Longrightarrow> ?H2 x_3 (?H2 (?H3 x_2) ?H4) (\<in>) = (\<in>)
|
[
"Fun.id",
"Set.vimage",
"Fun.map_fun",
"Quotient.Quotient3"
] |
[
"'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'd) \\<Rightarrow> ('b \\<Rightarrow> 'c) \\<Rightarrow> 'a \\<Rightarrow> 'd",
"('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('b \\<Rightarrow> 'a) \\<Rightarrow> bool"
] |
[
"definition id :: \"'a \\<Rightarrow> 'a\"\n where \"id = (\\<lambda>x. x)\"",
"definition vimage :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set \\<Rightarrow> 'a set\" (infixr \"-`\" 90)\n where \"f -` B \\<equiv> {x. f x \\<in> B}\"",
"definition map_fun :: \"('c \\<Rightarrow> 'a) \\<Rightarrow> ('b \\<Rightarrow> 'd) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> 'c \\<Rightarrow> 'd\"\n where \"map_fun f g h = g \\<circ> h \\<circ> f\"",
"definition\n \"Quotient3 R Abs Rep \\<longleftrightarrow>\n (\\<forall>a. Abs (Rep a) = a) \\<and> (\\<forall>a. R (Rep a) (Rep a)) \\<and>\n (\\<forall>r s. R r s \\<longleftrightarrow> R r r \\<and> R s s \\<and> Abs r = Abs s)\""
] |
template
|
###lemma
Quotient3 ?R ?Abs ?Rep \<Longrightarrow> (?Rep ---> (-`) ?Abs ---> id) (\<in>) = (\<in>)
###symbols
Fun.id :::: 'a \<Rightarrow> 'a
Set.vimage :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b set \<Rightarrow> 'a set
Fun.map_fun :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'd) \<Rightarrow> ('b \<Rightarrow> 'c) \<Rightarrow> 'a \<Rightarrow> 'd
Quotient.Quotient3 :::: ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('b \<Rightarrow> 'a) \<Rightarrow> bool
###defs
definition id :: "'a \<Rightarrow> 'a"
where "id = (\<lambda>x. x)"
definition vimage :: "('a \<Rightarrow> 'b) \<Rightarrow> 'b set \<Rightarrow> 'a set" (infixr "-`" 90)
where "f -` B \<equiv> {x. f x \<in> B}"
definition map_fun :: "('c \<Rightarrow> 'a) \<Rightarrow> ('b \<Rightarrow> 'd) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'c \<Rightarrow> 'd"
where "map_fun f g h = g \<circ> h \<circ> f"
definition
"Quotient3 R Abs Rep \<longleftrightarrow>
(\<forall>a. Abs (Rep a) = a) \<and> (\<forall>a. R (Rep a) (Rep a)) \<and>
(\<forall>r s. R r s \<longleftrightarrow> R r r \<and> R s s \<and> Abs r = Abs s)"
|
###output
?H1 x_1 x_2 x_3 \<Longrightarrow> ?H2 x_3 (?H2 (?H3 x_2) ?H4) (\<in>) = (\<in>)###end
|
Cardinals/Wellorder_Constructions
|
Wellorder_Constructions.oproj_embed
|
theorem oproj_embed:
assumes r: "Well_order r" and s: "Well_order s" and f: "oproj r s f"
shows "\<exists> g. embed s r g"
|
Well_order ?r \<Longrightarrow> Well_order ?s \<Longrightarrow> oproj ?r ?s ?f \<Longrightarrow> \<exists>g. embed ?s ?r g
|
\<lbrakk> ?H1 x_1; ?H1 x_2; ?H2 x_1 x_2 x_3\<rbrakk> \<Longrightarrow> \<exists>y_0. ?H3 x_2 x_1 y_0
|
[
"BNF_Wellorder_Embedding.embed",
"Wellorder_Constructions.oproj",
"Order_Relation.Well_order"
] |
[
"('a \\<times> 'a) set \\<Rightarrow> ('b \\<times> 'b) set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"('a \\<times> 'a) set \\<Rightarrow> ('b \\<times> 'b) set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"('a \\<times> 'a) set \\<Rightarrow> bool"
] |
[
"definition embed :: \"'a rel \\<Rightarrow> 'a' rel \\<Rightarrow> ('a \\<Rightarrow> 'a') \\<Rightarrow> bool\"\n where\n \"embed r r' f \\<equiv> \\<forall>a \\<in> Field r. bij_betw f (under r a) (under r' (f a))\"",
"definition \"oproj r s f \\<equiv> Field s \\<subseteq> f ` (Field r) \\<and> compat r s f\"",
"abbreviation \"Well_order r \\<equiv> well_order_on (Field r) r\""
] |
template
|
###lemma
Well_order ?r \<Longrightarrow> Well_order ?s \<Longrightarrow> oproj ?r ?s ?f \<Longrightarrow> \<exists>g. embed ?s ?r g
###symbols
BNF_Wellorder_Embedding.embed :::: ('a \<times> 'a) set \<Rightarrow> ('b \<times> 'b) set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
Wellorder_Constructions.oproj :::: ('a \<times> 'a) set \<Rightarrow> ('b \<times> 'b) set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool
Order_Relation.Well_order :::: ('a \<times> 'a) set \<Rightarrow> bool
###defs
definition embed :: "'a rel \<Rightarrow> 'a' rel \<Rightarrow> ('a \<Rightarrow> 'a') \<Rightarrow> bool"
where
"embed r r' f \<equiv> \<forall>a \<in> Field r. bij_betw f (under r a) (under r' (f a))"
definition "oproj r s f \<equiv> Field s \<subseteq> f ` (Field r) \<and> compat r s f"
abbreviation "Well_order r \<equiv> well_order_on (Field r) r"
|
###output
\<lbrakk> ?H1 x_1; ?H1 x_2; ?H2 x_1 x_2 x_3\<rbrakk> \<Longrightarrow> \<exists>y_0. ?H3 x_2 x_1 y_0###end
|
HOLCF/Tr
|
Transfer.transfer_raw(210)
| null |
bi_total ?A \<Longrightarrow> Transfer.Rel (rel_fun (rel_fun ?A (=)) (=)) All All
|
?H1 x_1 \<Longrightarrow> ?H2 (?H3 (?H3 x_1 (=)) (=)) All All
|
[
"BNF_Def.rel_fun",
"Transfer.Rel",
"Transfer.bi_total"
] |
[
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'c) \\<Rightarrow> ('b \\<Rightarrow> 'd) \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'b \\<Rightarrow> bool",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool"
] |
[
"definition\n rel_fun :: \"('a \\<Rightarrow> 'c \\<Rightarrow> bool) \\<Rightarrow> ('b \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'd) \\<Rightarrow> bool\"\nwhere\n \"rel_fun A B = (\\<lambda>f g. \\<forall>x y. A x y \\<longrightarrow> B (f x) (g y))\"",
"definition Rel :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'b \\<Rightarrow> bool\"\n where \"Rel r \\<equiv> r\"",
"definition bi_total :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool\"\n where \"bi_total R \\<longleftrightarrow> (\\<forall>x. \\<exists>y. R x y) \\<and> (\\<forall>y. \\<exists>x. R x y)\""
] |
template
|
###lemma
bi_total ?A \<Longrightarrow> Transfer.Rel (rel_fun (rel_fun ?A (=)) (=)) All All
###symbols
BNF_Def.rel_fun :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'c) \<Rightarrow> ('b \<Rightarrow> 'd) \<Rightarrow> bool
Transfer.Rel :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool
Transfer.bi_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 Rel :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool"
where "Rel r \<equiv> r"
definition bi_total :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool"
where "bi_total R \<longleftrightarrow> (\<forall>x. \<exists>y. R x y) \<and> (\<forall>y. \<exists>x. R x y)"
|
###output
?H1 x_1 \<Longrightarrow> ?H2 (?H3 (?H3 x_1 (=)) (=)) All All###end
|
Numeral_Simprocs
|
Numeral_Simprocs.nat_less_add_iff2
|
lemma nat_less_add_iff2:
"i <= (j::nat) ==> (i*u + m < j*u + n) = (m < (j-i)*u + n)"
|
?i \<le> ?j \<Longrightarrow> (?i * ?u + ?m < ?j * ?u + ?n) = (?m < (?j - ?i) * ?u + ?n)
|
x_1 \<le> x_2 \<Longrightarrow> (?H1 (?H2 x_1 x_3) x_4 < ?H1 (?H2 x_2 x_3) x_5) = (x_4 < ?H1 (?H2 (?H3 x_2 x_1) x_3) x_5)
|
[
"Groups.minus_class.minus",
"Groups.times_class.times",
"Groups.plus_class.plus"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a"
] |
[
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)"
] |
template
|
###lemma
?i \<le> ?j \<Longrightarrow> (?i * ?u + ?m < ?j * ?u + ?n) = (?m < (?j - ?i) * ?u + ?n)
###symbols
Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
###defs
class minus =
fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
|
###output
x_1 \<le> x_2 \<Longrightarrow> (?H1 (?H2 x_1 x_3) x_4 < ?H1 (?H2 x_2 x_3) x_5) = (x_4 < ?H1 (?H2 (?H3 x_2 x_1) x_3) x_5)###end
|
Hoare_Parallel/RG_Examples
|
RG_Examples.Example2_lemma2_aux2
|
lemma Example2_lemma2_aux2:
"j\<le> s \<Longrightarrow> (\<Sum>i::nat=0..<j. (b (s:=t)) i) = (\<Sum>i=0..<j. b i)"
|
?j \<le> ?s \<Longrightarrow> sum (?b(?s := ?t)) {0..< ?j} = sum ?b {0..< ?j}
|
x_1 \<le> x_2 \<Longrightarrow> ?H1 (?H2 x_3 x_2 x_4) (?H3 ?H4 x_1) = ?H1 x_3 (?H3 ?H4 x_1)
|
[
"Groups.zero_class.zero",
"Set_Interval.ord_class.atLeastLessThan",
"Fun.fun_upd",
"Groups_Big.comm_monoid_add_class.sum"
] |
[
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> 'b \\<Rightarrow> 'a \\<Rightarrow> 'b",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"definition fun_upd :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> 'b \\<Rightarrow> ('a \\<Rightarrow> 'b)\"\n where \"fun_upd f a b = (\\<lambda>x. if x = a then b else f x)\""
] |
template
|
###lemma
?j \<le> ?s \<Longrightarrow> sum (?b(?s := ?t)) {0..< ?j} = sum ?b {0..< ?j}
###symbols
Groups.zero_class.zero :::: 'a
Set_Interval.ord_class.atLeastLessThan :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a set
Fun.fun_upd :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> 'a \<Rightarrow> 'b
Groups_Big.comm_monoid_add_class.sum :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b
###defs
class zero =
fixes zero :: 'a ("0")
definition fun_upd :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> ('a \<Rightarrow> 'b)"
where "fun_upd f a b = (\<lambda>x. if x = a then b else f x)"
|
###output
x_1 \<le> x_2 \<Longrightarrow> ?H1 (?H2 x_3 x_2 x_4) (?H3 ?H4 x_1) = ?H1 x_3 (?H3 ?H4 x_1)###end
|
Computational_Algebra/Formal_Laurent_Series
|
Formal_Laurent_Series.fls_right_inverse_delta
|
lemma fls_right_inverse_delta:
fixes b :: "'a::{comm_monoid_add,mult_zero,uminus}"
assumes "b \<noteq> 0"
shows "fls_right_inverse (Abs_fls (\<lambda>n. if n=a then b else 0)) x =
Abs_fls (\<lambda>n. if n=-a then x else 0)"
|
?b \<noteq> (0:: ?'a) \<Longrightarrow> fls_right_inverse (Abs_fls (\<lambda>n. if n = ?a then ?b else (0:: ?'a))) ?x = Abs_fls (\<lambda>n. if n = - ?a then ?x else (0:: ?'a))
|
x_1 \<noteq> ?H1 \<Longrightarrow> ?H2 (?H3 (\<lambda>y_0. if y_0 = x_2 then x_1 else ?H1)) x_3 = ?H3 (\<lambda>y_1. if y_1 = ?H4 x_2 then x_3 else ?H1)
|
[
"Groups.uminus_class.uminus",
"Formal_Laurent_Series.fls.Abs_fls",
"Formal_Laurent_Series.fls_right_inverse",
"Groups.zero_class.zero"
] |
[
"'a \\<Rightarrow> 'a",
"(int \\<Rightarrow> 'a) \\<Rightarrow> 'a fls",
"'a fls \\<Rightarrow> 'a \\<Rightarrow> 'a fls",
"'a"
] |
[
"class uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)",
"abbreviation fls_right_inverse ::\n \"'a::{comm_monoid_add,uminus,times} fls \\<Rightarrow> 'a \\<Rightarrow> 'a fls\"\n where\n \"fls_right_inverse f y \\<equiv>\n fls_shift (fls_subdegree f) (fps_to_fls (fps_right_inverse (fls_base_factor_to_fps f) y))\"",
"class zero =\n fixes zero :: 'a (\"0\")"
] |
template
|
###lemma
?b \<noteq> (0:: ?'a) \<Longrightarrow> fls_right_inverse (Abs_fls (\<lambda>n. if n = ?a then ?b else (0:: ?'a))) ?x = Abs_fls (\<lambda>n. if n = - ?a then ?x else (0:: ?'a))
###symbols
Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a
Formal_Laurent_Series.fls.Abs_fls :::: (int \<Rightarrow> 'a) \<Rightarrow> 'a fls
Formal_Laurent_Series.fls_right_inverse :::: 'a fls \<Rightarrow> 'a \<Rightarrow> 'a fls
Groups.zero_class.zero :::: 'a
###defs
class uminus =
fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80)
abbreviation fls_right_inverse ::
"'a::{comm_monoid_add,uminus,times} fls \<Rightarrow> 'a \<Rightarrow> 'a fls"
where
"fls_right_inverse f y \<equiv>
fls_shift (fls_subdegree f) (fps_to_fls (fps_right_inverse (fls_base_factor_to_fps f) y))"
class zero =
fixes zero :: 'a ("0")
|
###output
x_1 \<noteq> ?H1 \<Longrightarrow> ?H2 (?H3 (\<lambda>y_0. if y_0 = x_2 then x_1 else ?H1)) x_3 = ?H3 (\<lambda>y_1. if y_1 = ?H4 x_2 then x_3 else ?H1)###end
|
Predicate_Compile_Examples/Predicate_Compile_Tests
|
Predicate_Compile_Tests.tupled_append''_PiioI
| null |
tupled_append'' (?x, ?xa, ?xb) \<Longrightarrow> pred.eval (tupled_append''_Piio (?x, ?xa)) ?xb
|
?H1 (x_1, x_2, x_3) \<Longrightarrow> ?H2 (?H3 (x_1, x_2)) x_3
|
[
"Predicate_Compile_Tests.tupled_append''_Piio",
"Predicate.pred.eval",
"Predicate_Compile_Tests.tupled_append''"
] |
[
"'a list \\<times> 'a list \\<Rightarrow> 'a list Predicate.pred",
"'a Predicate.pred \\<Rightarrow> 'a \\<Rightarrow> bool",
"'a list \\<times> 'a list \\<times> 'a list \\<Rightarrow> bool"
] |
[
"datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: \"'a \\<Rightarrow> bool\")",
"inductive tupled_append'' :: \"'a list \\<times> 'a list \\<times> 'a list \\<Rightarrow> bool\"\nwhere\n \"tupled_append'' ([], xs, xs)\"\n| \"ys = fst yszs ==> x # zs = snd yszs ==> tupled_append'' (xs, ys, zs) \\<Longrightarrow> tupled_append'' (x # xs, yszs)\""
] |
template
|
###lemma
tupled_append'' (?x, ?xa, ?xb) \<Longrightarrow> pred.eval (tupled_append''_Piio (?x, ?xa)) ?xb
###symbols
Predicate_Compile_Tests.tupled_append''_Piio :::: 'a list \<times> 'a list \<Rightarrow> 'a list Predicate.pred
Predicate.pred.eval :::: 'a Predicate.pred \<Rightarrow> 'a \<Rightarrow> bool
Predicate_Compile_Tests.tupled_append'' :::: 'a list \<times> 'a list \<times> 'a list \<Rightarrow> bool
###defs
datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: "'a \<Rightarrow> bool")
inductive tupled_append'' :: "'a list \<times> 'a list \<times> 'a list \<Rightarrow> bool"
where
"tupled_append'' ([], xs, xs)"
| "ys = fst yszs ==> x # zs = snd yszs ==> tupled_append'' (xs, ys, zs) \<Longrightarrow> tupled_append'' (x # xs, yszs)"
|
###output
?H1 (x_1, x_2, x_3) \<Longrightarrow> ?H2 (?H3 (x_1, x_2)) x_3###end
|
Auth/Guard/Extensions
|
Extensions.keyset_keysfor
|
lemma keyset_keysfor [iff]: "keyset (keysfor G)"
|
keyset (keysfor ?G)
|
?H1 (?H2 x_1)
|
[
"Extensions.keysfor",
"Extensions.keyset"
] |
[
"msg set \\<Rightarrow> msg set",
"msg set \\<Rightarrow> bool"
] |
[] |
template
|
###lemma
keyset (keysfor ?G)
###symbols
Extensions.keysfor :::: msg set \<Rightarrow> msg set
Extensions.keyset :::: msg set \<Rightarrow> bool
###defs
|
###output
?H1 (?H2 x_1)###end
|
Probability/SPMF
|
SPMF.set_pair_spmf
|
lemma set_pair_spmf [simp]: "set_spmf (pair_spmf p q) = set_spmf p \<times> set_spmf q"
|
set_spmf (pair_spmf ?p ?q) = set_spmf ?p \<times> set_spmf ?q
|
?H1 (?H2 x_1 x_2) = ?H3 (?H1 x_1) (?H1 x_2)
|
[
"Product_Type.Times",
"SPMF.pair_spmf",
"SPMF.set_spmf"
] |
[
"'a set \\<Rightarrow> 'b set \\<Rightarrow> ('a \\<times> 'b) set",
"'a spmf \\<Rightarrow> 'b spmf \\<Rightarrow> ('a \\<times> 'b) spmf",
"'a spmf \\<Rightarrow> 'a set"
] |
[
"abbreviation Times :: \"'a set \\<Rightarrow> 'b set \\<Rightarrow> ('a \\<times> 'b) set\" (infixr \"\\<times>\" 80)\n where \"A \\<times> B \\<equiv> Sigma A (\\<lambda>_. B)\"",
"definition pair_spmf :: \"'a spmf \\<Rightarrow> 'b spmf \\<Rightarrow> ('a \\<times> 'b) spmf\"\nwhere \"pair_spmf p q = bind_pmf (pair_pmf p q) (\\<lambda>xy. case xy of (Some x, Some y) \\<Rightarrow> return_spmf (x, y) | _ \\<Rightarrow> return_pmf None)\"",
"definition set_spmf :: \"'a spmf \\<Rightarrow> 'a set\"\n where \"set_spmf p = set_pmf p \\<bind> set_option\""
] |
template
|
###lemma
set_spmf (pair_spmf ?p ?q) = set_spmf ?p \<times> set_spmf ?q
###symbols
Product_Type.Times :::: 'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<times> 'b) set
SPMF.pair_spmf :::: 'a spmf \<Rightarrow> 'b spmf \<Rightarrow> ('a \<times> 'b) spmf
SPMF.set_spmf :::: 'a spmf \<Rightarrow> 'a set
###defs
abbreviation Times :: "'a set \<Rightarrow> 'b set \<Rightarrow> ('a \<times> 'b) set" (infixr "\<times>" 80)
where "A \<times> B \<equiv> Sigma A (\<lambda>_. B)"
definition pair_spmf :: "'a spmf \<Rightarrow> 'b spmf \<Rightarrow> ('a \<times> 'b) spmf"
where "pair_spmf p q = bind_pmf (pair_pmf p q) (\<lambda>xy. case xy of (Some x, Some y) \<Rightarrow> return_spmf (x, y) | _ \<Rightarrow> return_pmf None)"
definition set_spmf :: "'a spmf \<Rightarrow> 'a set"
where "set_spmf p = set_pmf p \<bind> set_option"
|
###output
?H1 (?H2 x_1 x_2) = ?H3 (?H1 x_1) (?H1 x_2)###end
|
Transitive_Closure
|
Transitive_Closure.rtrancl_trancl_reflcl
|
lemma rtrancl_trancl_reflcl [code]: "r\<^sup>* = (r\<^sup>+)\<^sup>="
|
?r\<^sup>* = (?r\<^sup>+)\<^sup>=
|
?H1 x_1 = ?H2 (?H3 x_1)
|
[
"Transitive_Closure.trancl",
"Transitive_Closure.reflcl",
"Transitive_Closure.rtrancl"
] |
[
"('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set",
"('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set",
"('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set"
] |
[
"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>+\"",
"abbreviation reflcl :: \"('a \\<times> 'a) set \\<Rightarrow> ('a \\<times> 'a) set\" (\"(_\\<^sup>=)\" [1000] 999)\n where \"r\\<^sup>= \\<equiv> r \\<union> Id\"",
"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>*\""
] |
template
|
###lemma
?r\<^sup>* = (?r\<^sup>+)\<^sup>=
###symbols
Transitive_Closure.trancl :::: ('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set
Transitive_Closure.reflcl :::: ('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set
Transitive_Closure.rtrancl :::: ('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set
###defs
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>+"
abbreviation reflcl :: "('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set" ("(_\<^sup>=)" [1000] 999)
where "r\<^sup>= \<equiv> r \<union> Id"
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>*"
|
###output
?H1 x_1 = ?H2 (?H3 x_1)###end
|
Computational_Algebra/Formal_Power_Series
|
Formal_Power_Series.fps_cutoff_numeral
|
lemma fps_cutoff_numeral: "fps_cutoff n (numeral c) = (if n = 0 then 0 else numeral c)"
|
fps_cutoff ?n (numeral ?c) = (if ?n = 0 then 0 else numeral ?c)
|
?H1 x_1 (?H2 x_2) = (if x_1 = ?H3 then ?H3 else ?H2 x_2)
|
[
"Groups.zero_class.zero",
"Num.numeral_class.numeral",
"Formal_Power_Series.fps_cutoff"
] |
[
"'a",
"num \\<Rightarrow> 'a",
"nat \\<Rightarrow> 'a fps \\<Rightarrow> 'a fps"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"primrec numeral :: \"num \\<Rightarrow> 'a\"\n where\n numeral_One: \"numeral One = 1\"\n | numeral_Bit0: \"numeral (Bit0 n) = numeral n + numeral n\"\n | numeral_Bit1: \"numeral (Bit1 n) = numeral n + numeral n + 1\"",
"definition \"fps_cutoff n f = Abs_fps (\\<lambda>i. if i < n then f$i else 0)\""
] |
template
|
###lemma
fps_cutoff ?n (numeral ?c) = (if ?n = 0 then 0 else numeral ?c)
###symbols
Groups.zero_class.zero :::: 'a
Num.numeral_class.numeral :::: num \<Rightarrow> 'a
Formal_Power_Series.fps_cutoff :::: nat \<Rightarrow> 'a fps \<Rightarrow> 'a fps
###defs
class zero =
fixes zero :: 'a ("0")
primrec numeral :: "num \<Rightarrow> 'a"
where
numeral_One: "numeral One = 1"
| numeral_Bit0: "numeral (Bit0 n) = numeral n + numeral n"
| numeral_Bit1: "numeral (Bit1 n) = numeral n + numeral n + 1"
definition "fps_cutoff n f = Abs_fps (\<lambda>i. if i < n then f$i else 0)"
|
###output
?H1 x_1 (?H2 x_2) = (if x_1 = ?H3 then ?H3 else ?H2 x_2)###end
|
Matrix_LP/ComputeNumeral
|
ComputeNumeral.compute_numeral(19)
| null |
(?P \<longrightarrow> True) = True
|
(x_1 \<longrightarrow> True) = True
|
[] |
[] |
[] |
template
|
###lemma
(?P \<longrightarrow> True) = True
###symbols
###defs
|
###output
(x_1 \<longrightarrow> True) = True###end
|
Nominal/Examples/SOS
|
SOS.values_reduce_to_themselves
|
lemma values_reduce_to_themselves:
assumes a: "val v"
shows "v \<Down> v"
|
val ?v \<Longrightarrow> ?v \<Down> ?v
|
?H1 x_1 \<Longrightarrow> ?H2 x_1 x_1
|
[
"SOS.big",
"SOS.val"
] |
[
"trm \\<Rightarrow> trm \\<Rightarrow> bool",
"trm \\<Rightarrow> bool"
] |
[] |
template
|
###lemma
val ?v \<Longrightarrow> ?v \<Down> ?v
###symbols
SOS.big :::: trm \<Rightarrow> trm \<Rightarrow> bool
SOS.val :::: trm \<Rightarrow> bool
###defs
|
###output
?H1 x_1 \<Longrightarrow> ?H2 x_1 x_1###end
|
Real_Asymp/Multiseries_Expansion
|
Multiseries_Expansion.expands_to_basic
|
lemma expands_to_basic:
assumes "basis_wf (b # basis)" "length basis = expansion_level TYPE('a::multiseries)"
shows "(b expands_to MS (MSLCons (const_expansion 1 :: 'a, 1) MSLNil) b) (b # basis)"
|
basis_wf (?b # ?basis) \<Longrightarrow> length ?basis = expansion_level TYPE(?'a) \<Longrightarrow> (?b expands_to MS (MSLCons (const_expansion 1, 1) MSLNil) ?b) (?b # ?basis)
|
\<lbrakk> ?H1 (?H2 x_1 x_2); ?H3 x_2 = ?H4 TYPE(?'a)\<rbrakk> \<Longrightarrow> ?H5 x_1 (?H6 (?H7 (?H8 ?H9, ?H9) ?H10) x_1) (?H2 x_1 x_2)
|
[
"Multiseries_Expansion.msllist.MSLNil",
"Groups.one_class.one",
"Multiseries_Expansion.multiseries_class.const_expansion",
"Multiseries_Expansion.msllist.MSLCons",
"Multiseries_Expansion.ms.MS",
"Multiseries_Expansion.expands_to",
"Multiseries_Expansion.multiseries_class.expansion_level",
"List.length",
"List.list.Cons",
"Multiseries_Expansion.basis_wf"
] |
[
"'a msllist",
"'a",
"real \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a msllist \\<Rightarrow> 'a msllist",
"('a \\<times> real) msllist \\<Rightarrow> (real \\<Rightarrow> real) \\<Rightarrow> 'a ms",
"(real \\<Rightarrow> real) \\<Rightarrow> 'a \\<Rightarrow> (real \\<Rightarrow> real) list \\<Rightarrow> bool",
"'a itself \\<Rightarrow> nat",
"'a list \\<Rightarrow> nat",
"'a \\<Rightarrow> 'a list \\<Rightarrow> 'a list",
"(real \\<Rightarrow> real) list \\<Rightarrow> bool"
] |
[
"codatatype 'a msllist = MSLNil | MSLCons 'a \"'a msllist\"\n for map: mslmap",
"class one =\n fixes one :: 'a (\"1\")",
"class multiseries = plus + minus + times + uminus + inverse + \n fixes is_expansion :: \"'a \\<Rightarrow> basis \\<Rightarrow> bool\"\n and expansion_level :: \"'a itself \\<Rightarrow> nat\"\n and eval :: \"'a \\<Rightarrow> real \\<Rightarrow> real\"\n and zero_expansion :: 'a\n and const_expansion :: \"real \\<Rightarrow> 'a\"\n and powr_expansion :: \"bool \\<Rightarrow> 'a \\<Rightarrow> real \\<Rightarrow> 'a\"\n and power_expansion :: \"bool \\<Rightarrow> 'a \\<Rightarrow> nat \\<Rightarrow> 'a\"\n and trimmed :: \"'a \\<Rightarrow> bool\"\n and dominant_term :: \"'a \\<Rightarrow> monom\"\n\n assumes is_expansion_length:\n \"is_expansion F basis \\<Longrightarrow> length basis = expansion_level (TYPE('a))\"\n assumes is_expansion_zero:\n \"basis_wf basis \\<Longrightarrow> length basis = expansion_level (TYPE('a)) \\<Longrightarrow> \n is_expansion zero_expansion basis\"\n assumes is_expansion_const:\n \"basis_wf basis \\<Longrightarrow> length basis = expansion_level (TYPE('a)) \\<Longrightarrow> \n is_expansion (const_expansion c) basis\"\n assumes is_expansion_uminus:\n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> is_expansion (-F) basis\"\n assumes is_expansion_add: \n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> is_expansion G basis \\<Longrightarrow> \n is_expansion (F + G) basis\"\n assumes is_expansion_minus: \n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> is_expansion G basis \\<Longrightarrow> \n is_expansion (F - G) basis\"\n assumes is_expansion_mult: \n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> is_expansion G basis \\<Longrightarrow> \n is_expansion (F * G) basis\"\n assumes is_expansion_inverse:\n \"basis_wf basis \\<Longrightarrow> trimmed F \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> \n is_expansion (inverse F) basis\"\n assumes is_expansion_divide:\n \"basis_wf basis \\<Longrightarrow> trimmed G \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> is_expansion G basis \\<Longrightarrow> \n is_expansion (F / G) basis\"\n assumes is_expansion_powr:\n \"basis_wf basis \\<Longrightarrow> trimmed F \\<Longrightarrow> fst (dominant_term F) > 0 \\<Longrightarrow> is_expansion F basis \\<Longrightarrow>\n is_expansion (powr_expansion abort F p) basis\"\n assumes is_expansion_power:\n \"basis_wf basis \\<Longrightarrow> trimmed F \\<Longrightarrow> is_expansion F basis \\<Longrightarrow>\n is_expansion (power_expansion abort F n) basis\"\n \n assumes is_expansion_imp_smallo:\n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> filterlim b at_top at_top \\<Longrightarrow>\n (\\<forall>g\\<in>set basis. (\\<lambda>x. ln (g x)) \\<in> o(\\<lambda>x. ln (b x))) \\<Longrightarrow> e > 0 \\<Longrightarrow> eval F \\<in> o(\\<lambda>x. b x powr e)\"\n assumes is_expansion_imp_smallomega:\n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> filterlim b at_top at_top \\<Longrightarrow> trimmed F \\<Longrightarrow> \n (\\<forall>g\\<in>set basis. (\\<lambda>x. ln (g x)) \\<in> o(\\<lambda>x. ln (b x))) \\<Longrightarrow> e < 0 \\<Longrightarrow> eval F \\<in> \\<omega>(\\<lambda>x. b x powr e)\"\n assumes trimmed_imp_eventually_sgn:\n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> trimmed F \\<Longrightarrow>\n eventually (\\<lambda>x. sgn (eval F x) = sgn (fst (dominant_term F))) at_top\"\n assumes trimmed_imp_eventually_nz: \n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> trimmed F \\<Longrightarrow> \n eventually (\\<lambda>x. eval F x \\<noteq> 0) at_top\"\n assumes trimmed_imp_dominant_term_nz: \"trimmed F \\<Longrightarrow> fst (dominant_term F) \\<noteq> 0\"\n \n assumes dominant_term: \n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> trimmed F \\<Longrightarrow>\n eval F \\<sim>[at_top] eval_monom (dominant_term F) basis\"\n assumes dominant_term_bigo:\n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow>\n eval F \\<in> O(eval_monom (1, snd (dominant_term F)) basis)\"\n assumes length_dominant_term:\n \"length (snd (dominant_term F)) = expansion_level TYPE('a)\"\n assumes fst_dominant_term_uminus [simp]: \"fst (dominant_term (- F)) = -fst (dominant_term F)\"\n assumes trimmed_uminus_iff [simp]: \"trimmed (-F) \\<longleftrightarrow> trimmed F\"\n \n assumes add_zero_expansion_left [simp]: \"zero_expansion + F = F\"\n assumes add_zero_expansion_right [simp]: \"F + zero_expansion = F\"\n \n assumes eval_zero [simp]: \"eval zero_expansion x = 0\"\n assumes eval_const [simp]: \"eval (const_expansion c) x = c\"\n assumes eval_uminus [simp]: \"eval (-F) = (\\<lambda>x. -eval F x)\"\n assumes eval_plus [simp]: \"eval (F + G) = (\\<lambda>x. eval F x + eval G x)\"\n assumes eval_minus [simp]: \"eval (F - G) = (\\<lambda>x. eval F x - eval G x)\"\n assumes eval_times [simp]: \"eval (F * G) = (\\<lambda>x. eval F x * eval G x)\"\n assumes eval_inverse [simp]: \"eval (inverse F) = (\\<lambda>x. inverse (eval F x))\"\n assumes eval_divide [simp]: \"eval (F / G) = (\\<lambda>x. eval F x / eval G x)\"\n assumes eval_powr [simp]: \"eval (powr_expansion abort F p) = (\\<lambda>x. eval F x powr p)\"\n assumes eval_power [simp]: \"eval (power_expansion abort F n) = (\\<lambda>x. eval F x ^ n)\"\n assumes minus_eq_plus_uminus: \"F - G = F + (-G)\"\n assumes times_const_expansion_1: \"const_expansion 1 * F = F\"\n assumes trimmed_const_expansion: \"trimmed (const_expansion c) \\<longleftrightarrow> c \\<noteq> 0\"\nbegin",
"codatatype 'a msllist = MSLNil | MSLCons 'a \"'a msllist\"\n for map: mslmap",
"datatype 'a ms = MS \"('a \\<times> real) msllist\" \"real \\<Rightarrow> real\"",
"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\"",
"class multiseries = plus + minus + times + uminus + inverse + \n fixes is_expansion :: \"'a \\<Rightarrow> basis \\<Rightarrow> bool\"\n and expansion_level :: \"'a itself \\<Rightarrow> nat\"\n and eval :: \"'a \\<Rightarrow> real \\<Rightarrow> real\"\n and zero_expansion :: 'a\n and const_expansion :: \"real \\<Rightarrow> 'a\"\n and powr_expansion :: \"bool \\<Rightarrow> 'a \\<Rightarrow> real \\<Rightarrow> 'a\"\n and power_expansion :: \"bool \\<Rightarrow> 'a \\<Rightarrow> nat \\<Rightarrow> 'a\"\n and trimmed :: \"'a \\<Rightarrow> bool\"\n and dominant_term :: \"'a \\<Rightarrow> monom\"\n\n assumes is_expansion_length:\n \"is_expansion F basis \\<Longrightarrow> length basis = expansion_level (TYPE('a))\"\n assumes is_expansion_zero:\n \"basis_wf basis \\<Longrightarrow> length basis = expansion_level (TYPE('a)) \\<Longrightarrow> \n is_expansion zero_expansion basis\"\n assumes is_expansion_const:\n \"basis_wf basis \\<Longrightarrow> length basis = expansion_level (TYPE('a)) \\<Longrightarrow> \n is_expansion (const_expansion c) basis\"\n assumes is_expansion_uminus:\n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> is_expansion (-F) basis\"\n assumes is_expansion_add: \n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> is_expansion G basis \\<Longrightarrow> \n is_expansion (F + G) basis\"\n assumes is_expansion_minus: \n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> is_expansion G basis \\<Longrightarrow> \n is_expansion (F - G) basis\"\n assumes is_expansion_mult: \n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> is_expansion G basis \\<Longrightarrow> \n is_expansion (F * G) basis\"\n assumes is_expansion_inverse:\n \"basis_wf basis \\<Longrightarrow> trimmed F \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> \n is_expansion (inverse F) basis\"\n assumes is_expansion_divide:\n \"basis_wf basis \\<Longrightarrow> trimmed G \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> is_expansion G basis \\<Longrightarrow> \n is_expansion (F / G) basis\"\n assumes is_expansion_powr:\n \"basis_wf basis \\<Longrightarrow> trimmed F \\<Longrightarrow> fst (dominant_term F) > 0 \\<Longrightarrow> is_expansion F basis \\<Longrightarrow>\n is_expansion (powr_expansion abort F p) basis\"\n assumes is_expansion_power:\n \"basis_wf basis \\<Longrightarrow> trimmed F \\<Longrightarrow> is_expansion F basis \\<Longrightarrow>\n is_expansion (power_expansion abort F n) basis\"\n \n assumes is_expansion_imp_smallo:\n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> filterlim b at_top at_top \\<Longrightarrow>\n (\\<forall>g\\<in>set basis. (\\<lambda>x. ln (g x)) \\<in> o(\\<lambda>x. ln (b x))) \\<Longrightarrow> e > 0 \\<Longrightarrow> eval F \\<in> o(\\<lambda>x. b x powr e)\"\n assumes is_expansion_imp_smallomega:\n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> filterlim b at_top at_top \\<Longrightarrow> trimmed F \\<Longrightarrow> \n (\\<forall>g\\<in>set basis. (\\<lambda>x. ln (g x)) \\<in> o(\\<lambda>x. ln (b x))) \\<Longrightarrow> e < 0 \\<Longrightarrow> eval F \\<in> \\<omega>(\\<lambda>x. b x powr e)\"\n assumes trimmed_imp_eventually_sgn:\n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> trimmed F \\<Longrightarrow>\n eventually (\\<lambda>x. sgn (eval F x) = sgn (fst (dominant_term F))) at_top\"\n assumes trimmed_imp_eventually_nz: \n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> trimmed F \\<Longrightarrow> \n eventually (\\<lambda>x. eval F x \\<noteq> 0) at_top\"\n assumes trimmed_imp_dominant_term_nz: \"trimmed F \\<Longrightarrow> fst (dominant_term F) \\<noteq> 0\"\n \n assumes dominant_term: \n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow> trimmed F \\<Longrightarrow>\n eval F \\<sim>[at_top] eval_monom (dominant_term F) basis\"\n assumes dominant_term_bigo:\n \"basis_wf basis \\<Longrightarrow> is_expansion F basis \\<Longrightarrow>\n eval F \\<in> O(eval_monom (1, snd (dominant_term F)) basis)\"\n assumes length_dominant_term:\n \"length (snd (dominant_term F)) = expansion_level TYPE('a)\"\n assumes fst_dominant_term_uminus [simp]: \"fst (dominant_term (- F)) = -fst (dominant_term F)\"\n assumes trimmed_uminus_iff [simp]: \"trimmed (-F) \\<longleftrightarrow> trimmed F\"\n \n assumes add_zero_expansion_left [simp]: \"zero_expansion + F = F\"\n assumes add_zero_expansion_right [simp]: \"F + zero_expansion = F\"\n \n assumes eval_zero [simp]: \"eval zero_expansion x = 0\"\n assumes eval_const [simp]: \"eval (const_expansion c) x = c\"\n assumes eval_uminus [simp]: \"eval (-F) = (\\<lambda>x. -eval F x)\"\n assumes eval_plus [simp]: \"eval (F + G) = (\\<lambda>x. eval F x + eval G x)\"\n assumes eval_minus [simp]: \"eval (F - G) = (\\<lambda>x. eval F x - eval G x)\"\n assumes eval_times [simp]: \"eval (F * G) = (\\<lambda>x. eval F x * eval G x)\"\n assumes eval_inverse [simp]: \"eval (inverse F) = (\\<lambda>x. inverse (eval F x))\"\n assumes eval_divide [simp]: \"eval (F / G) = (\\<lambda>x. eval F x / eval G x)\"\n assumes eval_powr [simp]: \"eval (powr_expansion abort F p) = (\\<lambda>x. eval F x powr p)\"\n assumes eval_power [simp]: \"eval (power_expansion abort F n) = (\\<lambda>x. eval F x ^ n)\"\n assumes minus_eq_plus_uminus: \"F - G = F + (-G)\"\n assumes times_const_expansion_1: \"const_expansion 1 * F = F\"\n assumes trimmed_const_expansion: \"trimmed (const_expansion c) \\<longleftrightarrow> c \\<noteq> 0\"\nbegin",
"abbreviation length :: \"'a list \\<Rightarrow> nat\" where\n\"length \\<equiv> size\"",
"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 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 (?b # ?basis) \<Longrightarrow> length ?basis = expansion_level TYPE(?'a) \<Longrightarrow> (?b expands_to MS (MSLCons (const_expansion 1, 1) MSLNil) ?b) (?b # ?basis)
###symbols
Multiseries_Expansion.msllist.MSLNil :::: 'a msllist
Groups.one_class.one :::: 'a
Multiseries_Expansion.multiseries_class.const_expansion :::: real \<Rightarrow> 'a
Multiseries_Expansion.msllist.MSLCons :::: 'a \<Rightarrow> 'a msllist \<Rightarrow> 'a msllist
Multiseries_Expansion.ms.MS :::: ('a \<times> real) msllist \<Rightarrow> (real \<Rightarrow> real) \<Rightarrow> 'a ms
Multiseries_Expansion.expands_to :::: (real \<Rightarrow> real) \<Rightarrow> 'a \<Rightarrow> (real \<Rightarrow> real) list \<Rightarrow> bool
Multiseries_Expansion.multiseries_class.expansion_level :::: 'a itself \<Rightarrow> nat
List.length :::: 'a list \<Rightarrow> nat
List.list.Cons :::: 'a \<Rightarrow> 'a list \<Rightarrow> 'a list
Multiseries_Expansion.basis_wf :::: (real \<Rightarrow> real) list \<Rightarrow> bool
###defs
codatatype 'a msllist = MSLNil | MSLCons 'a "'a msllist"
for map: mslmap
class one =
fixes one :: 'a ("1")
class multiseries = plus + minus + times + uminus + inverse +
fixes is_expansion :: "'a \<Rightarrow> basis \<Rightarrow> bool"
and expansion_level :: "'a itself \<Rightarrow> nat"
and eval :: "'a \<Rightarrow> real \<Rightarrow> real"
and zero_expansion :: 'a
and const_expansion :: "real \<Rightarrow> 'a"
and powr_expansion :: "bool \<Rightarrow> 'a \<Rightarrow> real \<Rightarrow> 'a"
and power_expansion :: "bool \<Rightarrow> 'a \<Rightarrow> nat \<Rightarrow> 'a"
and trimmed :: "'a \<Rightarrow> bool"
and dominant_term :: "'a \<Rightarrow> monom"
assumes is_expansion_length:
"is_expansion F basis \<Longrightarrow> length basis = expansion_level (TYPE('a))"
assumes is_expansion_zero:
"basis_wf basis \<Longrightarrow> length basis = expansion_level (TYPE('a)) \<Longrightarrow>
is_expansion zero_expansion basis"
assumes is_expansion_const:
"basis_wf basis \<Longrightarrow> length basis = expansion_level (TYPE('a)) \<Longrightarrow>
is_expansion (const_expansion c) basis"
assumes is_expansion_uminus:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> is_expansion (-F) basis"
assumes is_expansion_add:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> is_expansion G basis \<Longrightarrow>
is_expansion (F + G) basis"
assumes is_expansion_minus:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> is_expansion G basis \<Longrightarrow>
is_expansion (F - G) basis"
assumes is_expansion_mult:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> is_expansion G basis \<Longrightarrow>
is_expansion (F * G) basis"
assumes is_expansion_inverse:
"basis_wf basis \<Longrightarrow> trimmed F \<Longrightarrow> is_expansion F basis \<Longrightarrow>
is_expansion (inverse F) basis"
assumes is_expansion_divide:
"basis_wf basis \<Longrightarrow> trimmed G \<Longrightarrow> is_expansion F basis \<Longrightarrow> is_expansion G basis \<Longrightarrow>
is_expansion (F / G) basis"
assumes is_expansion_powr:
"basis_wf basis \<Longrightarrow> trimmed F \<Longrightarrow> fst (dominant_term F) > 0 \<Longrightarrow> is_expansion F basis \<Longrightarrow>
is_expansion (powr_expansion abort F p) basis"
assumes is_expansion_power:
"basis_wf basis \<Longrightarrow> trimmed F \<Longrightarrow> is_expansion F basis \<Longrightarrow>
is_expansion (power_expansion abort F n) basis"
assumes is_expansion_imp_smallo:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> filterlim b at_top at_top \<Longrightarrow>
(\<forall>g\<in>set basis. (\<lambda>x. ln (g x)) \<in> o(\<lambda>x. ln (b x))) \<Longrightarrow> e > 0 \<Longrightarrow> eval F \<in> o(\<lambda>x. b x powr e)"
assumes is_expansion_imp_smallomega:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> filterlim b at_top at_top \<Longrightarrow> trimmed F \<Longrightarrow>
(\<forall>g\<in>set basis. (\<lambda>x. ln (g x)) \<in> o(\<lambda>x. ln (b x))) \<Longrightarrow> e < 0 \<Longrightarrow> eval F \<in> \<omega>(\<lambda>x. b x powr e)"
assumes trimmed_imp_eventually_sgn:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> trimmed F \<Longrightarrow>
eventually (\<lambda>x. sgn (eval F x) = sgn (fst (dominant_term F))) at_top"
assumes trimmed_imp_eventually_nz:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> trimmed F \<Longrightarrow>
eventually (\<lambda>x. eval F x \<noteq> 0) at_top"
assumes trimmed_imp_dominant_term_nz: "trimmed F \<Longrightarrow> fst (dominant_term F) \<noteq> 0"
assumes dominant_term:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> trimmed F \<Longrightarrow>
eval F \<sim>[at_top] eval_monom (dominant_term F) basis"
assumes dominant_term_bigo:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow>
eval F \<in> O(eval_monom (1, snd (dominant_term F)) basis)"
assumes length_dominant_term:
"length (snd (dominant_term F)) = expansion_level TYPE('a)"
assumes fst_dominant_term_uminus [simp]: "fst (dominant_term (- F)) = -fst (dominant_term F)"
assumes trimmed_uminus_iff [simp]: "trimmed (-F) \<longleftrightarrow> trimmed F"
assumes add_zero_expansion_left [simp]: "zero_expansion + F = F"
assumes add_zero_expansion_right [simp]: "F + zero_expansion = F"
assumes eval_zero [simp]: "eval zero_expansion x = 0"
assumes eval_const [simp]: "eval (const_expansion c) x = c"
assumes eval_uminus [simp]: "eval (-F) = (\<lambda>x. -eval F x)"
assumes eval_plus [simp]: "eval (F + G) = (\<lambda>x. eval F x + eval G x)"
assumes eval_minus [simp]: "eval (F - G) = (\<lambda>x. eval F x - eval G x)"
assumes eval_times [simp]: "eval (F * G) = (\<lambda>x. eval F x * eval G x)"
assumes eval_inverse [simp]: "eval (inverse F) = (\<lambda>x. inverse (eval F x))"
assumes eval_divide [simp]: "eval (F / G) = (\<lambda>x. eval F x / eval G x)"
assumes eval_powr [simp]: "eval (powr_expansion abort F p) = (\<lambda>x. eval F x powr p)"
assumes eval_power [simp]: "eval (power_expansion abort F n) = (\<lambda>x. eval F x ^ n)"
assumes minus_eq_plus_uminus: "F - G = F + (-G)"
assumes times_const_expansion_1: "const_expansion 1 * F = F"
assumes trimmed_const_expansion: "trimmed (const_expansion c) \<longleftrightarrow> c \<noteq> 0"
begin
codatatype 'a msllist = MSLNil | MSLCons 'a "'a msllist"
for map: mslmap
datatype 'a ms = MS "('a \<times> real) msllist" "real \<Rightarrow> real"
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"
class multiseries = plus + minus + times + uminus + inverse +
fixes is_expansion :: "'a \<Rightarrow> basis \<Rightarrow> bool"
and expansion_level :: "'a itself \<Rightarrow> nat"
and eval :: "'a \<Rightarrow> real \<Rightarrow> real"
and zero_expansion :: 'a
and const_expansion :: "real \<Rightarrow> 'a"
and powr_expansion :: "bool \<Rightarrow> 'a \<Rightarrow> real \<Rightarrow> 'a"
and power_expansion :: "bool \<Rightarrow> 'a \<Rightarrow> nat \<Rightarrow> 'a"
and trimmed :: "'a \<Rightarrow> bool"
and dominant_term :: "'a \<Rightarrow> monom"
assumes is_expansion_length:
"is_expansion F basis \<Longrightarrow> length basis = expansion_level (TYPE('a))"
assumes is_expansion_zero:
"basis_wf basis \<Longrightarrow> length basis = expansion_level (TYPE('a)) \<Longrightarrow>
is_expansion zero_expansion basis"
assumes is_expansion_const:
"basis_wf basis \<Longrightarrow> length basis = expansion_level (TYPE('a)) \<Longrightarrow>
is_expansion (const_expansion c) basis"
assumes is_expansion_uminus:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> is_expansion (-F) basis"
assumes is_expansion_add:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> is_expansion G basis \<Longrightarrow>
is_expansion (F + G) basis"
assumes is_expansion_minus:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> is_expansion G basis \<Longrightarrow>
is_expansion (F - G) basis"
assumes is_expansion_mult:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> is_expansion G basis \<Longrightarrow>
is_expansion (F * G) basis"
assumes is_expansion_inverse:
"basis_wf basis \<Longrightarrow> trimmed F \<Longrightarrow> is_expansion F basis \<Longrightarrow>
is_expansion (inverse F) basis"
assumes is_expansion_divide:
"basis_wf basis \<Longrightarrow> trimmed G \<Longrightarrow> is_expansion F basis \<Longrightarrow> is_expansion G basis \<Longrightarrow>
is_expansion (F / G) basis"
assumes is_expansion_powr:
"basis_wf basis \<Longrightarrow> trimmed F \<Longrightarrow> fst (dominant_term F) > 0 \<Longrightarrow> is_expansion F basis \<Longrightarrow>
is_expansion (powr_expansion abort F p) basis"
assumes is_expansion_power:
"basis_wf basis \<Longrightarrow> trimmed F \<Longrightarrow> is_expansion F basis \<Longrightarrow>
is_expansion (power_expansion abort F n) basis"
assumes is_expansion_imp_smallo:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> filterlim b at_top at_top \<Longrightarrow>
(\<forall>g\<in>set basis. (\<lambda>x. ln (g x)) \<in> o(\<lambda>x. ln (b x))) \<Longrightarrow> e > 0 \<Longrightarrow> eval F \<in> o(\<lambda>x. b x powr e)"
assumes is_expansion_imp_smallomega:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> filterlim b at_top at_top \<Longrightarrow> trimmed F \<Longrightarrow>
(\<forall>g\<in>set basis. (\<lambda>x. ln (g x)) \<in> o(\<lambda>x. ln (b x))) \<Longrightarrow> e < 0 \<Longrightarrow> eval F \<in> \<omega>(\<lambda>x. b x powr e)"
assumes trimmed_imp_eventually_sgn:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> trimmed F \<Longrightarrow>
eventually (\<lambda>x. sgn (eval F x) = sgn (fst (dominant_term F))) at_top"
assumes trimmed_imp_eventually_nz:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> trimmed F \<Longrightarrow>
eventually (\<lambda>x. eval F x \<noteq> 0) at_top"
assumes trimmed_imp_dominant_term_nz: "trimmed F \<Longrightarrow> fst (dominant_term F) \<noteq> 0"
assumes dominant_term:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow> trimmed F \<Longrightarrow>
eval F \<sim>[at_top] eval_monom (dominant_term F) basis"
assumes dominant_term_bigo:
"basis_wf basis \<Longrightarrow> is_expansion F basis \<Longrightarrow>
eval F \<in> O(eval_monom (1, snd (dominant_term F)) basis)"
assumes length_dominant_term:
"length (snd (dominant_term F)) = expansion_level TYPE('a)"
assumes fst_dominant_term_uminus [simp]: "fst (dominant_term (- F)) = -fst (dominant_term F)"
assumes trimmed_uminus_iff [simp]: "trimmed (-F) \<longleftrightarrow> trimmed F"
assumes add_zero_expansion_left [simp]: "zero_expansion + F = F"
assumes add_zero_expansion_right [simp]: "F + zero_expansion = F"
assumes eval_zero [simp]: "eval zero_expansion x = 0"
assumes eval_const [simp]: "eval (const_expansion c) x = c"
assumes eval_uminus [simp]: "eval (-F) = (\<lambda>x. -eval F x)"
assumes eval_plus [simp]: "eval (F + G) = (\<lambda>x. eval F x + eval G x)"
assumes eval_minus [simp]: "eval (F - G) = (\<lambda>x. eval F x - eval G x)"
assumes eval_times [simp]: "eval (F * G) = (\<lambda>x. eval F x * eval G x)"
assumes eval_inverse [simp]: "eval (inverse F) = (\<lambda>x. inverse (eval F x))"
assumes eval_divide [simp]: "eval (F / G) = (\<lambda>x. eval F x / eval G x)"
assumes eval_powr [simp]: "eval (powr_expansion abort F p) = (\<lambda>x. eval F x powr p)"
assumes eval_power [simp]: "eval (power_expansion abort F n) = (\<lambda>x. eval F x ^ n)"
assumes minus_eq_plus_uminus: "F - G = F + (-G)"
assumes times_const_expansion_1: "const_expansion 1 * F = F"
assumes trimmed_const_expansion: "trimmed (const_expansion c) \<longleftrightarrow> c \<noteq> 0"
begin
abbreviation length :: "'a list \<Rightarrow> nat" where
"length \<equiv> size"
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 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 (?H2 x_1 x_2); ?H3 x_2 = ?H4 TYPE(?'a)\<rbrakk> \<Longrightarrow> ?H5 x_1 (?H6 (?H7 (?H8 ?H9, ?H9) ?H10) x_1) (?H2 x_1 x_2)###end
|
Analysis/Convex
|
Convex.atMostAtLeast_subset_convex
|
lemma atMostAtLeast_subset_convex:
fixes C :: "real set"
assumes "convex C"
and "x \<in> C" "y \<in> C" "x < y"
shows "{x .. y} \<subseteq> C"
|
convex ?C \<Longrightarrow> ?x \<in> ?C \<Longrightarrow> ?y \<in> ?C \<Longrightarrow> ?x < ?y \<Longrightarrow> { ?x.. ?y} \<subseteq> ?C
|
\<lbrakk> ?H1 x_1; x_2 \<in> x_1; x_3 \<in> x_1; x_2 < x_3\<rbrakk> \<Longrightarrow> ?H2 (?H3 x_2 x_3) x_1
|
[
"Set_Interval.ord_class.atLeastAtMost",
"Set.subset_eq",
"Convex.convex"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool",
"'a set \\<Rightarrow> bool"
] |
[
"abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\""
] |
template
|
###lemma
convex ?C \<Longrightarrow> ?x \<in> ?C \<Longrightarrow> ?y \<in> ?C \<Longrightarrow> ?x < ?y \<Longrightarrow> { ?x.. ?y} \<subseteq> ?C
###symbols
Set_Interval.ord_class.atLeastAtMost :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a set
Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool
Convex.convex :::: 'a set \<Rightarrow> bool
###defs
abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool"
where "subset_eq \<equiv> less_eq"
|
###output
\<lbrakk> ?H1 x_1; x_2 \<in> x_1; x_3 \<in> x_1; x_2 < x_3\<rbrakk> \<Longrightarrow> ?H2 (?H3 x_2 x_3) x_1###end
|
List
|
List.remove1_transfer
|
lemma remove1_transfer [transfer_rule]:
assumes [transfer_rule]: "bi_unique A"
shows "(A ===> list_all2 A ===> list_all2 A) remove1 remove1"
|
bi_unique ?A \<Longrightarrow> rel_fun ?A (rel_fun (list_all2 ?A) (list_all2 ?A)) remove1 remove1
|
?H1 x_1 \<Longrightarrow> ?H2 x_1 (?H2 (?H3 x_1) (?H3 x_1)) ?H4 ?H4
|
[
"List.remove1",
"List.list.list_all2",
"BNF_Def.rel_fun",
"Transfer.bi_unique"
] |
[
"'a \\<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",
"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool"
] |
[
"primrec remove1 :: \"'a \\<Rightarrow> 'a list \\<Rightarrow> 'a list\" where\n\"remove1 x [] = []\" |\n\"remove1 x (y # xs) = (if x = y then xs else y # remove1 x 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))\"",
"definition bi_unique :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool\"\n where \"bi_unique R \\<longleftrightarrow>\n (\\<forall>x y z. R x y \\<longrightarrow> R x z \\<longrightarrow> y = z) \\<and>\n (\\<forall>x y z. R x z \\<longrightarrow> R y z \\<longrightarrow> x = y)\""
] |
template
|
###lemma
bi_unique ?A \<Longrightarrow> rel_fun ?A (rel_fun (list_all2 ?A) (list_all2 ?A)) remove1 remove1
###symbols
List.remove1 :::: 'a \<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
Transfer.bi_unique :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool
###defs
primrec remove1 :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" where
"remove1 x [] = []" |
"remove1 x (y # xs) = (if x = y then xs else y # remove1 x 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))"
definition bi_unique :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool"
where "bi_unique R \<longleftrightarrow>
(\<forall>x y z. R x y \<longrightarrow> R x z \<longrightarrow> y = z) \<and>
(\<forall>x y z. R x z \<longrightarrow> R y z \<longrightarrow> x = y)"
|
###output
?H1 x_1 \<Longrightarrow> ?H2 x_1 (?H2 (?H3 x_1) (?H3 x_1)) ?H4 ?H4###end
|
Computational_Algebra/Formal_Laurent_Series
|
Formal_Laurent_Series.fls_lr_inverse_eq0_imp_starting0(2)
|
lemma fls_lr_inverse_eq0_imp_starting0:
"fls_left_inverse f x = 0 \<Longrightarrow> x = 0"
"fls_right_inverse f x = 0 \<Longrightarrow> x = 0"
|
fls_right_inverse ?f ?x = 0 \<Longrightarrow> ?x = (0:: ?'a)
|
?H1 x_1 x_2 = ?H2 \<Longrightarrow> x_2 = ?H2
|
[
"Groups.zero_class.zero",
"Formal_Laurent_Series.fls_right_inverse"
] |
[
"'a",
"'a fls \\<Rightarrow> 'a \\<Rightarrow> 'a fls"
] |
[
"class zero =\n fixes zero :: 'a (\"0\")",
"abbreviation fls_right_inverse ::\n \"'a::{comm_monoid_add,uminus,times} fls \\<Rightarrow> 'a \\<Rightarrow> 'a fls\"\n where\n \"fls_right_inverse f y \\<equiv>\n fls_shift (fls_subdegree f) (fps_to_fls (fps_right_inverse (fls_base_factor_to_fps f) y))\""
] |
template
|
###lemma
fls_right_inverse ?f ?x = 0 \<Longrightarrow> ?x = (0:: ?'a)
###symbols
Groups.zero_class.zero :::: 'a
Formal_Laurent_Series.fls_right_inverse :::: 'a fls \<Rightarrow> 'a \<Rightarrow> 'a fls
###defs
class zero =
fixes zero :: 'a ("0")
abbreviation fls_right_inverse ::
"'a::{comm_monoid_add,uminus,times} fls \<Rightarrow> 'a \<Rightarrow> 'a fls"
where
"fls_right_inverse f y \<equiv>
fls_shift (fls_subdegree f) (fps_to_fls (fps_right_inverse (fls_base_factor_to_fps f) y))"
|
###output
?H1 x_1 x_2 = ?H2 \<Longrightarrow> x_2 = ?H2###end
|
Limits
|
Limits.convergent_Suc_iff
|
lemma convergent_Suc_iff: "convergent (\<lambda>n. f (Suc n)) \<longleftrightarrow> convergent f"
|
convergent (\<lambda>n. ?f (Suc n)) = convergent ?f
|
?H1 (\<lambda>y_0. x_1 (?H2 y_0)) = ?H1 x_1
|
[
"Nat.Suc",
"Topological_Spaces.topological_space_class.convergent"
] |
[
"nat \\<Rightarrow> nat",
"(nat \\<Rightarrow> 'a) \\<Rightarrow> bool"
] |
[
"definition Suc :: \"nat \\<Rightarrow> nat\"\n where \"Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))\"",
"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
convergent (\<lambda>n. ?f (Suc n)) = convergent ?f
###symbols
Nat.Suc :::: nat \<Rightarrow> nat
Topological_Spaces.topological_space_class.convergent :::: (nat \<Rightarrow> 'a) \<Rightarrow> bool
###defs
definition Suc :: "nat \<Rightarrow> nat"
where "Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))"
class topological_space = "open" +
assumes open_UNIV [simp, intro]: "open UNIV"
assumes open_Int [intro]: "open S \<Longrightarrow> open T \<Longrightarrow> open (S \<inter> T)"
assumes open_Union [intro]: "\<forall>S\<in>K. open S \<Longrightarrow> open (\<Union>K)"
begin
|
###output
?H1 (\<lambda>y_0. x_1 (?H2 y_0)) = ?H1 x_1###end
|
UNITY/Comp
|
Complete_Lattices.UN_extend_simps(3)
| null |
?A \<union> \<Union> (?B ` ?C) = (if ?C = {} then ?A else \<Union>x\<in> ?C. ?A \<union> ?B x)
|
?H1 x_1 (?H2 (?H3 x_2 x_3)) = (if x_3 = ?H4 then x_1 else ?H2 (?H3 (\<lambda>y_1. ?H1 x_1 (x_2 y_1)) x_3))
|
[
"Set.empty",
"Set.image",
"Complete_Lattices.Union",
"Set.union"
] |
[
"'a set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set",
"'a set set \\<Rightarrow> 'a set",
"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set"
] |
[
"abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"",
"definition image :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set\" (infixr \"`\" 90)\n where \"f ` A = {y. \\<exists>x\\<in>A. y = f x}\"",
"abbreviation Union :: \"'a set set \\<Rightarrow> 'a set\" (\"\\<Union>\")\n where \"\\<Union>S \\<equiv> \\<Squnion>S\"",
"abbreviation union :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<union>\" 65)\n where \"union \\<equiv> sup\""
] |
template
|
###lemma
?A \<union> \<Union> (?B ` ?C) = (if ?C = {} then ?A else \<Union>x\<in> ?C. ?A \<union> ?B x)
###symbols
Set.empty :::: 'a set
Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set
Complete_Lattices.Union :::: 'a set set \<Rightarrow> 'a set
Set.union :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set
###defs
abbreviation empty :: "'a set" ("{}")
where "{} \<equiv> bot"
definition image :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set" (infixr "`" 90)
where "f ` A = {y. \<exists>x\<in>A. y = f x}"
abbreviation Union :: "'a set set \<Rightarrow> 'a set" ("\<Union>")
where "\<Union>S \<equiv> \<Squnion>S"
abbreviation union :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<union>" 65)
where "union \<equiv> sup"
|
###output
?H1 x_1 (?H2 (?H3 x_2 x_3)) = (if x_3 = ?H4 then x_1 else ?H2 (?H3 (\<lambda>y_1. ?H1 x_1 (x_2 y_1)) x_3))###end
|
Cardinals/Wellorder_Constructions
|
Wellorder_Constructions.ofilter_ordLeq
|
lemma ofilter_ordLeq:
assumes "Well_order r" and "ofilter r A"
shows "Restr r A \<le>o r"
|
Well_order ?r \<Longrightarrow> ofilter ?r ?A \<Longrightarrow> Restr ?r ?A \<le>o ?r
|
\<lbrakk> ?H1 x_1; ?H2 x_1 x_2\<rbrakk> \<Longrightarrow> ?H3 (?H4 x_1 x_2) x_1
|
[
"BNF_Wellorder_Constructions.Restr",
"BNF_Wellorder_Constructions.ordLeq3",
"Order_Relation.ofilter",
"Order_Relation.Well_order"
] |
[
"('a \\<times> 'a) set \\<Rightarrow> 'a set \\<Rightarrow> ('a \\<times> 'a) set",
"('a \\<times> 'a) set \\<Rightarrow> ('b \\<times> 'b) set \\<Rightarrow> bool",
"('a \\<times> 'a) set \\<Rightarrow> 'a set \\<Rightarrow> bool",
"('a \\<times> 'a) set \\<Rightarrow> bool"
] |
[
"abbreviation Restr :: \"'a rel \\<Rightarrow> 'a set \\<Rightarrow> 'a rel\"\n where \"Restr r A \\<equiv> r Int (A \\<times> A)\"",
"abbreviation ordLeq3 :: \"'a rel \\<Rightarrow> 'a' rel \\<Rightarrow> bool\" (infix \"\\<le>o\" 50)\n where \"r \\<le>o r' \\<equiv> r <=o r'\"",
"definition ofilter :: \"'a rel \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"ofilter r A \\<equiv> A \\<subseteq> Field r \\<and> (\\<forall>a \\<in> A. under r a \\<subseteq> A)\"",
"abbreviation \"Well_order r \\<equiv> well_order_on (Field r) r\""
] |
template
|
###lemma
Well_order ?r \<Longrightarrow> ofilter ?r ?A \<Longrightarrow> Restr ?r ?A \<le>o ?r
###symbols
BNF_Wellorder_Constructions.Restr :::: ('a \<times> 'a) set \<Rightarrow> 'a set \<Rightarrow> ('a \<times> 'a) set
BNF_Wellorder_Constructions.ordLeq3 :::: ('a \<times> 'a) set \<Rightarrow> ('b \<times> 'b) set \<Rightarrow> bool
Order_Relation.ofilter :::: ('a \<times> 'a) set \<Rightarrow> 'a set \<Rightarrow> bool
Order_Relation.Well_order :::: ('a \<times> 'a) set \<Rightarrow> bool
###defs
abbreviation Restr :: "'a rel \<Rightarrow> 'a set \<Rightarrow> 'a rel"
where "Restr r A \<equiv> r Int (A \<times> A)"
abbreviation ordLeq3 :: "'a rel \<Rightarrow> 'a' rel \<Rightarrow> bool" (infix "\<le>o" 50)
where "r \<le>o r' \<equiv> r <=o r'"
definition ofilter :: "'a rel \<Rightarrow> 'a set \<Rightarrow> bool"
where "ofilter r A \<equiv> A \<subseteq> Field r \<and> (\<forall>a \<in> A. under r a \<subseteq> A)"
abbreviation "Well_order r \<equiv> well_order_on (Field r) r"
|
###output
\<lbrakk> ?H1 x_1; ?H2 x_1 x_2\<rbrakk> \<Longrightarrow> ?H3 (?H4 x_1 x_2) x_1###end
|
HOLCF/Domain
|
Domain_Aux.sel_app_rules(6)
| null |
sscase\<cdot>ID\<cdot>\<bottom>\<cdot>(sinr\<cdot> ?x) = \<bottom>
|
?H1 (?H1 (?H1 ?H2 ?H3) ?H4) (?H1 ?H5 x_1) = ?H4
|
[
"Ssum.sinr",
"Pcpo.pcpo_class.bottom",
"Cfun.ID",
"Ssum.sscase",
"Cfun.cfun.Rep_cfun"
] |
[
"'a \\<rightarrow> 'b \\<oplus> 'a",
"'a",
"'a \\<rightarrow> 'a",
"('a \\<rightarrow> 'b) \\<rightarrow> ('c \\<rightarrow> 'b) \\<rightarrow> 'a \\<oplus> 'c \\<rightarrow> 'b",
"('a \\<rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> 'b"
] |
[
"definition sinr :: \"'b \\<rightarrow> ('a ++ 'b)\"\n where \"sinr = (\\<Lambda> b. Abs_ssum (seq\\<cdot>b\\<cdot>FF, \\<bottom>, b))\"",
"class pcpo = cpo +\n assumes least: \"\\<exists>x. \\<forall>y. x \\<sqsubseteq> y\"\nbegin",
"definition ID :: \"'a \\<rightarrow> 'a\"\n where \"ID = (\\<Lambda> x. x)\"",
"definition sscase :: \"('a \\<rightarrow> 'c) \\<rightarrow> ('b \\<rightarrow> 'c) \\<rightarrow> ('a ++ 'b) \\<rightarrow> 'c\"\n where \"sscase = (\\<Lambda> f g s. (\\<lambda>(t, x, y). If t then f\\<cdot>x else g\\<cdot>y) (Rep_ssum s))\""
] |
template
|
###lemma
sscase\<cdot>ID\<cdot>\<bottom>\<cdot>(sinr\<cdot> ?x) = \<bottom>
###symbols
Ssum.sinr :::: 'a \<rightarrow> 'b \<oplus> 'a
Pcpo.pcpo_class.bottom :::: 'a
Cfun.ID :::: 'a \<rightarrow> 'a
Ssum.sscase :::: ('a \<rightarrow> 'b) \<rightarrow> ('c \<rightarrow> 'b) \<rightarrow> 'a \<oplus> 'c \<rightarrow> 'b
Cfun.cfun.Rep_cfun :::: ('a \<rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b
###defs
definition sinr :: "'b \<rightarrow> ('a ++ 'b)"
where "sinr = (\<Lambda> b. Abs_ssum (seq\<cdot>b\<cdot>FF, \<bottom>, b))"
class pcpo = cpo +
assumes least: "\<exists>x. \<forall>y. x \<sqsubseteq> y"
begin
definition ID :: "'a \<rightarrow> 'a"
where "ID = (\<Lambda> x. x)"
definition sscase :: "('a \<rightarrow> 'c) \<rightarrow> ('b \<rightarrow> 'c) \<rightarrow> ('a ++ 'b) \<rightarrow> 'c"
where "sscase = (\<Lambda> f g s. (\<lambda>(t, x, y). If t then f\<cdot>x else g\<cdot>y) (Rep_ssum s))"
|
###output
?H1 (?H1 (?H1 ?H2 ?H3) ?H4) (?H1 ?H5 x_1) = ?H4###end
|
Matrix_LP/SparseMatrix
|
SparseMatrix.sparse_row_matrix_nprt
|
lemma sparse_row_matrix_nprt: "sorted_spvec (m :: 'a::lattice_ring spmat) \<Longrightarrow> sorted_spmat m \<Longrightarrow> sparse_row_matrix (nprt_spmat m) = nprt (sparse_row_matrix m)"
|
sorted_spvec ?m \<Longrightarrow> sorted_spmat ?m \<Longrightarrow> sparse_row_matrix (nprt_spmat ?m) = nprt (sparse_row_matrix ?m)
|
\<lbrakk> ?H1 x_1; ?H2 x_1\<rbrakk> \<Longrightarrow> ?H3 (?H4 x_1) = ?H5 (?H3 x_1)
|
[
"Lattice_Algebras.lattice_ab_group_add_class.nprt",
"SparseMatrix.nprt_spmat",
"SparseMatrix.sparse_row_matrix",
"SparseMatrix.sorted_spmat",
"SparseMatrix.sorted_spvec"
] |
[
"'a \\<Rightarrow> 'a",
"(nat \\<times> (nat \\<times> 'a) list) list \\<Rightarrow> (nat \\<times> (nat \\<times> 'a) list) list",
"(nat \\<times> (nat \\<times> 'a) list) list \\<Rightarrow> 'a matrix",
"(nat \\<times> (nat \\<times> 'a) list) list \\<Rightarrow> bool",
"(nat \\<times> 'a) list \\<Rightarrow> bool"
] |
[
"class lattice_ab_group_add = ordered_ab_group_add + lattice\nbegin",
"primrec nprt_spmat :: \"('a::{lattice_ab_group_add}) spmat \\<Rightarrow> 'a spmat\"\nwhere\n \"nprt_spmat [] = []\"\n| \"nprt_spmat (a#as) = (fst a, nprt_spvec (snd a))#(nprt_spmat as)\"",
"definition sparse_row_matrix :: \"('a::ab_group_add) spmat \\<Rightarrow> 'a matrix\"\n where \"sparse_row_matrix arr = foldl (% m r. m + (move_matrix (sparse_row_vector (snd r)) (int (fst r)) 0)) 0 arr\"",
"primrec sorted_spmat :: \"'a spmat \\<Rightarrow> bool\"\nwhere\n \"sorted_spmat [] = True\"\n| \"sorted_spmat (a#as) = ((sorted_spvec (snd a)) & (sorted_spmat as))\"",
"primrec sorted_spvec :: \"'a spvec \\<Rightarrow> bool\"\nwhere\n \"sorted_spvec [] = True\"\n| sorted_spvec_step: \"sorted_spvec (a#as) = (case as of [] \\<Rightarrow> True | b#bs \\<Rightarrow> ((fst a < fst b) & (sorted_spvec as)))\""
] |
template
|
###lemma
sorted_spvec ?m \<Longrightarrow> sorted_spmat ?m \<Longrightarrow> sparse_row_matrix (nprt_spmat ?m) = nprt (sparse_row_matrix ?m)
###symbols
Lattice_Algebras.lattice_ab_group_add_class.nprt :::: 'a \<Rightarrow> 'a
SparseMatrix.nprt_spmat :::: (nat \<times> (nat \<times> 'a) list) list \<Rightarrow> (nat \<times> (nat \<times> 'a) list) list
SparseMatrix.sparse_row_matrix :::: (nat \<times> (nat \<times> 'a) list) list \<Rightarrow> 'a matrix
SparseMatrix.sorted_spmat :::: (nat \<times> (nat \<times> 'a) list) list \<Rightarrow> bool
SparseMatrix.sorted_spvec :::: (nat \<times> 'a) list \<Rightarrow> bool
###defs
class lattice_ab_group_add = ordered_ab_group_add + lattice
begin
primrec nprt_spmat :: "('a::{lattice_ab_group_add}) spmat \<Rightarrow> 'a spmat"
where
"nprt_spmat [] = []"
| "nprt_spmat (a#as) = (fst a, nprt_spvec (snd a))#(nprt_spmat as)"
definition sparse_row_matrix :: "('a::ab_group_add) spmat \<Rightarrow> 'a matrix"
where "sparse_row_matrix arr = foldl (% m r. m + (move_matrix (sparse_row_vector (snd r)) (int (fst r)) 0)) 0 arr"
primrec sorted_spmat :: "'a spmat \<Rightarrow> bool"
where
"sorted_spmat [] = True"
| "sorted_spmat (a#as) = ((sorted_spvec (snd a)) & (sorted_spmat as))"
primrec sorted_spvec :: "'a spvec \<Rightarrow> bool"
where
"sorted_spvec [] = True"
| sorted_spvec_step: "sorted_spvec (a#as) = (case as of [] \<Rightarrow> True | b#bs \<Rightarrow> ((fst a < fst b) & (sorted_spvec as)))"
|
###output
\<lbrakk> ?H1 x_1; ?H2 x_1\<rbrakk> \<Longrightarrow> ?H3 (?H4 x_1) = ?H5 (?H3 x_1)###end
|
Deriv
|
Deriv.DERIV_power_Suc
|
lemma DERIV_power_Suc:
"(f has_field_derivative D) (at x within s) \<Longrightarrow>
((\<lambda>x. f x ^ Suc n) has_field_derivative (1 + of_nat n) * (D * f x ^ n)) (at x within s)"
|
(?f has_field_derivative ?D) (at ?x within ?s) \<Longrightarrow> ((\<lambda>x. ?f x ^ Suc ?n) has_field_derivative ((1:: ?'a) + of_nat ?n) * (?D * ?f ?x ^ ?n)) (at ?x within ?s)
|
?H1 x_1 x_2 (?H2 x_3 x_4) \<Longrightarrow> ?H1 (\<lambda>y_0. ?H3 (x_1 y_0) (?H4 x_5)) (?H5 (?H6 ?H7 (?H8 x_5)) (?H5 x_2 (?H3 (x_1 x_3) x_5))) (?H2 x_3 x_4)
|
[
"Nat.semiring_1_class.of_nat",
"Groups.one_class.one",
"Groups.plus_class.plus",
"Groups.times_class.times",
"Nat.Suc",
"Power.power_class.power",
"Topological_Spaces.topological_space_class.at_within",
"Deriv.has_field_derivative"
] |
[
"nat \\<Rightarrow> 'a",
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"nat \\<Rightarrow> nat",
"'a \\<Rightarrow> nat \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a filter",
"('a \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> 'a filter \\<Rightarrow> bool"
] |
[
"class one =\n fixes one :: 'a (\"1\")",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)",
"definition Suc :: \"nat \\<Rightarrow> nat\"\n where \"Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))\"",
"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 topological_space = \"open\" +\n assumes open_UNIV [simp, intro]: \"open UNIV\"\n assumes open_Int [intro]: \"open S \\<Longrightarrow> open T \\<Longrightarrow> open (S \\<inter> T)\"\n assumes open_Union [intro]: \"\\<forall>S\\<in>K. open S \\<Longrightarrow> open (\\<Union>K)\"\nbegin",
"definition has_field_derivative :: \"('a::real_normed_field \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> 'a filter \\<Rightarrow> bool\"\n (infix \"(has'_field'_derivative)\" 50)\n where \"(f has_field_derivative D) F \\<longleftrightarrow> (f has_derivative (*) D) F\""
] |
template
|
###lemma
(?f has_field_derivative ?D) (at ?x within ?s) \<Longrightarrow> ((\<lambda>x. ?f x ^ Suc ?n) has_field_derivative ((1:: ?'a) + of_nat ?n) * (?D * ?f ?x ^ ?n)) (at ?x within ?s)
###symbols
Nat.semiring_1_class.of_nat :::: nat \<Rightarrow> 'a
Groups.one_class.one :::: 'a
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Nat.Suc :::: nat \<Rightarrow> nat
Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a
Topological_Spaces.topological_space_class.at_within :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a filter
Deriv.has_field_derivative :::: ('a \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> 'a filter \<Rightarrow> bool
###defs
class one =
fixes one :: 'a ("1")
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
class times =
fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70)
definition Suc :: "nat \<Rightarrow> nat"
where "Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))"
primrec power :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^" 80)
where
power_0: "a ^ 0 = 1"
| power_Suc: "a ^ Suc n = a * a ^ n"
class topological_space = "open" +
assumes open_UNIV [simp, intro]: "open UNIV"
assumes open_Int [intro]: "open S \<Longrightarrow> open T \<Longrightarrow> open (S \<inter> T)"
assumes open_Union [intro]: "\<forall>S\<in>K. open S \<Longrightarrow> open (\<Union>K)"
begin
definition has_field_derivative :: "('a::real_normed_field \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> 'a filter \<Rightarrow> bool"
(infix "(has'_field'_derivative)" 50)
where "(f has_field_derivative D) F \<longleftrightarrow> (f has_derivative (*) D) F"
|
###output
?H1 x_1 x_2 (?H2 x_3 x_4) \<Longrightarrow> ?H1 (\<lambda>y_0. ?H3 (x_1 y_0) (?H4 x_5)) (?H5 (?H6 ?H7 (?H8 x_5)) (?H5 x_2 (?H3 (x_1 x_3) x_5))) (?H2 x_3 x_4)###end
|
List
|
List.gen_length_code(2)
|
lemma gen_length_code [code]:
"gen_length n [] = n"
"gen_length n (x # xs) = gen_length (Suc n) xs"
|
List.gen_length ?n (?x # ?xs) = List.gen_length (Suc ?n) ?xs
|
?H1 x_1 (?H2 x_2 x_3) = ?H1 (?H3 x_1) x_3
|
[
"Nat.Suc",
"List.list.Cons",
"List.gen_length"
] |
[
"nat \\<Rightarrow> nat",
"'a \\<Rightarrow> 'a list \\<Rightarrow> 'a list",
"nat \\<Rightarrow> 'a list \\<Rightarrow> nat"
] |
[
"definition Suc :: \"nat \\<Rightarrow> nat\"\n where \"Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))\"",
"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 gen_length :: \"nat \\<Rightarrow> 'a list \\<Rightarrow> nat\"\nwhere \"gen_length n xs = n + length xs\""
] |
template
|
###lemma
List.gen_length ?n (?x # ?xs) = List.gen_length (Suc ?n) ?xs
###symbols
Nat.Suc :::: nat \<Rightarrow> nat
List.list.Cons :::: 'a \<Rightarrow> 'a list \<Rightarrow> 'a list
List.gen_length :::: nat \<Rightarrow> 'a list \<Rightarrow> nat
###defs
definition Suc :: "nat \<Rightarrow> nat"
where "Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))"
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 gen_length :: "nat \<Rightarrow> 'a list \<Rightarrow> nat"
where "gen_length n xs = n + length xs"
|
###output
?H1 x_1 (?H2 x_2 x_3) = ?H1 (?H3 x_1) x_3###end
|
List
|
List.wf_listrel1_iff
|
lemma wf_listrel1_iff[simp]: "wf(listrel1 r) = wf r"
|
wf (listrel1 ?r) = wf ?r
|
?H1 (?H2 x_1) = ?H1 x_1
|
[
"List.listrel1",
"Wellfounded.wf"
] |
[
"('a \\<times> 'a) set \\<Rightarrow> ('a list \\<times> 'a list) set",
"('a \\<times> 'a) set \\<Rightarrow> bool"
] |
[
"definition listrel1 :: \"('a \\<times> 'a) set \\<Rightarrow> ('a list \\<times> 'a list) set\" where\n\"listrel1 r = {(xs,ys).\n \\<exists>us z z' vs. xs = us @ z # vs \\<and> (z,z') \\<in> r \\<and> ys = us @ z' # vs}\"",
"abbreviation wf :: \"('a \\<times> 'a) set \\<Rightarrow> bool\" where\n \"wf \\<equiv> wf_on UNIV\""
] |
template
|
###lemma
wf (listrel1 ?r) = wf ?r
###symbols
List.listrel1 :::: ('a \<times> 'a) set \<Rightarrow> ('a list \<times> 'a list) set
Wellfounded.wf :::: ('a \<times> 'a) set \<Rightarrow> bool
###defs
definition listrel1 :: "('a \<times> 'a) set \<Rightarrow> ('a list \<times> 'a list) set" where
"listrel1 r = {(xs,ys).
\<exists>us z z' vs. xs = us @ z # vs \<and> (z,z') \<in> r \<and> ys = us @ z' # vs}"
abbreviation wf :: "('a \<times> 'a) set \<Rightarrow> bool" where
"wf \<equiv> wf_on UNIV"
|
###output
?H1 (?H2 x_1) = ?H1 x_1###end
|
Number_Theory/Fib
|
Fib.gen_fib_fib
|
lemma gen_fib_fib: "gen_fib (fib n) (fib (Suc n)) m = fib (n + m)"
|
gen_fib (fib ?n) (fib (Suc ?n)) ?m = fib (?n + ?m)
|
?H1 (?H2 x_1) (?H2 (?H3 x_1)) x_2 = ?H2 (?H4 x_1 x_2)
|
[
"Groups.plus_class.plus",
"Nat.Suc",
"Fib.fib",
"Fib.gen_fib"
] |
[
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"nat \\<Rightarrow> nat",
"nat \\<Rightarrow> nat",
"nat \\<Rightarrow> nat \\<Rightarrow> nat \\<Rightarrow> nat"
] |
[
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)",
"definition Suc :: \"nat \\<Rightarrow> nat\"\n where \"Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))\"",
"fun fib :: \"nat \\<Rightarrow> nat\"\n where\n fib0: \"fib 0 = 0\"\n | fib1: \"fib (Suc 0) = 1\"\n | fib2: \"fib (Suc (Suc n)) = fib (Suc n) + fib n\"",
"fun gen_fib :: \"nat \\<Rightarrow> nat \\<Rightarrow> nat \\<Rightarrow> nat\"\n where\n \"gen_fib a b 0 = a\"\n | \"gen_fib a b (Suc 0) = b\"\n | \"gen_fib a b (Suc (Suc n)) = gen_fib b (a + b) (Suc n)\""
] |
template
|
###lemma
gen_fib (fib ?n) (fib (Suc ?n)) ?m = fib (?n + ?m)
###symbols
Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a
Nat.Suc :::: nat \<Rightarrow> nat
Fib.fib :::: nat \<Rightarrow> nat
Fib.gen_fib :::: nat \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> nat
###defs
class plus =
fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65)
definition Suc :: "nat \<Rightarrow> nat"
where "Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))"
fun fib :: "nat \<Rightarrow> nat"
where
fib0: "fib 0 = 0"
| fib1: "fib (Suc 0) = 1"
| fib2: "fib (Suc (Suc n)) = fib (Suc n) + fib n"
fun gen_fib :: "nat \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> nat"
where
"gen_fib a b 0 = a"
| "gen_fib a b (Suc 0) = b"
| "gen_fib a b (Suc (Suc n)) = gen_fib b (a + b) (Suc n)"
|
###output
?H1 (?H2 x_1) (?H2 (?H3 x_1)) x_2 = ?H2 (?H4 x_1 x_2)###end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.