Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Isabelle (proof assistant)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Example proof== Isabelle allows proofs to be written in two different styles, the [[procedural programming|procedural]] and the [[declarative programming|declarative]]. Procedural proofs specify a series of [[Tactic (computer science)|tactics]] (theorem proving [[Subroutine|functions/procedures]]) to apply. While reflecting the procedure that a human mathematician might apply to proving a result, they are typically hard to read as they do not describe the outcome of these steps. Declarative proofs (supported by Isabelle's proof language, Isar), on the other hand, specify the actual mathematical operations to be performed, and are therefore more easily read and checked by humans. The procedural style has been deprecated in recent versions of Isabelle.<ref>{{cite web|url=https://isabelle.in.tum.de/doc/isar-ref.pdf|title=The Isabelle/Isar Reference Manual|first=Makarius|last=Wenzel|date=March 13, 2025|access-date=2025-05-10}} Page 148: "Arbitrary goal refinement via tactics is considered harmful". See also section 7.3, "Tactics: improper proof methods", pp. 172–175.</ref> For example, a declarative [[proof by contradiction]] in Isar that [[Square root of 2#Proof by infinite descent|the square root of two is not rational]] can be written as follows. <div style="font-family: monospace, monospace;"> {{color|darkblue|theorem}} sqrt2_not_rational: {{olive|"sqrt 2 ∉ {{mathbb|Q}}"}} {{color|darkblue|proof}} {{color|darkblue|let}} ?x = {{olive|"sqrt 2"}} {{blue|assume}} {{olive|"?x ∈ {{mathbb|Q}}"}} {{color|darkblue|then}} {{blue|obtain}} m n :: nat {{green|where}} sqrt_rat: {{olive|"¦?x¦ {{=}} m / n"}} {{green|and}} lowest_terms: {{olive|"coprime m n"}} {{color|darkblue|by}} (rule Rats_abs_nat_div_natE) {{color|darkblue|hence}} {{olive|"m^2 {{=}} ?x^2 * n^2"}} {{color|darkblue|by}} (auto simp add: power2_eq_square) {{color|darkblue|hence}} eq: {{olive|"m^2 {{=}} 2 * n^2"}} {{color|darkblue|using}} of_nat_eq_iff power2_eq_square {{color|darkblue|by}} fastforce {{color|darkblue|hence}} {{olive|"2 dvd m^2"}} {{color|darkblue|by}} simp {{color|darkblue|hence}} {{olive|"2 dvd m"}} {{color|darkblue|by}} simp {{color|darkblue|have}} {{olive|"2 dvd n"}} {{color|darkblue|proof}} - {{color|darkblue|from}} {{olive|‹2 dvd m›}} {{blue|obtain}} k {{green|where}} {{color|olive|"m {{=}} 2 * k"}} ..<!--The two dots refer to a complete proof of this claim--> {{color|darkblue|with}} eq {{color|darkblue|have}} {{olive|"2 * n^2 {{=}} 2^2 * k^2"}} {{color|darkblue|by}} simp {{color|darkblue|hence}} {{olive|"2 dvd n^2"}} {{color|darkblue|by}} simp {{blue|thus}} {{olive|"2 dvd n"}} {{color|darkblue|by}} simp {{color|darkblue|qed}} {{color|darkblue|with}} {{olive|‹2 dvd m›}} {{color|darkblue|have}} {{olive|"2 dvd gcd m n"}} {{color|darkblue|by}} (rule gcd_greatest) {{color|darkblue|with}} lowest_terms {{color|darkblue|have}} {{olive|"2 dvd 1"}} {{color|darkblue|by}} simp {{blue|thus}} False {{color|darkblue|using}} odd_one {{color|darkblue|by}} blast {{color|darkblue|qed}} </div>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Isabelle (proof assistant)
(section)
Add topic