File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -262,10 +262,17 @@ Qed.
262262
263263(* Some facts about circular numbers in base 10 *)
264264
265- Let v11939 := Eval compute in N.to_nat 11939.
266- Let v19937 := Eval compute in N.to_nat 19937.
267- Let v193939 := Eval compute in N.to_nat 193939.
268- Let v199933 := Eval compute in N.to_nat 199933.
265+ (* Uglu trick to get large number *)
266+ Fixpoint myadd m n := if m is m1.+1 then myadd m1 n.+1 else n.
267+ Fixpoint mymul3 m n p :=
268+ if m is m1.+1 then mymul3 m1 n (myadd n p) else p.
269+ Definition mymul m n := mymul3 m n 0.
270+ Definition get_num l := foldr (fun i r => 10 * r + i) 0 (rev l).
271+
272+ Let v11939 := Eval compute in get_num [::1; 1; 9; 3; 9].
273+ Let v19937 := Eval compute in get_num [::1; 9; 9; 3; 7].
274+ Let v193939 := Eval compute in get_num [:: 1; 9; 3; 9; 3; 9].
275+ Let v199933 := Eval compute in get_num [:: 1; 9; 9; 9; 3; 3].
269276
270277(* the first circular primes in base 10 *)
271278Lemma first_ten_cprimes :
@@ -340,3 +347,5 @@ by apply: cprime10_digit0.
340347Qed .
341348
342349End Cprime.
350+
351+ Check first_ten_cprimes.
You can’t perform that action at this time.
0 commit comments