equal
deleted
inserted
replaced
9 |
9 |
10 lemma "\\<forall>xs. if xs = [] then rev xs = [] else rev xs \\<noteq> []"; |
10 lemma "\\<forall>xs. if xs = [] then rev xs = [] else rev xs \\<noteq> []"; |
11 |
11 |
12 txt{*\noindent |
12 txt{*\noindent |
13 can be split into |
13 can be split into |
14 \begin{isabellepar}% |
14 \begin{isabelle} |
15 ~1.~{\isasymforall}xs.~(xs~=~[]~{\isasymlongrightarrow}~rev~xs~=~[])~{\isasymand}~(xs~{\isasymnoteq}~[]~{\isasymlongrightarrow}~rev~xs~{\isasymnoteq}~[])% |
15 ~1.~{\isasymforall}xs.~(xs~=~[]~{\isasymlongrightarrow}~rev~xs~=~[])~{\isasymand}~(xs~{\isasymnoteq}~[]~{\isasymlongrightarrow}~rev~xs~{\isasymnoteq}~[])% |
16 \end{isabellepar}% |
16 \end{isabelle} |
17 by a degenerate form of simplification |
17 by a degenerate form of simplification |
18 *} |
18 *} |
19 |
19 |
20 apply(simp only: split: split_if); |
20 apply(simp only: split: split_if); |
21 (*<*)oops;(*>*) |
21 (*<*)oops;(*>*) |
32 *} |
32 *} |
33 |
33 |
34 lemma "(case xs of [] \\<Rightarrow> zs | y#ys \\<Rightarrow> y#(ys@zs)) = xs@zs"; |
34 lemma "(case xs of [] \\<Rightarrow> zs | y#ys \\<Rightarrow> y#(ys@zs)) = xs@zs"; |
35 txt{*\noindent |
35 txt{*\noindent |
36 becomes |
36 becomes |
37 \begin{isabellepar}% |
37 \begin{isabelle} |
38 ~1.~(xs~=~[]~{\isasymlongrightarrow}~zs~=~xs~@~zs)~{\isasymand}\isanewline |
38 ~1.~(xs~=~[]~{\isasymlongrightarrow}~zs~=~xs~@~zs)~{\isasymand}\isanewline |
39 ~~~~({\isasymforall}a~list.~xs~=~a~\#~list~{\isasymlongrightarrow}~a~\#~list~@~zs~=~xs~@~zs)% |
39 ~~~~({\isasymforall}a~list.~xs~=~a~\#~list~{\isasymlongrightarrow}~a~\#~list~@~zs~=~xs~@~zs)% |
40 \end{isabellepar}% |
40 \end{isabelle} |
41 by typing |
41 by typing |
42 *} |
42 *} |
43 |
43 |
44 apply(simp only: split: list.split); |
44 apply(simp only: split: list.split); |
45 (*<*)oops;(*>*) |
45 (*<*)oops;(*>*) |