| author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
| Tue, 08 Jul 2014 11:34:10 +0100 | |
| changeset 557 | 77ea2de0ca62 |
| parent 538 | e9fd5eff62c1 |
| child 562 | daf404920ab9 |
| permissions | -rw-r--r-- |
| 23 | 1 |
theory Base |
| 459 | 2 |
imports Main |
3 |
"~~/src/HOL/Library/LaTeXsugar" |
|
| 23 | 4 |
begin |
5 |
||
| 394 | 6 |
notation (latex output) |
7 |
Cons ("_ # _" [66,65] 65)
|
|
8 |
||
| 396 | 9 |
ML {*
|
10 |
fun P n = @{term "P::nat \<Rightarrow> bool"} $ (HOLogic.mk_number @{typ "nat"} n)
|
|
11 |
||
12 |
fun rhs 1 = P 1 |
|
13 |
| rhs n = HOLogic.mk_conj (P n, rhs (n - 1)) |
|
14 |
||
15 |
fun lhs 1 n = HOLogic.mk_imp (HOLogic.mk_eq (P 1, P n), rhs n) |
|
16 |
| lhs m n = HOLogic.mk_conj (HOLogic.mk_imp |
|
17 |
(HOLogic.mk_eq (P (m - 1), P m), rhs n), lhs (m - 1) n) |
|
18 |
||
19 |
fun de_bruijn n = |
|
20 |
HOLogic.mk_Trueprop (HOLogic.mk_imp (lhs n n, rhs n)) |
|
21 |
*} |
|
|
346
0fea8b7a14a1
tuned the ML-output mechanism; tuned slightly the text
Christian Urban <urbanc@in.tum.de>
parents:
328
diff
changeset
|
22 |
|
|
538
e9fd5eff62c1
removed "use" for "ML_file"
Christian Urban <urbanc@in.tum.de>
parents:
535
diff
changeset
|
23 |
ML_file "output_tutorial.ML" |
|
e9fd5eff62c1
removed "use" for "ML_file"
Christian Urban <urbanc@in.tum.de>
parents:
535
diff
changeset
|
24 |
ML_file "antiquote_setup.ML" |
|
346
0fea8b7a14a1
tuned the ML-output mechanism; tuned slightly the text
Christian Urban <urbanc@in.tum.de>
parents:
328
diff
changeset
|
25 |
|
| 471 | 26 |
setup {* OutputTutorial.setup *}
|
27 |
setup {* AntiquoteSetup.setup *}
|
|
|
346
0fea8b7a14a1
tuned the ML-output mechanism; tuned slightly the text
Christian Urban <urbanc@in.tum.de>
parents:
328
diff
changeset
|
28 |
|
|
239
b63c72776f03
replaced "warning" with "writeln"
Christian Urban <urbanc@in.tum.de>
parents:
224
diff
changeset
|
29 |
end |