| author | paulson <lp15@cam.ac.uk> |
| Thu, 06 Nov 2025 10:55:39 +0000 | |
| changeset 83520 | 6f656fc94319 |
| parent 83359 | 518a1464f1ac |
| permissions | -rw-r--r-- |
|
83357
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
1 |
(* Title: HOL/Computational_Algebra/Computation_Checks.thy |
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
2 |
Author: Florian Haftmann, TU Muenchen |
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
3 |
*) |
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
4 |
|
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
5 |
section \<open>Computation checks\<close> |
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
6 |
|
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
7 |
theory Computation_Checks |
| 83358 | 8 |
imports Primes Polynomial_Factorial "HOL-Library.Discrete_Functions" "HOL-Library.Code_Target_Numeral" |
|
83357
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
9 |
begin |
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
10 |
|
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
11 |
text \<open> |
| 83358 | 12 |
@{lemma \<open>floor_sqrt 16476148165462159 = 128359449\<close> by eval}
|
|
83357
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
13 |
\<close> |
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
14 |
|
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
15 |
text \<open> |
| 83359 | 16 |
@{lemma \<open>prime (97 :: nat)\<close> by simp}
|
| 83358 | 17 |
\<close> |
18 |
||
19 |
text \<open> |
|
| 83359 | 20 |
@{lemma \<open>prime (97 :: int)\<close> by simp}
|
21 |
\<close> |
|
22 |
||
23 |
text \<open> |
|
24 |
@{lemma \<open>prime (9973 :: nat)\<close> by eval}
|
|
25 |
\<close> |
|
26 |
||
27 |
text \<open> |
|
28 |
@{lemma \<open>prime (9973 :: int)\<close> by eval}
|
|
|
83357
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
29 |
\<close> |
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
30 |
|
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
31 |
text \<open> |
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
32 |
@{lemma \<open>Gcd {[:1, 2, 3:], [:2, 3, (4 :: int):]} = 1\<close> by eval}
|
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
33 |
\<close> |
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
34 |
|
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
35 |
text \<open> |
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
36 |
@{lemma \<open>Lcm {[:1, 2, 3:], [:2, 3, 4:]} = [:[:2:], [:7:], [:16:], [:17:], [:12 :: int:]:]\<close> by eval}
|
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
37 |
\<close> |
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
38 |
|
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
39 |
end |
|
d7c525fd68b2
avoid computation checks when using theories as regular libraries
haftmann
parents:
diff
changeset
|
40 |