Quelle Greatest_Common_Divisor.thy
Sprache: Isabelle
(* Title: HOL/SPARK/Examples/Gcd/Greatest_Common_Divisor.thy Author: Stefan Berghofer Copyright: secunet Security Networks AG
*)
theory Greatest_Common_Divisor imports"HOL-SPARK.SPARK" begin
spark_proof_functions
gcd = "gcd :: int \ int \ int"
spark_open ‹greatest_common_divisor/g_c_d›
spark_vc procedure_g_c_d_4 proof - from‹0 < d›have"0 \ c mod d"by (rule pos_mod_sign) with‹0 ≤ c›‹0 < d›‹c - c sdiv d * d ≠ 0›show ?C1 by (simp add: sdiv_pos_pos minus_div_mult_eq_mod [symmetric]) next from‹0 ≤ c›‹0 < d›‹gcd c d = gcd m n›show ?C2 by (simp add: sdiv_pos_pos minus_div_mult_eq_mod [symmetric] gcd_non_0_int) qed
spark_vc procedure_g_c_d_11 proof - from‹0 ≤ c›‹0 < d›‹c - c sdiv d * d = 0› have"d dvd c" by (auto simp add: sdiv_pos_pos dvd_def ac_simps) with‹0 < d›‹gcd c d = gcd m n›show ?C1 by simp qed
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.