Dataset Viewer
Auto-converted to Parquet
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
sequencelengths
0
101
types
sequencelengths
0
101
defs
sequencelengths
0
83
output_key
stringclasses
1 value
input
stringlengths
37
79.6k
output
stringlengths
24
16.1k
List
List.size_list_map
lemma size_list_map[simp]: "size_list f (map g xs) = size_list (f \<circ> g) xs"
size_list ?f (map ?g ?xs) = size_list (?f \<circ> ?g) ?xs
?H1 x_1 (?H2 x_2 x_3) = ?H1 (?H3 x_1 x_2) x_3
[ "Fun.comp", "List.list.map", "List.list.size_list" ]
[ "('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'a) \\<Rightarrow> 'c \\<Rightarrow> 'b", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a list \\<Rightarrow> 'b list", "('a \\<Rightarrow> nat) \\<Rightarrow> 'a list \\<Rightarrow> nat" ]
[ "definition comp :: \"('b \\<Rightarrow> 'c) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> 'c\" (infixl \"\\<circ>\" 55)\n where \"f \\<circ> g = (\\<lambda>x. f (g x))\"", "datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"", "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 size_list ?f (map ?g ?xs) = size_list (?f \<circ> ?g) ?xs ###symbols Fun.comp :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'a) \<Rightarrow> 'c \<Rightarrow> 'b List.list.map :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a list \<Rightarrow> 'b list List.list.size_list :::: ('a \<Rightarrow> nat) \<Rightarrow> 'a list \<Rightarrow> nat ###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))" datatype (set: 'a) list = Nil ("[]") | Cons (hd: 'a) (tl: "'a list") (infixr "#" 65) for map: map rel: list_all2 pred: list_all where "tl [] = []" datatype (set: 'a) list = Nil ("[]") | Cons (hd: 'a) (tl: "'a list") (infixr "#" 65) for map: map rel: list_all2 pred: list_all where "tl [] = []"
###output ?H1 x_1 (?H2 x_2 x_3) = ?H1 (?H3 x_1 x_2) x_3###end
Predicate_Compile_Examples/Predicate_Compile_Tests
Predicate_Compile_Tests.foldlP_Foi_oB_i_i_oE
null
pred.eval (foldlP_Foi_oB_i_i_o ?x ?xa ?xb) ?xc \<Longrightarrow> (foldlP (\<lambda>xa xb xc. pred.eval (?x xb) (xa, xc)) ?xa ?xb ?xc \<Longrightarrow> ?P) \<Longrightarrow> ?P
\<lbrakk> ?H1 (?H2 x_1 x_2 x_3) x_4; ?H3 (\<lambda>y_0 y_1 y_2. ?H1 (x_1 y_1) (y_0, y_2)) x_2 x_3 x_4 \<Longrightarrow> x_5\<rbrakk> \<Longrightarrow> x_5
[ "Predicate_Compile_Tests.foldlP", "Predicate_Compile_Tests.foldlP_Foi_oB_i_i_o", "Predicate.pred.eval" ]
[ "('a \\<Rightarrow> 'b \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'b list \\<Rightarrow> 'a \\<Rightarrow> bool", "('a \\<Rightarrow> ('b \\<times> 'b) Predicate.pred) \\<Rightarrow> 'b \\<Rightarrow> 'a list \\<Rightarrow> 'b Predicate.pred", "'a Predicate.pred \\<Rightarrow> 'a \\<Rightarrow> bool" ]
[ "datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: \"'a \\<Rightarrow> bool\")" ]
template
###lemma pred.eval (foldlP_Foi_oB_i_i_o ?x ?xa ?xb) ?xc \<Longrightarrow> (foldlP (\<lambda>xa xb xc. pred.eval (?x xb) (xa, xc)) ?xa ?xb ?xc \<Longrightarrow> ?P) \<Longrightarrow> ?P ###symbols Predicate_Compile_Tests.foldlP :::: ('a \<Rightarrow> 'b \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'b list \<Rightarrow> 'a \<Rightarrow> bool Predicate_Compile_Tests.foldlP_Foi_oB_i_i_o :::: ('a \<Rightarrow> ('b \<times> 'b) Predicate.pred) \<Rightarrow> 'b \<Rightarrow> 'a list \<Rightarrow> 'b Predicate.pred Predicate.pred.eval :::: 'a Predicate.pred \<Rightarrow> 'a \<Rightarrow> bool ###defs datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: "'a \<Rightarrow> bool")
###output \<lbrakk> ?H1 (?H2 x_1 x_2 x_3) x_4; ?H3 (\<lambda>y_0 y_1 y_2. ?H1 (x_1 y_1) (y_0, y_2)) x_2 x_3 x_4 \<Longrightarrow> x_5\<rbrakk> \<Longrightarrow> x_5###end
Analysis/Infinite_Products
Infinite_Products.convergent_prod_imp_convergent
null
convergent_prod ?f \<Longrightarrow> convergent (\<lambda>n. prod ?f {..n})
?H1 x_1 \<Longrightarrow> ?H2 (\<lambda>y_0. ?H3 x_1 (?H4 y_0))
[ "Set_Interval.ord_class.atMost", "Groups_Big.comm_monoid_mult_class.prod", "Topological_Spaces.topological_space_class.convergent", "Infinite_Products.convergent_prod" ]
[ "'a \\<Rightarrow> 'a set", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b", "(nat \\<Rightarrow> 'a) \\<Rightarrow> bool", "(nat \\<Rightarrow> 'a) \\<Rightarrow> bool" ]
[ "class topological_space = \"open\" +\n assumes open_UNIV [simp, intro]: \"open UNIV\"\n assumes open_Int [intro]: \"open S \\<Longrightarrow> open T \\<Longrightarrow> open (S \\<inter> T)\"\n assumes open_Union [intro]: \"\\<forall>S\\<in>K. open S \\<Longrightarrow> open (\\<Union>K)\"\nbegin" ]
template
###lemma convergent_prod ?f \<Longrightarrow> convergent (\<lambda>n. prod ?f {..n}) ###symbols Set_Interval.ord_class.atMost :::: 'a \<Rightarrow> 'a set Groups_Big.comm_monoid_mult_class.prod :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b Topological_Spaces.topological_space_class.convergent :::: (nat \<Rightarrow> 'a) \<Rightarrow> bool Infinite_Products.convergent_prod :::: (nat \<Rightarrow> 'a) \<Rightarrow> bool ###defs class topological_space = "open" + assumes open_UNIV [simp, intro]: "open UNIV" assumes open_Int [intro]: "open S \<Longrightarrow> open T \<Longrightarrow> open (S \<inter> T)" assumes open_Union [intro]: "\<forall>S\<in>K. open S \<Longrightarrow> open (\<Union>K)" begin
###output ?H1 x_1 \<Longrightarrow> ?H2 (\<lambda>y_0. ?H3 x_1 (?H4 y_0))###end
Analysis/Generalised_Binomial_Theorem
Generalised_Binomial_Theorem.gen_binomial_complex
theorem gen_binomial_complex: fixes z :: complex assumes "norm z < 1" shows "(\<lambda>n. (a gchoose n) * z^n) sums (1 + z) powr a"
cmod ?z < 1 \<Longrightarrow> (\<lambda>n. (?a gchoose n) * ?z ^ n) sums (1 + ?z) powr ?a
?H1 x_1 < ?H2 \<Longrightarrow> ?H3 (\<lambda>y_0. ?H4 (?H5 x_2 y_0) (?H6 x_1 y_0)) (?H7 (?H8 ?H2 x_1) x_2)
[ "Groups.plus_class.plus", "Transcendental.powr", "Power.power_class.power", "Binomial.gbinomial", "Groups.times_class.times", "Series.sums", "Groups.one_class.one", "Complex.cmod" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a \\<Rightarrow> nat \\<Rightarrow> 'a", "'a \\<Rightarrow> nat \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "(nat \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> bool", "'a", "complex \\<Rightarrow> real" ]
[ "class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)", "definition powr :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a::ln\" (infixr \"powr\" 80)\n \\<comment> \\<open>exponentation via ln and exp\\<close>\n where \"x powr a \\<equiv> if x = 0 then 0 else exp (a * ln x)\"", "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 gbinomial :: \"'a::{semidom_divide,semiring_char_0} \\<Rightarrow> nat \\<Rightarrow> 'a\" (infixl \"gchoose\" 65)\n where gbinomial_prod_rev: \"a gchoose k = prod (\\<lambda>i. a - of_nat i) {0..<k} div fact k\"", "class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)", "definition sums :: \"(nat \\<Rightarrow> 'a::{topological_space, comm_monoid_add}) \\<Rightarrow> 'a \\<Rightarrow> bool\"\n (infixr \"sums\" 80)\n where \"f sums s \\<longleftrightarrow> (\\<lambda>n. \\<Sum>i<n. f i) \\<longlonglongrightarrow> s\"", "class one =\n fixes one :: 'a (\"1\")", "abbreviation cmod :: \"complex \\<Rightarrow> real\"\n where \"cmod \\<equiv> norm\"" ]
template
###lemma cmod ?z < 1 \<Longrightarrow> (\<lambda>n. (?a gchoose n) * ?z ^ n) sums (1 + ?z) powr ?a ###symbols Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Transcendental.powr :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a Binomial.gbinomial :::: 'a \<Rightarrow> nat \<Rightarrow> 'a Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Series.sums :::: (nat \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> bool Groups.one_class.one :::: 'a Complex.cmod :::: complex \<Rightarrow> real ###defs class plus = fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65) definition powr :: "'a \<Rightarrow> 'a \<Rightarrow> 'a::ln" (infixr "powr" 80) \<comment> \<open>exponentation via ln and exp\<close> where "x powr a \<equiv> if x = 0 then 0 else exp (a * ln x)" primrec power :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^" 80) where power_0: "a ^ 0 = 1" | power_Suc: "a ^ Suc n = a * a ^ n" definition gbinomial :: "'a::{semidom_divide,semiring_char_0} \<Rightarrow> nat \<Rightarrow> 'a" (infixl "gchoose" 65) where gbinomial_prod_rev: "a gchoose k = prod (\<lambda>i. a - of_nat i) {0..<k} div fact k" class times = fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70) definition sums :: "(nat \<Rightarrow> 'a::{topological_space, comm_monoid_add}) \<Rightarrow> 'a \<Rightarrow> bool" (infixr "sums" 80) where "f sums s \<longleftrightarrow> (\<lambda>n. \<Sum>i<n. f i) \<longlonglongrightarrow> s" class one = fixes one :: 'a ("1") abbreviation cmod :: "complex \<Rightarrow> real" where "cmod \<equiv> norm"
###output ?H1 x_1 < ?H2 \<Longrightarrow> ?H3 (\<lambda>y_0. ?H4 (?H5 x_2 y_0) (?H6 x_1 y_0)) (?H7 (?H8 ?H2 x_1) x_2)###end
Analysis/Ball_Volume
Ball_Volume.emeasure_ball
null
0 \<le> ?r \<Longrightarrow> emeasure lborel (ball ?c ?r) = ennreal (unit_ball_vol (real DIM(?'a)) * ?r ^ DIM(?'a))
?H1 \<le> x_1 \<Longrightarrow> ?H2 ?H3 (?H4 x_2 x_1) = ?H5 (?H6 (?H7 (?H8 (?H9 ?H10))) (?H11 x_1 (?H9 ?H10)))
[ "Power.power_class.power", "Euclidean_Space.euclidean_space_class.Basis", "Finite_Set.card", "Real.real", "Ball_Volume.unit_ball_vol", "Groups.times_class.times", "Extended_Nonnegative_Real.ennreal", "Elementary_Metric_Spaces.ball", "Lebesgue_Measure.lborel", "Sigma_Algebra.emeasure", "Groups.zero_class.zero" ]
[ "'a \\<Rightarrow> nat \\<Rightarrow> 'a", "'a set", "'a set \\<Rightarrow> nat", "nat \\<Rightarrow> real", "real \\<Rightarrow> real", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "real \\<Rightarrow> ennreal", "'a \\<Rightarrow> real \\<Rightarrow> 'a set", "'a measure", "'a measure \\<Rightarrow> 'a set \\<Rightarrow> ennreal", "'a" ]
[ "primrec power :: \"'a \\<Rightarrow> nat \\<Rightarrow> 'a\" (infixr \"^\" 80)\n where\n power_0: \"a ^ 0 = 1\"\n | power_Suc: \"a ^ Suc n = a * a ^ n\"", "class euclidean_space = real_inner +\n fixes Basis :: \"'a set\"\n assumes nonempty_Basis [simp]: \"Basis \\<noteq> {}\"\n assumes finite_Basis [simp]: \"finite Basis\"\n assumes inner_Basis:\n \"\\<lbrakk>u \\<in> Basis; v \\<in> Basis\\<rbrakk> \\<Longrightarrow> inner u v = (if u = v then 1 else 0)\"\n assumes euclidean_all_zero_iff:\n \"(\\<forall>u\\<in>Basis. inner x u = 0) \\<longleftrightarrow> (x = 0)\"", "abbreviation real :: \"nat \\<Rightarrow> real\"\n where \"real \\<equiv> of_nat\"", "class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)", "typedef ennreal = \"{x :: ereal. 0 \\<le> x}\"\n morphisms enn2ereal e2ennreal'", "class zero =\n fixes zero :: 'a (\"0\")" ]
template
###lemma 0 \<le> ?r \<Longrightarrow> emeasure lborel (ball ?c ?r) = ennreal (unit_ball_vol (real DIM(?'a)) * ?r ^ DIM(?'a)) ###symbols Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a Euclidean_Space.euclidean_space_class.Basis :::: 'a set Finite_Set.card :::: 'a set \<Rightarrow> nat Real.real :::: nat \<Rightarrow> real Ball_Volume.unit_ball_vol :::: real \<Rightarrow> real Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Extended_Nonnegative_Real.ennreal :::: real \<Rightarrow> ennreal Elementary_Metric_Spaces.ball :::: 'a \<Rightarrow> real \<Rightarrow> 'a set Lebesgue_Measure.lborel :::: 'a measure Sigma_Algebra.emeasure :::: 'a measure \<Rightarrow> 'a set \<Rightarrow> ennreal Groups.zero_class.zero :::: 'a ###defs primrec power :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^" 80) where power_0: "a ^ 0 = 1" | power_Suc: "a ^ Suc n = a * a ^ n" class euclidean_space = real_inner + fixes Basis :: "'a set" assumes nonempty_Basis [simp]: "Basis \<noteq> {}" assumes finite_Basis [simp]: "finite Basis" assumes inner_Basis: "\<lbrakk>u \<in> Basis; v \<in> Basis\<rbrakk> \<Longrightarrow> inner u v = (if u = v then 1 else 0)" assumes euclidean_all_zero_iff: "(\<forall>u\<in>Basis. inner x u = 0) \<longleftrightarrow> (x = 0)" abbreviation real :: "nat \<Rightarrow> real" where "real \<equiv> of_nat" class times = fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70) typedef ennreal = "{x :: ereal. 0 \<le> x}" morphisms enn2ereal e2ennreal' class zero = fixes zero :: 'a ("0")
###output ?H1 \<le> x_1 \<Longrightarrow> ?H2 ?H3 (?H4 x_2 x_1) = ?H5 (?H6 (?H7 (?H8 (?H9 ?H10))) (?H11 x_1 (?H9 ?H10)))###end
Cardinals/Wellorder_Constructions
Wellorder_Constructions.omax_ordLess
lemma omax_ordLess: assumes "finite R" and "R \<noteq> {}" and "\<forall> r \<in> R. r <o p" shows "omax R <o p"
finite ?R \<Longrightarrow> ?R \<noteq> {} \<Longrightarrow> \<forall>r\<in> ?R. r <o ?p \<Longrightarrow> omax ?R <o ?p
\<lbrakk> ?H1 x_1; x_1 \<noteq> ?H2; \<forall>y_0\<in>x_1. ?H3 y_0 x_2\<rbrakk> \<Longrightarrow> ?H3 (?H4 x_1) x_2
[ "Wellorder_Constructions.omax", "BNF_Wellorder_Constructions.ordLess2", "Set.empty", "Finite_Set.finite" ]
[ "('a \\<times> 'a) set set \\<Rightarrow> ('a \\<times> 'a) set", "('a \\<times> 'a) set \\<Rightarrow> ('b \\<times> 'b) set \\<Rightarrow> bool", "'a set", "'a set \\<Rightarrow> bool" ]
[ "definition omax :: \"'a rel set \\<Rightarrow> 'a rel\"\n where\n \"omax R == SOME r. isOmax R r\"", "abbreviation ordLess2 :: \"'a rel \\<Rightarrow> 'a' rel \\<Rightarrow> bool\" (infix \"<o\" 50)\n where \"r <o r' \\<equiv> (r,r') \\<in> ordLess\"", "abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"", "class finite =\n assumes finite_UNIV: \"finite (UNIV :: 'a set)\"\nbegin" ]
template
###lemma finite ?R \<Longrightarrow> ?R \<noteq> {} \<Longrightarrow> \<forall>r\<in> ?R. r <o ?p \<Longrightarrow> omax ?R <o ?p ###symbols Wellorder_Constructions.omax :::: ('a \<times> 'a) set set \<Rightarrow> ('a \<times> 'a) set BNF_Wellorder_Constructions.ordLess2 :::: ('a \<times> 'a) set \<Rightarrow> ('b \<times> 'b) set \<Rightarrow> bool Set.empty :::: 'a set Finite_Set.finite :::: 'a set \<Rightarrow> bool ###defs definition omax :: "'a rel set \<Rightarrow> 'a rel" where "omax R == SOME r. isOmax R r" abbreviation ordLess2 :: "'a rel \<Rightarrow> 'a' rel \<Rightarrow> bool" (infix "<o" 50) where "r <o r' \<equiv> (r,r') \<in> ordLess" abbreviation empty :: "'a set" ("{}") where "{} \<equiv> bot" class finite = assumes finite_UNIV: "finite (UNIV :: 'a set)" begin
###output \<lbrakk> ?H1 x_1; x_1 \<noteq> ?H2; \<forall>y_0\<in>x_1. ?H3 y_0 x_2\<rbrakk> \<Longrightarrow> ?H3 (?H4 x_1) x_2###end
Deriv
Deriv.differentiable_inverse
lemma differentiable_inverse [simp, derivative_intros]: fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_field" shows "f differentiable (at x within s) \<Longrightarrow> f x \<noteq> 0 \<Longrightarrow> (\<lambda>x. inverse (f x)) differentiable (at x within s)"
?f differentiable at ?x within ?s \<Longrightarrow> ?f ?x \<noteq> (0:: ?'b) \<Longrightarrow> (\<lambda>x. inverse (?f x)) differentiable at ?x within ?s
\<lbrakk> ?H1 x_1 (?H2 x_2 x_3); x_1 x_2 \<noteq> ?H3\<rbrakk> \<Longrightarrow> ?H1 (\<lambda>y_0. ?H4 (x_1 y_0)) (?H2 x_2 x_3)
[ "Fields.inverse_class.inverse", "Groups.zero_class.zero", "Topological_Spaces.topological_space_class.at_within", "Deriv.differentiable" ]
[ "'a \\<Rightarrow> 'a", "'a", "'a \\<Rightarrow> 'a set \\<Rightarrow> 'a filter", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a filter \\<Rightarrow> bool" ]
[ "class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin", "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", "definition differentiable :: \"('a::real_normed_vector \\<Rightarrow> 'b::real_normed_vector) \\<Rightarrow> 'a filter \\<Rightarrow> bool\"\n (infix \"differentiable\" 50)\n where \"f differentiable F \\<longleftrightarrow> (\\<exists>D. (f has_derivative D) F)\"" ]
template
###lemma ?f differentiable at ?x within ?s \<Longrightarrow> ?f ?x \<noteq> (0:: ?'b) \<Longrightarrow> (\<lambda>x. inverse (?f x)) differentiable at ?x within ?s ###symbols Fields.inverse_class.inverse :::: 'a \<Rightarrow> 'a Groups.zero_class.zero :::: 'a Topological_Spaces.topological_space_class.at_within :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a filter Deriv.differentiable :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a filter \<Rightarrow> bool ###defs class inverse = divide + fixes inverse :: "'a \<Rightarrow> 'a" begin 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 definition differentiable :: "('a::real_normed_vector \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> 'a filter \<Rightarrow> bool" (infix "differentiable" 50) where "f differentiable F \<longleftrightarrow> (\<exists>D. (f has_derivative D) F)"
###output \<lbrakk> ?H1 x_1 (?H2 x_2 x_3); x_1 x_2 \<noteq> ?H3\<rbrakk> \<Longrightarrow> ?H1 (\<lambda>y_0. ?H4 (x_1 y_0)) (?H2 x_2 x_3)###end
Combinatorics/Orbits
Orbits.funpow_neq_less_funpow_dist
lemma funpow_neq_less_funpow_dist: assumes "y \<in> orbit f x" "m \<le> funpow_dist f x y" "n \<le> funpow_dist f x y" "m \<noteq> n" shows "(f ^^ m) x \<noteq> (f ^^ n) x"
?y \<in> orbit ?f ?x \<Longrightarrow> ?m \<le> funpow_dist ?f ?x ?y \<Longrightarrow> ?n \<le> funpow_dist ?f ?x ?y \<Longrightarrow> ?m \<noteq> ?n \<Longrightarrow> (?f ^^ ?m) ?x \<noteq> (?f ^^ ?n) ?x
\<lbrakk>x_1 \<in> ?H1 x_2 x_3; x_4 \<le> ?H2 x_2 x_3 x_1; x_5 \<le> ?H2 x_2 x_3 x_1; x_4 \<noteq> x_5\<rbrakk> \<Longrightarrow> ?H3 x_2 x_4 x_3 \<noteq> ?H3 x_2 x_5 x_3
[ "Nat.compower", "Orbits.funpow_dist", "Orbits.orbit" ]
[ "'a \\<Rightarrow> nat \\<Rightarrow> 'a", "('a \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> nat", "('a \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> 'a set" ]
[ "abbreviation compower :: \"'a \\<Rightarrow> nat \\<Rightarrow> 'a\" (infixr \"^^\" 80)\n where \"f ^^ n \\<equiv> compow n f\"", "definition funpow_dist :: \"('a \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> nat\" where\n \"funpow_dist f x y \\<equiv> LEAST n. (f ^^ n) x = y\"", "inductive_set orbit :: \"('a \\<Rightarrow> 'a) \\<Rightarrow> 'a \\<Rightarrow> 'a set\" for f x where\n base: \"f x \\<in> orbit f x\" |\n step: \"y \\<in> orbit f x \\<Longrightarrow> f y \\<in> orbit f x\"" ]
template
###lemma ?y \<in> orbit ?f ?x \<Longrightarrow> ?m \<le> funpow_dist ?f ?x ?y \<Longrightarrow> ?n \<le> funpow_dist ?f ?x ?y \<Longrightarrow> ?m \<noteq> ?n \<Longrightarrow> (?f ^^ ?m) ?x \<noteq> (?f ^^ ?n) ?x ###symbols Nat.compower :::: 'a \<Rightarrow> nat \<Rightarrow> 'a Orbits.funpow_dist :::: ('a \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> nat Orbits.orbit :::: ('a \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> 'a set ###defs abbreviation compower :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^^" 80) where "f ^^ n \<equiv> compow n f" definition funpow_dist :: "('a \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> nat" where "funpow_dist f x y \<equiv> LEAST n. (f ^^ n) x = y" inductive_set orbit :: "('a \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> 'a set" for f x where base: "f x \<in> orbit f x" | step: "y \<in> orbit f x \<Longrightarrow> f y \<in> orbit f x"
###output \<lbrakk>x_1 \<in> ?H1 x_2 x_3; x_4 \<le> ?H2 x_2 x_3 x_1; x_5 \<le> ?H2 x_2 x_3 x_1; x_4 \<noteq> x_5\<rbrakk> \<Longrightarrow> ?H3 x_2 x_4 x_3 \<noteq> ?H3 x_2 x_5 x_3###end
Probability/Probability
Probability_Mass_Function.rel_pmf_imp_rel_set
null
rel_pmf ?R ?p ?q \<Longrightarrow> rel_set ?R (set_pmf ?p) (set_pmf ?q)
?H1 x_1 x_2 x_3 \<Longrightarrow> ?H2 x_1 (?H3 x_2) (?H3 x_3)
[ "Probability_Mass_Function.set_pmf", "BNF_Def.rel_set", "Probability_Mass_Function.rel_pmf" ]
[ "'a pmf \\<Rightarrow> 'a set", "('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a set \\<Rightarrow> 'b set \\<Rightarrow> bool", "('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a pmf \\<Rightarrow> 'b pmf \\<Rightarrow> bool" ]
[ "definition rel_set :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a set \\<Rightarrow> 'b set \\<Rightarrow> bool\"\n where \"rel_set R = (\\<lambda>A B. (\\<forall>x\\<in>A. \\<exists>y\\<in>B. R x y) \\<and> (\\<forall>y\\<in>B. \\<exists>x\\<in>A. R x y))\"", "inductive rel_pmf :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a pmf \\<Rightarrow> 'b pmf \\<Rightarrow> bool\"\nfor R p q\nwhere\n \"\\<lbrakk> \\<And>x y. (x, y) \\<in> set_pmf pq \\<Longrightarrow> R x y;\n map_pmf fst pq = p; map_pmf snd pq = q \\<rbrakk>\n \\<Longrightarrow> rel_pmf R p q\"" ]
template
###lemma rel_pmf ?R ?p ?q \<Longrightarrow> rel_set ?R (set_pmf ?p) (set_pmf ?q) ###symbols Probability_Mass_Function.set_pmf :::: 'a pmf \<Rightarrow> 'a set BNF_Def.rel_set :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a set \<Rightarrow> 'b set \<Rightarrow> bool Probability_Mass_Function.rel_pmf :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a pmf \<Rightarrow> 'b pmf \<Rightarrow> bool ###defs definition rel_set :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a set \<Rightarrow> 'b set \<Rightarrow> bool" where "rel_set R = (\<lambda>A B. (\<forall>x\<in>A. \<exists>y\<in>B. R x y) \<and> (\<forall>y\<in>B. \<exists>x\<in>A. R x y))" inductive rel_pmf :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a pmf \<Rightarrow> 'b pmf \<Rightarrow> bool" for R p q where "\<lbrakk> \<And>x y. (x, y) \<in> set_pmf pq \<Longrightarrow> R x y; map_pmf fst pq = p; map_pmf snd pq = q \<rbrakk> \<Longrightarrow> rel_pmf R p q"
###output ?H1 x_1 x_2 x_3 \<Longrightarrow> ?H2 x_1 (?H3 x_2) (?H3 x_3)###end
MicroJava/DFA/Opt
Option.combine_options_simps(1)
null
combine_options ?f None ?y = ?y
?H1 x_1 ?H2 x_2 = x_2
[ "Option.option.None", "Option.combine_options" ]
[ "'a option", "('a \\<Rightarrow> 'a \\<Rightarrow> 'a) \\<Rightarrow> 'a option \\<Rightarrow> 'a option \\<Rightarrow> 'a option" ]
[ "datatype 'a option =\n None\n | Some (the: 'a)", "definition combine_options :: \"('a \\<Rightarrow> 'a \\<Rightarrow> 'a) \\<Rightarrow> 'a option \\<Rightarrow> 'a option \\<Rightarrow> 'a option\"\n where \"combine_options f x y = \n (case x of None \\<Rightarrow> y | Some x \\<Rightarrow> (case y of None \\<Rightarrow> Some x | Some y \\<Rightarrow> Some (f x y)))\"" ]
template
###lemma combine_options ?f None ?y = ?y ###symbols Option.option.None :::: 'a option Option.combine_options :::: ('a \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> 'a option \<Rightarrow> 'a option \<Rightarrow> 'a option ###defs datatype 'a option = None | Some (the: 'a) definition combine_options :: "('a \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> 'a option \<Rightarrow> 'a option \<Rightarrow> 'a option" where "combine_options f x y = (case x of None \<Rightarrow> y | Some x \<Rightarrow> (case y of None \<Rightarrow> Some x | Some y \<Rightarrow> Some (f x y)))"
###output ?H1 x_1 ?H2 x_2 = x_2###end
Metis_Examples/Big_O
Big_O.bigo_const_mult7
lemma bigo_const_mult7 [intro]: "f =o O(g) \<Longrightarrow> (\<lambda>x. c * f x) =o O(g)"
?f \<in> O(?g) \<Longrightarrow> (\<lambda>x. ?c * ?f x) \<in> O(?g)
x_1 \<in> ?H1 x_2 \<Longrightarrow> (\<lambda>y_0. ?H2 x_3 (x_1 y_0)) \<in> ?H1 x_2
[ "Groups.times_class.times", "Big_O.bigo" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "('a \\<Rightarrow> 'b) \\<Rightarrow> ('a \\<Rightarrow> 'b) set" ]
[ "class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)", "definition bigo :: \"('a => 'b::linordered_idom) => ('a => 'b) set\" (\"(1O'(_'))\") where\n \"O(f::('a => 'b)) == {h. \\<exists>c. \\<forall>x. \\<bar>h x\\<bar> <= c * \\<bar>f x\\<bar>}\"" ]
template
###lemma ?f \<in> O(?g) \<Longrightarrow> (\<lambda>x. ?c * ?f x) \<in> O(?g) ###symbols Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Big_O.bigo :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'b) set ###defs class times = fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70) definition bigo :: "('a => 'b::linordered_idom) => ('a => 'b) set" ("(1O'(_'))") where "O(f::('a => 'b)) == {h. \<exists>c. \<forall>x. \<bar>h x\<bar> <= c * \<bar>f x\<bar>}"
###output x_1 \<in> ?H1 x_2 \<Longrightarrow> (\<lambda>y_0. ?H2 x_3 (x_1 y_0)) \<in> ?H1 x_2###end
Auth/Smartcard/ShoupRubinBella
ShoupRubinBella.Inputs_B_Card_6
lemma Inputs_B_Card_6: "\<lbrakk> Inputs B C \<lbrace>Agent A, Nonce Na\<rbrace> \<in> set evs; B \<noteq> Spy; evs \<in> srb \<rbrakk> \<Longrightarrow> legalUse(C) \<and> C = (Card B) \<and> Gets B \<lbrace>Agent A, Nonce Na\<rbrace> \<in> set evs"
Inputs ?B ?C \<lbrace>Agent ?A, Nonce ?Na\<rbrace> \<in> set ?evs \<Longrightarrow> ?B \<noteq> Spy \<Longrightarrow> ?evs \<in> srb \<Longrightarrow> legalUse ?C \<and> ?C = Card ?B \<and> Gets ?B \<lbrace>Agent ?A, Nonce ?Na\<rbrace> \<in> set ?evs
\<lbrakk> ?H1 x_1 x_2 (?H2 (?H3 x_3) (?H4 x_4)) \<in> ?H5 x_5; x_1 \<noteq> ?H6; x_5 \<in> ?H7\<rbrakk> \<Longrightarrow> ?H8 x_2 \<and> x_2 = ?H9 x_1 \<and> ?H10 x_1 (?H2 (?H3 x_3) (?H4 x_4)) \<in> ?H5 x_5
[ "EventSC.event.Gets", "EventSC.card.Card", "Smartcard.legalUse", "ShoupRubinBella.srb", "Message.agent.Spy", "List.list.set", "Message.msg.Nonce", "Message.msg.Agent", "Message.msg.MPair", "EventSC.event.Inputs" ]
[ "agent \\<Rightarrow> msg \\<Rightarrow> event", "agent \\<Rightarrow> card", "card \\<Rightarrow> bool", "event list set", "agent", "'a list \\<Rightarrow> 'a set", "nat \\<Rightarrow> msg", "agent \\<Rightarrow> msg", "msg \\<Rightarrow> msg \\<Rightarrow> msg", "agent \\<Rightarrow> card \\<Rightarrow> msg \\<Rightarrow> event" ]
[ "definition legalUse :: \"card => bool\" (\"legalUse (_)\") where\n \"legalUse C == C \\<notin> stolen\"", "datatype (set: 'a) list =\n Nil (\"[]\")\n | Cons (hd: 'a) (tl: \"'a list\") (infixr \"#\" 65)\nfor\n map: map\n rel: list_all2\n pred: list_all\nwhere\n \"tl [] = []\"", "datatype\n msg = Agent agent \\<comment> \\<open>Agent names\\<close>\n | Number nat \\<comment> \\<open>Ordinary integers, timestamps, ...\\<close>\n | Nonce nat \\<comment> \\<open>Unguessable nonces\\<close>\n | Key key \\<comment> \\<open>Crypto keys\\<close>\n | Hash msg \\<comment> \\<open>Hashing\\<close>\n | MPair msg msg \\<comment> \\<open>Compound messages\\<close>\n | Crypt key msg \\<comment> \\<open>Encryption, public- or shared-key\\<close>", "datatype\n msg = Agent agent \\<comment> \\<open>Agent names\\<close>\n | Number nat \\<comment> \\<open>Ordinary integers, timestamps, ...\\<close>\n | Nonce nat \\<comment> \\<open>Unguessable nonces\\<close>\n | Key key \\<comment> \\<open>Crypto keys\\<close>\n | Hash msg \\<comment> \\<open>Hashing\\<close>\n | MPair msg msg \\<comment> \\<open>Compound messages\\<close>\n | Crypt key msg \\<comment> \\<open>Encryption, public- or shared-key\\<close>", "datatype\n msg = Agent agent \\<comment> \\<open>Agent names\\<close>\n | Number nat \\<comment> \\<open>Ordinary integers, timestamps, ...\\<close>\n | Nonce nat \\<comment> \\<open>Unguessable nonces\\<close>\n | Key key \\<comment> \\<open>Crypto keys\\<close>\n | Hash msg \\<comment> \\<open>Hashing\\<close>\n | MPair msg msg \\<comment> \\<open>Compound messages\\<close>\n | Crypt key msg \\<comment> \\<open>Encryption, public- or shared-key\\<close>" ]
template
###lemma Inputs ?B ?C \<lbrace>Agent ?A, Nonce ?Na\<rbrace> \<in> set ?evs \<Longrightarrow> ?B \<noteq> Spy \<Longrightarrow> ?evs \<in> srb \<Longrightarrow> legalUse ?C \<and> ?C = Card ?B \<and> Gets ?B \<lbrace>Agent ?A, Nonce ?Na\<rbrace> \<in> set ?evs ###symbols EventSC.event.Gets :::: agent \<Rightarrow> msg \<Rightarrow> event EventSC.card.Card :::: agent \<Rightarrow> card Smartcard.legalUse :::: card \<Rightarrow> bool ShoupRubinBella.srb :::: event list set Message.agent.Spy :::: agent List.list.set :::: 'a list \<Rightarrow> 'a set Message.msg.Nonce :::: nat \<Rightarrow> msg Message.msg.Agent :::: agent \<Rightarrow> msg Message.msg.MPair :::: msg \<Rightarrow> msg \<Rightarrow> msg EventSC.event.Inputs :::: agent \<Rightarrow> card \<Rightarrow> msg \<Rightarrow> event ###defs definition legalUse :: "card => bool" ("legalUse (_)") where "legalUse C == C \<notin> stolen" datatype (set: 'a) list = Nil ("[]") | Cons (hd: 'a) (tl: "'a list") (infixr "#" 65) for map: map rel: list_all2 pred: list_all where "tl [] = []" datatype msg = Agent agent \<comment> \<open>Agent names\<close> | Number nat \<comment> \<open>Ordinary integers, timestamps, ...\<close> | Nonce nat \<comment> \<open>Unguessable nonces\<close> | Key key \<comment> \<open>Crypto keys\<close> | Hash msg \<comment> \<open>Hashing\<close> | MPair msg msg \<comment> \<open>Compound messages\<close> | Crypt key msg \<comment> \<open>Encryption, public- or shared-key\<close> datatype msg = Agent agent \<comment> \<open>Agent names\<close> | Number nat \<comment> \<open>Ordinary integers, timestamps, ...\<close> | Nonce nat \<comment> \<open>Unguessable nonces\<close> | Key key \<comment> \<open>Crypto keys\<close> | Hash msg \<comment> \<open>Hashing\<close> | MPair msg msg \<comment> \<open>Compound messages\<close> | Crypt key msg \<comment> \<open>Encryption, public- or shared-key\<close> datatype msg = Agent agent \<comment> \<open>Agent names\<close> | Number nat \<comment> \<open>Ordinary integers, timestamps, ...\<close> | Nonce nat \<comment> \<open>Unguessable nonces\<close> | Key key \<comment> \<open>Crypto keys\<close> | Hash msg \<comment> \<open>Hashing\<close> | MPair msg msg \<comment> \<open>Compound messages\<close> | Crypt key msg \<comment> \<open>Encryption, public- or shared-key\<close>
###output \<lbrakk> ?H1 x_1 x_2 (?H2 (?H3 x_3) (?H4 x_4)) \<in> ?H5 x_5; x_1 \<noteq> ?H6; x_5 \<in> ?H7\<rbrakk> \<Longrightarrow> ?H8 x_2 \<and> x_2 = ?H9 x_1 \<and> ?H10 x_1 (?H2 (?H3 x_3) (?H4 x_4)) \<in> ?H5 x_5###end
HOLCF/FOCUS/Stream_adm
Stream_adm.infinite_chain_adm_lemma
lemma infinite_chain_adm_lemma: "\<lbrakk>Porder.chain Y; \<forall>i. P (Y i); \<And>Y. \<lbrakk>Porder.chain Y; \<forall>i. P (Y i); \<not> finite_chain Y\<rbrakk> \<Longrightarrow> P (\<Squnion>i. Y i)\<rbrakk> \<Longrightarrow> P (\<Squnion>i. Y i)"
chain ?Y \<Longrightarrow> \<forall>i. ?P (?Y i) \<Longrightarrow> (\<And>Y. chain Y \<Longrightarrow> \<forall>i. ?P (Y i) \<Longrightarrow> \<not> finite_chain Y \<Longrightarrow> ?P (\<Squnion>i. Y i)) \<Longrightarrow> ?P (\<Squnion>i. ?Y i)
\<lbrakk> ?H1 x_1; \<forall>y_0. x_2 (x_1 y_0); \<And>y_1. \<lbrakk> ?H1 y_1; \<forall>y_2. x_2 (y_1 y_2); \<not> ?H2 y_1\<rbrakk> \<Longrightarrow> x_2 (?H3 y_1)\<rbrakk> \<Longrightarrow> x_2 (?H3 x_1)
[ "Porder.po_class.Lub", "Porder.po_class.finite_chain", "Porder.po_class.chain" ]
[ "('a \\<Rightarrow> 'b) \\<Rightarrow> 'b", "(nat \\<Rightarrow> 'a) \\<Rightarrow> bool", "(nat \\<Rightarrow> 'a) \\<Rightarrow> bool" ]
[ "class po = below +\n assumes below_refl [iff]: \"x \\<sqsubseteq> x\"\n assumes below_trans: \"x \\<sqsubseteq> y \\<Longrightarrow> y \\<sqsubseteq> z \\<Longrightarrow> x \\<sqsubseteq> z\"\n assumes below_antisym: \"x \\<sqsubseteq> y \\<Longrightarrow> y \\<sqsubseteq> x \\<Longrightarrow> x = y\"\nbegin", "class po = below +\n assumes below_refl [iff]: \"x \\<sqsubseteq> x\"\n assumes below_trans: \"x \\<sqsubseteq> y \\<Longrightarrow> y \\<sqsubseteq> z \\<Longrightarrow> x \\<sqsubseteq> z\"\n assumes below_antisym: \"x \\<sqsubseteq> y \\<Longrightarrow> y \\<sqsubseteq> x \\<Longrightarrow> x = y\"\nbegin", "class po = below +\n assumes below_refl [iff]: \"x \\<sqsubseteq> x\"\n assumes below_trans: \"x \\<sqsubseteq> y \\<Longrightarrow> y \\<sqsubseteq> z \\<Longrightarrow> x \\<sqsubseteq> z\"\n assumes below_antisym: \"x \\<sqsubseteq> y \\<Longrightarrow> y \\<sqsubseteq> x \\<Longrightarrow> x = y\"\nbegin" ]
template
###lemma chain ?Y \<Longrightarrow> \<forall>i. ?P (?Y i) \<Longrightarrow> (\<And>Y. chain Y \<Longrightarrow> \<forall>i. ?P (Y i) \<Longrightarrow> \<not> finite_chain Y \<Longrightarrow> ?P (\<Squnion>i. Y i)) \<Longrightarrow> ?P (\<Squnion>i. ?Y i) ###symbols Porder.po_class.Lub :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b Porder.po_class.finite_chain :::: (nat \<Rightarrow> 'a) \<Rightarrow> bool Porder.po_class.chain :::: (nat \<Rightarrow> 'a) \<Rightarrow> bool ###defs class po = below + assumes below_refl [iff]: "x \<sqsubseteq> x" assumes below_trans: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> z \<Longrightarrow> x \<sqsubseteq> z" assumes below_antisym: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> x \<Longrightarrow> x = y" begin class po = below + assumes below_refl [iff]: "x \<sqsubseteq> x" assumes below_trans: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> z \<Longrightarrow> x \<sqsubseteq> z" assumes below_antisym: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> x \<Longrightarrow> x = y" begin class po = below + assumes below_refl [iff]: "x \<sqsubseteq> x" assumes below_trans: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> z \<Longrightarrow> x \<sqsubseteq> z" assumes below_antisym: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> x \<Longrightarrow> x = y" begin
###output \<lbrakk> ?H1 x_1; \<forall>y_0. x_2 (x_1 y_0); \<And>y_1. \<lbrakk> ?H1 y_1; \<forall>y_2. x_2 (y_1 y_2); \<not> ?H2 y_1\<rbrakk> \<Longrightarrow> x_2 (?H3 y_1)\<rbrakk> \<Longrightarrow> x_2 (?H3 x_1)###end
Library/Word
Word.word_rec_id_eq
lemma word_rec_id_eq: "(\<And>m. m < n \<Longrightarrow> f m = id) \<Longrightarrow> word_rec z f n = z"
(\<And>m. m < ?n \<Longrightarrow> ?f m = id) \<Longrightarrow> word_rec ?z ?f ?n = ?z
(\<And>y_0. y_0 < x_1 \<Longrightarrow> x_2 y_0 = ?H1) \<Longrightarrow> ?H2 x_3 x_2 x_1 = x_3
[ "Word.word_rec", "Fun.id" ]
[ "'a \\<Rightarrow> ('b word \\<Rightarrow> 'a \\<Rightarrow> 'a) \\<Rightarrow> 'b word \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a" ]
[ "definition word_rec :: \"'a \\<Rightarrow> ('b::len word \\<Rightarrow> 'a \\<Rightarrow> 'a) \\<Rightarrow> 'b word \\<Rightarrow> 'a\"\n where \"word_rec forZero forSuc n = rec_nat forZero (forSuc \\<circ> of_nat) (unat n)\"", "definition id :: \"'a \\<Rightarrow> 'a\"\n where \"id = (\\<lambda>x. x)\"" ]
template
###lemma (\<And>m. m < ?n \<Longrightarrow> ?f m = id) \<Longrightarrow> word_rec ?z ?f ?n = ?z ###symbols Word.word_rec :::: 'a \<Rightarrow> ('b word \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> 'b word \<Rightarrow> 'a Fun.id :::: 'a \<Rightarrow> 'a ###defs definition word_rec :: "'a \<Rightarrow> ('b::len word \<Rightarrow> 'a \<Rightarrow> 'a) \<Rightarrow> 'b word \<Rightarrow> 'a" where "word_rec forZero forSuc n = rec_nat forZero (forSuc \<circ> of_nat) (unat n)" definition id :: "'a \<Rightarrow> 'a" where "id = (\<lambda>x. x)"
###output (\<And>y_0. y_0 < x_1 \<Longrightarrow> x_2 y_0 = ?H1) \<Longrightarrow> ?H2 x_3 x_2 x_1 = x_3###end
Nonstandard_Analysis/NSA
NSA.hypreal_gt_isUb
lemma hypreal_gt_isUb: "isUb R S x \<Longrightarrow> x < y \<Longrightarrow> y \<in> R \<Longrightarrow> isUb R S y" for x y :: hypreal
isUb ?R ?S ?x \<Longrightarrow> ?x < ?y \<Longrightarrow> ?y \<in> ?R \<Longrightarrow> isUb ?R ?S ?y
\<lbrakk> ?H1 x_1 x_2 x_3; x_3 < x_4; x_4 \<in> x_1\<rbrakk> \<Longrightarrow> ?H1 x_1 x_2 x_4
[ "Lub_Glb.isUb" ]
[ "'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a \\<Rightarrow> bool" ]
[ "definition isUb :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a::ord \\<Rightarrow> bool\"\n where \"isUb R S x = (S *<= x \\<and> x \\<in> R)\"" ]
template
###lemma isUb ?R ?S ?x \<Longrightarrow> ?x < ?y \<Longrightarrow> ?y \<in> ?R \<Longrightarrow> isUb ?R ?S ?y ###symbols Lub_Glb.isUb :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a \<Rightarrow> bool ###defs definition isUb :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a::ord \<Rightarrow> bool" where "isUb R S x = (S *<= x \<and> x \<in> R)"
###output \<lbrakk> ?H1 x_1 x_2 x_3; x_3 < x_4; x_4 \<in> x_1\<rbrakk> \<Longrightarrow> ?H1 x_1 x_2 x_4###end
Computational_Algebra/Normalized_Fraction
Normalized_Fraction.normalize_quot_aux(4)
lemma normalize_quot_aux: fixes a b assumes "b \<noteq> 0" defines "d \<equiv> gcd a b * unit_factor b" shows "a = fst (normalize_quot (a,b)) * d" "b = snd (normalize_quot (a,b)) * d" "d dvd a" "d dvd b" "d \<noteq> 0"
?b \<noteq> (0:: ?'a) \<Longrightarrow> gcd ?a ?b * unit_factor ?b dvd ?b
x_1 \<noteq> ?H1 \<Longrightarrow> ?H2 (?H3 (?H4 x_2 x_1) (?H5 x_1)) x_1
[ "Rings.unit_factor_class.unit_factor", "GCD.gcd_class.gcd", "Groups.times_class.times", "Rings.dvd_class.dvd", "Groups.zero_class.zero" ]
[ "'a \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> bool", "'a" ]
[ "class unit_factor =\n fixes unit_factor :: \"'a \\<Rightarrow> 'a\"", "class gcd = zero + one + dvd +\n fixes gcd :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\"\n and lcm :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\"", "class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)", "definition dvd :: \"'a \\<Rightarrow> 'a \\<Rightarrow> bool\" (infix \"dvd\" 50)\n where \"b dvd a \\<longleftrightarrow> (\\<exists>k. a = b * k)\"", "class zero =\n fixes zero :: 'a (\"0\")" ]
template
###lemma ?b \<noteq> (0:: ?'a) \<Longrightarrow> gcd ?a ?b * unit_factor ?b dvd ?b ###symbols Rings.unit_factor_class.unit_factor :::: 'a \<Rightarrow> 'a GCD.gcd_class.gcd :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Rings.dvd_class.dvd :::: 'a \<Rightarrow> 'a \<Rightarrow> bool Groups.zero_class.zero :::: 'a ###defs class unit_factor = fixes unit_factor :: "'a \<Rightarrow> 'a" class gcd = zero + one + dvd + fixes gcd :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" and lcm :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" class times = fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70) definition dvd :: "'a \<Rightarrow> 'a \<Rightarrow> bool" (infix "dvd" 50) where "b dvd a \<longleftrightarrow> (\<exists>k. a = b * k)" class zero = fixes zero :: 'a ("0")
###output x_1 \<noteq> ?H1 \<Longrightarrow> ?H2 (?H3 (?H4 x_2 x_1) (?H5 x_1)) x_1###end
Record
Record.update_accessor_congruence_foldE
lemma update_accessor_congruence_foldE: assumes uac: "iso_tuple_update_accessor_cong_assist upd ac" and r: "r = r'" and v: "ac r' = v'" and f: "\<And>v. v' = v \<Longrightarrow> f v = f' v" shows "upd f r = upd f' r'"
Record.iso_tuple_update_accessor_cong_assist ?upd ?ac \<Longrightarrow> ?r = ?r' \<Longrightarrow> ?ac ?r' = ?v' \<Longrightarrow> (\<And>v. ?v' = v \<Longrightarrow> ?f v = ?f' v) \<Longrightarrow> ?upd ?f ?r = ?upd ?f' ?r'
\<lbrakk> ?H1 x_1 x_2; x_3 = x_4; x_2 x_4 = x_5; \<And>y_0. x_5 = y_0 \<Longrightarrow> x_6 y_0 = x_7 y_0\<rbrakk> \<Longrightarrow> x_1 x_6 x_3 = x_1 x_7 x_4
[ "Record.iso_tuple_update_accessor_cong_assist" ]
[ "(('a \\<Rightarrow> 'a) \\<Rightarrow> 'b \\<Rightarrow> 'b) \\<Rightarrow> ('b \\<Rightarrow> 'a) \\<Rightarrow> bool" ]
[ "definition\n iso_tuple_update_accessor_cong_assist ::\n \"(('b \\<Rightarrow> 'b) \\<Rightarrow> ('a \\<Rightarrow> 'a)) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool\" where\n \"iso_tuple_update_accessor_cong_assist upd ac \\<longleftrightarrow>\n (\\<forall>f v. upd (\\<lambda>x. f (ac v)) v = upd f v) \\<and> (\\<forall>v. upd id v = v)\"" ]
template
###lemma Record.iso_tuple_update_accessor_cong_assist ?upd ?ac \<Longrightarrow> ?r = ?r' \<Longrightarrow> ?ac ?r' = ?v' \<Longrightarrow> (\<And>v. ?v' = v \<Longrightarrow> ?f v = ?f' v) \<Longrightarrow> ?upd ?f ?r = ?upd ?f' ?r' ###symbols Record.iso_tuple_update_accessor_cong_assist :::: (('a \<Rightarrow> 'a) \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> ('b \<Rightarrow> 'a) \<Rightarrow> bool ###defs definition iso_tuple_update_accessor_cong_assist :: "(('b \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'a)) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool" where "iso_tuple_update_accessor_cong_assist upd ac \<longleftrightarrow> (\<forall>f v. upd (\<lambda>x. f (ac v)) v = upd f v) \<and> (\<forall>v. upd id v = v)"
###output \<lbrakk> ?H1 x_1 x_2; x_3 = x_4; x_2 x_4 = x_5; \<And>y_0. x_5 = y_0 \<Longrightarrow> x_6 y_0 = x_7 y_0\<rbrakk> \<Longrightarrow> x_1 x_6 x_3 = x_1 x_7 x_4###end
Analysis/Tagged_Division
Tagged_Division.tagged_division_split_right_inj
lemma tagged_division_split_right_inj: assumes d: "d tagged_division_of i" and tags: "(x1, K1) \<in> d" "(x2, K2) \<in> d" and "K1 \<noteq> K2" and eq: "K1 \<inter> {x. x\<bullet>k \<ge> c} = K2 \<inter> {x. x\<bullet>k \<ge> c}" shows "interior (K1 \<inter> {x. x\<bullet>k \<ge> c}) = {}"
?d tagged_division_of ?i \<Longrightarrow> (?x1.0, ?K1.0) \<in> ?d \<Longrightarrow> (?x2.0, ?K2.0) \<in> ?d \<Longrightarrow> ?K1.0 \<noteq> ?K2.0 \<Longrightarrow> ?K1.0 \<inter> {x. ?c \<le> x \<bullet> ?k} = ?K2.0 \<inter> {x. ?c \<le> x \<bullet> ?k} \<Longrightarrow> interior (?K1.0 \<inter> {x. ?c \<le> x \<bullet> ?k}) = {}
\<lbrakk> ?H1 x_1 x_2; (x_3, x_4) \<in> x_1; (x_5, x_6) \<in> x_1; x_4 \<noteq> x_6; ?H2 x_4 (?H3 (\<lambda>y_0. x_7 \<le> ?H4 y_0 x_8)) = ?H2 x_6 (?H3 (\<lambda>y_1. x_7 \<le> ?H4 y_1 x_8))\<rbrakk> \<Longrightarrow> ?H5 (?H2 x_4 (?H3 (\<lambda>y_2. x_7 \<le> ?H4 y_2 x_8))) = ?H6
[ "Set.empty", "Elementary_Topology.interior", "Inner_Product.real_inner_class.inner", "Set.Collect", "Set.inter", "Tagged_Division.tagged_division_of" ]
[ "'a set", "'a set \\<Rightarrow> 'a set", "'a \\<Rightarrow> 'a \\<Rightarrow> real", "('a \\<Rightarrow> bool) \\<Rightarrow> 'a set", "'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set", "('a \\<times> 'a set) set \\<Rightarrow> 'a set \\<Rightarrow> bool" ]
[ "abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"", "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", "abbreviation inter :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<inter>\" 70)\n where \"(\\<inter>) \\<equiv> inf\"" ]
template
###lemma ?d tagged_division_of ?i \<Longrightarrow> (?x1.0, ?K1.0) \<in> ?d \<Longrightarrow> (?x2.0, ?K2.0) \<in> ?d \<Longrightarrow> ?K1.0 \<noteq> ?K2.0 \<Longrightarrow> ?K1.0 \<inter> {x. ?c \<le> x \<bullet> ?k} = ?K2.0 \<inter> {x. ?c \<le> x \<bullet> ?k} \<Longrightarrow> interior (?K1.0 \<inter> {x. ?c \<le> x \<bullet> ?k}) = {} ###symbols Set.empty :::: 'a set Elementary_Topology.interior :::: 'a set \<Rightarrow> 'a set Inner_Product.real_inner_class.inner :::: 'a \<Rightarrow> 'a \<Rightarrow> real Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set Set.inter :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set Tagged_Division.tagged_division_of :::: ('a \<times> 'a set) set \<Rightarrow> 'a set \<Rightarrow> bool ###defs abbreviation empty :: "'a set" ("{}") where "{} \<equiv> bot" 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 abbreviation inter :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<inter>" 70) where "(\<inter>) \<equiv> inf"
###output \<lbrakk> ?H1 x_1 x_2; (x_3, x_4) \<in> x_1; (x_5, x_6) \<in> x_1; x_4 \<noteq> x_6; ?H2 x_4 (?H3 (\<lambda>y_0. x_7 \<le> ?H4 y_0 x_8)) = ?H2 x_6 (?H3 (\<lambda>y_1. x_7 \<le> ?H4 y_1 x_8))\<rbrakk> \<Longrightarrow> ?H5 (?H2 x_4 (?H3 (\<lambda>y_2. x_7 \<le> ?H4 y_2 x_8))) = ?H6###end
Examples/Gauss_Numbers
Gauss_Numbers.Im_i_times
lemma Im_i_times [simp]: \<open>Im (\<i> * z) = Re z\<close>
Im (\<i> * ?z) = Re ?z
?H1 (?H2 ?H3 x_1) = ?H4 x_1
[ "Gauss_Numbers.gauss.Re", "Gauss_Numbers.imaginary_unit", "Groups.times_class.times", "Gauss_Numbers.gauss.Im" ]
[ "gauss \\<Rightarrow> int", "gauss", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "gauss \\<Rightarrow> int" ]
[ "codatatype gauss = Gauss (Re: int) (Im: int)", "primcorec imaginary_unit :: gauss (\\<open>\\<i>\\<close>)\n where\n \\<open>Re \\<i> = 0\\<close>\n | \\<open>Im \\<i> = 1\\<close>", "class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)", "codatatype gauss = Gauss (Re: int) (Im: int)" ]
template
###lemma Im (\<i> * ?z) = Re ?z ###symbols Gauss_Numbers.gauss.Re :::: gauss \<Rightarrow> int Gauss_Numbers.imaginary_unit :::: gauss Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Gauss_Numbers.gauss.Im :::: gauss \<Rightarrow> int ###defs codatatype gauss = Gauss (Re: int) (Im: int) primcorec imaginary_unit :: gauss (\<open>\<i>\<close>) where \<open>Re \<i> = 0\<close> | \<open>Im \<i> = 1\<close> class times = fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70) codatatype gauss = Gauss (Re: int) (Im: int)
###output ?H1 (?H2 ?H3 x_1) = ?H4 x_1###end
Library/Complete_Partial_Order2
Complete_Partial_Order2.mcont_call
lemma mcont_call [cont_intro, simp]: "mcont (fun_lub lub) (fun_ord ord) lub ord (\<lambda>f. f t)"
mcont (fun_lub ?lub) (fun_ord ?ord) ?lub ?ord (\<lambda>f. f ?t)
?H1 (?H2 x_1) (?H3 x_2) x_1 x_2 (\<lambda>y_0. y_0 x_3)
[ "Partial_Function.fun_ord", "Partial_Function.fun_lub", "Complete_Partial_Order2.mcont" ]
[ "('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c \\<Rightarrow> 'a) \\<Rightarrow> ('c \\<Rightarrow> 'b) \\<Rightarrow> bool", "('a set \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'a) set \\<Rightarrow> 'c \\<Rightarrow> 'b", "('a set \\<Rightarrow> 'a) \\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> ('b set \\<Rightarrow> 'b) \\<Rightarrow> ('b \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool" ]
[ "definition \"fun_ord ord f g \\<longleftrightarrow> (\\<forall>x. ord (f x) (g x))\"", "definition \"fun_lub L A = (\\<lambda>x. L {y. \\<exists>f\\<in>A. y = f x})\"", "definition mcont :: \"('a set \\<Rightarrow> 'a) \\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarrow> bool) \\<Rightarrow> ('b set \\<Rightarrow> 'b) \\<Rightarrow> ('b \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool\"\nwhere\n \"mcont luba orda lubb ordb f \\<longleftrightarrow>\n monotone orda ordb f \\<and> cont luba orda lubb ordb f\"" ]
template
###lemma mcont (fun_lub ?lub) (fun_ord ?ord) ?lub ?ord (\<lambda>f. f ?t) ###symbols Partial_Function.fun_ord :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c \<Rightarrow> 'a) \<Rightarrow> ('c \<Rightarrow> 'b) \<Rightarrow> bool Partial_Function.fun_lub :::: ('a set \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'a) set \<Rightarrow> 'c \<Rightarrow> 'b Complete_Partial_Order2.mcont :::: ('a set \<Rightarrow> 'a) \<Rightarrow> ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> ('b set \<Rightarrow> 'b) \<Rightarrow> ('b \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool ###defs definition "fun_ord ord f g \<longleftrightarrow> (\<forall>x. ord (f x) (g x))" definition "fun_lub L A = (\<lambda>x. L {y. \<exists>f\<in>A. y = f x})" definition mcont :: "('a set \<Rightarrow> 'a) \<Rightarrow> ('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> ('b set \<Rightarrow> 'b) \<Rightarrow> ('b \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool" where "mcont luba orda lubb ordb f \<longleftrightarrow> monotone orda ordb f \<and> cont luba orda lubb ordb f"
###output ?H1 (?H2 x_1) (?H3 x_2) x_1 x_2 (\<lambda>y_0. y_0 x_3)###end
Bali/Trans
Transfer.transfer_raw(29)
null
bi_total ?A \<Longrightarrow> bi_unique ?A \<Longrightarrow> Transfer.Rel (rel_fun (rel_fun (rel_fun ?A (=)) (=)) (=)) is_filter is_filter
\<lbrakk> ?H1 x_1; ?H2 x_1\<rbrakk> \<Longrightarrow> ?H3 (?H4 (?H4 (?H4 x_1 (=)) (=)) (=)) ?H5 ?H5
[ "Filter.is_filter", "BNF_Def.rel_fun", "Transfer.Rel", "Transfer.bi_unique", "Transfer.bi_total" ]
[ "(('a \\<Rightarrow> bool) \\<Rightarrow> bool) \\<Rightarrow> bool", "('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> ('c \\<Rightarrow> 'd \\<Rightarrow> bool) \\<Rightarrow> ('a \\<Rightarrow> 'c) \\<Rightarrow> ('b \\<Rightarrow> 'd) \\<Rightarrow> bool", "('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> 'b \\<Rightarrow> bool", "('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool", "('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_unique :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool\"\n where \"bi_unique R \\<longleftrightarrow>\n (\\<forall>x y z. R x y \\<longrightarrow> R x z \\<longrightarrow> y = z) \\<and>\n (\\<forall>x y z. R x z \\<longrightarrow> R y z \\<longrightarrow> x = y)\"", "definition bi_total :: \"('a \\<Rightarrow> 'b \\<Rightarrow> bool) \\<Rightarrow> bool\"\n where \"bi_total R \\<longleftrightarrow> (\\<forall>x. \\<exists>y. R x y) \\<and> (\\<forall>y. \\<exists>x. R x y)\"" ]
template
###lemma bi_total ?A \<Longrightarrow> bi_unique ?A \<Longrightarrow> Transfer.Rel (rel_fun (rel_fun (rel_fun ?A (=)) (=)) (=)) is_filter is_filter ###symbols Filter.is_filter :::: (('a \<Rightarrow> bool) \<Rightarrow> bool) \<Rightarrow> bool BNF_Def.rel_fun :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('c \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'c) \<Rightarrow> ('b \<Rightarrow> 'd) \<Rightarrow> bool Transfer.Rel :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool Transfer.bi_unique :::: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<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_unique :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool" where "bi_unique R \<longleftrightarrow> (\<forall>x y z. R x y \<longrightarrow> R x z \<longrightarrow> y = z) \<and> (\<forall>x y z. R x z \<longrightarrow> R y z \<longrightarrow> x = y)" definition bi_total :: "('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> bool" where "bi_total R \<longleftrightarrow> (\<forall>x. \<exists>y. R x y) \<and> (\<forall>y. \<exists>x. R x y)"
###output \<lbrakk> ?H1 x_1; ?H2 x_1\<rbrakk> \<Longrightarrow> ?H3 (?H4 (?H4 (?H4 x_1 (=)) (=)) (=)) ?H5 ?H5###end
Library/FuncSet
FuncSet.Pi_Int
lemma Pi_Int: "Pi I E \<inter> Pi I F = (\<Pi> i\<in>I. E i \<inter> F i)"
Pi ?I ?E \<inter> Pi ?I ?F = (\<Pi> i\<in> ?I. ?E i \<inter> ?F i)
?H1 (?H2 x_1 x_2) (?H2 x_1 x_3) = ?H2 x_1 (\<lambda>y_0. ?H1 (x_2 y_0) (x_3 y_0))
[ "FuncSet.Pi", "Set.inter" ]
[ "'a set \\<Rightarrow> ('a \\<Rightarrow> 'b set) \\<Rightarrow> ('a \\<Rightarrow> 'b) set", "'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set" ]
[ "definition Pi :: \"'a set \\<Rightarrow> ('a \\<Rightarrow> 'b set) \\<Rightarrow> ('a \\<Rightarrow> 'b) set\"\n where \"Pi A B = {f. \\<forall>x. x \\<in> A \\<longrightarrow> f x \\<in> B x}\"", "abbreviation inter :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<inter>\" 70)\n where \"(\\<inter>) \\<equiv> inf\"" ]
template
###lemma Pi ?I ?E \<inter> Pi ?I ?F = (\<Pi> i\<in> ?I. ?E i \<inter> ?F i) ###symbols FuncSet.Pi :::: 'a set \<Rightarrow> ('a \<Rightarrow> 'b set) \<Rightarrow> ('a \<Rightarrow> 'b) set Set.inter :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set ###defs definition Pi :: "'a set \<Rightarrow> ('a \<Rightarrow> 'b set) \<Rightarrow> ('a \<Rightarrow> 'b) set" where "Pi A B = {f. \<forall>x. x \<in> A \<longrightarrow> f x \<in> B x}" abbreviation inter :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<inter>" 70) where "(\<inter>) \<equiv> inf"
###output ?H1 (?H2 x_1 x_2) (?H2 x_1 x_3) = ?H2 x_1 (\<lambda>y_0. ?H1 (x_2 y_0) (x_3 y_0))###end
Analysis/Tagged_Division
Tagged_Division.additive_tagged_division_1
lemma additive_tagged_division_1: fixes f :: "real \<Rightarrow> 'a::real_normed_vector" assumes "a \<le> b" and "p tagged_division_of {a..b}" shows "sum (\<lambda>(x,K). f(Sup K) - f(Inf K)) p = f b - f a"
?a \<le> ?b \<Longrightarrow> ?p tagged_division_of { ?a.. ?b} \<Longrightarrow> (\<Sum>(x, K)\<in> ?p. ?f (Sup K) - ?f (Inf K)) = ?f ?b - ?f ?a
\<lbrakk>x_1 \<le> x_2; ?H1 x_3 (?H2 x_1 x_2)\<rbrakk> \<Longrightarrow> ?H3 (?H4 (\<lambda>y_0 y_1. ?H5 (x_4 (?H6 y_1)) (x_4 (?H7 y_1)))) x_3 = ?H5 (x_4 x_2) (x_4 x_1)
[ "Complete_Lattices.Inf_class.Inf", "Complete_Lattices.Sup_class.Sup", "Groups.minus_class.minus", "Product_Type.prod.case_prod", "Groups_Big.comm_monoid_add_class.sum", "Set_Interval.ord_class.atLeastAtMost", "Tagged_Division.tagged_division_of" ]
[ "'a set \\<Rightarrow> 'a", "'a set \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "('a \\<Rightarrow> 'b \\<Rightarrow> 'c) \\<Rightarrow> 'a \\<times> 'b \\<Rightarrow> 'c", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a set", "('a \\<times> 'a set) set \\<Rightarrow> 'a set \\<Rightarrow> bool" ]
[ "class Inf =\n fixes Inf :: \"'a set \\<Rightarrow> 'a\" (\"\\<Sqinter> _\" [900] 900)", "class Sup =\n fixes Sup :: \"'a set \\<Rightarrow> 'a\" (\"\\<Squnion> _\" [900] 900)", "class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)", "definition \"prod = {f. \\<exists>a b. f = Pair_Rep (a::'a) (b::'b)}\"" ]
template
###lemma ?a \<le> ?b \<Longrightarrow> ?p tagged_division_of { ?a.. ?b} \<Longrightarrow> (\<Sum>(x, K)\<in> ?p. ?f (Sup K) - ?f (Inf K)) = ?f ?b - ?f ?a ###symbols Complete_Lattices.Inf_class.Inf :::: 'a set \<Rightarrow> 'a Complete_Lattices.Sup_class.Sup :::: 'a set \<Rightarrow> 'a Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Product_Type.prod.case_prod :::: ('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'a \<times> 'b \<Rightarrow> 'c Groups_Big.comm_monoid_add_class.sum :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b Set_Interval.ord_class.atLeastAtMost :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a set Tagged_Division.tagged_division_of :::: ('a \<times> 'a set) set \<Rightarrow> 'a set \<Rightarrow> bool ###defs class Inf = fixes Inf :: "'a set \<Rightarrow> 'a" ("\<Sqinter> _" [900] 900) class Sup = fixes Sup :: "'a set \<Rightarrow> 'a" ("\<Squnion> _" [900] 900) class minus = fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65) definition "prod = {f. \<exists>a b. f = Pair_Rep (a::'a) (b::'b)}"
###output \<lbrakk>x_1 \<le> x_2; ?H1 x_3 (?H2 x_1 x_2)\<rbrakk> \<Longrightarrow> ?H3 (?H4 (\<lambda>y_0 y_1. ?H5 (x_4 (?H6 y_1)) (x_4 (?H7 y_1)))) x_3 = ?H5 (x_4 x_2) (x_4 x_1)###end
Analysis/Abstract_Euclidean_Space
Abstract_Euclidean_Space.Hausdorff_Euclidean_space
lemma Hausdorff_Euclidean_space: "Hausdorff_space (Euclidean_space n)"
Hausdorff_space (Euclidean_space ?n)
?H1 (?H2 x_1)
[ "Abstract_Euclidean_Space.Euclidean_space", "T1_Spaces.Hausdorff_space" ]
[ "nat \\<Rightarrow> (nat \\<Rightarrow> real) topology", "'a topology \\<Rightarrow> bool" ]
[ "definition Euclidean_space :: \"nat \\<Rightarrow> (nat \\<Rightarrow> real) topology\"\n where \"Euclidean_space n \\<equiv> subtopology (powertop_real UNIV) {x. \\<forall>i\\<ge>n. x i = 0}\"", "definition Hausdorff_space\n where\n \"Hausdorff_space X \\<equiv>\n \\<forall>x y. x \\<in> topspace X \\<and> y \\<in> topspace X \\<and> (x \\<noteq> y)\n \\<longrightarrow> (\\<exists>U V. openin X U \\<and> openin X V \\<and> x \\<in> U \\<and> y \\<in> V \\<and> disjnt U V)\"" ]
template
###lemma Hausdorff_space (Euclidean_space ?n) ###symbols Abstract_Euclidean_Space.Euclidean_space :::: nat \<Rightarrow> (nat \<Rightarrow> real) topology T1_Spaces.Hausdorff_space :::: 'a topology \<Rightarrow> bool ###defs definition Euclidean_space :: "nat \<Rightarrow> (nat \<Rightarrow> real) topology" where "Euclidean_space n \<equiv> subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}" definition Hausdorff_space where "Hausdorff_space X \<equiv> \<forall>x y. x \<in> topspace X \<and> y \<in> topspace X \<and> (x \<noteq> y) \<longrightarrow> (\<exists>U V. openin X U \<and> openin X V \<and> x \<in> U \<and> y \<in> V \<and> disjnt U V)"
###output ?H1 (?H2 x_1)###end
Nonstandard_Analysis/HyperNat
HyperNat.of_hypnat_add
lemma of_hypnat_add [simp]: "\<And>m n. of_hypnat (m + n) = of_hypnat m + of_hypnat n"
of_hypnat (?m + ?n) = of_hypnat ?m + of_hypnat ?n
?H1 (?H2 x_1 x_2) = ?H2 (?H1 x_1) (?H1 x_2)
[ "Groups.plus_class.plus", "HyperNat.of_hypnat" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "nat star \\<Rightarrow> 'a star" ]
[ "class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)", "definition of_hypnat :: \"hypnat \\<Rightarrow> 'a::semiring_1_cancel star\"\n where of_hypnat_def [transfer_unfold]: \"of_hypnat = *f* of_nat\"" ]
template
###lemma of_hypnat (?m + ?n) = of_hypnat ?m + of_hypnat ?n ###symbols Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a HyperNat.of_hypnat :::: nat star \<Rightarrow> 'a star ###defs class plus = fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65) definition of_hypnat :: "hypnat \<Rightarrow> 'a::semiring_1_cancel star" where of_hypnat_def [transfer_unfold]: "of_hypnat = *f* of_nat"
###output ?H1 (?H2 x_1 x_2) = ?H2 (?H1 x_1) (?H1 x_2)###end
Topological_Spaces
Topological_Spaces.tendsto_compose_filtermap
lemma tendsto_compose_filtermap: "((g \<circ> f) \<longlongrightarrow> T) F \<longleftrightarrow> (g \<longlongrightarrow> T) (filtermap f F)"
((?g \<circ> ?f) \<longlongrightarrow> ?T) ?F = (?g \<longlongrightarrow> ?T) (filtermap ?f ?F)
?H1 (?H2 x_1 x_2) x_3 x_4 = ?H1 x_1 x_3 (?H3 x_2 x_4)
[ "Filter.filtermap", "Fun.comp", "Topological_Spaces.topological_space_class.tendsto" ]
[ "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a filter \\<Rightarrow> 'b filter", "('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'a) \\<Rightarrow> 'c \\<Rightarrow> 'b", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'b \\<Rightarrow> 'a filter \\<Rightarrow> bool" ]
[ "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)\"", "definition comp :: \"('b \\<Rightarrow> 'c) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> 'c\" (infixl \"\\<circ>\" 55)\n where \"f \\<circ> g = (\\<lambda>x. f (g x))\"", "class 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 ((?g \<circ> ?f) \<longlongrightarrow> ?T) ?F = (?g \<longlongrightarrow> ?T) (filtermap ?f ?F) ###symbols Filter.filtermap :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a filter \<Rightarrow> 'b filter Fun.comp :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'a) \<Rightarrow> 'c \<Rightarrow> 'b Topological_Spaces.topological_space_class.tendsto :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b \<Rightarrow> 'a filter \<Rightarrow> bool ###defs 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)" definition comp :: "('b \<Rightarrow> 'c) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'c" (infixl "\<circ>" 55) where "f \<circ> g = (\<lambda>x. f (g x))" class topological_space = "open" + assumes open_UNIV [simp, intro]: "open UNIV" assumes open_Int [intro]: "open S \<Longrightarrow> open T \<Longrightarrow> open (S \<inter> T)" assumes open_Union [intro]: "\<forall>S\<in>K. open S \<Longrightarrow> open (\<Union>K)" begin
###output ?H1 (?H2 x_1 x_2) x_3 x_4 = ?H1 x_1 x_3 (?H3 x_2 x_4)###end
Analysis/Complex_Transcendental
Complex_Transcendental.Arg2pi_inverse_eq_0
lemma Arg2pi_inverse_eq_0: "Arg2pi(inverse z) = 0 \<longleftrightarrow> Arg2pi z = 0"
(Arg2pi (inverse ?z) = 0) = (Arg2pi ?z = 0)
(?H1 (?H2 x_1) = ?H3) = (?H1 x_1 = ?H3)
[ "Groups.zero_class.zero", "Fields.inverse_class.inverse", "Complex_Transcendental.Arg2pi" ]
[ "'a", "'a \\<Rightarrow> 'a", "complex \\<Rightarrow> real" ]
[ "class zero =\n fixes zero :: 'a (\"0\")", "class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin" ]
template
###lemma (Arg2pi (inverse ?z) = 0) = (Arg2pi ?z = 0) ###symbols Groups.zero_class.zero :::: 'a Fields.inverse_class.inverse :::: 'a \<Rightarrow> 'a Complex_Transcendental.Arg2pi :::: complex \<Rightarrow> real ###defs class zero = fixes zero :: 'a ("0") class inverse = divide + fixes inverse :: "'a \<Rightarrow> 'a" begin
###output (?H1 (?H2 x_1) = ?H3) = (?H1 x_1 = ?H3)###end
Number_Theory/Cong
Cong.cong_0_1_nat
lemma cong_0_1_nat: "[0 = 1] (mod n) \<longleftrightarrow> n = 1" for n :: nat
[0 = 1] (mod ?n) = (?n = 1)
?H1 ?H2 ?H3 x_1 = (x_1 = ?H3)
[ "Groups.one_class.one", "Groups.zero_class.zero", "Cong.unique_euclidean_semiring_class.cong" ]
[ "'a", "'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> bool" ]
[ "class one =\n fixes one :: 'a (\"1\")", "class zero =\n fixes zero :: 'a (\"0\")" ]
template
###lemma [0 = 1] (mod ?n) = (?n = 1) ###symbols Groups.one_class.one :::: 'a Groups.zero_class.zero :::: 'a Cong.unique_euclidean_semiring_class.cong :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool ###defs class one = fixes one :: 'a ("1") class zero = fixes zero :: 'a ("0")
###output ?H1 ?H2 ?H3 x_1 = (x_1 = ?H3)###end
SET_Protocol/Merchant_Registration
Merchant_Registration.Spy_see_private_Key
lemma Spy_see_private_Key [simp]: "evs \<in> set_mr ==> (Key(invKey (publicKey b A)) \<in> parts(knows Spy evs)) = (A \<in> bad)"
?evs \<in> set_mr \<Longrightarrow> (Key (invKey (publicKey ?b ?A)) \<in> parts (knows Spy ?evs)) = (?A \<in> bad)
x_1 \<in> ?H1 \<Longrightarrow> (?H2 (?H3 (?H4 x_2 x_3)) \<in> ?H5 (?H6 ?H7 x_1)) = (x_3 \<in> ?H8)
[ "Event_SET.bad", "Message_SET.agent.Spy", "Event_SET.knows", "Message_SET.parts", "Public_SET.publicKey", "Message_SET.invKey", "Message_SET.msg.Key", "Merchant_Registration.set_mr" ]
[ "agent set", "agent", "agent \\<Rightarrow> event list \\<Rightarrow> msg set", "msg set \\<Rightarrow> msg set", "bool \\<Rightarrow> agent \\<Rightarrow> nat", "nat \\<Rightarrow> nat", "nat \\<Rightarrow> msg", "event list set" ]
[ "consts bad :: \"agent set\"", "datatype\n agent = CA nat | Cardholder nat | Merchant nat | PG nat | Spy", "primrec knows :: \"[agent, event list] \\<Rightarrow> msg set\"\nwhere\n knows_Nil:\n \"knows A [] = initState A\"\n| knows_Cons:\n \"knows A (ev # evs) =\n (if A = Spy then\n (case ev of\n Says A' B X \\<Rightarrow> insert X (knows Spy evs)\n | Gets A' X \\<Rightarrow> knows Spy evs\n | Notes A' X \\<Rightarrow>\n if A' \\<in> bad then insert X (knows Spy evs) else knows Spy evs)\n else\n (case ev of\n Says A' B X \\<Rightarrow>\n if A'=A then insert X (knows A evs) else knows A evs\n | Gets A' X \\<Rightarrow>\n if A'=A then insert X (knows A evs) else knows A evs\n | Notes A' X \\<Rightarrow>\n if A'=A then insert X (knows A evs) else knows A evs))\"", "inductive_set\n parts :: \"msg set \\<Rightarrow> msg set\"\n for H :: \"msg set\"\n where\n Inj [intro]: \"X \\<in> H ==> X \\<in> parts H\"\n | Fst: \"\\<lbrace>X,Y\\<rbrace> \\<in> parts H ==> X \\<in> parts H\"\n | Snd: \"\\<lbrace>X,Y\\<rbrace> \\<in> parts H ==> Y \\<in> parts H\"\n | Body: \"Crypt K X \\<in> parts H ==> X \\<in> parts H\"", "consts\n publicKey :: \"[bool, agent] \\<Rightarrow> key\"\n \\<comment> \\<open>the boolean is TRUE if a signing key\\<close>", "datatype\n msg = Agent agent \\<comment> \\<open>Agent names\\<close>\n | Number nat \\<comment> \\<open>Ordinary integers, timestamps, ...\\<close>\n | Nonce nat \\<comment> \\<open>Unguessable nonces\\<close>\n | Pan nat \\<comment> \\<open>Unguessable Primary Account Numbers (??)\\<close>\n | Key key \\<comment> \\<open>Crypto keys\\<close>\n | Hash msg \\<comment> \\<open>Hashing\\<close>\n | MPair msg msg \\<comment> \\<open>Compound messages\\<close>\n | Crypt key msg \\<comment> \\<open>Encryption, public- or shared-key\\<close>", "inductive_set\n set_mr :: \"event list set\"\nwhere\n\n Nil: \\<comment> \\<open>Initial trace is empty\\<close>\n \"[] \\<in> set_mr\"\n\n\n| Fake: \\<comment> \\<open>The spy MAY say anything he CAN say.\\<close>\n \"[| evsf \\<in> set_mr; X \\<in> synth (analz (knows Spy evsf)) |]\n ==> Says Spy B X # evsf \\<in> set_mr\"\n \n\n| Reception: \\<comment> \\<open>If A sends a message X to B, then B might receive it\\<close>\n \"[| evsr \\<in> set_mr; Says A B X \\<in> set evsr |]\n ==> Gets B X # evsr \\<in> set_mr\"\n\n\n| SET_MR1: \\<comment> \\<open>RegFormReq: M requires a registration form to a CA\\<close>\n \"[| evs1 \\<in> set_mr; M = Merchant k; Nonce NM1 \\<notin> used evs1 |]\n ==> Says M (CA i) \\<lbrace>Agent M, Nonce NM1\\<rbrace> # evs1 \\<in> set_mr\"\n\n\n| SET_MR2: \\<comment> \\<open>RegFormRes: CA replies with the registration form and the \n certificates for her keys\\<close>\n \"[| evs2 \\<in> set_mr; Nonce NCA \\<notin> used evs2;\n Gets (CA i) \\<lbrace>Agent M, Nonce NM1\\<rbrace> \\<in> set evs2 |]\n ==> Says (CA i) M \\<lbrace>sign (priSK (CA i)) \\<lbrace>Agent M, Nonce NM1, Nonce NCA\\<rbrace>,\n cert (CA i) (pubEK (CA i)) onlyEnc (priSK RCA),\n cert (CA i) (pubSK (CA i)) onlySig (priSK RCA) \\<rbrace>\n # evs2 \\<in> set_mr\"\n\n| SET_MR3:\n \\<comment> \\<open>CertReq: M submits the key pair to be certified. The Notes\n event allows KM1 to be lost if M is compromised. Piero remarks\n that the agent mentioned inside the signature is not verified to\n correspond to M. As in CR, each Merchant has fixed key pairs. M\n is only optionally required to send NCA back, so M doesn't do so\n in the model\\<close>\n \"[| evs3 \\<in> set_mr; M = Merchant k; Nonce NM2 \\<notin> used evs3;\n Key KM1 \\<notin> used evs3; KM1 \\<in> symKeys;\n Gets M \\<lbrace>sign (invKey SKi) \\<lbrace>Agent X, Nonce NM1, Nonce NCA\\<rbrace>,\n cert (CA i) EKi onlyEnc (priSK RCA),\n cert (CA i) SKi onlySig (priSK RCA) \\<rbrace>\n \\<in> set evs3;\n Says M (CA i) \\<lbrace>Agent M, Nonce NM1\\<rbrace> \\<in> set evs3 |]\n ==> Says M (CA i)\n \\<lbrace>Crypt KM1 (sign (priSK M) \\<lbrace>Agent M, Nonce NM2,\n Key (pubSK M), Key (pubEK M)\\<rbrace>),\n Crypt EKi (Key KM1)\\<rbrace>\n # Notes M \\<lbrace>Key KM1, Agent (CA i)\\<rbrace>\n # evs3 \\<in> set_mr\"\n\n| SET_MR4:\n \\<comment> \\<open>CertRes: CA issues the certificates for merSK and merEK,\n while checking never to have certified the m even\n separately. NOTE: In Cardholder Registration the\n corresponding rule (6) doesn't use the \"sign\" primitive. \"The\n CertRes shall be signed but not encrypted if the EE is a Merchant\n or Payment Gateway.\"-- Programmer's Guide, page 191.\\<close>\n \"[| evs4 \\<in> set_mr; M = Merchant k;\n merSK \\<notin> symKeys; merEK \\<notin> symKeys;\n Notes (CA i) (Key merSK) \\<notin> set evs4;\n Notes (CA i) (Key merEK) \\<notin> set evs4;\n Gets (CA i) \\<lbrace>Crypt KM1 (sign (invKey merSK)\n \\<lbrace>Agent M, Nonce NM2, Key merSK, Key merEK\\<rbrace>),\n Crypt (pubEK (CA i)) (Key KM1) \\<rbrace>\n \\<in> set evs4 |]\n ==> Says (CA i) M \\<lbrace>sign (priSK(CA i)) \\<lbrace>Agent M, Nonce NM2, Agent(CA i)\\<rbrace>,\n cert M merSK onlySig (priSK (CA i)),\n cert M merEK onlyEnc (priSK (CA i)),\n cert (CA i) (pubSK (CA i)) onlySig (priSK RCA)\\<rbrace>\n # Notes (CA i) (Key merSK)\n # Notes (CA i) (Key merEK)\n # evs4 \\<in> set_mr\"" ]
template
###lemma ?evs \<in> set_mr \<Longrightarrow> (Key (invKey (publicKey ?b ?A)) \<in> parts (knows Spy ?evs)) = (?A \<in> bad) ###symbols Event_SET.bad :::: agent set Message_SET.agent.Spy :::: agent Event_SET.knows :::: agent \<Rightarrow> event list \<Rightarrow> msg set Message_SET.parts :::: msg set \<Rightarrow> msg set Public_SET.publicKey :::: bool \<Rightarrow> agent \<Rightarrow> nat Message_SET.invKey :::: nat \<Rightarrow> nat Message_SET.msg.Key :::: nat \<Rightarrow> msg Merchant_Registration.set_mr :::: event list set ###defs consts bad :: "agent set" datatype agent = CA nat | Cardholder nat | Merchant nat | PG nat | Spy primrec knows :: "[agent, event list] \<Rightarrow> msg set" where knows_Nil: "knows A [] = initState A" | knows_Cons: "knows A (ev # evs) = (if A = Spy then (case ev of Says A' B X \<Rightarrow> insert X (knows Spy evs) | Gets A' X \<Rightarrow> knows Spy evs | Notes A' X \<Rightarrow> if A' \<in> bad then insert X (knows Spy evs) else knows Spy evs) else (case ev of Says A' B X \<Rightarrow> if A'=A then insert X (knows A evs) else knows A evs | Gets A' X \<Rightarrow> if A'=A then insert X (knows A evs) else knows A evs | Notes A' X \<Rightarrow> if A'=A then insert X (knows A evs) else knows A evs))" inductive_set parts :: "msg set \<Rightarrow> msg set" for H :: "msg set" where Inj [intro]: "X \<in> H ==> X \<in> parts H" | Fst: "\<lbrace>X,Y\<rbrace> \<in> parts H ==> X \<in> parts H" | Snd: "\<lbrace>X,Y\<rbrace> \<in> parts H ==> Y \<in> parts H" | Body: "Crypt K X \<in> parts H ==> X \<in> parts H" consts publicKey :: "[bool, agent] \<Rightarrow> key" \<comment> \<open>the boolean is TRUE if a signing key\<close> datatype msg = Agent agent \<comment> \<open>Agent names\<close> | Number nat \<comment> \<open>Ordinary integers, timestamps, ...\<close> | Nonce nat \<comment> \<open>Unguessable nonces\<close> | Pan nat \<comment> \<open>Unguessable Primary Account Numbers (??)\<close> | Key key \<comment> \<open>Crypto keys\<close> | Hash msg \<comment> \<open>Hashing\<close> | MPair msg msg \<comment> \<open>Compound messages\<close> | Crypt key msg \<comment> \<open>Encryption, public- or shared-key\<close> inductive_set set_mr :: "event list set" where Nil: \<comment> \<open>Initial trace is empty\<close> "[] \<in> set_mr" | Fake: \<comment> \<open>The spy MAY say anything he CAN say.\<close> "[| evsf \<in> set_mr; X \<in> synth (analz (knows Spy evsf)) |] ==> Says Spy B X # evsf \<in> set_mr" | Reception: \<comment> \<open>If A sends a message X to B, then B might receive it\<close> "[| evsr \<in> set_mr; Says A B X \<in> set evsr |] ==> Gets B X # evsr \<in> set_mr" | SET_MR1: \<comment> \<open>RegFormReq: M requires a registration form to a CA\<close> "[| evs1 \<in> set_mr; M = Merchant k; Nonce NM1 \<notin> used evs1 |] ==> Says M (CA i) \<lbrace>Agent M, Nonce NM1\<rbrace> # evs1 \<in> set_mr" | SET_MR2: \<comment> \<open>RegFormRes: CA replies with the registration form and the certificates for her keys\<close> "[| evs2 \<in> set_mr; Nonce NCA \<notin> used evs2; Gets (CA i) \<lbrace>Agent M, Nonce NM1\<rbrace> \<in> set evs2 |] ==> Says (CA i) M \<lbrace>sign (priSK (CA i)) \<lbrace>Agent M, Nonce NM1, Nonce NCA\<rbrace>, cert (CA i) (pubEK (CA i)) onlyEnc (priSK RCA), cert (CA i) (pubSK (CA i)) onlySig (priSK RCA) \<rbrace> # evs2 \<in> set_mr" | SET_MR3: \<comment> \<open>CertReq: M submits the key pair to be certified. The Notes event allows KM1 to be lost if M is compromised. Piero remarks that the agent mentioned inside the signature is not verified to correspond to M. As in CR, each Merchant has fixed key pairs. M is only optionally required to send NCA back, so M doesn't do so in the model\<close> "[| evs3 \<in> set_mr; M = Merchant k; Nonce NM2 \<notin> used evs3; Key KM1 \<notin> used evs3; KM1 \<in> symKeys; Gets M \<lbrace>sign (invKey SKi) \<lbrace>Agent X, Nonce NM1, Nonce NCA\<rbrace>, cert (CA i) EKi onlyEnc (priSK RCA), cert (CA i) SKi onlySig (priSK RCA) \<rbrace> \<in> set evs3; Says M (CA i) \<lbrace>Agent M, Nonce NM1\<rbrace> \<in> set evs3 |] ==> Says M (CA i) \<lbrace>Crypt KM1 (sign (priSK M) \<lbrace>Agent M, Nonce NM2, Key (pubSK M), Key (pubEK M)\<rbrace>), Crypt EKi (Key KM1)\<rbrace> # Notes M \<lbrace>Key KM1, Agent (CA i)\<rbrace> # evs3 \<in> set_mr" | SET_MR4: \<comment> \<open>CertRes: CA issues the certificates for merSK and merEK, while checking never to have certified the m even separately. NOTE: In Cardholder Registration the corresponding rule (6) doesn't use the "sign" primitive. "The CertRes shall be signed but not encrypted if the EE is a Merchant or Payment Gateway."-- Programmer's Guide, page 191.\<close> "[| evs4 \<in> set_mr; M = Merchant k; merSK \<notin> symKeys; merEK \<notin> symKeys; Notes (CA i) (Key merSK) \<notin> set evs4; Notes (CA i) (Key merEK) \<notin> set evs4; Gets (CA i) \<lbrace>Crypt KM1 (sign (invKey merSK) \<lbrace>Agent M, Nonce NM2, Key merSK, Key merEK\<rbrace>), Crypt (pubEK (CA i)) (Key KM1) \<rbrace> \<in> set evs4 |] ==> Says (CA i) M \<lbrace>sign (priSK(CA i)) \<lbrace>Agent M, Nonce NM2, Agent(CA i)\<rbrace>, cert M merSK onlySig (priSK (CA i)), cert M merEK onlyEnc (priSK (CA i)), cert (CA i) (pubSK (CA i)) onlySig (priSK RCA)\<rbrace> # Notes (CA i) (Key merSK) # Notes (CA i) (Key merEK) # evs4 \<in> set_mr"
###output x_1 \<in> ?H1 \<Longrightarrow> (?H2 (?H3 (?H4 x_2 x_3)) \<in> ?H5 (?H6 ?H7 x_1)) = (x_3 \<in> ?H8)###end
Analysis/Derivative
Derivative.has_derivative_within_alt
lemma has_derivative_within_alt: "(f has_derivative f') (at x within s) \<longleftrightarrow> bounded_linear f' \<and> (\<forall>e>0. \<exists>d>0. \<forall>y\<in>s. norm(y - x) < d \<longrightarrow> norm (f y - f x - f' (y - x)) \<le> e * norm (y - x))"
(?f has_derivative ?f') (at ?x within ?s) = (bounded_linear ?f' \<and> (\<forall>e>0. \<exists>d>0. \<forall>y\<in> ?s. norm (y - ?x) < d \<longrightarrow> norm (?f y - ?f ?x - ?f' (y - ?x)) \<le> e * norm (y - ?x)))
?H1 x_1 x_2 (?H2 x_3 x_4) = (?H3 x_2 \<and> (\<forall>y_0> ?H4. \<exists>y_1> ?H4. \<forall>y_2\<in>x_4. ?H5 (?H6 y_2 x_3) < y_1 \<longrightarrow> ?H5 (?H6 (?H6 (x_1 y_2) (x_1 x_3)) (x_2 (?H6 y_2 x_3))) \<le> ?H7 y_0 (?H5 (?H6 y_2 x_3))))
[ "Groups.times_class.times", "Groups.minus_class.minus", "Real_Vector_Spaces.norm_class.norm", "Groups.zero_class.zero", "Real_Vector_Spaces.bounded_linear", "Topological_Spaces.topological_space_class.at_within", "Deriv.has_derivative" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a \\<Rightarrow> real", "'a", "('a \\<Rightarrow> 'b) \\<Rightarrow> bool", "'a \\<Rightarrow> 'a set \\<Rightarrow> 'a filter", "('a \\<Rightarrow> 'b) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> 'a filter \\<Rightarrow> bool" ]
[ "class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)", "class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)", "class norm =\n fixes norm :: \"'a \\<Rightarrow> real\"", "class zero =\n fixes zero :: 'a (\"0\")", "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) = (bounded_linear ?f' \<and> (\<forall>e>0. \<exists>d>0. \<forall>y\<in> ?s. norm (y - ?x) < d \<longrightarrow> norm (?f y - ?f ?x - ?f' (y - ?x)) \<le> e * norm (y - ?x))) ###symbols Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Real_Vector_Spaces.norm_class.norm :::: 'a \<Rightarrow> real Groups.zero_class.zero :::: 'a Real_Vector_Spaces.bounded_linear :::: ('a \<Rightarrow> 'b) \<Rightarrow> bool Topological_Spaces.topological_space_class.at_within :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a filter Deriv.has_derivative :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'a filter \<Rightarrow> bool ###defs class times = fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70) class minus = fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65) class norm = fixes norm :: "'a \<Rightarrow> real" 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 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 ?H1 x_1 x_2 (?H2 x_3 x_4) = (?H3 x_2 \<and> (\<forall>y_0> ?H4. \<exists>y_1> ?H4. \<forall>y_2\<in>x_4. ?H5 (?H6 y_2 x_3) < y_1 \<longrightarrow> ?H5 (?H6 (?H6 (x_1 y_2) (x_1 x_3)) (x_2 (?H6 y_2 x_3))) \<le> ?H7 y_0 (?H5 (?H6 y_2 x_3))))###end
Cardinals/Order_Relation_More
Order_Relation_More.aboveS_notIn
lemma aboveS_notIn: "a \<notin> aboveS r a"
?a \<notin> aboveS ?r ?a
?H1 x_1 (?H2 x_2 x_1)
[ "Order_Relation.aboveS", "Set.not_member" ]
[ "('a \\<times> 'a) set \\<Rightarrow> 'a \\<Rightarrow> 'a set", "'a \\<Rightarrow> 'a set \\<Rightarrow> bool" ]
[ "definition aboveS :: \"'a rel \\<Rightarrow> 'a \\<Rightarrow> 'a set\"\n where \"aboveS r a \\<equiv> {b. b \\<noteq> a \\<and> (a, b) \\<in> r}\"", "abbreviation not_member\n where \"not_member x A \\<equiv> \\<not> (x \\<in> A)\" \\<comment> \\<open>non-membership\\<close>" ]
template
###lemma ?a \<notin> aboveS ?r ?a ###symbols Order_Relation.aboveS :::: ('a \<times> 'a) set \<Rightarrow> 'a \<Rightarrow> 'a set Set.not_member :::: 'a \<Rightarrow> 'a set \<Rightarrow> bool ###defs definition aboveS :: "'a rel \<Rightarrow> 'a \<Rightarrow> 'a set" where "aboveS r a \<equiv> {b. b \<noteq> a \<and> (a, b) \<in> r}" abbreviation not_member where "not_member x A \<equiv> \<not> (x \<in> A)" \<comment> \<open>non-membership\<close>
###output ?H1 x_1 (?H2 x_2 x_1)###end
Auth/Event
Event.analz_impI
null
(?Y \<notin> analz (knows Spy ?evs) \<Longrightarrow> ?Q) \<Longrightarrow> ?Y \<notin> analz (knows Spy ?evs) \<longrightarrow> ?Q
(?H1 x_1 (?H2 (?H3 ?H4 x_2)) \<Longrightarrow> x_3) \<Longrightarrow> ?H1 x_1 (?H2 (?H3 ?H4 x_2)) \<longrightarrow> x_3
[ "Message.agent.Spy", "Event.knows", "Message.analz", "Set.not_member" ]
[ "agent", "agent \\<Rightarrow> event list \\<Rightarrow> msg set", "msg set \\<Rightarrow> msg set", "'a \\<Rightarrow> 'a set \\<Rightarrow> bool" ]
[ "primrec knows :: \"agent \\<Rightarrow> event list \\<Rightarrow> msg set\"\nwhere\n knows_Nil: \"knows A [] = initState A\"\n| knows_Cons:\n \"knows A (ev # evs) =\n (if A = Spy then \n (case ev of\n Says A' B X \\<Rightarrow> insert X (knows Spy evs)\n | Gets A' X \\<Rightarrow> knows Spy evs\n | Notes A' X \\<Rightarrow> \n if A' \\<in> bad then insert X (knows Spy evs) else knows Spy evs)\n else\n (case ev of\n Says A' B X \\<Rightarrow> \n if A'=A then insert X (knows A evs) else knows A evs\n | Gets A' X \\<Rightarrow> \n if A'=A then insert X (knows A evs) else knows A evs\n | Notes A' X \\<Rightarrow> \n if A'=A then insert X (knows A evs) else knows A evs))\"", "inductive_set\n analz :: \"msg set \\<Rightarrow> msg set\"\n for H :: \"msg set\"\n where\n Inj [intro,simp]: \"X \\<in> H \\<Longrightarrow> X \\<in> analz H\"\n | Fst: \"\\<lbrace>X,Y\\<rbrace> \\<in> analz H \\<Longrightarrow> X \\<in> analz H\"\n | Snd: \"\\<lbrace>X,Y\\<rbrace> \\<in> analz H \\<Longrightarrow> Y \\<in> analz H\"\n | Decrypt [dest]: \n \"\\<lbrakk>Crypt K X \\<in> analz H; Key(invKey K) \\<in> analz H\\<rbrakk> \\<Longrightarrow> X \\<in> analz H\"", "abbreviation not_member\n where \"not_member x A \\<equiv> \\<not> (x \\<in> A)\" \\<comment> \\<open>non-membership\\<close>" ]
template
###lemma (?Y \<notin> analz (knows Spy ?evs) \<Longrightarrow> ?Q) \<Longrightarrow> ?Y \<notin> analz (knows Spy ?evs) \<longrightarrow> ?Q ###symbols Message.agent.Spy :::: agent Event.knows :::: agent \<Rightarrow> event list \<Rightarrow> msg set Message.analz :::: msg set \<Rightarrow> msg set Set.not_member :::: 'a \<Rightarrow> 'a set \<Rightarrow> bool ###defs primrec knows :: "agent \<Rightarrow> event list \<Rightarrow> msg set" where knows_Nil: "knows A [] = initState A" | knows_Cons: "knows A (ev # evs) = (if A = Spy then (case ev of Says A' B X \<Rightarrow> insert X (knows Spy evs) | Gets A' X \<Rightarrow> knows Spy evs | Notes A' X \<Rightarrow> if A' \<in> bad then insert X (knows Spy evs) else knows Spy evs) else (case ev of Says A' B X \<Rightarrow> if A'=A then insert X (knows A evs) else knows A evs | Gets A' X \<Rightarrow> if A'=A then insert X (knows A evs) else knows A evs | Notes A' X \<Rightarrow> if A'=A then insert X (knows A evs) else knows A evs))" inductive_set analz :: "msg set \<Rightarrow> msg set" for H :: "msg set" where Inj [intro,simp]: "X \<in> H \<Longrightarrow> X \<in> analz H" | Fst: "\<lbrace>X,Y\<rbrace> \<in> analz H \<Longrightarrow> X \<in> analz H" | Snd: "\<lbrace>X,Y\<rbrace> \<in> analz H \<Longrightarrow> Y \<in> analz H" | Decrypt [dest]: "\<lbrakk>Crypt K X \<in> analz H; Key(invKey K) \<in> analz H\<rbrakk> \<Longrightarrow> X \<in> analz H" abbreviation not_member where "not_member x A \<equiv> \<not> (x \<in> A)" \<comment> \<open>non-membership\<close>
###output (?H1 x_1 (?H2 (?H3 ?H4 x_2)) \<Longrightarrow> x_3) \<Longrightarrow> ?H1 x_1 (?H2 (?H3 ?H4 x_2)) \<longrightarrow> x_3###end
Nonstandard_Analysis/HyperNat
HyperNat.hypnat_of_nat_less_whn
lemma hypnat_of_nat_less_whn [simp]: "hypnat_of_nat n < whn"
hypnat_of_nat ?n < whn
?H1 x_1 < ?H2
[ "HyperNat.whn", "HyperNat.hypnat_of_nat" ]
[ "nat star", "nat \\<Rightarrow> nat star" ]
[ "definition whn :: hypnat\n where hypnat_omega_def: \"whn = star_n (\\<lambda>n::nat. n)\"", "abbreviation hypnat_of_nat :: \"nat \\<Rightarrow> nat star\"\n where \"hypnat_of_nat \\<equiv> star_of\"" ]
template
###lemma hypnat_of_nat ?n < whn ###symbols HyperNat.whn :::: nat star HyperNat.hypnat_of_nat :::: nat \<Rightarrow> nat star ###defs definition whn :: hypnat where hypnat_omega_def: "whn = star_n (\<lambda>n::nat. n)" abbreviation hypnat_of_nat :: "nat \<Rightarrow> nat star" where "hypnat_of_nat \<equiv> star_of"
###output ?H1 x_1 < ?H2###end
Predicate_Compile_Examples/Predicate_Compile_Tests
Predicate_Compile_Tests.one_or_two''_iE
null
pred.eval (one_or_two''_i ?x) ?y \<Longrightarrow> (one_or_two'' ?x \<Longrightarrow> ?P) \<Longrightarrow> ?P
\<lbrakk> ?H1 (?H2 x_1) x_2; ?H3 x_1 \<Longrightarrow> x_3\<rbrakk> \<Longrightarrow> x_3
[ "Predicate_Compile_Tests.one_or_two''", "Predicate_Compile_Tests.one_or_two''_i", "Predicate.pred.eval" ]
[ "nat \\<Rightarrow> bool", "nat \\<Rightarrow> unit Predicate.pred", "'a Predicate.pred \\<Rightarrow> 'a \\<Rightarrow> bool" ]
[ "definition one_or_two'':\n \"one_or_two'' == (%x. x = 1 \\<or> x = (2::nat))\"", "datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: \"'a \\<Rightarrow> bool\")" ]
template
###lemma pred.eval (one_or_two''_i ?x) ?y \<Longrightarrow> (one_or_two'' ?x \<Longrightarrow> ?P) \<Longrightarrow> ?P ###symbols Predicate_Compile_Tests.one_or_two'' :::: nat \<Rightarrow> bool Predicate_Compile_Tests.one_or_two''_i :::: nat \<Rightarrow> unit Predicate.pred Predicate.pred.eval :::: 'a Predicate.pred \<Rightarrow> 'a \<Rightarrow> bool ###defs definition one_or_two'': "one_or_two'' == (%x. x = 1 \<or> x = (2::nat))" datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: "'a \<Rightarrow> bool")
###output \<lbrakk> ?H1 (?H2 x_1) x_2; ?H3 x_1 \<Longrightarrow> x_3\<rbrakk> \<Longrightarrow> x_3###end
Analysis/Affine
Affine.aff_dim_affine_independent
lemma aff_dim_affine_independent: fixes B :: "'n::euclidean_space set" assumes "\<not> affine_dependent B" shows "of_nat (card B) = aff_dim B + 1"
\<not> affine_dependent ?B \<Longrightarrow> int (card ?B) = aff_dim ?B + 1
\<not> ?H1 x_1 \<Longrightarrow> ?H2 (?H3 x_1) = ?H4 (?H5 x_1) ?H6
[ "Groups.one_class.one", "Affine.aff_dim", "Groups.plus_class.plus", "Finite_Set.card", "Int.int", "Affine.affine_dependent" ]
[ "'a", "'a set \\<Rightarrow> int", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a set \\<Rightarrow> nat", "nat \\<Rightarrow> int", "'a set \\<Rightarrow> bool" ]
[ "class one =\n fixes one :: 'a (\"1\")", "class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)", "abbreviation int :: \"nat \\<Rightarrow> int\"\n where \"int \\<equiv> of_nat\"" ]
template
###lemma \<not> affine_dependent ?B \<Longrightarrow> int (card ?B) = aff_dim ?B + 1 ###symbols Groups.one_class.one :::: 'a Affine.aff_dim :::: 'a set \<Rightarrow> int Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Finite_Set.card :::: 'a set \<Rightarrow> nat Int.int :::: nat \<Rightarrow> int Affine.affine_dependent :::: 'a set \<Rightarrow> bool ###defs class one = fixes one :: 'a ("1") class plus = fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65) abbreviation int :: "nat \<Rightarrow> int" where "int \<equiv> of_nat"
###output \<not> ?H1 x_1 \<Longrightarrow> ?H2 (?H3 x_1) = ?H4 (?H5 x_1) ?H6###end
Predicate
Predicate.eval_map
lemma eval_map [simp]: "eval (map f P) = (\<Squnion>x\<in>{x. eval P x}. (\<lambda>y. f x = y))"
pred.eval (Predicate.map ?f ?P) = (SUP x\<in>{x. pred.eval ?P x}. (=) (?f x))
?H1 (?H2 x_1 x_2) = ?H3 (?H4 (\<lambda>y_0. (=) (x_1 y_0)) (?H5 (?H1 x_2)))
[ "Set.Collect", "Set.image", "Complete_Lattices.Sup_class.Sup", "Predicate.map", "Predicate.pred.eval" ]
[ "('a \\<Rightarrow> bool) \\<Rightarrow> 'a set", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set", "'a set \\<Rightarrow> 'a", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a Predicate.pred \\<Rightarrow> 'b Predicate.pred", "'a Predicate.pred \\<Rightarrow> 'a \\<Rightarrow> bool" ]
[ "definition image :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set\" (infixr \"`\" 90)\n where \"f ` A = {y. \\<exists>x\\<in>A. y = f x}\"", "class Sup =\n fixes Sup :: \"'a set \\<Rightarrow> 'a\" (\"\\<Squnion> _\" [900] 900)", "definition map :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a pred \\<Rightarrow> 'b pred\" where\n \"map f P = P \\<bind> (single \\<circ> f)\"", "datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: \"'a \\<Rightarrow> bool\")" ]
template
###lemma pred.eval (Predicate.map ?f ?P) = (SUP x\<in>{x. pred.eval ?P x}. (=) (?f x)) ###symbols Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set Complete_Lattices.Sup_class.Sup :::: 'a set \<Rightarrow> 'a Predicate.map :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a Predicate.pred \<Rightarrow> 'b Predicate.pred Predicate.pred.eval :::: 'a Predicate.pred \<Rightarrow> 'a \<Rightarrow> bool ###defs definition image :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set" (infixr "`" 90) where "f ` A = {y. \<exists>x\<in>A. y = f x}" class Sup = fixes Sup :: "'a set \<Rightarrow> 'a" ("\<Squnion> _" [900] 900) definition map :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a pred \<Rightarrow> 'b pred" where "map f P = P \<bind> (single \<circ> f)" datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: "'a \<Rightarrow> bool")
###output ?H1 (?H2 x_1 x_2) = ?H3 (?H4 (\<lambda>y_0. (=) (x_1 y_0)) (?H5 (?H1 x_2)))###end
Algebra/Group
Groups.field_simps(50)
null
((1:: ?'a) / ?a) ^ ?n = (1:: ?'a) / ?a ^ ?n
?H1 (?H2 ?H3 x_1) x_2 = ?H2 ?H3 (?H1 x_1 x_2)
[ "Groups.one_class.one", "Fields.inverse_class.inverse_divide", "Power.power_class.power" ]
[ "'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a \\<Rightarrow> nat \\<Rightarrow> 'a" ]
[ "class one =\n fixes one :: 'a (\"1\")", "class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin", "primrec power :: \"'a \\<Rightarrow> nat \\<Rightarrow> 'a\" (infixr \"^\" 80)\n where\n power_0: \"a ^ 0 = 1\"\n | power_Suc: \"a ^ Suc n = a * a ^ n\"" ]
template
###lemma ((1:: ?'a) / ?a) ^ ?n = (1:: ?'a) / ?a ^ ?n ###symbols Groups.one_class.one :::: 'a Fields.inverse_class.inverse_divide :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a ###defs class one = fixes one :: 'a ("1") class inverse = divide + fixes inverse :: "'a \<Rightarrow> 'a" begin primrec power :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^" 80) where power_0: "a ^ 0 = 1" | power_Suc: "a ^ Suc n = a * a ^ n"
###output ?H1 (?H2 ?H3 x_1) x_2 = ?H2 ?H3 (?H1 x_1 x_2)###end
Relation
Relation.Range_Int_subset
lemma Range_Int_subset: "Range (A \<inter> B) \<subseteq> Range A \<inter> Range B"
Range (?A \<inter> ?B) \<subseteq> Range ?A \<inter> Range ?B
?H1 (?H2 (?H3 x_1 x_2)) (?H3 (?H2 x_1) (?H2 x_2))
[ "Set.inter", "Relation.Range", "Set.subset_eq" ]
[ "'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set", "('a \\<times> 'b) set \\<Rightarrow> 'b set", "'a set \\<Rightarrow> 'a set \\<Rightarrow> bool" ]
[ "abbreviation inter :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> 'a set\" (infixl \"\\<inter>\" 70)\n where \"(\\<inter>) \\<equiv> inf\"", "inductive_set Range :: \"('a \\<times> 'b) set \\<Rightarrow> 'b set\" for r :: \"('a \\<times> 'b) set\"\n where RangeI [intro]: \"(a, b) \\<in> r \\<Longrightarrow> b \\<in> Range r\"", "abbreviation subset_eq :: \"'a set \\<Rightarrow> 'a set \\<Rightarrow> bool\"\n where \"subset_eq \\<equiv> less_eq\"" ]
template
###lemma Range (?A \<inter> ?B) \<subseteq> Range ?A \<inter> Range ?B ###symbols Set.inter :::: 'a set \<Rightarrow> 'a set \<Rightarrow> 'a set Relation.Range :::: ('a \<times> 'b) set \<Rightarrow> 'b set Set.subset_eq :::: 'a set \<Rightarrow> 'a set \<Rightarrow> bool ###defs abbreviation inter :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "\<inter>" 70) where "(\<inter>) \<equiv> inf" inductive_set Range :: "('a \<times> 'b) set \<Rightarrow> 'b set" for r :: "('a \<times> 'b) set" where RangeI [intro]: "(a, b) \<in> r \<Longrightarrow> b \<in> Range r" abbreviation subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool" where "subset_eq \<equiv> less_eq"
###output ?H1 (?H2 (?H3 x_1 x_2)) (?H3 (?H2 x_1) (?H2 x_2))###end
Library/Stream
Stream.smap_smap2
lemma smap_smap2[simp]: "smap f (smap2 g s1 s2) = smap2 (\<lambda>x y. f (g x y)) s1 s2"
smap ?f (smap2 ?g ?s1.0 ?s2.0) = smap2 (\<lambda>x y. ?f (?g x y)) ?s1.0 ?s2.0
?H1 x_1 (?H2 x_2 x_3 x_4) = ?H2 (\<lambda>y_0 y_1. x_1 (x_2 y_0 y_1)) x_3 x_4
[ "Stream.smap2", "Stream.stream.smap" ]
[ "('a \\<Rightarrow> 'b \\<Rightarrow> 'c) \\<Rightarrow> 'a stream \\<Rightarrow> 'b stream \\<Rightarrow> 'c stream", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a stream \\<Rightarrow> 'b stream" ]
[ "primcorec smap2 where\n \"shd (smap2 f s1 s2) = f (shd s1) (shd s2)\"\n| \"stl (smap2 f s1 s2) = smap2 f (stl s1) (stl s2)\"", "codatatype (sset: 'a) stream =\n SCons (shd: 'a) (stl: \"'a stream\") (infixr \\<open>##\\<close> 65)\nfor\n map: smap\n rel: stream_all2" ]
template
###lemma smap ?f (smap2 ?g ?s1.0 ?s2.0) = smap2 (\<lambda>x y. ?f (?g x y)) ?s1.0 ?s2.0 ###symbols Stream.smap2 :::: ('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'a stream \<Rightarrow> 'b stream \<Rightarrow> 'c stream Stream.stream.smap :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a stream \<Rightarrow> 'b stream ###defs primcorec smap2 where "shd (smap2 f s1 s2) = f (shd s1) (shd s2)" | "stl (smap2 f s1 s2) = smap2 f (stl s1) (stl s2)" codatatype (sset: 'a) stream = SCons (shd: 'a) (stl: "'a stream") (infixr \<open>##\<close> 65) for map: smap rel: stream_all2
###output ?H1 x_1 (?H2 x_2 x_3 x_4) = ?H2 (\<lambda>y_0 y_1. x_1 (x_2 y_0 y_1)) x_3 x_4###end
Complete_Lattices
Complete_Lattices.UN_insert_distrib
lemma UN_insert_distrib: "u \<in> A \<Longrightarrow> (\<Union>x\<in>A. insert a (B x)) = insert a (\<Union>x\<in>A. B x)"
?u \<in> ?A \<Longrightarrow> (\<Union>x\<in> ?A. insert ?a (?B x)) = insert ?a (\<Union> (?B ` ?A))
x_1 \<in> x_2 \<Longrightarrow> ?H1 (?H2 (\<lambda>y_0. ?H3 x_3 (x_4 y_0)) x_2) = ?H3 x_3 (?H1 (?H2 x_4 x_2))
[ "Set.insert", "Set.image", "Complete_Lattices.Union" ]
[ "'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set", "'a set set \\<Rightarrow> 'a set" ]
[ "definition insert :: \"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set\"\n where insert_compr: \"insert a B = {x. x = a \\<or> x \\<in> B}\"", "definition image :: \"('a \\<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 ?u \<in> ?A \<Longrightarrow> (\<Union>x\<in> ?A. insert ?a (?B x)) = insert ?a (\<Union> (?B ` ?A)) ###symbols Set.insert :::: 'a \<Rightarrow> 'a set \<Rightarrow> 'a set Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set Complete_Lattices.Union :::: 'a set set \<Rightarrow> 'a set ###defs definition insert :: "'a \<Rightarrow> 'a set \<Rightarrow> 'a set" where insert_compr: "insert a B = {x. x = a \<or> x \<in> B}" definition image :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set" (infixr "`" 90) where "f ` A = {y. \<exists>x\<in>A. y = f x}" abbreviation Union :: "'a set set \<Rightarrow> 'a set" ("\<Union>") where "\<Union>S \<equiv> \<Squnion>S"
###output x_1 \<in> x_2 \<Longrightarrow> ?H1 (?H2 (\<lambda>y_0. ?H3 x_3 (x_4 y_0)) x_2) = ?H3 x_3 (?H1 (?H2 x_4 x_2))###end
Library/Omega_Words_Fun
Omega_Words_Fun.build_split
lemma build_split[intro]: "w = w 0 ## suffix 1 w"
?w = ?w 0 ## suffix 1 ?w
x_1 = ?H1 (x_1 ?H2) (?H3 ?H4 x_1)
[ "Groups.one_class.one", "Omega_Words_Fun.suffix", "Groups.zero_class.zero", "Omega_Words_Fun.build" ]
[ "'a", "nat \\<Rightarrow> (nat \\<Rightarrow> 'a) \\<Rightarrow> nat \\<Rightarrow> 'a", "'a", "'a \\<Rightarrow> (nat \\<Rightarrow> 'a) \\<Rightarrow> nat \\<Rightarrow> 'a" ]
[ "class one =\n fixes one :: 'a (\"1\")", "definition suffix :: \"[nat, 'a word] \\<Rightarrow> 'a word\"\n where \"suffix k x \\<equiv> \\<lambda>n. x (k+n)\"", "class zero =\n fixes zero :: 'a (\"0\")", "primrec build :: \"'a \\<Rightarrow> 'a word \\<Rightarrow> 'a word\" (infixr \\<open>##\\<close> 65)\n where \"(a ## w) 0 = a\" | \"(a ## w) (Suc i) = w i\"" ]
template
###lemma ?w = ?w 0 ## suffix 1 ?w ###symbols Groups.one_class.one :::: 'a Omega_Words_Fun.suffix :::: nat \<Rightarrow> (nat \<Rightarrow> 'a) \<Rightarrow> nat \<Rightarrow> 'a Groups.zero_class.zero :::: 'a Omega_Words_Fun.build :::: 'a \<Rightarrow> (nat \<Rightarrow> 'a) \<Rightarrow> nat \<Rightarrow> 'a ###defs class one = fixes one :: 'a ("1") definition suffix :: "[nat, 'a word] \<Rightarrow> 'a word" where "suffix k x \<equiv> \<lambda>n. x (k+n)" class zero = fixes zero :: 'a ("0") primrec build :: "'a \<Rightarrow> 'a word \<Rightarrow> 'a word" (infixr \<open>##\<close> 65) where "(a ## w) 0 = a" | "(a ## w) (Suc i) = w i"
###output x_1 = ?H1 (x_1 ?H2) (?H3 ?H4 x_1)###end
ex/Sqrt_Script
Sqrt_Script.prime_not_square
lemma prime_not_square: "prime (p::nat) \<Longrightarrow> (\<And>k. 0 < k \<Longrightarrow> m * m \<noteq> p * (k * k))"
prime ?p \<Longrightarrow> 0 < ?k \<Longrightarrow> ?m * ?m \<noteq> ?p * (?k * ?k)
\<lbrakk> ?H1 x_1; ?H2 < x_2\<rbrakk> \<Longrightarrow> ?H3 x_3 x_3 \<noteq> ?H3 x_1 (?H3 x_2 x_2)
[ "Groups.times_class.times", "Groups.zero_class.zero", "Factorial_Ring.normalization_semidom_class.prime" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a", "'a \\<Rightarrow> bool" ]
[ "class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"*\" 70)", "class zero =\n fixes zero :: 'a (\"0\")" ]
template
###lemma prime ?p \<Longrightarrow> 0 < ?k \<Longrightarrow> ?m * ?m \<noteq> ?p * (?k * ?k) ###symbols Groups.times_class.times :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Groups.zero_class.zero :::: 'a Factorial_Ring.normalization_semidom_class.prime :::: 'a \<Rightarrow> bool ###defs class times = fixes times :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "*" 70) class zero = fixes zero :: 'a ("0")
###output \<lbrakk> ?H1 x_1; ?H2 < x_2\<rbrakk> \<Longrightarrow> ?H3 x_3 x_3 \<noteq> ?H3 x_1 (?H3 x_2 x_2)###end
Library/Extended_Real
Extended_Real.ereal_tendsto_simps(2)
null
((?f \<circ> real_of_ereal) \<longlongrightarrow> ?y) (at_right (ereal ?x)) = (?f \<longlongrightarrow> ?y) (at_right ?x)
?H1 (?H2 x_1 ?H3) x_2 (?H4 (?H5 x_3)) = ?H1 x_1 x_2 (?H4 x_3)
[ "Extended_Real.ereal.ereal", "Topological_Spaces.order_topology_class.at_right", "Extended_Real.real_of_ereal", "Fun.comp", "Topological_Spaces.topological_space_class.tendsto" ]
[ "real \\<Rightarrow> ereal", "'a \\<Rightarrow> 'a filter", "ereal \\<Rightarrow> real", "('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'a) \\<Rightarrow> 'c \\<Rightarrow> 'b", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'b \\<Rightarrow> 'a filter \\<Rightarrow> bool" ]
[ "datatype ereal = ereal real | PInfty | MInfty", "class order_topology = order + \"open\" +\n assumes open_generated_order: \"open = generate_topology (range (\\<lambda>a. {..< a}) \\<union> range (\\<lambda>a. {a <..}))\"\nbegin", "function real_of_ereal :: \"ereal \\<Rightarrow> real\" where\n \"real_of_ereal (ereal r) = r\"\n| \"real_of_ereal \\<infinity> = 0\"\n| \"real_of_ereal (-\\<infinity>) = 0\"", "definition comp :: \"('b \\<Rightarrow> 'c) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> 'a \\<Rightarrow> 'c\" (infixl \"\\<circ>\" 55)\n where \"f \\<circ> g = (\\<lambda>x. f (g x))\"", "class 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 ((?f \<circ> real_of_ereal) \<longlongrightarrow> ?y) (at_right (ereal ?x)) = (?f \<longlongrightarrow> ?y) (at_right ?x) ###symbols Extended_Real.ereal.ereal :::: real \<Rightarrow> ereal Topological_Spaces.order_topology_class.at_right :::: 'a \<Rightarrow> 'a filter Extended_Real.real_of_ereal :::: ereal \<Rightarrow> real Fun.comp :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'a) \<Rightarrow> 'c \<Rightarrow> 'b Topological_Spaces.topological_space_class.tendsto :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b \<Rightarrow> 'a filter \<Rightarrow> bool ###defs datatype ereal = ereal real | PInfty | MInfty class order_topology = order + "open" + assumes open_generated_order: "open = generate_topology (range (\<lambda>a. {..< a}) \<union> range (\<lambda>a. {a <..}))" begin function real_of_ereal :: "ereal \<Rightarrow> real" where "real_of_ereal (ereal r) = r" | "real_of_ereal \<infinity> = 0" | "real_of_ereal (-\<infinity>) = 0" definition comp :: "('b \<Rightarrow> 'c) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'c" (infixl "\<circ>" 55) where "f \<circ> g = (\<lambda>x. f (g x))" class topological_space = "open" + assumes open_UNIV [simp, intro]: "open UNIV" assumes open_Int [intro]: "open S \<Longrightarrow> open T \<Longrightarrow> open (S \<inter> T)" assumes open_Union [intro]: "\<forall>S\<in>K. open S \<Longrightarrow> open (\<Union>K)" begin
###output ?H1 (?H2 x_1 ?H3) x_2 (?H4 (?H5 x_3)) = ?H1 x_1 x_2 (?H4 x_3)###end
Analysis/Homotopy
Homotopy.nullhomotopic_into_contractible_space
lemma nullhomotopic_into_contractible_space: assumes f: "continuous_map X Y f" and Y: "contractible_space Y" obtains c where "homotopic_with (\<lambda>h. True) X Y f (\<lambda>x. c)"
continuous_map ?X ?Y ?f \<Longrightarrow> contractible_space ?Y \<Longrightarrow> (\<And>c. homotopic_with (\<lambda>h. True) ?X ?Y ?f (\<lambda>x. c) \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
\<lbrakk> ?H1 x_1 x_2 x_3; ?H2 x_2; \<And>y_0. ?H3 (\<lambda>y_1. True) x_1 x_2 x_3 (\<lambda>y_2. y_0) \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_4
[ "Homotopy.homotopic_with", "Homotopy.contractible_space", "Abstract_Topology.continuous_map" ]
[ "(('a \\<Rightarrow> 'b) \\<Rightarrow> bool) \\<Rightarrow> 'a topology \\<Rightarrow> 'b topology \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool", "'a topology \\<Rightarrow> bool", "'a topology \\<Rightarrow> 'b topology \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool" ]
[ "definition contractible_space where\n \"contractible_space X \\<equiv> \\<exists>a. homotopic_with (\\<lambda>x. True) X X id (\\<lambda>x. a)\"", "definition continuous_map where\n \"continuous_map X Y f \\<equiv>\n f \\<in> topspace X \\<rightarrow> topspace Y \\<and>\n (\\<forall>U. openin Y U \\<longrightarrow> openin X {x \\<in> topspace X. f x \\<in> U})\"" ]
template
###lemma continuous_map ?X ?Y ?f \<Longrightarrow> contractible_space ?Y \<Longrightarrow> (\<And>c. homotopic_with (\<lambda>h. True) ?X ?Y ?f (\<lambda>x. c) \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis ###symbols Homotopy.homotopic_with :::: (('a \<Rightarrow> 'b) \<Rightarrow> bool) \<Rightarrow> 'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool Homotopy.contractible_space :::: 'a topology \<Rightarrow> bool Abstract_Topology.continuous_map :::: 'a topology \<Rightarrow> 'b topology \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool ###defs definition contractible_space where "contractible_space X \<equiv> \<exists>a. homotopic_with (\<lambda>x. True) X X id (\<lambda>x. a)" definition continuous_map where "continuous_map X Y f \<equiv> f \<in> topspace X \<rightarrow> topspace Y \<and> (\<forall>U. openin Y U \<longrightarrow> openin X {x \<in> topspace X. f x \<in> U})"
###output \<lbrakk> ?H1 x_1 x_2 x_3; ?H2 x_2; \<And>y_0. ?H3 (\<lambda>y_1. True) x_1 x_2 x_3 (\<lambda>y_2. y_0) \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_4###end
Analysis/Further_Topology
Further_Topology.Jordan_Brouwer_frontier
null
?S homeomorphic sphere ?a ?r \<Longrightarrow> ?T \<in> components (- ?S) \<Longrightarrow> 2 \<le> DIM(?'a) \<Longrightarrow> frontier ?T = ?S
\<lbrakk> ?H1 x_1 (?H2 x_2 x_3); x_4 \<in> ?H3 (?H4 x_1); ?H5 (?H6 ?H7) \<le> ?H8 ?H9\<rbrakk> \<Longrightarrow> ?H10 x_4 = x_1
[ "Elementary_Topology.frontier", "Euclidean_Space.euclidean_space_class.Basis", "Finite_Set.card", "Num.num.One", "Num.num.Bit0", "Num.numeral_class.numeral", "Groups.uminus_class.uminus", "Connected.components", "Elementary_Metric_Spaces.sphere", "Elementary_Topology.homeomorphic" ]
[ "'a set \\<Rightarrow> 'a set", "'a set", "'a set \\<Rightarrow> nat", "num", "num \\<Rightarrow> num", "num \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a", "'a set \\<Rightarrow> 'a set set", "'a \\<Rightarrow> real \\<Rightarrow> 'a set", "'a set \\<Rightarrow> 'b set \\<Rightarrow> bool" ]
[ "class euclidean_space = real_inner +\n fixes Basis :: \"'a set\"\n assumes nonempty_Basis [simp]: \"Basis \\<noteq> {}\"\n assumes finite_Basis [simp]: \"finite Basis\"\n assumes inner_Basis:\n \"\\<lbrakk>u \\<in> Basis; v \\<in> Basis\\<rbrakk> \\<Longrightarrow> inner u v = (if u = v then 1 else 0)\"\n assumes euclidean_all_zero_iff:\n \"(\\<forall>u\\<in>Basis. inner x u = 0) \\<longleftrightarrow> (x = 0)\"", "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)" ]
template
###lemma ?S homeomorphic sphere ?a ?r \<Longrightarrow> ?T \<in> components (- ?S) \<Longrightarrow> 2 \<le> DIM(?'a) \<Longrightarrow> frontier ?T = ?S ###symbols Elementary_Topology.frontier :::: 'a set \<Rightarrow> 'a set Euclidean_Space.euclidean_space_class.Basis :::: 'a set Finite_Set.card :::: 'a set \<Rightarrow> nat Num.num.One :::: num Num.num.Bit0 :::: num \<Rightarrow> num Num.numeral_class.numeral :::: num \<Rightarrow> 'a Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a Connected.components :::: 'a set \<Rightarrow> 'a set set Elementary_Metric_Spaces.sphere :::: 'a \<Rightarrow> real \<Rightarrow> 'a set Elementary_Topology.homeomorphic :::: 'a set \<Rightarrow> 'b set \<Rightarrow> bool ###defs class euclidean_space = real_inner + fixes Basis :: "'a set" assumes nonempty_Basis [simp]: "Basis \<noteq> {}" assumes finite_Basis [simp]: "finite Basis" assumes inner_Basis: "\<lbrakk>u \<in> Basis; v \<in> Basis\<rbrakk> \<Longrightarrow> inner u v = (if u = v then 1 else 0)" assumes euclidean_all_zero_iff: "(\<forall>u\<in>Basis. inner x u = 0) \<longleftrightarrow> (x = 0)" 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)
###output \<lbrakk> ?H1 x_1 (?H2 x_2 x_3); x_4 \<in> ?H3 (?H4 x_1); ?H5 (?H6 ?H7) \<le> ?H8 ?H9\<rbrakk> \<Longrightarrow> ?H10 x_4 = x_1###end
Predicate_Compile_Examples/Predicate_Compile_Tests
Predicate_Compile_Tests.map_prods_hoaux_PPiii_PoiiI
null
map_prods_hoaux ?x (?xa, ?xb) \<Longrightarrow> pred.eval (map_prods_hoaux_PPiii_Poii ?x ?xb) ?xa
?H1 x_1 (x_2, x_3) \<Longrightarrow> ?H2 (?H3 x_1 x_3) x_2
[ "Predicate_Compile_Tests.map_prods_hoaux_PPiii_Poii", "Predicate.pred.eval", "Predicate_Compile_Tests.map_prods_hoaux" ]
[ "('a \\<times> 'b) \\<times> 'c \\<Rightarrow> 'b \\<times> 'c \\<Rightarrow> 'a Predicate.pred", "'a Predicate.pred \\<Rightarrow> 'a \\<Rightarrow> bool", "('a \\<times> 'b) \\<times> 'c \\<Rightarrow> 'a \\<times> 'b \\<times> 'c \\<Rightarrow> bool" ]
[ "datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: \"'a \\<Rightarrow> bool\")" ]
template
###lemma map_prods_hoaux ?x (?xa, ?xb) \<Longrightarrow> pred.eval (map_prods_hoaux_PPiii_Poii ?x ?xb) ?xa ###symbols Predicate_Compile_Tests.map_prods_hoaux_PPiii_Poii :::: ('a \<times> 'b) \<times> 'c \<Rightarrow> 'b \<times> 'c \<Rightarrow> 'a 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 datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: "'a \<Rightarrow> bool")
###output ?H1 x_1 (x_2, x_3) \<Longrightarrow> ?H2 (?H3 x_1 x_3) x_2###end
Predicate_Compile_Examples/Predicate_Compile_Tests
Predicate_Compile_Tests.partition_FiBB_o_i_iE
null
pred.eval (partition_FiBB_o_i_i ?x ?xb ?xc) ?xa \<Longrightarrow> (Predicate_Compile_Tests.partition (\<lambda>xa. pred.eval (?x xa) ()) ?xa ?xb ?xc \<Longrightarrow> ?P) \<Longrightarrow> ?P
\<lbrakk> ?H1 (?H2 x_1 x_2 x_3) x_4; ?H3 (\<lambda>y_0. ?H1 (x_1 y_0) ?H4) x_4 x_2 x_3 \<Longrightarrow> x_5\<rbrakk> \<Longrightarrow> x_5
[ "Product_Type.Unity", "Predicate_Compile_Tests.partition", "Predicate_Compile_Tests.partition_FiBB_o_i_i", "Predicate.pred.eval" ]
[ "unit", "('a \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> 'a list \\<Rightarrow> 'a list \\<Rightarrow> bool", "('a \\<Rightarrow> unit Predicate.pred) \\<Rightarrow> 'a list \\<Rightarrow> 'a list \\<Rightarrow> 'a list Predicate.pred", "'a Predicate.pred \\<Rightarrow> 'a \\<Rightarrow> bool" ]
[ "definition Unity :: unit (\"'(')\")\n where \"() = Abs_unit True\"", "inductive partition :: \"('a \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> 'a list \\<Rightarrow> 'a list \\<Rightarrow> bool\"\n for f where\n \"partition f [] [] []\"\n | \"f x \\<Longrightarrow> partition f xs ys zs \\<Longrightarrow> partition f (x # xs) (x # ys) zs\"\n | \"\\<not> f x \\<Longrightarrow> partition f xs ys zs \\<Longrightarrow> partition f (x # xs) ys (x # zs)\"", "datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: \"'a \\<Rightarrow> bool\")" ]
template
###lemma pred.eval (partition_FiBB_o_i_i ?x ?xb ?xc) ?xa \<Longrightarrow> (Predicate_Compile_Tests.partition (\<lambda>xa. pred.eval (?x xa) ()) ?xa ?xb ?xc \<Longrightarrow> ?P) \<Longrightarrow> ?P ###symbols Product_Type.Unity :::: unit Predicate_Compile_Tests.partition :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> 'a list \<Rightarrow> 'a list \<Rightarrow> bool Predicate_Compile_Tests.partition_FiBB_o_i_i :::: ('a \<Rightarrow> unit Predicate.pred) \<Rightarrow> 'a list \<Rightarrow> 'a list \<Rightarrow> 'a list Predicate.pred Predicate.pred.eval :::: 'a Predicate.pred \<Rightarrow> 'a \<Rightarrow> bool ###defs definition Unity :: unit ("'(')") where "() = Abs_unit True" inductive partition :: "('a \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> 'a list \<Rightarrow> 'a list \<Rightarrow> bool" for f where "partition f [] [] []" | "f x \<Longrightarrow> partition f xs ys zs \<Longrightarrow> partition f (x # xs) (x # ys) zs" | "\<not> f x \<Longrightarrow> partition f xs ys zs \<Longrightarrow> partition f (x # xs) ys (x # zs)" datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: "'a \<Rightarrow> bool")
###output \<lbrakk> ?H1 (?H2 x_1 x_2 x_3) x_4; ?H3 (\<lambda>y_0. ?H1 (x_1 y_0) ?H4) x_4 x_2 x_3 \<Longrightarrow> x_5\<rbrakk> \<Longrightarrow> x_5###end
Set
Set.DiffE
lemma DiffE [elim!]: "c \<in> A - B \<Longrightarrow> (c \<in> A \<Longrightarrow> c \<notin> B \<Longrightarrow> P) \<Longrightarrow> P"
?c \<in> ?A - ?B \<Longrightarrow> (?c \<in> ?A \<Longrightarrow> ?c \<notin> ?B \<Longrightarrow> ?P) \<Longrightarrow> ?P
\<lbrakk>x_1 \<in> ?H1 x_2 x_3; \<lbrakk>x_1 \<in> x_2; ?H2 x_1 x_3\<rbrakk> \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_4
[ "Set.not_member", "Groups.minus_class.minus" ]
[ "'a \\<Rightarrow> 'a set \\<Rightarrow> bool", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a" ]
[ "abbreviation not_member\n where \"not_member x A \\<equiv> \\<not> (x \\<in> A)\" \\<comment> \\<open>non-membership\\<close>", "class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)" ]
template
###lemma ?c \<in> ?A - ?B \<Longrightarrow> (?c \<in> ?A \<Longrightarrow> ?c \<notin> ?B \<Longrightarrow> ?P) \<Longrightarrow> ?P ###symbols Set.not_member :::: 'a \<Rightarrow> 'a set \<Rightarrow> bool Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a ###defs abbreviation not_member where "not_member x A \<equiv> \<not> (x \<in> A)" \<comment> \<open>non-membership\<close> class minus = fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65)
###output \<lbrakk>x_1 \<in> ?H1 x_2 x_3; \<lbrakk>x_1 \<in> x_2; ?H2 x_1 x_3\<rbrakk> \<Longrightarrow> x_4\<rbrakk> \<Longrightarrow> x_4###end
Nominal/Examples/Class1
Class1.crename_fresh
lemma crename_fresh: assumes a: "a\<sharp>M" shows "M[a\<turnstile>c>b] = M"
?a \<sharp> ?M \<Longrightarrow> ?M[ ?a\<turnstile>c> ?b] = ?M
?H1 x_1 x_2 \<Longrightarrow> ?H2 x_2 x_1 x_3 = x_2
[ "Class1.crename", "Nominal.fresh" ]
[ "trm \\<Rightarrow> coname \\<Rightarrow> coname \\<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 ?a \<sharp> ?M \<Longrightarrow> ?M[ ?a\<turnstile>c> ?b] = ?M ###symbols Class1.crename :::: trm \<Rightarrow> coname \<Rightarrow> coname \<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 \<Longrightarrow> ?H2 x_2 x_1 x_3 = x_2###end
Limits
Limits.BseqD
lemma BseqD: "Bseq X \<Longrightarrow> \<exists>K. 0 < K \<and> (\<forall>n. norm (X n) \<le> K)"
Bseq ?X \<Longrightarrow> \<exists>K>0. \<forall>n. norm (?X n) \<le> K
?H1 x_1 \<Longrightarrow> \<exists>y_0> ?H2. \<forall>y_1. ?H3 (x_1 y_1) \<le> y_0
[ "Real_Vector_Spaces.norm_class.norm", "Groups.zero_class.zero", "Limits.Bseq" ]
[ "'a \\<Rightarrow> real", "'a", "(nat \\<Rightarrow> 'a) \\<Rightarrow> bool" ]
[ "class norm =\n fixes norm :: \"'a \\<Rightarrow> real\"", "class zero =\n fixes zero :: 'a (\"0\")", "abbreviation Bseq :: \"(nat \\<Rightarrow> 'a::metric_space) \\<Rightarrow> bool\"\n where \"Bseq X \\<equiv> Bfun X sequentially\"" ]
template
###lemma Bseq ?X \<Longrightarrow> \<exists>K>0. \<forall>n. norm (?X n) \<le> K ###symbols Real_Vector_Spaces.norm_class.norm :::: 'a \<Rightarrow> real Groups.zero_class.zero :::: 'a Limits.Bseq :::: (nat \<Rightarrow> 'a) \<Rightarrow> bool ###defs class norm = fixes norm :: "'a \<Rightarrow> real" class zero = fixes zero :: 'a ("0") abbreviation Bseq :: "(nat \<Rightarrow> 'a::metric_space) \<Rightarrow> bool" where "Bseq X \<equiv> Bfun X sequentially"
###output ?H1 x_1 \<Longrightarrow> \<exists>y_0> ?H2. \<forall>y_1. ?H3 (x_1 y_1) \<le> y_0###end
GCD
GCD.lcm_cases_int
lemma lcm_cases_int: fixes x y :: int assumes "x \<ge> 0 \<Longrightarrow> y \<ge> 0 \<Longrightarrow> P (lcm x y)" and "x \<ge> 0 \<Longrightarrow> y \<le> 0 \<Longrightarrow> P (lcm x (- y))" and "x \<le> 0 \<Longrightarrow> y \<ge> 0 \<Longrightarrow> P (lcm (- x) y)" and "x \<le> 0 \<Longrightarrow> y \<le> 0 \<Longrightarrow> P (lcm (- x) (- y))" shows "P (lcm x y)"
(0 \<le> ?x \<Longrightarrow> 0 \<le> ?y \<Longrightarrow> ?P (lcm ?x ?y)) \<Longrightarrow> (0 \<le> ?x \<Longrightarrow> ?y \<le> 0 \<Longrightarrow> ?P (lcm ?x (- ?y))) \<Longrightarrow> (?x \<le> 0 \<Longrightarrow> 0 \<le> ?y \<Longrightarrow> ?P (lcm (- ?x) ?y)) \<Longrightarrow> (?x \<le> 0 \<Longrightarrow> ?y \<le> 0 \<Longrightarrow> ?P (lcm (- ?x) (- ?y))) \<Longrightarrow> ?P (lcm ?x ?y)
\<lbrakk>\<lbrakk> ?H1 \<le> x_1; ?H1 \<le> x_2\<rbrakk> \<Longrightarrow> x_3 (?H2 x_1 x_2); \<lbrakk> ?H1 \<le> x_1; x_2 \<le> ?H1\<rbrakk> \<Longrightarrow> x_3 (?H2 x_1 (?H3 x_2)); \<lbrakk>x_1 \<le> ?H1; ?H1 \<le> x_2\<rbrakk> \<Longrightarrow> x_3 (?H2 (?H3 x_1) x_2); \<lbrakk>x_1 \<le> ?H1; x_2 \<le> ?H1\<rbrakk> \<Longrightarrow> x_3 (?H2 (?H3 x_1) (?H3 x_2))\<rbrakk> \<Longrightarrow> x_3 (?H2 x_1 x_2)
[ "Groups.uminus_class.uminus", "GCD.gcd_class.lcm", "Groups.zero_class.zero" ]
[ "'a \\<Rightarrow> 'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a" ]
[ "class uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)", "class gcd = zero + one + dvd +\n fixes gcd :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\"\n and lcm :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\"", "class zero =\n fixes zero :: 'a (\"0\")" ]
template
###lemma (0 \<le> ?x \<Longrightarrow> 0 \<le> ?y \<Longrightarrow> ?P (lcm ?x ?y)) \<Longrightarrow> (0 \<le> ?x \<Longrightarrow> ?y \<le> 0 \<Longrightarrow> ?P (lcm ?x (- ?y))) \<Longrightarrow> (?x \<le> 0 \<Longrightarrow> 0 \<le> ?y \<Longrightarrow> ?P (lcm (- ?x) ?y)) \<Longrightarrow> (?x \<le> 0 \<Longrightarrow> ?y \<le> 0 \<Longrightarrow> ?P (lcm (- ?x) (- ?y))) \<Longrightarrow> ?P (lcm ?x ?y) ###symbols Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a GCD.gcd_class.lcm :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Groups.zero_class.zero :::: 'a ###defs class uminus = fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80) class gcd = zero + one + dvd + fixes gcd :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" and lcm :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" class zero = fixes zero :: 'a ("0")
###output \<lbrakk>\<lbrakk> ?H1 \<le> x_1; ?H1 \<le> x_2\<rbrakk> \<Longrightarrow> x_3 (?H2 x_1 x_2); \<lbrakk> ?H1 \<le> x_1; x_2 \<le> ?H1\<rbrakk> \<Longrightarrow> x_3 (?H2 x_1 (?H3 x_2)); \<lbrakk>x_1 \<le> ?H1; ?H1 \<le> x_2\<rbrakk> \<Longrightarrow> x_3 (?H2 (?H3 x_1) x_2); \<lbrakk>x_1 \<le> ?H1; x_2 \<le> ?H1\<rbrakk> \<Longrightarrow> x_3 (?H2 (?H3 x_1) (?H3 x_2))\<rbrakk> \<Longrightarrow> x_3 (?H2 x_1 x_2)###end
Combinatorics/Permutations
Permutations.permutes_inv_eq
lemma permutes_inv_eq: \<open>inv p y = x \<longleftrightarrow> p x = y\<close>
?p permutes ?S \<Longrightarrow> (inv ?p ?y = ?x) = (?p ?x = ?y)
?H1 x_1 x_2 \<Longrightarrow> (?H2 x_1 x_3 = x_4) = (x_1 x_4 = x_3)
[ "Hilbert_Choice.inv", "Permutations.permutes" ]
[ "('a \\<Rightarrow> 'b) \\<Rightarrow> 'b \\<Rightarrow> 'a", "('a \\<Rightarrow> 'a) \\<Rightarrow> 'a set \\<Rightarrow> bool" ]
[ "abbreviation inv :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> ('b \\<Rightarrow> 'a)\" where\n\"inv \\<equiv> inv_into UNIV\"", "definition permutes :: \\<open>('a \\<Rightarrow> 'a) \\<Rightarrow> 'a set \\<Rightarrow> bool\\<close> (infixr \\<open>permutes\\<close> 41)\n where \\<open>p permutes S \\<longleftrightarrow> (\\<forall>x. x \\<notin> S \\<longrightarrow> p x = x) \\<and> (\\<forall>y. \\<exists>!x. p x = y)\\<close>" ]
template
###lemma ?p permutes ?S \<Longrightarrow> (inv ?p ?y = ?x) = (?p ?x = ?y) ###symbols Hilbert_Choice.inv :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b \<Rightarrow> 'a Permutations.permutes :::: ('a \<Rightarrow> 'a) \<Rightarrow> 'a set \<Rightarrow> bool ###defs abbreviation inv :: "('a \<Rightarrow> 'b) \<Rightarrow> ('b \<Rightarrow> 'a)" where "inv \<equiv> inv_into UNIV" definition permutes :: \<open>('a \<Rightarrow> 'a) \<Rightarrow> 'a set \<Rightarrow> bool\<close> (infixr \<open>permutes\<close> 41) where \<open>p permutes S \<longleftrightarrow> (\<forall>x. x \<notin> S \<longrightarrow> p x = x) \<and> (\<forall>y. \<exists>!x. p x = y)\<close>
###output ?H1 x_1 x_2 \<Longrightarrow> (?H2 x_1 x_3 = x_4) = (x_1 x_4 = x_3)###end
Fun
Fun.strict_mono_on_imp_inj_on
lemma strict_mono_on_imp_inj_on: assumes "strict_mono_on A (f :: (_ :: linorder) \<Rightarrow> (_ :: preorder))" shows "inj_on f A"
strict_mono_on ?A ?f \<Longrightarrow> inj_on ?f ?A
?H1 x_1 x_2 \<Longrightarrow> ?H2 x_2 x_1
[ "Fun.inj_on", "Fun.ord_class.strict_mono_on" ]
[ "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> bool", "'a set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool" ]
[ "definition inj_on :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> bool\" \\<comment> \\<open>injective\\<close>\n where \"inj_on f A \\<longleftrightarrow> (\\<forall>x\\<in>A. \\<forall>y\\<in>A. f x = f y \\<longrightarrow> x = y)\"" ]
template
###lemma strict_mono_on ?A ?f \<Longrightarrow> inj_on ?f ?A ###symbols Fun.inj_on :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> bool Fun.ord_class.strict_mono_on :::: 'a set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool ###defs definition inj_on :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> bool" \<comment> \<open>injective\<close> where "inj_on f A \<longleftrightarrow> (\<forall>x\<in>A. \<forall>y\<in>A. f x = f y \<longrightarrow> x = y)"
###output ?H1 x_1 x_2 \<Longrightarrow> ?H2 x_2 x_1###end
SPARK/Examples/RIPEMD-160/F
Filter.prod_filter_assoc
null
(?F \<times>\<^sub>F ?G) \<times>\<^sub>F ?H = filtermap (\<lambda>(x, y, z). ((x, y), z)) (?F \<times>\<^sub>F ?G \<times>\<^sub>F ?H)
?H1 (?H1 x_1 x_2) x_3 = ?H2 (?H3 (\<lambda>y_0. ?H3 (\<lambda>y_1. Pair (y_0, y_1)))) (?H1 x_1 (?H1 x_2 x_3))
[ "Product_Type.prod.case_prod", "Filter.filtermap", "Filter.prod_filter" ]
[ "('a \\<Rightarrow> 'b \\<Rightarrow> 'c) \\<Rightarrow> 'a \\<times> 'b \\<Rightarrow> 'c", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a filter \\<Rightarrow> 'b filter", "'a filter \\<Rightarrow> 'b filter \\<Rightarrow> ('a \\<times> 'b) filter" ]
[ "definition \"prod = {f. \\<exists>a b. f = Pair_Rep (a::'a) (b::'b)}\"", "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)\"", "definition prod_filter :: \"'a filter \\<Rightarrow> 'b filter \\<Rightarrow> ('a \\<times> 'b) filter\" (infixr \"\\<times>\\<^sub>F\" 80) where\n \"prod_filter F G =\n (\\<Sqinter>(P, Q)\\<in>{(P, Q). eventually P F \\<and> eventually Q G}. principal {(x, y). P x \\<and> Q y})\"" ]
template
###lemma (?F \<times>\<^sub>F ?G) \<times>\<^sub>F ?H = filtermap (\<lambda>(x, y, z). ((x, y), z)) (?F \<times>\<^sub>F ?G \<times>\<^sub>F ?H) ###symbols Product_Type.prod.case_prod :::: ('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> 'a \<times> 'b \<Rightarrow> 'c Filter.filtermap :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a filter \<Rightarrow> 'b filter Filter.prod_filter :::: 'a filter \<Rightarrow> 'b filter \<Rightarrow> ('a \<times> 'b) filter ###defs definition "prod = {f. \<exists>a b. f = Pair_Rep (a::'a) (b::'b)}" 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)" definition prod_filter :: "'a filter \<Rightarrow> 'b filter \<Rightarrow> ('a \<times> 'b) filter" (infixr "\<times>\<^sub>F" 80) where "prod_filter F G = (\<Sqinter>(P, Q)\<in>{(P, Q). eventually P F \<and> eventually Q G}. principal {(x, y). P x \<and> Q y})"
###output ?H1 (?H1 x_1 x_2) x_3 = ?H2 (?H3 (\<lambda>y_0. ?H3 (\<lambda>y_1. Pair (y_0, y_1)))) (?H1 x_1 (?H1 x_2 x_3))###end
IMPP/Com
Complete_Lattices.UN_simps(7)
null
(\<Union>x\<in> ?C. ?A - ?B x) = ?A - \<Inter> (?B ` ?C)
?H1 (?H2 (\<lambda>y_0. ?H3 x_1 (x_2 y_0)) x_3) = ?H3 x_1 (?H4 (?H2 x_2 x_3))
[ "Complete_Lattices.Inter", "Groups.minus_class.minus", "Set.image", "Complete_Lattices.Union" ]
[ "'a set set \\<Rightarrow> 'a set", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set", "'a set set \\<Rightarrow> 'a set" ]
[ "abbreviation Inter :: \"'a set set \\<Rightarrow> 'a set\" (\"\\<Inter>\")\n where \"\\<Inter>S \\<equiv> \\<Sqinter>S\"", "class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"-\" 65)", "definition image :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b set\" (infixr \"`\" 90)\n where \"f ` A = {y. \\<exists>x\\<in>A. y = f x}\"", "abbreviation Union :: \"'a set set \\<Rightarrow> 'a set\" (\"\\<Union>\")\n where \"\\<Union>S \\<equiv> \\<Squnion>S\"" ]
template
###lemma (\<Union>x\<in> ?C. ?A - ?B x) = ?A - \<Inter> (?B ` ?C) ###symbols Complete_Lattices.Inter :::: 'a set set \<Rightarrow> 'a set Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Set.image :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set Complete_Lattices.Union :::: 'a set set \<Rightarrow> 'a set ###defs abbreviation Inter :: "'a set set \<Rightarrow> 'a set" ("\<Inter>") where "\<Inter>S \<equiv> \<Sqinter>S" class minus = fixes minus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "-" 65) definition image :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a set \<Rightarrow> 'b set" (infixr "`" 90) where "f ` A = {y. \<exists>x\<in>A. y = f x}" abbreviation Union :: "'a set set \<Rightarrow> 'a set" ("\<Union>") where "\<Union>S \<equiv> \<Squnion>S"
###output ?H1 (?H2 (\<lambda>y_0. ?H3 x_1 (x_2 y_0)) x_3) = ?H3 x_1 (?H4 (?H2 x_2 x_3))###end
Bali/WellType
WellType.wt_elim_cases(17)
null
?E, ?dt\<Turnstile>In1l (Body ?D ?blk)\<Colon> ?T \<Longrightarrow> (\<And>T. ?T = Inl T \<Longrightarrow> is_class (prg ?E) ?D \<Longrightarrow> ?E, ?dt\<Turnstile> ?blk\<Colon>\<surd> \<Longrightarrow> lcl ?E Result = Some T \<Longrightarrow> is_type (prg ?E) T \<Longrightarrow> ?P) \<Longrightarrow> ?P
\<lbrakk> ?H1 x_1 x_2 (?H2 (?H3 x_3 x_4)) x_5; \<And>y_0. \<lbrakk>x_5 = ?H4 y_0; ?H5 (?H6 x_1) x_3; ?H7 x_1 x_2 x_4; ?H8 x_1 ?H9 = ?H10 y_0; ?H11 (?H6 x_1) y_0\<rbrakk> \<Longrightarrow> x_6\<rbrakk> \<Longrightarrow> x_6
[ "Decl.is_type", "Option.option.Some", "Name.Result", "WellType.env.lcl", "WellType.wt_stmt", "WellType.env.prg", "Decl.is_class", "Sum_Type.Inl", "Term.expr.Body", "Basis.In1l", "WellType.wt" ]
[ "prog \\<Rightarrow> ty \\<Rightarrow> bool", "'a \\<Rightarrow> 'a option", "lname", "'a env_scheme \\<Rightarrow> lenv", "env \\<Rightarrow> (loc \\<Rightarrow> ty option) \\<Rightarrow> stmt \\<Rightarrow> bool", "'a env_scheme \\<Rightarrow> prog", "prog \\<Rightarrow> qtname \\<Rightarrow> bool", "'a \\<Rightarrow> 'a + 'b", "qtname \\<Rightarrow> stmt \\<Rightarrow> expr", "'a \\<Rightarrow> ('a + 'b, 'c, 'd) sum3", "env \\<Rightarrow> (loc \\<Rightarrow> ty option) \\<Rightarrow> Term.term \\<Rightarrow> tys \\<Rightarrow> bool" ]
[ "primrec is_type :: \"prog \\<Rightarrow> ty \\<Rightarrow> bool\"\n and isrtype :: \"prog \\<Rightarrow> ref_ty \\<Rightarrow> bool\"\nwhere\n \"is_type G (PrimT pt) = True\"\n| \"is_type G (RefT rt) = isrtype G rt\"\n| \"isrtype G (NullT) = True\"\n| \"isrtype G (IfaceT tn) = is_iface G tn\"\n| \"isrtype G (ClassT tn) = is_class G tn\"\n| \"isrtype G (ArrayT T ) = is_type G T\"", "datatype 'a option =\n None\n | Some (the: 'a)", "abbreviation Result :: lname\n where \"Result == EName Res\"", "record env = \n prg:: \"prog\" \\<comment> \\<open>program\\<close>\n cls:: \"qtname\" \\<comment> \\<open>current package and class name\\<close>\n lcl:: \"lenv\" \\<comment> \\<open>local environment\\<close>", "record env = \n prg:: \"prog\" \\<comment> \\<open>program\\<close>\n cls:: \"qtname\" \\<comment> \\<open>current package and class name\\<close>\n lcl:: \"lenv\" \\<comment> \\<open>local environment\\<close>", "abbreviation\n is_class :: \"prog \\<Rightarrow> qtname \\<Rightarrow> bool\"\n where \"is_class G C == class G C \\<noteq> None\"", "definition Inl :: \"'a \\<Rightarrow> 'a + 'b\"\n where \"Inl = Abs_sum \\<circ> Inl_Rep\"", "abbreviation In1l :: \"'al \\<Rightarrow> ('al + 'ar, 'b, 'c) sum3\"\n where \"In1l e \\<equiv> In1 (Inl e)\"", "inductive wt :: \"env \\<Rightarrow> dyn_ty \\<Rightarrow> [term,tys] \\<Rightarrow> bool\" (\"_,_\\<Turnstile>_\\<Colon>_\" [51,51,51,51] 50)\n and wt_stmt :: \"env \\<Rightarrow> dyn_ty \\<Rightarrow> stmt \\<Rightarrow> bool\" (\"_,_\\<Turnstile>_\\<Colon>\\<surd>\" [51,51,51] 50)\n and ty_expr :: \"env \\<Rightarrow> dyn_ty \\<Rightarrow> [expr ,ty ] \\<Rightarrow> bool\" (\"_,_\\<Turnstile>_\\<Colon>-_\" [51,51,51,51] 50)\n and ty_var :: \"env \\<Rightarrow> dyn_ty \\<Rightarrow> [var ,ty ] \\<Rightarrow> bool\" (\"_,_\\<Turnstile>_\\<Colon>=_\" [51,51,51,51] 50)\n and ty_exprs :: \"env \\<Rightarrow> dyn_ty \\<Rightarrow> [expr list, ty list] \\<Rightarrow> bool\"\n (\"_,_\\<Turnstile>_\\<Colon>\\<doteq>_\" [51,51,51,51] 50)\nwhere\n\n \"E,dt\\<Turnstile>s\\<Colon>\\<surd> \\<equiv> E,dt\\<Turnstile>In1r s\\<Colon>Inl (PrimT Void)\"\n| \"E,dt\\<Turnstile>e\\<Colon>-T \\<equiv> E,dt\\<Turnstile>In1l e\\<Colon>Inl T\"\n| \"E,dt\\<Turnstile>e\\<Colon>=T \\<equiv> E,dt\\<Turnstile>In2 e\\<Colon>Inl T\"\n| \"E,dt\\<Turnstile>e\\<Colon>\\<doteq>T \\<equiv> E,dt\\<Turnstile>In3 e\\<Colon>Inr T\"\n\n\\<comment> \\<open>well-typed statements\\<close>\n\n| Skip: \"E,dt\\<Turnstile>Skip\\<Colon>\\<surd>\"\n\n| Expr: \"\\<lbrakk>E,dt\\<Turnstile>e\\<Colon>-T\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>Expr e\\<Colon>\\<surd>\"\n \\<comment> \\<open>cf. 14.6\\<close>\n| Lab: \"E,dt\\<Turnstile>c\\<Colon>\\<surd> \\<Longrightarrow> \n E,dt\\<Turnstile>l\\<bullet> c\\<Colon>\\<surd>\" \n\n| Comp: \"\\<lbrakk>E,dt\\<Turnstile>c1\\<Colon>\\<surd>; \n E,dt\\<Turnstile>c2\\<Colon>\\<surd>\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>c1;; c2\\<Colon>\\<surd>\"\n\n \\<comment> \\<open>cf. 14.8\\<close>\n| If: \"\\<lbrakk>E,dt\\<Turnstile>e\\<Colon>-PrimT Boolean;\n E,dt\\<Turnstile>c1\\<Colon>\\<surd>;\n E,dt\\<Turnstile>c2\\<Colon>\\<surd>\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>If(e) c1 Else c2\\<Colon>\\<surd>\"\n\n \\<comment> \\<open>cf. 14.10\\<close>\n| Loop: \"\\<lbrakk>E,dt\\<Turnstile>e\\<Colon>-PrimT Boolean;\n E,dt\\<Turnstile>c\\<Colon>\\<surd>\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>l\\<bullet> While(e) c\\<Colon>\\<surd>\"\n \\<comment> \\<open>cf. 14.13, 14.15, 14.16\\<close>\n| Jmp: \"E,dt\\<Turnstile>Jmp jump\\<Colon>\\<surd>\"\n\n \\<comment> \\<open>cf. 14.16\\<close>\n| Throw: \"\\<lbrakk>E,dt\\<Turnstile>e\\<Colon>-Class tn;\n prg E\\<turnstile>tn\\<preceq>\\<^sub>C SXcpt Throwable\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>Throw e\\<Colon>\\<surd>\"\n \\<comment> \\<open>cf. 14.18\\<close>\n| Try: \"\\<lbrakk>E,dt\\<Turnstile>c1\\<Colon>\\<surd>; prg E\\<turnstile>tn\\<preceq>\\<^sub>C SXcpt Throwable;\n lcl E (VName vn)=None; E \\<lparr>lcl := (lcl E)(VName vn\\<mapsto>Class tn)\\<rparr>,dt\\<Turnstile>c2\\<Colon>\\<surd>\\<rbrakk>\n \\<Longrightarrow>\n E,dt\\<Turnstile>Try c1 Catch(tn vn) c2\\<Colon>\\<surd>\"\n\n \\<comment> \\<open>cf. 14.18\\<close>\n| Fin: \"\\<lbrakk>E,dt\\<Turnstile>c1\\<Colon>\\<surd>; E,dt\\<Turnstile>c2\\<Colon>\\<surd>\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>c1 Finally c2\\<Colon>\\<surd>\"\n\n| Init: \"\\<lbrakk>is_class (prg E) C\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>Init C\\<Colon>\\<surd>\"\n \\<comment> \\<open>\\<^term>\\<open>Init\\<close> is created on the fly during evaluation (see Eval.thy). \n The class isn't necessarily accessible from the points \\<^term>\\<open>Init\\<close> \n is called. Therefor we only demand \\<^term>\\<open>is_class\\<close> and not \n \\<^term>\\<open>is_acc_class\\<close> here.\\<close>\n\n\\<comment> \\<open>well-typed expressions\\<close>\n\n \\<comment> \\<open>cf. 15.8\\<close>\n| NewC: \"\\<lbrakk>is_acc_class (prg E) (pkg E) C\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>NewC C\\<Colon>-Class C\"\n \\<comment> \\<open>cf. 15.9\\<close>\n| NewA: \"\\<lbrakk>is_acc_type (prg E) (pkg E) T;\n E,dt\\<Turnstile>i\\<Colon>-PrimT Integer\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>New T[i]\\<Colon>-T.[]\"\n\n \\<comment> \\<open>cf. 15.15\\<close>\n| Cast: \"\\<lbrakk>E,dt\\<Turnstile>e\\<Colon>-T; is_acc_type (prg E) (pkg E) T';\n prg E\\<turnstile>T\\<preceq>? T'\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>Cast T' e\\<Colon>-T'\"\n\n \\<comment> \\<open>cf. 15.19.2\\<close>\n| Inst: \"\\<lbrakk>E,dt\\<Turnstile>e\\<Colon>-RefT T; is_acc_type (prg E) (pkg E) (RefT T');\n prg E\\<turnstile>RefT T\\<preceq>? RefT T'\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>e InstOf T'\\<Colon>-PrimT Boolean\"\n\n \\<comment> \\<open>cf. 15.7.1\\<close>\n| Lit: \"\\<lbrakk>typeof dt x = Some T\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>Lit x\\<Colon>-T\"\n\n| UnOp: \"\\<lbrakk>E,dt\\<Turnstile>e\\<Colon>-Te; wt_unop unop Te; T=PrimT (unop_type unop)\\<rbrakk> \n \\<Longrightarrow>\n E,dt\\<Turnstile>UnOp unop e\\<Colon>-T\"\n \n| BinOp: \"\\<lbrakk>E,dt\\<Turnstile>e1\\<Colon>-T1; E,dt\\<Turnstile>e2\\<Colon>-T2; wt_binop (prg E) binop T1 T2; \n T=PrimT (binop_type binop)\\<rbrakk> \n \\<Longrightarrow>\n E,dt\\<Turnstile>BinOp binop e1 e2\\<Colon>-T\"\n \n \\<comment> \\<open>cf. 15.10.2, 15.11.1\\<close>\n| Super: \"\\<lbrakk>lcl E This = Some (Class C); C \\<noteq> Object;\n class (prg E) C = Some c\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>Super\\<Colon>-Class (super c)\"\n\n \\<comment> \\<open>cf. 15.13.1, 15.10.1, 15.12\\<close>\n| Acc: \"\\<lbrakk>E,dt\\<Turnstile>va\\<Colon>=T\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>Acc va\\<Colon>-T\"\n\n \\<comment> \\<open>cf. 15.25, 15.25.1\\<close>\n| Ass: \"\\<lbrakk>E,dt\\<Turnstile>va\\<Colon>=T; va \\<noteq> LVar This;\n E,dt\\<Turnstile>v \\<Colon>-T';\n prg E\\<turnstile>T'\\<preceq>T\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>va:=v\\<Colon>-T'\"\n\n \\<comment> \\<open>cf. 15.24\\<close>\n| Cond: \"\\<lbrakk>E,dt\\<Turnstile>e0\\<Colon>-PrimT Boolean;\n E,dt\\<Turnstile>e1\\<Colon>-T1; E,dt\\<Turnstile>e2\\<Colon>-T2;\n prg E\\<turnstile>T1\\<preceq>T2 \\<and> T = T2 \\<or> prg E\\<turnstile>T2\\<preceq>T1 \\<and> T = T1\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>e0 ? e1 : e2\\<Colon>-T\"\n\n \\<comment> \\<open>cf. 15.11.1, 15.11.2, 15.11.3\\<close>\n| Call: \"\\<lbrakk>E,dt\\<Turnstile>e\\<Colon>-RefT statT;\n E,dt\\<Turnstile>ps\\<Colon>\\<doteq>pTs;\n max_spec (prg E) (cls E) statT \\<lparr>name=mn,parTs=pTs\\<rparr> \n = {((statDeclT,m),pTs')}\n \\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>{cls E,statT,invmode m e}e\\<cdot>mn({pTs'}ps)\\<Colon>-(resTy m)\"\n\n| Methd: \"\\<lbrakk>is_class (prg E) C;\n methd (prg E) C sig = Some m;\n E,dt\\<Turnstile>Body (declclass m) (stmt (mbody (mthd m)))\\<Colon>-T\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>Methd C sig\\<Colon>-T\"\n \\<comment> \\<open>The class \\<^term>\\<open>C\\<close> is the dynamic class of the method call \n (cf. Eval.thy). \n It hasn't got to be directly accessible from the current package \n \\<^term>\\<open>(pkg E)\\<close>. \n Only the static class must be accessible (enshured indirectly by \n \\<^term>\\<open>Call\\<close>). \n Note that l is just a dummy value. It is only used in the smallstep \n semantics. To proof typesafety directly for the smallstep semantics \n we would have to assume conformance of l here!\\<close>\n\n| Body: \"\\<lbrakk>is_class (prg E) D;\n E,dt\\<Turnstile>blk\\<Colon>\\<surd>;\n (lcl E) Result = Some T;\n is_type (prg E) T\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>Body D blk\\<Colon>-T\"\n\\<comment> \\<open>The class \\<^term>\\<open>D\\<close> implementing the method must not directly be \n accessible from the current package \\<^term>\\<open>(pkg E)\\<close>, but can also \n be indirectly accessible due to inheritance (enshured in \\<^term>\\<open>Call\\<close>)\n The result type hasn't got to be accessible in Java! (If it is not \n accessible you can only assign it to Object).\n For dummy value l see rule \\<^term>\\<open>Methd\\<close>.\\<close>\n\n\\<comment> \\<open>well-typed variables\\<close>\n\n \\<comment> \\<open>cf. 15.13.1\\<close>\n| LVar: \"\\<lbrakk>lcl E vn = Some T; is_acc_type (prg E) (pkg E) T\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>LVar vn\\<Colon>=T\"\n \\<comment> \\<open>cf. 15.10.1\\<close>\n| FVar: \"\\<lbrakk>E,dt\\<Turnstile>e\\<Colon>-Class C; \n accfield (prg E) (cls E) C fn = Some (statDeclC,f)\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>{cls E,statDeclC,is_static f}e..fn\\<Colon>=(type f)\"\n \\<comment> \\<open>cf. 15.12\\<close>\n| AVar: \"\\<lbrakk>E,dt\\<Turnstile>e\\<Colon>-T.[]; \n E,dt\\<Turnstile>i\\<Colon>-PrimT Integer\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>e.[i]\\<Colon>=T\"\n\n\n\\<comment> \\<open>well-typed expression lists\\<close>\n\n \\<comment> \\<open>cf. 15.11.???\\<close>\n| Nil: \"E,dt\\<Turnstile>[]\\<Colon>\\<doteq>[]\"\n\n \\<comment> \\<open>cf. 15.11.???\\<close>\n| Cons: \"\\<lbrakk>E,dt\\<Turnstile>e \\<Colon>-T;\n E,dt\\<Turnstile>es\\<Colon>\\<doteq>Ts\\<rbrakk> \\<Longrightarrow>\n E,dt\\<Turnstile>e#es\\<Colon>\\<doteq>T#Ts\"" ]
template
###lemma ?E, ?dt\<Turnstile>In1l (Body ?D ?blk)\<Colon> ?T \<Longrightarrow> (\<And>T. ?T = Inl T \<Longrightarrow> is_class (prg ?E) ?D \<Longrightarrow> ?E, ?dt\<Turnstile> ?blk\<Colon>\<surd> \<Longrightarrow> lcl ?E Result = Some T \<Longrightarrow> is_type (prg ?E) T \<Longrightarrow> ?P) \<Longrightarrow> ?P ###symbols Decl.is_type :::: prog \<Rightarrow> ty \<Rightarrow> bool Option.option.Some :::: 'a \<Rightarrow> 'a option Name.Result :::: lname WellType.env.lcl :::: 'a env_scheme \<Rightarrow> lenv WellType.wt_stmt :::: env \<Rightarrow> (loc \<Rightarrow> ty option) \<Rightarrow> stmt \<Rightarrow> bool WellType.env.prg :::: 'a env_scheme \<Rightarrow> prog Decl.is_class :::: prog \<Rightarrow> qtname \<Rightarrow> bool Sum_Type.Inl :::: 'a \<Rightarrow> 'a + 'b Term.expr.Body :::: qtname \<Rightarrow> stmt \<Rightarrow> expr Basis.In1l :::: 'a \<Rightarrow> ('a + 'b, 'c, 'd) sum3 WellType.wt :::: env \<Rightarrow> (loc \<Rightarrow> ty option) \<Rightarrow> Term.term \<Rightarrow> tys \<Rightarrow> bool ###defs primrec is_type :: "prog \<Rightarrow> ty \<Rightarrow> bool" and isrtype :: "prog \<Rightarrow> ref_ty \<Rightarrow> bool" where "is_type G (PrimT pt) = True" | "is_type G (RefT rt) = isrtype G rt" | "isrtype G (NullT) = True" | "isrtype G (IfaceT tn) = is_iface G tn" | "isrtype G (ClassT tn) = is_class G tn" | "isrtype G (ArrayT T ) = is_type G T" datatype 'a option = None | Some (the: 'a) abbreviation Result :: lname where "Result == EName Res" record env = prg:: "prog" \<comment> \<open>program\<close> cls:: "qtname" \<comment> \<open>current package and class name\<close> lcl:: "lenv" \<comment> \<open>local environment\<close> record env = prg:: "prog" \<comment> \<open>program\<close> cls:: "qtname" \<comment> \<open>current package and class name\<close> lcl:: "lenv" \<comment> \<open>local environment\<close> abbreviation is_class :: "prog \<Rightarrow> qtname \<Rightarrow> bool" where "is_class G C == class G C \<noteq> None" definition Inl :: "'a \<Rightarrow> 'a + 'b" where "Inl = Abs_sum \<circ> Inl_Rep" abbreviation In1l :: "'al \<Rightarrow> ('al + 'ar, 'b, 'c) sum3" where "In1l e \<equiv> In1 (Inl e)" inductive wt :: "env \<Rightarrow> dyn_ty \<Rightarrow> [term,tys] \<Rightarrow> bool" ("_,_\<Turnstile>_\<Colon>_" [51,51,51,51] 50) and wt_stmt :: "env \<Rightarrow> dyn_ty \<Rightarrow> stmt \<Rightarrow> bool" ("_,_\<Turnstile>_\<Colon>\<surd>" [51,51,51] 50) and ty_expr :: "env \<Rightarrow> dyn_ty \<Rightarrow> [expr ,ty ] \<Rightarrow> bool" ("_,_\<Turnstile>_\<Colon>-_" [51,51,51,51] 50) and ty_var :: "env \<Rightarrow> dyn_ty \<Rightarrow> [var ,ty ] \<Rightarrow> bool" ("_,_\<Turnstile>_\<Colon>=_" [51,51,51,51] 50) and ty_exprs :: "env \<Rightarrow> dyn_ty \<Rightarrow> [expr list, ty list] \<Rightarrow> bool" ("_,_\<Turnstile>_\<Colon>\<doteq>_" [51,51,51,51] 50) where "E,dt\<Turnstile>s\<Colon>\<surd> \<equiv> E,dt\<Turnstile>In1r s\<Colon>Inl (PrimT Void)" | "E,dt\<Turnstile>e\<Colon>-T \<equiv> E,dt\<Turnstile>In1l e\<Colon>Inl T" | "E,dt\<Turnstile>e\<Colon>=T \<equiv> E,dt\<Turnstile>In2 e\<Colon>Inl T" | "E,dt\<Turnstile>e\<Colon>\<doteq>T \<equiv> E,dt\<Turnstile>In3 e\<Colon>Inr T" \<comment> \<open>well-typed statements\<close> | Skip: "E,dt\<Turnstile>Skip\<Colon>\<surd>" | Expr: "\<lbrakk>E,dt\<Turnstile>e\<Colon>-T\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>Expr e\<Colon>\<surd>" \<comment> \<open>cf. 14.6\<close> | Lab: "E,dt\<Turnstile>c\<Colon>\<surd> \<Longrightarrow> E,dt\<Turnstile>l\<bullet> c\<Colon>\<surd>" | Comp: "\<lbrakk>E,dt\<Turnstile>c1\<Colon>\<surd>; E,dt\<Turnstile>c2\<Colon>\<surd>\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>c1;; c2\<Colon>\<surd>" \<comment> \<open>cf. 14.8\<close> | If: "\<lbrakk>E,dt\<Turnstile>e\<Colon>-PrimT Boolean; E,dt\<Turnstile>c1\<Colon>\<surd>; E,dt\<Turnstile>c2\<Colon>\<surd>\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>If(e) c1 Else c2\<Colon>\<surd>" \<comment> \<open>cf. 14.10\<close> | Loop: "\<lbrakk>E,dt\<Turnstile>e\<Colon>-PrimT Boolean; E,dt\<Turnstile>c\<Colon>\<surd>\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>l\<bullet> While(e) c\<Colon>\<surd>" \<comment> \<open>cf. 14.13, 14.15, 14.16\<close> | Jmp: "E,dt\<Turnstile>Jmp jump\<Colon>\<surd>" \<comment> \<open>cf. 14.16\<close> | Throw: "\<lbrakk>E,dt\<Turnstile>e\<Colon>-Class tn; prg E\<turnstile>tn\<preceq>\<^sub>C SXcpt Throwable\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>Throw e\<Colon>\<surd>" \<comment> \<open>cf. 14.18\<close> | Try: "\<lbrakk>E,dt\<Turnstile>c1\<Colon>\<surd>; prg E\<turnstile>tn\<preceq>\<^sub>C SXcpt Throwable; lcl E (VName vn)=None; E \<lparr>lcl := (lcl E)(VName vn\<mapsto>Class tn)\<rparr>,dt\<Turnstile>c2\<Colon>\<surd>\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>Try c1 Catch(tn vn) c2\<Colon>\<surd>" \<comment> \<open>cf. 14.18\<close> | Fin: "\<lbrakk>E,dt\<Turnstile>c1\<Colon>\<surd>; E,dt\<Turnstile>c2\<Colon>\<surd>\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>c1 Finally c2\<Colon>\<surd>" | Init: "\<lbrakk>is_class (prg E) C\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>Init C\<Colon>\<surd>" \<comment> \<open>\<^term>\<open>Init\<close> is created on the fly during evaluation (see Eval.thy). The class isn't necessarily accessible from the points \<^term>\<open>Init\<close> is called. Therefor we only demand \<^term>\<open>is_class\<close> and not \<^term>\<open>is_acc_class\<close> here.\<close> \<comment> \<open>well-typed expressions\<close> \<comment> \<open>cf. 15.8\<close> | NewC: "\<lbrakk>is_acc_class (prg E) (pkg E) C\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>NewC C\<Colon>-Class C" \<comment> \<open>cf. 15.9\<close> | NewA: "\<lbrakk>is_acc_type (prg E) (pkg E) T; E,dt\<Turnstile>i\<Colon>-PrimT Integer\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>New T[i]\<Colon>-T.[]" \<comment> \<open>cf. 15.15\<close> | Cast: "\<lbrakk>E,dt\<Turnstile>e\<Colon>-T; is_acc_type (prg E) (pkg E) T'; prg E\<turnstile>T\<preceq>? T'\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>Cast T' e\<Colon>-T'" \<comment> \<open>cf. 15.19.2\<close> | Inst: "\<lbrakk>E,dt\<Turnstile>e\<Colon>-RefT T; is_acc_type (prg E) (pkg E) (RefT T'); prg E\<turnstile>RefT T\<preceq>? RefT T'\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>e InstOf T'\<Colon>-PrimT Boolean" \<comment> \<open>cf. 15.7.1\<close> | Lit: "\<lbrakk>typeof dt x = Some T\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>Lit x\<Colon>-T" | UnOp: "\<lbrakk>E,dt\<Turnstile>e\<Colon>-Te; wt_unop unop Te; T=PrimT (unop_type unop)\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>UnOp unop e\<Colon>-T" | BinOp: "\<lbrakk>E,dt\<Turnstile>e1\<Colon>-T1; E,dt\<Turnstile>e2\<Colon>-T2; wt_binop (prg E) binop T1 T2; T=PrimT (binop_type binop)\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>BinOp binop e1 e2\<Colon>-T" \<comment> \<open>cf. 15.10.2, 15.11.1\<close> | Super: "\<lbrakk>lcl E This = Some (Class C); C \<noteq> Object; class (prg E) C = Some c\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>Super\<Colon>-Class (super c)" \<comment> \<open>cf. 15.13.1, 15.10.1, 15.12\<close> | Acc: "\<lbrakk>E,dt\<Turnstile>va\<Colon>=T\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>Acc va\<Colon>-T" \<comment> \<open>cf. 15.25, 15.25.1\<close> | Ass: "\<lbrakk>E,dt\<Turnstile>va\<Colon>=T; va \<noteq> LVar This; E,dt\<Turnstile>v \<Colon>-T'; prg E\<turnstile>T'\<preceq>T\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>va:=v\<Colon>-T'" \<comment> \<open>cf. 15.24\<close> | Cond: "\<lbrakk>E,dt\<Turnstile>e0\<Colon>-PrimT Boolean; E,dt\<Turnstile>e1\<Colon>-T1; E,dt\<Turnstile>e2\<Colon>-T2; prg E\<turnstile>T1\<preceq>T2 \<and> T = T2 \<or> prg E\<turnstile>T2\<preceq>T1 \<and> T = T1\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>e0 ? e1 : e2\<Colon>-T" \<comment> \<open>cf. 15.11.1, 15.11.2, 15.11.3\<close> | Call: "\<lbrakk>E,dt\<Turnstile>e\<Colon>-RefT statT; E,dt\<Turnstile>ps\<Colon>\<doteq>pTs; max_spec (prg E) (cls E) statT \<lparr>name=mn,parTs=pTs\<rparr> = {((statDeclT,m),pTs')} \<rbrakk> \<Longrightarrow> E,dt\<Turnstile>{cls E,statT,invmode m e}e\<cdot>mn({pTs'}ps)\<Colon>-(resTy m)" | Methd: "\<lbrakk>is_class (prg E) C; methd (prg E) C sig = Some m; E,dt\<Turnstile>Body (declclass m) (stmt (mbody (mthd m)))\<Colon>-T\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>Methd C sig\<Colon>-T" \<comment> \<open>The class \<^term>\<open>C\<close> is the dynamic class of the method call (cf. Eval.thy). It hasn't got to be directly accessible from the current package \<^term>\<open>(pkg E)\<close>. Only the static class must be accessible (enshured indirectly by \<^term>\<open>Call\<close>). Note that l is just a dummy value. It is only used in the smallstep semantics. To proof typesafety directly for the smallstep semantics we would have to assume conformance of l here!\<close> | Body: "\<lbrakk>is_class (prg E) D; E,dt\<Turnstile>blk\<Colon>\<surd>; (lcl E) Result = Some T; is_type (prg E) T\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>Body D blk\<Colon>-T" \<comment> \<open>The class \<^term>\<open>D\<close> implementing the method must not directly be accessible from the current package \<^term>\<open>(pkg E)\<close>, but can also be indirectly accessible due to inheritance (enshured in \<^term>\<open>Call\<close>) The result type hasn't got to be accessible in Java! (If it is not accessible you can only assign it to Object). For dummy value l see rule \<^term>\<open>Methd\<close>.\<close> \<comment> \<open>well-typed variables\<close> \<comment> \<open>cf. 15.13.1\<close> | LVar: "\<lbrakk>lcl E vn = Some T; is_acc_type (prg E) (pkg E) T\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>LVar vn\<Colon>=T" \<comment> \<open>cf. 15.10.1\<close> | FVar: "\<lbrakk>E,dt\<Turnstile>e\<Colon>-Class C; accfield (prg E) (cls E) C fn = Some (statDeclC,f)\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>{cls E,statDeclC,is_static f}e..fn\<Colon>=(type f)" \<comment> \<open>cf. 15.12\<close> | AVar: "\<lbrakk>E,dt\<Turnstile>e\<Colon>-T.[]; E,dt\<Turnstile>i\<Colon>-PrimT Integer\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>e.[i]\<Colon>=T" \<comment> \<open>well-typed expression lists\<close> \<comment> \<open>cf. 15.11.???\<close> | Nil: "E,dt\<Turnstile>[]\<Colon>\<doteq>[]" \<comment> \<open>cf. 15.11.???\<close> | Cons: "\<lbrakk>E,dt\<Turnstile>e \<Colon>-T; E,dt\<Turnstile>es\<Colon>\<doteq>Ts\<rbrakk> \<Longrightarrow> E,dt\<Turnstile>e#es\<Colon>\<doteq>T#Ts"
###output \<lbrakk> ?H1 x_1 x_2 (?H2 (?H3 x_3 x_4)) x_5; \<And>y_0. \<lbrakk>x_5 = ?H4 y_0; ?H5 (?H6 x_1) x_3; ?H7 x_1 x_2 x_4; ?H8 x_1 ?H9 = ?H10 y_0; ?H11 (?H6 x_1) y_0\<rbrakk> \<Longrightarrow> x_6\<rbrakk> \<Longrightarrow> x_6###end
Predicate_Compile_Examples/Predicate_Compile_Tests
Predicate_Compile_Tests.predicate_where_argument_is_condition_and_value_oE
null
pred.eval predicate_where_argument_is_condition_and_value_o ?x \<Longrightarrow> (predicate_where_argument_is_condition_and_value ?x \<Longrightarrow> ?P) \<Longrightarrow> ?P
\<lbrakk> ?H1 ?H2 x_1; ?H3 x_1 \<Longrightarrow> x_2\<rbrakk> \<Longrightarrow> x_2
[ "Predicate_Compile_Tests.predicate_where_argument_is_condition_and_value", "Predicate_Compile_Tests.predicate_where_argument_is_condition_and_value_o", "Predicate.pred.eval" ]
[ "bool \\<Rightarrow> bool", "bool Predicate.pred", "'a Predicate.pred \\<Rightarrow> 'a \\<Rightarrow> bool" ]
[ "inductive predicate_where_argument_is_condition_and_value :: \"bool \\<Rightarrow> bool\"\nwhere\n \"predicate_where_argument_is_condition_and_value ck \\<Longrightarrow> ck\n \\<Longrightarrow> predicate_where_argument_is_condition_and_value ck\"", "datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: \"'a \\<Rightarrow> bool\")" ]
template
###lemma pred.eval predicate_where_argument_is_condition_and_value_o ?x \<Longrightarrow> (predicate_where_argument_is_condition_and_value ?x \<Longrightarrow> ?P) \<Longrightarrow> ?P ###symbols Predicate_Compile_Tests.predicate_where_argument_is_condition_and_value :::: bool \<Rightarrow> bool Predicate_Compile_Tests.predicate_where_argument_is_condition_and_value_o :::: bool Predicate.pred Predicate.pred.eval :::: 'a Predicate.pred \<Rightarrow> 'a \<Rightarrow> bool ###defs inductive predicate_where_argument_is_condition_and_value :: "bool \<Rightarrow> bool" where "predicate_where_argument_is_condition_and_value ck \<Longrightarrow> ck \<Longrightarrow> predicate_where_argument_is_condition_and_value ck" datatype (plugins only: extraction) (dead 'a) pred = Pred (eval: "'a \<Rightarrow> bool")
###output \<lbrakk> ?H1 ?H2 x_1; ?H3 x_1 \<Longrightarrow> x_2\<rbrakk> \<Longrightarrow> x_2###end
Limits
Limits.filterlim_at_top_add_at_top
lemma filterlim_at_top_add_at_top: assumes f: "LIM x F. f x :> at_top" and g: "LIM x F. g x :> at_top" shows "LIM x F. (f x + g x :: real) :> at_top"
filterlim ?f at_top ?F \<Longrightarrow> filterlim ?g at_top ?F \<Longrightarrow> LIM x ?F. ?f x + ?g x :> at_top
\<lbrakk> ?H1 x_1 ?H2 x_2; ?H1 x_3 ?H2 x_2\<rbrakk> \<Longrightarrow> ?H1 (\<lambda>y_2. ?H3 (x_1 y_2) (x_3 y_2)) ?H2 x_2
[ "Groups.plus_class.plus", "Filter.at_top", "Filter.filterlim" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "'a filter", "('a \\<Rightarrow> 'b) \\<Rightarrow> 'b filter \\<Rightarrow> 'a filter \\<Rightarrow> bool" ]
[ "class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)", "definition at_top :: \"('a::order) filter\"\n where \"at_top = (\\<Sqinter>k. principal {k ..})\"", "definition filterlim :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b filter \\<Rightarrow> 'a filter \\<Rightarrow> bool\" where\n \"filterlim f F2 F1 \\<longleftrightarrow> filtermap f F1 \\<le> F2\"" ]
template
###lemma filterlim ?f at_top ?F \<Longrightarrow> filterlim ?g at_top ?F \<Longrightarrow> LIM x ?F. ?f x + ?g x :> at_top ###symbols Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Filter.at_top :::: 'a filter Filter.filterlim :::: ('a \<Rightarrow> 'b) \<Rightarrow> 'b filter \<Rightarrow> 'a filter \<Rightarrow> bool ###defs class plus = fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65) definition at_top :: "('a::order) filter" where "at_top = (\<Sqinter>k. principal {k ..})" definition filterlim :: "('a \<Rightarrow> 'b) \<Rightarrow> 'b filter \<Rightarrow> 'a filter \<Rightarrow> bool" where "filterlim f F2 F1 \<longleftrightarrow> filtermap f F1 \<le> F2"
###output \<lbrakk> ?H1 x_1 ?H2 x_2; ?H1 x_3 ?H2 x_2\<rbrakk> \<Longrightarrow> ?H1 (\<lambda>y_2. ?H3 (x_1 y_2) (x_3 y_2)) ?H2 x_2###end
Complex
Complex.sum_roots_unity
lemma sum_roots_unity: assumes "n > 1" shows "\<Sum>{z::complex. z ^ n = 1} = 0"
1 < ?n \<Longrightarrow> \<Sum> {z. z ^ ?n = 1} = 0
?H1 < x_1 \<Longrightarrow> ?H2 (?H3 (\<lambda>y_0. ?H4 y_0 x_1 = ?H1)) = ?H5
[ "Groups.zero_class.zero", "Power.power_class.power", "Set.Collect", "Groups_Big.comm_monoid_add_class.Sum", "Groups.one_class.one" ]
[ "'a", "'a \\<Rightarrow> nat \\<Rightarrow> 'a", "('a \\<Rightarrow> bool) \\<Rightarrow> 'a set", "'a set \\<Rightarrow> 'a", "'a" ]
[ "class zero =\n fixes zero :: 'a (\"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\"", "class one =\n fixes one :: 'a (\"1\")" ]
template
###lemma 1 < ?n \<Longrightarrow> \<Sum> {z. z ^ ?n = 1} = 0 ###symbols Groups.zero_class.zero :::: 'a Power.power_class.power :::: 'a \<Rightarrow> nat \<Rightarrow> 'a Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set Groups_Big.comm_monoid_add_class.Sum :::: 'a set \<Rightarrow> 'a Groups.one_class.one :::: 'a ###defs class zero = fixes zero :: 'a ("0") primrec power :: "'a \<Rightarrow> nat \<Rightarrow> 'a" (infixr "^" 80) where power_0: "a ^ 0 = 1" | power_Suc: "a ^ Suc n = a * a ^ n" class one = fixes one :: 'a ("1")
###output ?H1 < x_1 \<Longrightarrow> ?H2 (?H3 (\<lambda>y_0. ?H4 y_0 x_1 = ?H1)) = ?H5###end
Analysis/Brouwer_Fixpoint
Brouwer_Fixpoint.swap_apply2
null
(?f \<circ> Transposition.transpose ?a ?b) ?b = ?f ?a
?H1 x_1 (?H2 x_2 x_3) x_3 = x_1 x_2
[ "Transposition.transpose", "Fun.comp" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "('a \\<Rightarrow> 'b) \\<Rightarrow> ('c \\<Rightarrow> 'a) \\<Rightarrow> 'c \\<Rightarrow> 'b" ]
[ "definition transpose :: \\<open>'a \\<Rightarrow> 'a \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n where \\<open>transpose a b c = (if c = a then b else if c = b then a else c)\\<close>", "definition 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))\"" ]
template
###lemma (?f \<circ> Transposition.transpose ?a ?b) ?b = ?f ?a ###symbols Transposition.transpose :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> 'a Fun.comp :::: ('a \<Rightarrow> 'b) \<Rightarrow> ('c \<Rightarrow> 'a) \<Rightarrow> 'c \<Rightarrow> 'b ###defs definition transpose :: \<open>'a \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> 'a\<close> where \<open>transpose a b c = (if c = a then b else if c = b then a else c)\<close> definition comp :: "('b \<Rightarrow> 'c) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'c" (infixl "\<circ>" 55) where "f \<circ> g = (\<lambda>x. f (g x))"
###output ?H1 x_1 (?H2 x_2 x_3) x_3 = x_1 x_2###end
Transcendental
Transcendental.arccos_ubound
lemma arccos_ubound: "- 1 \<le> y \<Longrightarrow> y \<le> 1 \<Longrightarrow> arccos y \<le> pi"
- 1 \<le> ?y \<Longrightarrow> ?y \<le> 1 \<Longrightarrow> arccos ?y \<le> pi
\<lbrakk> ?H1 ?H2 \<le> x_1; x_1 \<le> ?H2\<rbrakk> \<Longrightarrow> ?H3 x_1 \<le> ?H4
[ "Transcendental.pi", "Transcendental.arccos", "Groups.one_class.one", "Groups.uminus_class.uminus" ]
[ "real", "real \\<Rightarrow> real", "'a", "'a \\<Rightarrow> 'a" ]
[ "definition pi :: real\n where \"pi = 2 * (THE x. 0 \\<le> x \\<and> x \\<le> 2 \\<and> cos x = 0)\"", "definition arccos :: \"real \\<Rightarrow> real\"\n where \"arccos y = (THE x. 0 \\<le> x \\<and> x \\<le> pi \\<and> cos x = y)\"", "class one =\n fixes one :: 'a (\"1\")", "class uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)" ]
template
###lemma - 1 \<le> ?y \<Longrightarrow> ?y \<le> 1 \<Longrightarrow> arccos ?y \<le> pi ###symbols Transcendental.pi :::: real Transcendental.arccos :::: real \<Rightarrow> real Groups.one_class.one :::: 'a Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a ###defs definition pi :: real where "pi = 2 * (THE x. 0 \<le> x \<and> x \<le> 2 \<and> cos x = 0)" definition arccos :: "real \<Rightarrow> real" where "arccos y = (THE x. 0 \<le> x \<and> x \<le> pi \<and> cos x = y)" class one = fixes one :: 'a ("1") class uminus = fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80)
###output \<lbrakk> ?H1 ?H2 \<le> x_1; x_1 \<le> ?H2\<rbrakk> \<Longrightarrow> ?H3 x_1 \<le> ?H4###end
HOLCF/IOA/CompoTraces
CompoTraces.subst_lemma1
lemma subst_lemma1: "f \<sqsubseteq> g x \<Longrightarrow> x = h x \<Longrightarrow> f \<sqsubseteq> g (h x)"
?f \<sqsubseteq> ?g ?x \<Longrightarrow> ?x = ?h ?x \<Longrightarrow> ?f \<sqsubseteq> ?g (?h ?x)
\<lbrakk> ?H1 x_1 (x_2 x_3); x_3 = x_4 x_3\<rbrakk> \<Longrightarrow> ?H1 x_1 (x_2 (x_4 x_3))
[ "Porder.below_class.below" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> bool" ]
[ "class below =\n fixes below :: \"'a \\<Rightarrow> 'a \\<Rightarrow> bool\"\nbegin" ]
template
###lemma ?f \<sqsubseteq> ?g ?x \<Longrightarrow> ?x = ?h ?x \<Longrightarrow> ?f \<sqsubseteq> ?g (?h ?x) ###symbols Porder.below_class.below :::: 'a \<Rightarrow> 'a \<Rightarrow> bool ###defs class below = fixes below :: "'a \<Rightarrow> 'a \<Rightarrow> bool" begin
###output \<lbrakk> ?H1 x_1 (x_2 x_3); x_3 = x_4 x_3\<rbrakk> \<Longrightarrow> ?H1 x_1 (x_2 (x_4 x_3))###end
Real_Asymp/Multiseries_Expansion_Bounds
Multiseries_Expansion_Bounds.abs_powr_nat_le
lemma abs_powr_nat_le: "abs (powr_nat x y) \<le> powr_nat (abs x) y"
\<bar>powr_nat ?x ?y\<bar> \<le> powr_nat \<bar> ?x\<bar> ?y
?H1 (?H2 x_1 x_2) \<le> ?H2 (?H1 x_1) x_2
[ "Multiseries_Expansion.powr_nat", "Groups.abs_class.abs" ]
[ "real \\<Rightarrow> real \\<Rightarrow> real", "'a \\<Rightarrow> 'a" ]
[ "definition powr_nat :: \"real \\<Rightarrow> real \\<Rightarrow> real\" where \n \"powr_nat x y = \n (if y = 0 then 1\n else if x < 0 then cos (pi * y) * (-x) powr y else x powr y)\"", "class abs =\n fixes abs :: \"'a \\<Rightarrow> 'a\" (\"\\<bar>_\\<bar>\")" ]
template
###lemma \<bar>powr_nat ?x ?y\<bar> \<le> powr_nat \<bar> ?x\<bar> ?y ###symbols Multiseries_Expansion.powr_nat :::: real \<Rightarrow> real \<Rightarrow> real Groups.abs_class.abs :::: 'a \<Rightarrow> 'a ###defs definition powr_nat :: "real \<Rightarrow> real \<Rightarrow> real" where "powr_nat x y = (if y = 0 then 1 else if x < 0 then cos (pi * y) * (-x) powr y else x powr y)" class abs = fixes abs :: "'a \<Rightarrow> 'a" ("\<bar>_\<bar>")
###output ?H1 (?H2 x_1 x_2) \<le> ?H2 (?H1 x_1) x_2###end
Imperative_HOL/Array
Array.noteq_sym
lemma noteq_sym: "a =!!= b \<Longrightarrow> b =!!= a" and unequal [simp]: "a \<noteq> a' \<longleftrightarrow> a =!!= a'"
?a =!!= ?b \<Longrightarrow> ?b =!!= ?a
?H1 x_1 x_2 \<Longrightarrow> ?H1 x_2 x_1
[ "Array.noteq" ]
[ "'a array \\<Rightarrow> 'b array \\<Rightarrow> bool" ]
[ "definition noteq :: \"'a::heap array \\<Rightarrow> 'b::heap array \\<Rightarrow> bool\" (infix \"=!!=\" 70) where\n \"r =!!= s \\<longleftrightarrow> TYPEREP('a) \\<noteq> TYPEREP('b) \\<or> addr_of_array r \\<noteq> addr_of_array s\"" ]
template
###lemma ?a =!!= ?b \<Longrightarrow> ?b =!!= ?a ###symbols Array.noteq :::: 'a array \<Rightarrow> 'b array \<Rightarrow> bool ###defs definition noteq :: "'a::heap array \<Rightarrow> 'b::heap array \<Rightarrow> bool" (infix "=!!=" 70) where "r =!!= s \<longleftrightarrow> TYPEREP('a) \<noteq> TYPEREP('b) \<or> addr_of_array r \<noteq> addr_of_array s"
###output ?H1 x_1 x_2 \<Longrightarrow> ?H1 x_2 x_1###end
Nominal/Examples/Class3
Class3.crename_NotL
lemma crename_NotL: assumes a: "R[a\<turnstile>c>b] = NotL <c>.N y" "c\<sharp>(R,a,b)" shows "\<exists>N'. (R = NotL <c>.N' y) \<and> N'[a\<turnstile>c>b] = N"
?R[ ?a\<turnstile>c> ?b] = NotL < ?c>. ?N ?y \<Longrightarrow> ?c \<sharp> (?R, ?a, ?b) \<Longrightarrow> \<exists>N'. ?R = NotL < ?c>.N' ?y \<and> N'[ ?a\<turnstile>c> ?b] = ?N
\<lbrakk> ?H1 x_1 x_2 x_3 = ?H2 x_4 x_5 x_6; ?H3 x_4 (x_1, x_2, x_3)\<rbrakk> \<Longrightarrow> \<exists>y_0. x_1 = ?H2 x_4 y_0 x_6 \<and> ?H1 y_0 x_2 x_3 = x_5
[ "Nominal.fresh", "Class1.trm.NotL", "Class1.crename" ]
[ "'a \\<Rightarrow> 'b \\<Rightarrow> bool", "coname \\<Rightarrow> trm \\<Rightarrow> name \\<Rightarrow> trm", "trm \\<Rightarrow> coname \\<Rightarrow> coname \\<Rightarrow> trm" ]
[ "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 ?R[ ?a\<turnstile>c> ?b] = NotL < ?c>. ?N ?y \<Longrightarrow> ?c \<sharp> (?R, ?a, ?b) \<Longrightarrow> \<exists>N'. ?R = NotL < ?c>.N' ?y \<and> N'[ ?a\<turnstile>c> ?b] = ?N ###symbols Nominal.fresh :::: 'a \<Rightarrow> 'b \<Rightarrow> bool Class1.trm.NotL :::: coname \<Rightarrow> trm \<Rightarrow> name \<Rightarrow> trm Class1.crename :::: trm \<Rightarrow> coname \<Rightarrow> coname \<Rightarrow> trm ###defs definition fresh :: "'x \<Rightarrow> 'a \<Rightarrow> bool" (\<open>_ \<sharp> _\<close> [80,80] 80) where "a \<sharp> x \<longleftrightarrow> a \<notin> supp x"
###output \<lbrakk> ?H1 x_1 x_2 x_3 = ?H2 x_4 x_5 x_6; ?H3 x_4 (x_1, x_2, x_3)\<rbrakk> \<Longrightarrow> \<exists>y_0. x_1 = ?H2 x_4 y_0 x_6 \<and> ?H1 y_0 x_2 x_3 = x_5###end
Groups
Groups.algebra_simps(22)
null
(?a - ?b) * ?c = ?a * ?c - ?b * ?c
?H1 (?H2 x_1 x_2) x_3 = ?H2 (?H1 x_1 x_3) (?H1 x_2 x_3)
[ "Groups.minus_class.minus", "Groups.times_class.times" ]
[ "'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)" ]
template
###lemma (?a - ?b) * ?c = ?a * ?c - ?b * ?c ###symbols Groups.minus_class.minus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Groups.times_class.times :::: '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)
###output ?H1 (?H2 x_1 x_2) x_3 = ?H2 (?H1 x_1 x_3) (?H1 x_2 x_3)###end
Bit_Operations
Bit_Operations.and_int_code(1)
lemma and_int_code [code]: fixes i j :: int shows \<open>0 AND j = 0\<close> \<open>i AND 0 = 0\<close> \<open>Int.Pos n AND Int.Pos m = (case and_num n m of None \<Rightarrow> 0 | Some n' \<Rightarrow> Int.Pos n')\<close> \<open>Int.Neg n AND Int.Neg m = NOT (Num.sub n num.One OR Num.sub m num.One)\<close> \<open>Int.Pos n AND Int.Neg num.One = Int.Pos n\<close> \<open>Int.Pos n AND Int.Neg (num.Bit0 m) = Num.sub (or_not_num_neg (Num.BitM m) n) num.One\<close> \<open>Int.Pos n AND Int.Neg (num.Bit1 m) = Num.sub (or_not_num_neg (num.Bit0 m) n) num.One\<close> \<open>Int.Neg num.One AND Int.Pos m = Int.Pos m\<close> \<open>Int.Neg (num.Bit0 n) AND Int.Pos m = Num.sub (or_not_num_neg (Num.BitM n) m) num.One\<close> \<open>Int.Neg (num.Bit1 n) AND Int.Pos m = Num.sub (or_not_num_neg (num.Bit0 n) m) num.One\<close>
and 0 ?j = 0
?H1 ?H2 x_1 = ?H2
[ "Groups.zero_class.zero", "Bit_Operations.semiring_bit_operations_class.and" ]
[ "'a", "'a \\<Rightarrow> 'a \\<Rightarrow> 'a" ]
[ "class zero =\n fixes zero :: 'a (\"0\")", "class semiring_bit_operations = semiring_bits +\n fixes \"and\" :: \\<open>'a \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close> (infixr \\<open>AND\\<close> 64)\n and or :: \\<open>'a \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close> (infixr \\<open>OR\\<close> 59)\n and xor :: \\<open>'a \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close> (infixr \\<open>XOR\\<close> 59)\n and mask :: \\<open>nat \\<Rightarrow> 'a\\<close>\n and set_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and unset_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and flip_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and push_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and drop_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n and take_bit :: \\<open>nat \\<Rightarrow> 'a \\<Rightarrow> 'a\\<close>\n assumes and_rec: \\<open>a AND b = of_bool (odd a \\<and> odd b) + 2 * ((a div 2) AND (b div 2))\\<close>\n and or_rec: \\<open>a OR b = of_bool (odd a \\<or> odd b) + 2 * ((a div 2) OR (b div 2))\\<close>\n and xor_rec: \\<open>a XOR b = of_bool (odd a \\<noteq> odd b) + 2 * ((a div 2) XOR (b div 2))\\<close>\n and mask_eq_exp_minus_1: \\<open>mask n = 2 ^ n - 1\\<close>\n and set_bit_eq_or: \\<open>set_bit n a = a OR push_bit n 1\\<close>\n and unset_bit_eq_or_xor: \\<open>unset_bit n a = (a OR push_bit n 1) XOR push_bit n 1\\<close>\n and flip_bit_eq_xor: \\<open>flip_bit n a = a XOR push_bit n 1\\<close>\n and push_bit_eq_mult: \\<open>push_bit n a = a * 2 ^ n\\<close>\n and drop_bit_eq_div: \\<open>drop_bit n a = a div 2 ^ n\\<close>\n and take_bit_eq_mod: \\<open>take_bit n a = a mod 2 ^ n\\<close>\nbegin" ]
template
###lemma and 0 ?j = 0 ###symbols Groups.zero_class.zero :::: 'a Bit_Operations.semiring_bit_operations_class.and :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a ###defs class zero = fixes zero :: 'a ("0") class semiring_bit_operations = semiring_bits + fixes "and" :: \<open>'a \<Rightarrow> 'a \<Rightarrow> 'a\<close> (infixr \<open>AND\<close> 64) and or :: \<open>'a \<Rightarrow> 'a \<Rightarrow> 'a\<close> (infixr \<open>OR\<close> 59) and xor :: \<open>'a \<Rightarrow> 'a \<Rightarrow> 'a\<close> (infixr \<open>XOR\<close> 59) and mask :: \<open>nat \<Rightarrow> 'a\<close> and set_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close> and unset_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close> and flip_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close> and push_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close> and drop_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close> and take_bit :: \<open>nat \<Rightarrow> 'a \<Rightarrow> 'a\<close> assumes and_rec: \<open>a AND b = of_bool (odd a \<and> odd b) + 2 * ((a div 2) AND (b div 2))\<close> and or_rec: \<open>a OR b = of_bool (odd a \<or> odd b) + 2 * ((a div 2) OR (b div 2))\<close> and xor_rec: \<open>a XOR b = of_bool (odd a \<noteq> odd b) + 2 * ((a div 2) XOR (b div 2))\<close> and mask_eq_exp_minus_1: \<open>mask n = 2 ^ n - 1\<close> and set_bit_eq_or: \<open>set_bit n a = a OR push_bit n 1\<close> and unset_bit_eq_or_xor: \<open>unset_bit n a = (a OR push_bit n 1) XOR push_bit n 1\<close> and flip_bit_eq_xor: \<open>flip_bit n a = a XOR push_bit n 1\<close> and push_bit_eq_mult: \<open>push_bit n a = a * 2 ^ n\<close> and drop_bit_eq_div: \<open>drop_bit n a = a div 2 ^ n\<close> and take_bit_eq_mod: \<open>take_bit n a = a mod 2 ^ n\<close> begin
###output ?H1 ?H2 x_1 = ?H2###end
Set
Set.emptyE
lemma emptyE [elim!]: "a \<in> {} \<Longrightarrow> P"
?a \<in> {} \<Longrightarrow> ?P
x_1 \<in> ?H1 \<Longrightarrow> x_2
[ "Set.empty" ]
[ "'a set" ]
[ "abbreviation empty :: \"'a set\" (\"{}\")\n where \"{} \\<equiv> bot\"" ]
template
###lemma ?a \<in> {} \<Longrightarrow> ?P ###symbols Set.empty :::: 'a set ###defs abbreviation empty :: "'a set" ("{}") where "{} \<equiv> bot"
###output x_1 \<in> ?H1 \<Longrightarrow> x_2###end
Analysis/Extended_Real_Limits
Extended_Real_Limits.ereal_limsup_add_mono
lemma ereal_limsup_add_mono: fixes u v::"nat \<Rightarrow> ereal" shows "limsup (\<lambda>n. u n + v n) \<le> limsup u + limsup v"
limsup (\<lambda>n. ?u n + ?v n) \<le> limsup ?u + limsup ?v
?H1 (\<lambda>y_0. ?H2 (x_1 y_0) (x_2 y_0)) \<le> ?H2 (?H1 x_1) (?H1 x_2)
[ "Groups.plus_class.plus", "Liminf_Limsup.limsup" ]
[ "'a \\<Rightarrow> 'a \\<Rightarrow> 'a", "(nat \\<Rightarrow> 'a) \\<Rightarrow> 'a" ]
[ "class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \"+\" 65)", "abbreviation \"limsup \\<equiv> Limsup sequentially\"" ]
template
###lemma limsup (\<lambda>n. ?u n + ?v n) \<le> limsup ?u + limsup ?v ###symbols Groups.plus_class.plus :::: 'a \<Rightarrow> 'a \<Rightarrow> 'a Liminf_Limsup.limsup :::: (nat \<Rightarrow> 'a) \<Rightarrow> 'a ###defs class plus = fixes plus :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" (infixl "+" 65) abbreviation "limsup \<equiv> Limsup sequentially"
###output ?H1 (\<lambda>y_0. ?H2 (x_1 y_0) (x_2 y_0)) \<le> ?H2 (?H1 x_1) (?H1 x_2)###end
Analysis/Starlike
Starlike.aff_dim_halfspace_ge
lemma aff_dim_halfspace_ge: fixes a :: "'a::euclidean_space" shows "aff_dim {x. a \<bullet> x \<ge> r} = (if a = 0 \<and> r > 0 then -1 else DIM('a))"
aff_dim {x. ?r \<le> ?a \<bullet> x} = (if ?a = (0:: ?'a) \<and> 0 < ?r then - 1 else int DIM(?'a))
?H1 (?H2 (\<lambda>y_0. x_1 \<le> ?H3 x_2 y_0)) = (if x_2 = ?H4 \<and> ?H4 < x_1 then ?H5 ?H6 else ?H7 (?H8 ?H9))
[ "Euclidean_Space.euclidean_space_class.Basis", "Finite_Set.card", "Int.int", "Groups.one_class.one", "Groups.uminus_class.uminus", "Groups.zero_class.zero", "Inner_Product.real_inner_class.inner", "Set.Collect", "Affine.aff_dim" ]
[ "'a set", "'a set \\<Rightarrow> nat", "nat \\<Rightarrow> int", "'a", "'a \\<Rightarrow> 'a", "'a", "'a \\<Rightarrow> 'a \\<Rightarrow> real", "('a \\<Rightarrow> bool) \\<Rightarrow> 'a set", "'a set \\<Rightarrow> int" ]
[ "class euclidean_space = real_inner +\n fixes Basis :: \"'a set\"\n assumes nonempty_Basis [simp]: \"Basis \\<noteq> {}\"\n assumes finite_Basis [simp]: \"finite Basis\"\n assumes inner_Basis:\n \"\\<lbrakk>u \\<in> Basis; v \\<in> Basis\\<rbrakk> \\<Longrightarrow> inner u v = (if u = v then 1 else 0)\"\n assumes euclidean_all_zero_iff:\n \"(\\<forall>u\\<in>Basis. inner x u = 0) \\<longleftrightarrow> (x = 0)\"", "abbreviation int :: \"nat \\<Rightarrow> int\"\n where \"int \\<equiv> of_nat\"", "class one =\n fixes one :: 'a (\"1\")", "class uminus =\n fixes uminus :: \"'a \\<Rightarrow> 'a\" (\"- _\" [81] 80)", "class zero =\n fixes zero :: 'a (\"0\")", "class real_inner = real_vector + sgn_div_norm + dist_norm + uniformity_dist + open_uniformity +\n fixes inner :: \"'a \\<Rightarrow> 'a \\<Rightarrow> real\"\n assumes inner_commute: \"inner x y = inner y x\"\n and inner_add_left: \"inner (x + y) z = inner x z + inner y z\"\n and inner_scaleR_left [simp]: \"inner (scaleR r x) y = r * (inner x y)\"\n and inner_ge_zero [simp]: \"0 \\<le> inner x x\"\n and inner_eq_zero_iff [simp]: \"inner x x = 0 \\<longleftrightarrow> x = 0\"\n and norm_eq_sqrt_inner: \"norm x = sqrt (inner x x)\"\nbegin" ]
template
###lemma aff_dim {x. ?r \<le> ?a \<bullet> x} = (if ?a = (0:: ?'a) \<and> 0 < ?r then - 1 else int DIM(?'a)) ###symbols Euclidean_Space.euclidean_space_class.Basis :::: 'a set Finite_Set.card :::: 'a set \<Rightarrow> nat Int.int :::: nat \<Rightarrow> int Groups.one_class.one :::: 'a Groups.uminus_class.uminus :::: 'a \<Rightarrow> 'a Groups.zero_class.zero :::: 'a Inner_Product.real_inner_class.inner :::: 'a \<Rightarrow> 'a \<Rightarrow> real Set.Collect :::: ('a \<Rightarrow> bool) \<Rightarrow> 'a set Affine.aff_dim :::: 'a set \<Rightarrow> int ###defs class euclidean_space = real_inner + fixes Basis :: "'a set" assumes nonempty_Basis [simp]: "Basis \<noteq> {}" assumes finite_Basis [simp]: "finite Basis" assumes inner_Basis: "\<lbrakk>u \<in> Basis; v \<in> Basis\<rbrakk> \<Longrightarrow> inner u v = (if u = v then 1 else 0)" assumes euclidean_all_zero_iff: "(\<forall>u\<in>Basis. inner x u = 0) \<longleftrightarrow> (x = 0)" abbreviation int :: "nat \<Rightarrow> int" where "int \<equiv> of_nat" class one = fixes one :: 'a ("1") class uminus = fixes uminus :: "'a \<Rightarrow> 'a" ("- _" [81] 80) class zero = fixes zero :: 'a ("0") class real_inner = real_vector + sgn_div_norm + dist_norm + uniformity_dist + open_uniformity + fixes inner :: "'a \<Rightarrow> 'a \<Rightarrow> real" assumes inner_commute: "inner x y = inner y x" and inner_add_left: "inner (x + y) z = inner x z + inner y z" and inner_scaleR_left [simp]: "inner (scaleR r x) y = r * (inner x y)" and inner_ge_zero [simp]: "0 \<le> inner x x" and inner_eq_zero_iff [simp]: "inner x x = 0 \<longleftrightarrow> x = 0" and norm_eq_sqrt_inner: "norm x = sqrt (inner x x)" begin
###output ?H1 (?H2 (\<lambda>y_0. x_1 \<le> ?H3 x_2 y_0)) = (if x_2 = ?H4 \<and> ?H4 < x_1 then ?H5 ?H6 else ?H7 (?H8 ?H9))###end
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
8