| author | wenzelm |
| Wed, 07 Jun 2017 23:23:48 +0200 | |
| changeset 66034 | ded1c636aece |
| parent 65552 | f533820e7248 |
| child 66453 | cc19f7ca2ed6 |
| permissions | -rw-r--r-- |
| 45610 | 1 |
(* Title: HOL/SPARK/Manual/Simple_Greatest_Common_Divisor.thy |
| 45044 | 2 |
Author: Stefan Berghofer |
3 |
Copyright: secunet Security Networks AG |
|
4 |
*) |
|
5 |
||
6 |
theory Simple_Greatest_Common_Divisor |
|
|
65552
f533820e7248
theories "GCD" and "Binomial" are already included in "Main": this avoids improper imports in applications;
wenzelm
parents:
63167
diff
changeset
|
7 |
imports "../SPARK" |
| 45044 | 8 |
begin |
9 |
||
10 |
spark_proof_functions |
|
11 |
gcd = "gcd :: int \<Rightarrow> int \<Rightarrow> int" |
|
12 |
||
|
56798
939e88e79724
Discontinued old spark_open; spark_open_siv is now spark_open
berghofe
parents:
45610
diff
changeset
|
13 |
spark_open "simple_greatest_common_divisor/g_c_d" |
| 45044 | 14 |
|
15 |
spark_vc procedure_g_c_d_4 |
|
| 63167 | 16 |
using \<open>0 < d\<close> \<open>gcd c d = gcd m n\<close> |
| 45044 | 17 |
by (simp add: gcd_non_0_int) |
18 |
||
19 |
spark_vc procedure_g_c_d_9 |
|
| 63167 | 20 |
using \<open>0 \<le> c\<close> \<open>gcd c 0 = gcd m n\<close> |
| 45044 | 21 |
by simp |
22 |
||
23 |
spark_end |
|
24 |
||
25 |
end |