equal
deleted
inserted
replaced
74 qed "prefix_prefix"; |
74 qed "prefix_prefix"; |
75 Addsimps [prefix_prefix]; |
75 Addsimps [prefix_prefix]; |
76 |
76 |
77 Goalw [prefix_def] |
77 Goalw [prefix_def] |
78 "(xs <= y#ys) = (xs=[] | (? zs. xs=y#zs & zs <= ys))"; |
78 "(xs <= y#ys) = (xs=[] | (? zs. xs=y#zs & zs <= ys))"; |
79 by (exhaust_tac "xs" 1); |
79 by (cases_tac "xs" 1); |
80 by Auto_tac; |
80 by Auto_tac; |
81 qed "prefix_Cons"; |
81 qed "prefix_Cons"; |
82 |
82 |
83 Goal "(xs <= ys@zs) = (xs <= ys | (? us. xs = ys@us & us <= zs))"; |
83 Goal "(xs <= ys@zs) = (xs <= ys | (? us. xs = ys@us & us <= zs))"; |
84 by (res_inst_tac [("xs","zs")] rev_induct 1); |
84 by (res_inst_tac [("xs","zs")] rev_induct 1); |
90 qed "prefix_append"; |
90 qed "prefix_append"; |
91 |
91 |
92 Goalw [prefix_def] |
92 Goalw [prefix_def] |
93 "[| xs <= ys; length xs < length ys |] ==> xs @ [ys ! length xs] <= ys"; |
93 "[| xs <= ys; length xs < length ys |] ==> xs @ [ys ! length xs] <= ys"; |
94 by (auto_tac(claset(), simpset() addsimps [nth_append])); |
94 by (auto_tac(claset(), simpset() addsimps [nth_append])); |
95 by (exhaust_tac "ys" 1); |
95 by (cases_tac "ys" 1); |
96 by Auto_tac; |
96 by Auto_tac; |
97 qed "append_one_prefix"; |
97 qed "append_one_prefix"; |
98 |
98 |
99 Goalw [prefix_def] "xs <= ys ==> length xs <= length ys"; |
99 Goalw [prefix_def] "xs <= ys ==> length xs <= length ys"; |
100 by Auto_tac; |
100 by Auto_tac; |