W.16 The Euler Line & Nine-Point Circle Over Arbitrary Fields — Code

In any non-null triangle A_1 A_2 A_3 over a field F (char F != 2), the nine-point center N = (C + O)/2 satisfies 2*N - C = O (and 3*G = 2*C + O when char F != 3), placing C, G, N, O on the Euler line with quadrance proportions Q(C, G) : Q(C, N) : Q(C, O) = 4 : 9 : 36; the three side midpoints M_i, three altitude feet F_i, and three Euler midpoints E_i = (A_i + O)/2 all have exact quadrance K / 4 from N.
t c_circ (Q = 610/9) c_nine (Q = 305/18) l_euler A_1 = [0, 0] A_2 = [14, 0] A_3 = [4, 12] C = [7, 13/3] G = [6, 4] N = [11/2, 23/6] O = [4, 10/3] M_1 = [9, 6] M_2 = [2, 6] M_3 = [7, 0] F_1 = [504/61, 420/61] F_2 = [7/5, 21/5] F_3 = [4, 0] E_1 = [2, 5/3] E_2 = [9, 5/3] E_3 = [4, 23/3] A = [7 - sqrt(61), 13/3 - sqrt(61)/3] B = [7 + sqrt(61), sqrt(61)/3 + 13/3] D = [11/2 - sqrt(61)/2, 23/6 - sqrt(61)/6] E = [sqrt(61)/2 + 11/2, sqrt(61)/6 + 23/6] K_9 = K/4 = 305/18 Euler Line: 3*G = 2*C + O, 2*N = C + O A1A1 A2A2 A3A3 CC GG NN OO M1M1 M2M2 M3M3 F1F1 F2F2 F3F3 E1E1 E2E2 E3E3 + − ⟲ Lbl Gde

Exact geometor.model SVG output of model.py for W.16 (The Euler Line & Nine-Point Circle Over Arbitrary Fields).

Symbolic Construction & Verification Script (model.py)

"""GEOMETOR Wildberger symbolic model and proof script for W.16: The Euler Line & Nine-Point Circle Over Arbitrary Fields.

        Enunciation: In any non-null triangle A_1 A_2 A_3 over a field F (char F != 2), the nine-point center N = (C + O)/2 satisfies 2*N - C = O (and 3*G = 2*C + O when char F != 3), placing C, G, N, O on the Euler line with quadrance proportions Q(C, G) : Q(C, N) : Q(C, O) = 4 : 9 : 36; the three side midpoints M_i, three altitude feet F_i, and three Euler midpoints E_i = (A_i + O)/2 all have exact quadrance K / 4 from N.
        """

        from __future__ import annotations

        import sys
        from pathlib import Path

        _ROOT_SRC = Path(__file__).resolve().parents[3] / "src"
        if str(_ROOT_SRC) not in sys.path:
            sys.path.insert(0, str(_ROOT_SRC))

        from geometor.wildberger.models import (  # noqa: E402
            TopicBuildResult,
            assert_zero_floats,
            build_principle_model,
        )
        from geometor.wildberger.render import render_svg  # noqa: E402


        def construct_w_16() -> TopicBuildResult:
            """Construct the exact symbolic model and verifications for W.16.

            Returns:
                Populated `TopicBuildResult` for W.16 (The Euler Line & Nine-Point Circle Over Arbitrary Fields).
            """
            result = build_principle_model("W.16")
            assert_zero_floats(result.model)
            return result


        def main() -> None:
            """Execute W.16 symbolic construction, render `w-16.svg`, and print invariants."""
            here = Path(__file__).resolve().parent
            bundle = construct_w_16()
            svg_out = render_svg(
                bundle.model,
                here / "w-16.svg",
                extra_curves=bundle.extra_curves,
                annotations=bundle.annotations,
            )
            print("W.16: The Euler Line & Nine-Point Circle Over Arbitrary Fields")
            print(f"  Elements in model: {len(bundle.model)}")
            print(f"  Rendered SVG:      {svg_out.name}")
            for label, val, status in bundle.verifications:
                print(f"  [OK] {label}: {val} ({status})")


        if __name__ == "__main__":
            main()