Template:Proof/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
ArrowHead294 (talk | contribs)
Docpage
 
ArrowHead294 (talk | contribs)
mNo edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{dochead}}
{{dochead}}
This is a box for proofs. This calls [[Template:Databox]] but it automatically appends [[Template:Qed]] in the end of the contents and adds the page to [[:Category:Pages with proofs]].
=== Usage ===
=== Usage ===
You type:  
You type:  


<pre>
<pre>
{{Proof|title=Proof that <math>\sqrt{2}</math> is irrational|
{{Proof
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).  
| title=Proof that the root of any integer is either an integer or irrational
| contents=Assume <math>\sqrt[n]{m}</math> is {{nowrap|''p'' / ''q''}}, where {{nowrap|''p'', ''q'' ∈ ℤ<sup>+</sup>}} and {{nowrap|gcd(''p'', ''q'') {{=}} 1}}. Then  
{{nowrap|''p<sup>n</sup>'' / ''q<sup>n</sup>'' {{=}} ''m''}}, and {{nowrap|''p<sup>n''</sup> {{=}} ''mq<sup>n''</sup>}}. This means ''p'' is divisible by ''m''. Therefore, there exists some integer ''r'' such that {{nowrap|''p'' {{=}} ''mr''}}, so we now have {{nowrap|''m<sup>n</sup>r<sup>n</sup>'' {{=}} ''mq<sup>n</sup>''}}. Dividing both sides by ''m'' gives {{nowrap|''m''<sup>{{nowrap|''n'' &minus; 1}}</sup>''r<sup>n''</sup> {{=}} ''q<sup>n</sup>''}}. This means that ''q'' must also be divisible by ''m'', which is a contradiction, since ''p'' and ''q'' were assumed to be relatively prime.
}}
}}
</pre>
</pre>
Line 11: Line 15:
You get:  
You get:  


{{Databox
{{{{ROOTPAGENAME}}
| 1=Proof that <math>\sqrt{2}</math> is irrational
| title=Proof that the root of any integer is either an integer or irrational
| 2=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). {{qed}}
| contents=Assume <math>\sqrt[n]{m}</math> is {{nowrap|''p'' / ''q''}}, where {{nowrap|''p'', ''q'' ∈ ℤ<sup>+</sup>}} and {{nowrap|gcd(''p'', ''q'') {{=}} 1}}. Then  
{{nowrap|''p<sup>n</sup>'' / ''q<sup>n</sup>'' {{=}} ''m''}}, and {{nowrap|''p<sup>n''</sup> {{=}} ''mq<sup>n''</sup>}}. This means ''p'' is divisible by ''m''. Therefore, there exists some integer ''r'' such that {{nowrap|''p'' {{=}} ''mr''}}, so we now have {{nowrap|''m<sup>n</sup>r<sup>n</sup>'' {{=}} ''mq<sup>n</sup>''}}. Dividing both sides by ''m'' gives {{nowrap|''m''<sup>{{nowrap|''n'' &minus; 1}}</sup>''r<sup>n''</sup> {{=}} ''q<sup>n</sup>''}}. This means that ''q'' must also be divisible by ''m'', which is a contradiction, since ''p'' and ''q'' were assumed to be relatively prime.
}}
}}


Note: To include the character <code>|</code>, it must be escaped as <code>{{((}}!{{))}}</code>, unless it appears inside preformatted text (such as a <nowiki><syntaxhighlight></nowiki> or <nowiki><math></nowiki> tag).
 
{{escape notice}}


=== See also ===
=== See also ===
* [[Template:Theorem]]
* [[Template:Theorem]]

Latest revision as of 15:30, 25 January 2025

This is a box for proofs. This calls Template:Databox but it automatically appends Template:Qed in the end of the contents and adds the page to Category:Pages with proofs.

Usage

You type:

{{Proof
| title=Proof that the root of any integer is either an integer or irrational
| contents=Assume <math>\sqrt[n]{m}</math> is {{nowrap|''p'' / ''q''}}, where {{nowrap|''p'', ''q'' ∈ ℤ<sup>+</sup>}} and {{nowrap|gcd(''p'', ''q'') {{=}} 1}}. Then 
{{nowrap|''p<sup>n</sup>'' / ''q<sup>n</sup>'' {{=}} ''m''}}, and {{nowrap|''p<sup>n''</sup> {{=}} ''mq<sup>n''</sup>}}. This means ''p'' is divisible by ''m''. Therefore, there exists some integer ''r'' such that {{nowrap|''p'' {{=}} ''mr''}}, so we now have {{nowrap|''m<sup>n</sup>r<sup>n</sup>'' {{=}} ''mq<sup>n</sup>''}}. Dividing both sides by ''m'' gives {{nowrap|''m''<sup>{{nowrap|''n'' − 1}}</sup>''r<sup>n''</sup> {{=}} ''q<sup>n</sup>''}}. This means that ''q'' must also be divisible by ''m'', which is a contradiction, since ''p'' and ''q'' were assumed to be relatively prime.
}}

You get:

Proof that the root of any integer is either an integer or irrational
Assume [math]\displaystyle{ \sqrt[n]{m} }[/math] is p / q, where p, q ∈ ℤ+ and gcd(p, q) = 1. Then pn / qn = m, and pn = mqn. This means p is divisible by m. Therefore, there exists some integer r such that p = mr, so we now have mnrn = mqn. Dividing both sides by m gives mn − 1rn = qn. This means that q must also be divisible by m, which is a contradiction, since p and q were assumed to be relatively prime. [math]\displaystyle{ \square }[/math]


Note: Pipe characters (|) must be escaped as {{!}} or {{pipe}}, equals signs must be escaped as {{=}} (this may apply to tags as well, e.g. <div style{{=}}"…">), and other special characters and character sequences may need to be escaped accordingly, except for ones inside <nowiki>, <pre>, <math>, and <syntaxhighlight> tags.

See also