src/HOL/SPARK/Manual/Simple_Greatest_Common_Divisor.thy
author wenzelm
Tue, 28 Oct 2014 16:19:04 +0100
changeset 58802 3cc68ec558b0
parent 58130 5e9170812356
child 63167 0909deb8059b
permissions -rw-r--r--
find command span in buffer; tuned signature;

(*  Title:      HOL/SPARK/Manual/Simple_Greatest_Common_Divisor.thy
    Author:     Stefan Berghofer
    Copyright:  secunet Security Networks AG
*)

theory Simple_Greatest_Common_Divisor
imports "../SPARK" GCD
begin

spark_proof_functions
  gcd = "gcd :: int \<Rightarrow> int \<Rightarrow> int"

spark_open "simple_greatest_common_divisor/g_c_d"

spark_vc procedure_g_c_d_4
  using `0 < d` `gcd c d = gcd m n`
  by (simp add: gcd_non_0_int)

spark_vc procedure_g_c_d_9
  using `0 \<le> c` `gcd c 0 = gcd m n`
  by simp

spark_end

end