Template:Proof: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Tag: Undo |
||
Line 1: | Line 1: | ||
<includeonly>{{Databox|{{{title|Proof}}}|<br/>{{{contents | <includeonly>{{Databox|{{{title|Proof}}}|<br/>{{{contents}}} {{qed}}}}[[Category:Articles with proofs]]</includeonly><noinclude> | ||
Box for proofs. This calls [[Template: Databox]] but it automatically: | Box for proofs. This calls [[Template: Databox]] but it automatically: | ||
* appends [[Template: Qed]] in the end of the contents; | * appends [[Template: Qed]] in the end of the contents; | ||
Line 7: | Line 7: | ||
<pre> | <pre> | ||
{{Proof|title=Proof that <math>\sqrt{2}</math> is irrational|Assume <math>\sqrt{2}</math> is ''p''/''q'', where ''p'', ''q'' ∈ ℤ<sub>>0</sub> and gcd(''p'', ''q'') = 1. Then ''p''<sup>2</sup>/''q''<sup>2</sup> = 2, and ''p''<sup>2</sup> = 2''q''<sup>2</sup>. Since ''p''<sup>2</sup> is even, and gcd(''p'', ''q'') = 1, gcd(''p''<sup>2</sup>, ''q''<sup>2</sup>) = 1, ''q''<sup>2</sup> must be odd. Hence ''p''<sup>2</sup> ≡ 2 (mod 4), which is impossible because the square of an integer must always be congruent to 0 or 1 (mod 4). | {{Proof|title=Proof that <math>\sqrt{2}</math> is irrational| | ||
contents=Assume <math>\sqrt{2}</math> is ''p''/''q'', where ''p'', ''q'' ∈ ℤ<sub>>0</sub> and gcd(''p'', ''q'') = 1. Then ''p''<sup>2</sup>/''q''<sup>2</sup> = 2, and ''p''<sup>2</sup> = 2''q''<sup>2</sup>. Since ''p''<sup>2</sup> is even, and gcd(''p'', ''q'') = 1, gcd(''p''<sup>2</sup>, ''q''<sup>2</sup>) = 1, ''q''<sup>2</sup> must be odd. Hence ''p''<sup>2</sup> ≡ 2 (mod 4), which is impossible because the square of an integer must always be congruent to 0 or 1 (mod 4). | |||
}} | }} | ||
</pre> | </pre> |
Revision as of 19:09, 7 February 2024
Box for proofs. This calls Template: Databox but it automatically:
- appends Template: Qed in the end of the contents;
- adds the article to Category: Articles with proofs.
You type:
{{Proof|title=Proof that <math>\sqrt{2}</math> is irrational| contents=Assume <math>\sqrt{2}</math> is ''p''/''q'', where ''p'', ''q'' ∈ ℤ<sub>>0</sub> and gcd(''p'', ''q'') = 1. Then ''p''<sup>2</sup>/''q''<sup>2</sup> = 2, and ''p''<sup>2</sup> = 2''q''<sup>2</sup>. Since ''p''<sup>2</sup> is even, and gcd(''p'', ''q'') = 1, gcd(''p''<sup>2</sup>, ''q''<sup>2</sup>) = 1, ''q''<sup>2</sup> must be odd. Hence ''p''<sup>2</sup> ≡ 2 (mod 4), which is impossible because the square of an integer must always be congruent to 0 or 1 (mod 4). }}
You get:
Proof that [math]\displaystyle{ \sqrt{2} }[/math] is irrational
Assume [math]\displaystyle{ \sqrt{2} }[/math] is p/q, where p, q ∈ ℤ>0 and gcd(p, q) = 1. Then p2/q2 = 2, and p2 = 2q2. Since p2 is even, and gcd(p, q) = 1, gcd(p2, q2) = 1, q2 must be odd. Hence p2 ≡ 2 (mod 4), which is impossible because the square of an integer must always be congruent to 0 or 1 (mod 4). [math]\displaystyle{ \square }[/math]
Note: To include the character |
, it must be escaped as {{!}}
, unless it appears inside preformatted text (such as a <syntaxhighlight> tag).