equal
deleted
inserted
replaced
5 |
5 |
6 theory Candidates |
6 theory Candidates |
7 imports |
7 imports |
8 Complex_Main |
8 Complex_Main |
9 "~~/src/HOL/Library/Library" |
9 "~~/src/HOL/Library/Library" |
10 "~~/src/HOL/Library/Sublist" |
10 "~~/src/HOL/Library/Sublist_Order" |
11 "~~/src/HOL/Number_Theory/Primes" |
11 "~~/src/HOL/Number_Theory/Primes" |
12 "~~/src/HOL/ex/Records" |
12 "~~/src/HOL/ex/Records" |
13 begin |
13 begin |
14 |
14 |
15 inductive sublist :: "'a list \<Rightarrow> 'a list \<Rightarrow> bool" where |
15 inductive sublist :: "'a list \<Rightarrow> 'a list \<Rightarrow> bool" |
16 empty: "sublist [] xs" |
16 where |
17 | drop: "sublist ys xs \<Longrightarrow> sublist ys (x # xs)" |
17 empty: "sublist [] xs" |
18 | take: "sublist ys xs \<Longrightarrow> sublist (x # ys) (x # xs)" |
18 | drop: "sublist ys xs \<Longrightarrow> sublist ys (x # xs)" |
|
19 | take: "sublist ys xs \<Longrightarrow> sublist (x # ys) (x # xs)" |
19 |
20 |
20 code_pred sublist . |
21 code_pred sublist . |
21 |
22 |
22 (*avoid popular infix*) |
23 code_reserved SML upto -- {* avoid popular infix *} |
23 code_reserved SML upto |
|
24 |
24 |
25 end |
25 end |