Skip to content

Commit 7da0333

Browse files
authored
PROJECT_LANG_1.thy [V1]
Version 1 of the first project language file for this directory set.
1 parent f1c67a8 commit 7da0333

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

Diff for: PROJECT_LANG_1.thy

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
theorem sqrt2_not_rational:
2+
"sqrt 2 ∉ Q"
3+
proof
4+
let ?x = "sqrt 2"
5+
assume "?x ∈ Q"
6+
then obtain m n :: nat where
7+
sqrt_rat: "¦?x¦ = m / n" and lowest_terms: "coprime m n"
8+
by (rule Rats_abs_nat_div_natE)
9+
hence "m^2 = ?x^2 * n^2" by (auto simp add: power2_eq_square)
10+
hence eq: "m^2 = 2 * n^2" using of_nat_eq_iff power2_eq_square by fastforce
11+
hence "2 dvd m^2" by simp
12+
hence "2 dvd m" by simp
13+
have "2 dvd n" proof -
14+
from2 dvd mobtain k where "m = 2 * k" ..
15+
with eq have "2 * n^2 = 2^2 * k^2" by simp
16+
hence "2 dvd n^2" by simp
17+
thus "2 dvd n" by simp
18+
qed
19+
with2 dvd mhave "2 dvd gcd m n" by (rule gcd_greatest)
20+
with lowest_terms have "2 dvd 1" by simp
21+
thus False using odd_one by blast
22+
qed
23+
(* End of Isabelle syntax identification sample *)
24+
25+
(* Project language file 1
26+
For: SNU/2D/ProgrammingTools/IDE/Isabelle
27+
About:
28+
I decided to make Isabelle the main project language file for this project (SNU / 2D / Programming Tools / IDE / Isabelle) as this is a Isabelle IDE, and it needs its main language to be represented here.
29+
*)
30+
31+
(* File info
32+
File type: Isabelle source file (*.thy)
33+
File version: 1 (2022, Monday, October 3rd at 7:44 pm PST)
34+
Line count (including blank lines and compiler line): 36
35+
*)

0 commit comments

Comments
 (0)