lemma assumes"x \ (3::int)" and "y = x + 4" shows"y - x > 0" using assms by (smt (verit))
lemma"let x = (2 :: int) in x + x \ 5" by (smt (verit))
lemma fixes x :: int assumes"3 * x + 7 * a < 4"and"3 < 2 * x" shows"a < 0" using assms by (smt (verit))
lemma"(0 \ y + -1 * x \ \ 0 \ x \ 0 \ (x::int)) = (\ False)" by (smt (verit))
lemma"
(n < m \<and> m < n') \<or> (n < m \<and> m = n') \<or> (n < n' \<and> n' < m) \<or>
(n = n' \ n' < m) \ (n = m \ m < n') \
(n' < m \ m < n) \ (n' < m \ m = n) \
(n' < n \ n < m) \ (n' = n \ n < m) \ (n' = m \ m < n) \
(m < n \<and> n < n') \<or> (m < n \<and> n' = n) \<or> (m < n' \<and> n' < n) \<or>
(m = n \<and> n < n') \<or> (m = n' \<and> n' < n) \<or>
(n' = m \ m = (n::int))" by (smt (verit))
text\<open>
The following example was taken from HOL/ex/PresburgerEx.thy, where it says:
This following theorem proves that all solutions to the
recurrence relation $x_{i+2} = |x_{i+1}| - x_i$ are periodic with
period 9. The example was brought to our attention by John
Harrison. It does does not require Presburger arithmetic but merely
quantifier-free linear arithmetic and holds for the rationals as well.
Warning: it takes (in 2006) over 4.2 minutes!
There, it is proved by"arith". (smt (verit)) is able to prove this within a fraction
of one second. Withproof reconstruction, it takes about 13 seconds on a Core2
processor. \<close>
lemma"let P = 2 * x + 1 > x + (x::real) in P \ False \ P" by (smt (verit))
subsection \<open>Linear arithmetic with quantifiers\<close>
lemma"~ (\x::int. False)" by (smt (verit)) lemma"~ (\x::real. False)" by (smt (verit))
lemma"\x y::int. (x = 0 \ y = 1) \ x \ y" by (smt (verit)) lemma"\x y::int. x < y \ (2 * x + 1) < (2 * y)" by (smt (verit)) lemma"\x y::int. x + y > 2 \ x + y = 2 \ x + y < 2" by (smt (verit)) lemma"\x::int. if x > 0 then x + 1 > 0 else 1 > x" by (smt (verit)) lemma"(if (\x::int. x < 0 \ x > 0) then -1 else 3) > (0::int)" by (smt (verit)) lemma"\x::int. \x y. 0 < x \ 0 < y \ (0::int) < x + y" by (smt (verit)) lemma"\u::int. \(x::int) y::real. 0 < x \ 0 < y \ -1 < x" by (smt (verit)) lemma"\(a::int) b::int. 0 < b \ b < 1" by (smt (verit))
subsection \<open>Linear arithmetic for natural numbers\<close>
declare [[smt_nat_as_int]]
lemma"2 * (x::nat) \ 1" by (smt (verit))
lemma"a < 3 \ (7::nat) > 2 * a" by (smt (verit))
lemma"let x = (1::nat) + y in x - y > 0 * x"by (smt (verit))
lemma "let x = (1::nat) + y in let P = (if x > 0 then True else False) in
False \<or> P = (x - 1 = y) \<or> (\<not>P \<longrightarrow> False)" by (smt (verit))
lemma"int (nat \x::int\) = \x\" by (smt (verit) int_nat_eq)
definition prime_nat :: "nat \ bool" where "prime_nat p = (1 < p \ (\m. m dvd p --> m = 1 \ m = p))"
lemma"prime_nat (4*m + 1) \ m \ (1::nat)" by (smt (verit) prime_nat_def)
lemma"2 * (x::nat) \ 1" by (smt (verit))
lemma\<open>2*(x :: int) \<noteq> 1\<close> by (smt (verit))
declare [[smt_nat_as_int = false]]
section \<open>Pairs\<close>
lemma"fst (x, y) = a \ x = a" using fst_conv by (smt (verit))
section \<open>Higher-order problems and recursion\<close>
lemma"i \ i1 \ i \ i2 \ (f (i1 := v1, i2 := v2)) i = f i" using fun_upd_same fun_upd_apply by (smt (verit))
lemma"(f g (x::'a::type) = (g x \ True)) \ (f g x = True) \ (g x = True)" by (smt (verit))
lemma"id x = x \ id True = True" by (smt (verit) id_def)
lemma"i \ i1 \ i \ i2 \ ((f (i1 := v1)) (i2 := v2)) i = f i" using fun_upd_same fun_upd_apply by (smt (verit))
lemma "f (\x. g x) \ True" "f (\x. g x) \ True" by (smt (verit))+
lemma True using let_rsp by (smt (verit)) lemma"le = (\) \ le (3::int) 42" by (smt (verit)) lemma"map (\i::int. i + 1) [0, 1] = [1, 2]" by (smt (verit) list.map) lemma"(\x. P x) \ \ All P" by (smt (verit))
fun dec_10 :: "int \ int" where "dec_10 n = (if n < 10 then n else dec_10 (n - 10))"
lemma "eq_set (List.coset xs) (set ys) = rhs" if"\ys. subset' (List.coset xs) (set ys) = (let n = card (UNIV::'a set) in 0 < n \ card (set (xs @ ys)) = n)" and"\uu A. (uu::'a) \ - A \ uu \ A" and"\uu. card (set (uu::'a list)) = length (remdups uu)" and"\uu. finite (set (uu::'a list))" and"\uu. (uu::'a) \ UNIV" and"(UNIV::'a set) \ {}" and"\c A B P. \(c::'a) \ A \ B; c \ A \ P; c \ B \ P\ \ P" and"\a b. (a::nat) + b = b + a" and"\a b. ((a::nat) = a + b) = (b = 0)" and"card' (set xs) = length (remdups xs)" and"card' = (card :: 'a set \ nat)" and"\A B. \finite (A::'a set); finite B\ \ card A + card B = card (A \ B) + card (A \ B)" and"\A. (card (A::'a set) = 0) = (A = {} \ infinite A)" and"\A. \finite (UNIV::'a set); card (A::'a set) = card (UNIV::'a set)\ \ A = UNIV" and"\xs. - List.coset (xs::'a list) = set xs" and"\xs. - set (xs::'a list) = List.coset xs" and"\A B. (A \ B = {}) = (\x. (x::'a) \ A \ x \ B)" and"eq_set = (=)" and"\A. finite (A::'a set) \ finite (- A) = finite (UNIV::'a set)" and"rhs \ let n = card (UNIV::'a set) in if n = 0 then False else let xs' = remdups xs; ys' = remdups ys in length xs' + length ys' = n \ (\x\set xs'. x \ set ys') \ (\y\set ys'. y \ set xs')" and"\xs ys. set ((xs::'a list) @ ys) = set xs \ set ys" and"\A B. ((A::'a set) = B) = (A \ B \ B \ A)" and"\xs. set (remdups (xs::'a list)) = set xs" and"subset' = (\)" and"\A B. (\x. (x::'a) \ A \ x \ B) \ A \ B" and"\A B. \(A::'a set) \ B; B \ A\ \ A = B" and"\A ys. (A \ List.coset ys) = (\y\set ys. (y::'a) \ A)" using that by (smt (verit, default))
notepad begin have"line_integral F {i, j} g = line_integral F {i} g + line_integral F {j} g" if\<open>(k, g) \<in> one_chain_typeI\<close> \<open>\<And>A b B. ({} = (A::(real \<times> real) set) \<inter> insert (b::real \<times> real) (B::(real \<times> real) set)) = (b \<notin> A \<and> {} = A \<inter> B)\<close> \<open>finite ({} :: (real \<times> real) set)\<close> \<open>\<And>a A. finite (A::(real \<times> real) set) \<Longrightarrow> finite (insert (a::real \<times> real) A)\<close> \<open>(i::real \<times> real) = (1::real, 0::real)\<close> \<open> \<And>a A. (a::real \<times> real) \<in> (A::(real \<times> real) set) \<Longrightarrow> insert a A = A\<close> \<open>j = (0, 1)\<close> \<open>\<And>x. (x::(real \<times> real) set) \<inter> {} = {}\<close> \<open>\<And>y x A. insert (x::real \<times> real) (insert (y::real \<times> real) (A::(real \<times> real) set)) = insert y (insert x A)\<close> \<open>\<And>a A. insert (a::real \<times> real) (A::(real \<times> real) set) = {a} \<union> A\<close> \<open>\<And>F u basis2 basis1 \<gamma>. finite (u :: (real \<times> real) set) \<Longrightarrow>
line_integral_exists F basis1 \<gamma> \<Longrightarrow>
line_integral_exists F basis2 \<gamma> \<Longrightarrow>
basis1 \<union> basis2 = u \<Longrightarrow>
basis1 \<inter> basis2 = {} \<Longrightarrow>
line_integral F u \<gamma> = line_integral F basis1 \<gamma> + line_integral F basis2 \<gamma>\<close> \<open>one_chain_line_integral F {i} one_chain_typeI =
one_chain_line_integral F {i} one_chain_typeII \<and>
(\<forall>(k, \<gamma>)\<in>one_chain_typeI. line_integral_exists F {i} \<gamma>) \<and>
(\<forall>(k, \<gamma>)\<in>one_chain_typeII. line_integral_exists F {i} \<gamma>)\<close> \<open> one_chain_line_integral (F::real \<times> real \<Rightarrow> real \<times> real) {j::real \<times> real}
(one_chain_typeII::(int \<times> (real \<Rightarrow> real \<times> real)) set) =
one_chain_line_integral F {j} (one_chain_typeI::(int \<times> (real \<Rightarrow> real \<times> real)) set) \<and>
(\<forall>(k::int, \<gamma>::real \<Rightarrow> real \<times> real)\<in>one_chain_typeII. line_integral_exists F {j} \<gamma>) \<and>
(\<forall>(k::int, \<gamma>::real \<Rightarrow> real \<times> real)\<in>one_chain_typeI. line_integral_exists F {j} \<gamma>)\<close> for F i j g one_chain_typeI one_chain_typeII and
line_integral :: \<open>(real \<times> real \<Rightarrow> real \<times> real) \<Rightarrow> (real \<times> real) set \<Rightarrow> (real \<Rightarrow> real \<times> real) \<Rightarrow> real\<close> and
line_integral_exists :: \<open>(real \<times> real \<Rightarrow> real \<times> real) \<Rightarrow> (real \<times> real) set \<Rightarrow> (real \<Rightarrow> real \<times> real) \<Rightarrow> bool\<close> and
one_chain_line_integral :: \<open>(real \<times> real \<Rightarrow> real \<times> real) \<Rightarrow> (real \<times> real) set \<Rightarrow> (int \<times> (real \<Rightarrow> real \<times> real)) set \<Rightarrow> real\<close> and
k using prod.case_eq_if singleton_inject snd_conv
that by (smt (verit)) end
lemma fixes x y z :: real assumes\<open>x + 2 * y > 0\<close> and \<open>x - 2 * y > 0\<close> and \<open>x < 0\<close> shows False using assms by (smt (verit))
(*test for arith reconstruction*) lemma fixes d :: real assumes\<open>0 < d\<close> \<open>diamond_y \<equiv> \<lambda>t. d / 2 - \<bar>t\<bar>\<close> \<open>\<And>a b c :: real. (a / c < b / c) =
((0 < c \<longrightarrow> a < b) \<and> (c < 0 \<longrightarrow> b < a) \<and> c \<noteq> 0)\<close> \<open>\<And>a b c :: real. (a / c < b / c) =
((0 < c \<longrightarrow> a < b) \<and> (c < 0 \<longrightarrow> b < a) \<and> c \<noteq> 0)\<close> \<open>\<And>a b :: real. - a / b = - (a / b)\<close> \<open>\<And>a b :: real. - a * b = - (a * b)\<close> \<open>\<And>(x1 :: real) x2 y1 y2 :: real. ((x1, x2) = (y1, y2)) = (x1 = y1 \<and> x2 = y2)\<close> shows\<open>(\<lambda>y. (d / 2, (2 * y - 1) * diamond_y (d / 2))) \<noteq>
(\<lambda>x. ((x - 1 / 2) * d, - diamond_y ((x - 1 / 2) * d))) \<Longrightarrow>
(\<lambda>y. (- (d / 2), (2 * y - 1) * diamond_y (- (d / 2)))) =
(\<lambda>x. ((x - 1 / 2) * d, diamond_y ((x - 1 / 2) * d))) \<Longrightarrow>
False\<close> using assms by (smt (verit,del_insts))
lemma fixes d :: real assumes\<open>0 < d\<close> \<open>diamond_y \<equiv> \<lambda>t. d / 2 - \<bar>t\<bar>\<close> \<open>\<And>a b c :: real. (a / c < b / c) =
((0 < c \<longrightarrow> a < b) \<and> (c < 0 \<longrightarrow> b < a) \<and> c \<noteq> 0)\<close> \<open>\<And>a b c :: real. (a / c < b / c) =
((0 < c \<longrightarrow> a < b) \<and> (c < 0 \<longrightarrow> b < a) \<and> c \<noteq> 0)\<close> \<open>\<And>a b :: real. - a / b = - (a / b)\<close> \<open>\<And>a b :: real. - a * b = - (a * b)\<close> \<open>\<And>(x1 :: real) x2 y1 y2 :: real. ((x1, x2) = (y1, y2)) = (x1 = y1 \<and> x2 = y2)\<close> shows\<open>(\<lambda>y. (d / 2, (2 * y - 1) * diamond_y (d / 2))) \<noteq>
(\<lambda>x. ((x - 1 / 2) * d, - diamond_y ((x - 1 / 2) * d))) \<Longrightarrow>
(\<lambda>y. (- (d / 2), (2 * y - 1) * diamond_y (- (d / 2)))) =
(\<lambda>x. ((x - 1 / 2) * d, diamond_y ((x - 1 / 2) * d))) \<Longrightarrow>
False\<close> using assms by (smt (verit,ccfv_threshold))
(*qnt_rm_unused example*) lemma assumes\<open>\<forall>z y x. P z y\<close> \<open>P z y \<Longrightarrow> False\<close> shows False using assms by (smt (verit))
lemma "max (x::int) y \ y"
supply [[smt_trace]] by (smt (verit))+
context begin abbreviation finite' :: "'a set \<Rightarrow> bool" where"finite' A \ finite A \ A \ {}"
lemma fixes f :: "'b \ 'c :: linorder" assumes \<open>\<forall>(S::'b::type set) f::'b::type \<Rightarrow> 'c::linorder. finite' S \<longrightarrow> arg_min_on f S \<in> S\<close> \<open>\<forall>(S::'a::type set) f::'a::type \<Rightarrow> 'c::linorder. finite' S \<longrightarrow> arg_min_on f S \<in> S\<close> \<open>\<forall>(S::'b::type set) (y::'b::type) f::'b::type \<Rightarrow> 'c::linorder.
finite S \<and> S \<noteq> {} \<and> y \<in> S \<longrightarrow> f (arg_min_on f S) \<le> f y\<close> \<open>\<forall>(S::'a::type set) (y::'a::type) f::'a::type \<Rightarrow> 'c::linorder.
finite S \<and> S \<noteq> {} \<and> y \<in> S \<longrightarrow> f (arg_min_on f S) \<le> f y\<close> \<open>\<forall>(f::'b::type \<Rightarrow> 'c::linorder) (g::'a::type \<Rightarrow> 'b::type) x::'a::type. (f \<circ> g) x = f (g x)\<close> \<open>\<forall>(F::'b::type set) h::'b::type \<Rightarrow> 'a::type. finite F \<longrightarrow> finite (h ` F)\<close> \<open>\<forall>(F::'b::type set) h::'b::type \<Rightarrow> 'b::type. finite F \<longrightarrow> finite (h ` F)\<close> \<open>\<forall>(F::'a::type set) h::'a::type \<Rightarrow> 'b::type. finite F \<longrightarrow> finite (h ` F)\<close> \<open>\<forall>(F::'a::type set) h::'a::type \<Rightarrow> 'a::type. finite F \<longrightarrow> finite (h ` F)\<close> \<open>\<forall>(b::'a::type) (f::'b::type \<Rightarrow> 'a::type) A::'b::type set.
b \<in> f ` A \<and> (\<forall>x::'b::type. b = f x \<and> x \<in> A \<longrightarrow> False) \<longrightarrow> False\<close> \<open>\<forall>(b::'b::type) (f::'b::type \<Rightarrow> 'b::type) A::'b::type set.
b \<in> f ` A \<and> (\<forall>x::'b::type. b = f x \<and> x \<in> A \<longrightarrow> False) \<longrightarrow> False\<close> \<open>\<forall>(b::'b::type) (f::'a::type \<Rightarrow> 'b::type) A::'a::type set.
b \<in> f ` A \<and> (\<forall>x::'a::type. b = f x \<and> x \<in> A \<longrightarrow> False) \<longrightarrow> False\<close> \<open>\<forall>(b::'a::type) (f::'a::type \<Rightarrow> 'a::type) A::'a::type set.
b \<in> f ` A \<and> (\<forall>x::'a::type. b = f x \<and> x \<in> A \<longrightarrow> False) \<longrightarrow> False\<close> \<open>\<forall>(b::'a::type) (f::'b::type \<Rightarrow> 'a::type) (x::'b::type) A::'b::type set. b = f x \<and> x \<in> A \<longrightarrow> b \<in> f ` A \<close> \<open>\<forall>(b::'b::type) (f::'b::type \<Rightarrow> 'b::type) (x::'b::type) A::'b::type set. b = f x \<and> x \<in> A \<longrightarrow> b \<in> f ` A \<close> \<open>\<forall>(b::'b::type) (f::'a::type \<Rightarrow> 'b::type) (x::'a::type) A::'a::type set. b = f x \<and> x \<in> A \<longrightarrow> b \<in> f ` A \<close> \<open>\<forall>(b::'a::type) (f::'a::type \<Rightarrow> 'a::type) (x::'a::type) A::'a::type set. b = f x \<and> x \<in> A \<longrightarrow> b \<in> f ` A \<close> \<open>\<forall>(f::'b::type \<Rightarrow> 'a::type) A::'b::type set. (f ` A = {}) = (A = {}) \<close> \<open>\<forall>(f::'b::type \<Rightarrow> 'b::type) A::'b::type set. (f ` A = {}) = (A = {}) \<close> \<open>\<forall>(f::'a::type \<Rightarrow> 'b::type) A::'a::type set. (f ` A = {}) = (A = {}) \<close> \<open>\<forall>(f::'a::type \<Rightarrow> 'a::type) A::'a::type set. (f ` A = {}) = (A = {}) \<close> \<open>\<forall>(f::'b::type \<Rightarrow> 'c::linorder) (A::'b::type set) (x::'b::type) y::'b::type.
inj_on f A \<and> f x = f y \<and> x \<in> A \<and> y \<in> A \<longrightarrow> x = y\<close> \<open>\<forall>(x::'c::linorder) y::'c::linorder. (x < y) = (x \<le> y \<and> x \<noteq> y)\<close> \<open>inj_on (f::'b::type \<Rightarrow> 'c::linorder) ((g::'a::type \<Rightarrow> 'b::type) ` (B::'a::type set))\<close> \<open>finite (B::'a::type set)\<close> \<open>(B::'a::type set) \<noteq> {}\<close> \<open>arg_min_on ((f::'b::type \<Rightarrow> 'c::linorder) \<circ> (g::'a::type \<Rightarrow> 'b::type)) (B::'a::type set) \<in> B\<close> \<open>\<nexists>x::'a::type.
x \<in> (B::'a::type set) \<and>
((f::'b::type \ 'c::linorder) \ (g::'a::type \ 'b::type)) x < (f \ g) (arg_min_on (f \ g) B)\ \<open>\<forall>(f::'b::type \<Rightarrow> 'c::linorder) (P::'b::type \<Rightarrow> bool) a::'b::type.
inj_on f (Collect P) \<and> P a \<and> (\<forall>y::'b::type. P y \<longrightarrow> f a \<le> f y) \<longrightarrow> arg_min f P = a\<close> \<open>\<forall>(S::'b::type set) f::'b::type \<Rightarrow> 'c::linorder. finite' S \<longrightarrow> arg_min_on f S \<in> S\<close> \<open>\<forall>(S::'a::type set) f::'a::type \<Rightarrow> 'c::linorder. finite' S \<longrightarrow> arg_min_on f S \<in> S\<close> \<open>\<forall>(S::'b::type set) (y::'b::type) f::'b::type \<Rightarrow> 'c::linorder.
finite S \<and> S \<noteq> {} \<and> y \<in> S \<longrightarrow> f (arg_min_on f S) \<le> f y\<close> \<open>\<forall>(S::'a::type set) (y::'a::type) f::'a::type \<Rightarrow> 'c::linorder.
finite S \<and> S \<noteq> {} \<and> y \<in> S \<longrightarrow> f (arg_min_on f S) \<le> f y\<close> \<open>\<forall>(f::'b::type \<Rightarrow> 'c::linorder) (g::'a::type \<Rightarrow> 'b::type) x::'a::type. (f \<circ> g) x = f (g x)\<close> \<open>\<forall>(F::'b::type set) h::'b::type \<Rightarrow> 'a::type. finite F \<longrightarrow> finite (h ` F)\<close> \<open>\<forall>(F::'b::type set) h::'b::type \<Rightarrow> 'b::type. finite F \<longrightarrow> finite (h ` F)\<close> \<open>\<forall>(F::'a::type set) h::'a::type \<Rightarrow> 'b::type. finite F \<longrightarrow> finite (h ` F)\<close> \<open>\<forall>(F::'a::type set) h::'a::type \<Rightarrow> 'a::type. finite F \<longrightarrow> finite (h ` F)\<close> \<open>\<forall>(b::'a::type) (f::'b::type \<Rightarrow> 'a::type) A::'b::type set.
b \<in> f ` A \<and> (\<forall>x::'b::type. b = f x \<and> x \<in> A \<longrightarrow> False) \<longrightarrow> False\<close> \<open>\<forall>(b::'b::type) (f::'b::type \<Rightarrow> 'b::type) A::'b::type set.
b \<in> f ` A \<and> (\<forall>x::'b::type. b = f x \<and> x \<in> A \<longrightarrow> False) \<longrightarrow> False\<close> \<open>\<forall>(b::'b::type) (f::'a::type \<Rightarrow> 'b::type) A::'a::type set.
b \<in> f ` A \<and> (\<forall>x::'a::type. b = f x \<and> x \<in> A \<longrightarrow> False) \<longrightarrow> False\<close> \<open>\<forall>(b::'a::type) (f::'a::type \<Rightarrow> 'a::type) A::'a::type set.
b \<in> f ` A \<and> (\<forall>x::'a::type. b = f x \<and> x \<in> A \<longrightarrow> False) \<longrightarrow> False\<close> \<open>\<forall>(b::'a::type) (f::'b::type \<Rightarrow> 'a::type) (x::'b::type) A::'b::type set. b = f x \<and> x \<in> A \<longrightarrow> b \<in> f ` A \<close> \<open>\<forall>(b::'b::type) (f::'b::type \<Rightarrow> 'b::type) (x::'b::type) A::'b::type set. b = f x \<and> x \<in> A \<longrightarrow> b \<in> f ` A \<close> \<open>\<forall>(b::'b::type) (f::'a::type \<Rightarrow> 'b::type) (x::'a::type) A::'a::type set. b = f x \<and> x \<in> A \<longrightarrow> b \<in> f ` A \<close> \<open>\<forall>(b::'a::type) (f::'a::type \<Rightarrow> 'a::type) (x::'a::type) A::'a::type set. b = f x \<and> x \<in> A \<longrightarrow> b \<in> f ` A \<close> \<open>\<forall>(f::'b::type \<Rightarrow> 'a::type) A::'b::type set. (f ` A = {}) = (A = {}) \<close> \<open>\<forall>(f::'b::type \<Rightarrow> 'b::type) A::'b::type set. (f ` A = {}) = (A = {}) \<close> \<open>\<forall>(f::'a::type \<Rightarrow> 'b::type) A::'a::type set. (f ` A = {}) = (A = {}) \<close> \<open>\<forall>(f::'a::type \<Rightarrow> 'a::type) A::'a::type set. (f ` A = {}) = (A = {})\<close> \<open>\<forall>(f::'b::type \<Rightarrow> 'c::linorder) (A::'b::type set) (x::'b::type) y::'b::type.
inj_on f A \<and> f x = f y \<and> x \<in> A \<and> y \<in> A \<longrightarrow> x = y\<close> \<open>\<forall>(x::'c::linorder) y::'c::linorder. (x < y) = (x \<le> y \<and> x \<noteq> y)\<close> \<open>arg_min_on (f::'b::type \<Rightarrow> 'c::linorder) ((g::'a::type \<Rightarrow> 'b::type) ` (B::'a::type set)) \<noteq>
g (arg_min_on (f \<circ> g) B) \<close> shows False using assms by (smt (verit)) end
experiment begin
private datatype abort =
Rtype_error
| Rtimeout_error
private datatype ('a) error_result =
Rraise " 'a "\<comment> \<open>\<open> Should only be a value of type exn \<close>\<close>
| Rabort " abort "
private datatype( 'a, 'b) result =
Rval " 'a "
| Rerr " ('b) error_result "
lemma fixes clock :: \<open>'astate \<Rightarrow> nat\<close> and
fun_evaluate_match :: \<open>'astate \<Rightarrow> 'vsemv_env \<Rightarrow> _ \<Rightarrow> ('pat \<times> 'exp0) list \<Rightarrow> _ \<Rightarrow> 'astate*((('v)list),('v))result\ assumes "fix_clock (st::'astate) (fun_evaluate st (env::'vsemv_env) [e::'exp0]) =
(st'::'astate, r::('v list, 'v) result)" "clock (fst (fun_evaluate (st::'astate) (env::'vsemv_env) [e::'exp0])) \ clock st" "\(b::nat) (a::nat) c::nat. b \ a \ c \ b \ c \ a" "\(a::'astate) p::'astate \ ('v list, 'v) result. (a = fst p) = (\b::('v list, 'v) result. p = (a, b))" "\y::'v error_result. (\x1::'v. y = Rraise x1 \ False) \ (\x2::abort. y = Rabort x2 \ False) \ False" "\(f1::'v \ 'astate \ ('v list, 'v) result) (f2::abort \ 'astate \ ('v list, 'v) result) x1::'v.
(case Rraise x1 of Rraise (x::'v) \ f1 x | Rabort (x::abort) \ f2 x) = f1 x1" "\(f1::'v \ 'astate \ ('v list, 'v) result) (f2::abort \ 'astate \ ('v list, 'v) result) x2::abort.
(case Rabort x2 of Rraise (x::'v) \ f1 x | Rabort (x::abort) \ f2 x) = f2 x2" "\(s1::'astate) (s2::'astate) (x::('v list, 'v) result) s::'astate.
fix_clock s1 (s2, x) = (s, x) \<longrightarrow> clock s \<le> clock s2" "\(s::'astate) (s'::'astate) res::('v list, 'v) result.
fix_clock s (s', res) =
(update_clock (\<lambda>_::nat. if clock s' \<le> clock s then clock s' else clock s) s', res)" "\(x2::'v error_result) x1::'v.
(r::('v list, 'v) result) = Rerr x2 \<and> x2 = Rraise x1 \<longrightarrow>
clock (fst (fun_evaluate_match (st'::'astate) (env::'vsemv_env) x1 (pes::('pat \<times> 'exp0) list) x1)) \<le> clock st'" shows"((r::('v list, 'v) result) = Rerr (x2::'v error_result) \
clock
(fst (case x2 of
Rraise (v2::'v) \
fun_evaluate_match (st'::'astate) (env::'vsemv_env) v2 (pes::('pat \<times> 'exp0) list) v2
| Rabort (abort::abort) \<Rightarrow> (st', Rerr (Rabort abort)))) \<le> clock (st::'astate))" using assms by (smt (verit)) end
context fixes piecewise_C1 :: "('real :: {one,zero,ord} \ 'a :: {one,zero,ord}) \ 'real set \ bool" and
joinpaths :: "('real \ 'a) \ ('real \ 'a) \ 'real \ 'a" begin notation piecewise_C1 (infixr\<open>piecewise'_C1'_differentiable'_on\<close> 50) notation joinpaths (infixr\<open>+++\<close> 75)
lemma assumes match: "L2_matches_L3 Const2 S2 Const3 S3" shows"L2_final Const2 S2 \ L2_final Const3 S3" proof - from match obtain N Ur Uff Urr where
state_simps: "Const2 = N" "Const3 = N" "S2 = (Ur, Uff)" "S3 = (Urr, Uff)"and
Ur_spec: " \<forall>Cr \<in> fset Ur. \<exists>C \<in> fset (N |\<union>| Urr |\<union>| Uff). \<exists>D \<in> fset (N |\<union>| Urr |\<union>| Uff).
(ground_resolution D)\<^sup>+\<^sup>+ C Cr \<and>
(\<exists>Crr \<in> fset Urr. (ground_resolution D)\<^sup>*\<^sup>* Cr Crr) \<or>
(is_least_false_clause (N |\<union>| Ur |\<union>| Uff) Cr)" by (smt (verit) L2_matches_L3.elims(2)) oops end
end
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.25Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.