equal
deleted
inserted
replaced
10 "~~/src/HOL/Library/Sublist_Order" |
10 "~~/src/HOL/Library/Sublist_Order" |
11 "~~/src/HOL/Number_Theory/Eratosthenes" |
11 "~~/src/HOL/Number_Theory/Eratosthenes" |
12 "~~/src/HOL/ex/Records" |
12 "~~/src/HOL/ex/Records" |
13 begin |
13 begin |
14 |
14 |
15 lemma [code]: -- {* Formal joining of hierarchy of implicit definitions in Scala *} |
|
16 fixes a :: "'a :: semiring_div_parity" |
|
17 shows "even a \<longleftrightarrow> a mod 2 = 0" |
|
18 by (fact even_iff_mod_2_eq_zero) |
|
19 |
|
20 inductive sublist :: "'a list \<Rightarrow> 'a list \<Rightarrow> bool" |
15 inductive sublist :: "'a list \<Rightarrow> 'a list \<Rightarrow> bool" |
21 where |
16 where |
22 empty: "sublist [] xs" |
17 empty: "sublist [] xs" |
23 | drop: "sublist ys xs \<Longrightarrow> sublist ys (x # xs)" |
18 | drop: "sublist ys xs \<Longrightarrow> sublist ys (x # xs)" |
24 | take: "sublist ys xs \<Longrightarrow> sublist (x # ys) (x # xs)" |
19 | take: "sublist ys xs \<Longrightarrow> sublist (x # ys) (x # xs)" |