| 1 |
-------------- |
| 2 |
Euler Identity |
| 3 |
-------------- |
| 4 |
|
| 5 |
This directory contains a single Notation3 file that expresses the |
| 6 |
Euler identity in the ARC style: it states the Answer, gives a short |
| 7 |
Reason, and carries several independent Checks that verify the claim |
| 8 |
each time the file is reasoned over. The file uses only the official N3 |
| 9 |
math built-ins in rule bodies and models complex numbers with small |
| 10 |
backward rules, which act as lightweight, user-defined built-ins for |
| 11 |
complex sum, product, and the mapping e^{iθ} → (cos θ, sin θ). |
| 12 |
|
| 13 |
The Answer is asserted when tolerant comparisons show that cos(π) is |
| 14 |
essentially −1 and sin(π) is essentially 0. The Reason is given as |
| 15 |
plain text that points to Euler’s formula viewed as “rotation on |
| 16 |
the unit circle.” The Checks verify the claim from different angles: |
| 17 |
- a direct trigonometric evaluation |
| 18 |
- a computation of e^{iπ} via the user-defined complex exponentiation |
| 19 |
- a unit-magnitude check |e^{iπ}| = 1 |
| 20 |
- an angle-doubling identity e^{iπ}·e^{iπ} = e^{i·2π}. |
| 21 |
All comparisons use a small tolerance of 1e−12 so harmless floating-point |
| 22 |
residues do not mask success. |
| 23 |
|
| 24 |
To run it, load the N3 file into an N3 reasoner that supports the math |
| 25 |
built-ins and backward rules, such as EYE, and materialize the inferred |
| 26 |
triples. Any reasoner that executes the built-ins for cosine, sine, |
| 27 |
arithmetic, absolute value, and order will do. After reasoning you |
| 28 |
should see the concise summary alongside the checks, for example: |
| 29 |
|
| 30 |
@prefix : <http://example.org/arc/euler#>. |
| 31 |
@prefix math: <http://www.w3.org/2000/10/swap/math#>. |
| 32 |
|
| 33 |
:answer :text "e^{iπ} + 1 = 0". |
| 34 |
:answer :pair (0 0). |
| 35 |
:reason :says "Use e^{iθ} = (cos θ, sin θ); with θ = π we get (-1,0), so e^{iπ}+1=0.". |
| 36 |
:reason :uses math:cos. |
| 37 |
:reason :uses math:sin. |
| 38 |
:reason :at 3.141592653589793 . |
| 39 |
:reason :cos -1.0 . |
| 40 |
:reason :sin 1.2246467991473532e-16 . |
| 41 |
:check1 :ok true. |
| 42 |
:check2 :ok true. |
| 43 |
:check3 :ok true. |
| 44 |
:check4 :ok true. |
| 45 |
:check5 :ok true. |
| 46 |
|
| 47 |
If you wish to adapt the file, you can change the angle, tighten or |
| 48 |
loosen the tolerance, or add more checks, so long as rule bodies remain |
| 49 |
triple patterns that call only the documented N3 built-ins. In this way |
| 50 |
the ARC artifact stays self-contained, readable, and repeatable: it |
| 51 |
says the answer, explains the reason, and proves itself every time it |
| 52 |
runs. |
| 53 |
|