diff --git a/isabelle/test/amc12a_2020_p4.thy b/isabelle/test/amc12a_2020_p4.thy index bf7a1d8..238a5b1 100644 --- a/isabelle/test/amc12a_2020_p4.thy +++ b/isabelle/test/amc12a_2020_p4.thy @@ -6,13 +6,13 @@ theory amc12a_2020_p4 imports Complex_Main begin +function digits :: "nat \ nat list" where + "digits n = (if n div 10 = 0 then [n] else (n mod 10) # (digits (n div 10)))" + by auto +termination by (relation "measure id") auto + theorem amc12a_2020_p4: - fixes a b c d :: nat - assumes h0: "1 \ a \ a \ 9 \ even a" - and h1: "0 \ b \ b \ 9 \ even b" - and h2: "0 \ c \ c \ 9 \ even c" - and h3: "0 \ d \ d \ 9 \ even d" - shows "card {n :: nat. n = 10 * (10*(10*a + b) + c) + d \ 5 dvd n} = 100" + shows "card {n :: nat. 1000\n \ n\9999 \ (\d\set (digits n). even d) \ 5 dvd n} = 100" sorry end diff --git a/isabelle/test/amc12b_2021_p18.thy b/isabelle/test/amc12b_2021_p18.thy index d942358..c2e6d07 100644 --- a/isabelle/test/amc12b_2021_p18.thy +++ b/isabelle/test/amc12b_2021_p18.thy @@ -8,8 +8,8 @@ begin theorem amc12b_2021_p18: fixes z :: complex - assumes h0: "12 * norm z = 2 * - norm (z + 2) + norm (z^2 + 1) + 31" + assumes h0: "12 * (norm z)^2 = 2 * + (norm (z + 2))^2 + (norm (z^2 + 1))^2 + 31" shows "z + 6 / z = -2" sorry diff --git a/isabelle/test/amc12b_2021_p4.thy b/isabelle/test/amc12b_2021_p4.thy index 6ffb79a..8a6d017 100644 --- a/isabelle/test/amc12b_2021_p4.thy +++ b/isabelle/test/amc12b_2021_p4.thy @@ -8,8 +8,8 @@ begin theorem amc12b_2021_p4: fixes m a :: nat - assumes h0: "m / a = 3 / (4::real)" - shows "84 * m + 70 * a / (m + a) = (76::real)" + assumes h0: "of_nat m / of_nat a = 3 / (4::real)" + shows "(84 * m + 70 * a) / (m + a) = (76::real)" sorry end \ No newline at end of file diff --git a/isabelle/test/mathd_numbertheory_135.thy b/isabelle/test/mathd_numbertheory_135.thy index 06056b9..43bbab4 100644 --- a/isabelle/test/mathd_numbertheory_135.thy +++ b/isabelle/test/mathd_numbertheory_135.thy @@ -6,13 +6,20 @@ theory mathd_numbertheory_135 imports Complex_Main "HOL-Computational_Algebra.Computational_Algebra" begin +function digits :: "nat \ nat list" where + "digits n = (if n div 10 = 0 then [n] else (n mod 10) # (digits (n div 10)))" + by auto +termination by (relation "measure id") auto + theorem mathd_numbertheory_135: fixes n a b c::nat assumes "n = 3^17 + 3^10" and "11 dvd (n + 1)" + and "a\b" "b\c" "a\c" + and "a\{0..9}" "b\{0..9}" "c\{0..9}" and "odd a \ odd c" and "\ 3 dvd b" - and "n = 10*(10*(10*(10*(10*(10*(10*(10*a +b) +c) +a) +c) +c) +b) +a) +b" + and "digits n = [b,a,b,c,d,a,c,b,a]" shows "10*(10 * a + b) + c = 129" sorry diff --git a/isabelle/test/mathd_numbertheory_321.thy b/isabelle/test/mathd_numbertheory_321.thy index 3470865..78cfd87 100644 --- a/isabelle/test/mathd_numbertheory_321.thy +++ b/isabelle/test/mathd_numbertheory_321.thy @@ -9,7 +9,7 @@ begin theorem mathd_numbertheory_321: fixes n::int - assumes "\n::int. 1\n \ n\ 1399 \ [n*160 = 1] (mod 1399)" + assumes "1\n \ n\ 1399 \ [n*160 = 1] (mod 1399)" shows "n = 1058" sorry diff --git a/isabelle/test/mathd_numbertheory_447.thy b/isabelle/test/mathd_numbertheory_447.thy index 9e2c216..c1d3253 100644 --- a/isabelle/test/mathd_numbertheory_447.thy +++ b/isabelle/test/mathd_numbertheory_447.thy @@ -8,7 +8,7 @@ theory mathd_numbertheory_447 imports begin theorem mathd_numbertheory_447: - "(\ k \{n. 3 dvd n \ 0 n<50}. k mod 3) = (78::nat)" + "(\ k \{n. 3 dvd n \ 0 n<50}. k mod 10) = (78::nat)" sorry end \ No newline at end of file