modules¶
geometor.byrne¶
Digital Scriptorium Codex, Visual Pseudocode Engine, and Symbolic Proofs for Oliver Byrne’s 1847 Euclid.
Unites Oliver Byrne’s The First Six Books of the Elements of Euclid in Which Coloured Diagrams and Symbols Are Used Instead of Letters for the Greater Ease of Learners (London: William Pickering / Chiswick Press, 1847) with:
Inline Byrne Visual Glyph Roles (
geometor.byrne.sphinx_ext) rendering authentic four-color vector micro-glyphs inside Sphinx/HTML/EPUB proof equations with bidirectional.euclid-graphichover/click highlighting;Formal Pointer-Free Visual Pseudocode Grammar (
geometor.byrne.pseudocode) modeling Byrne’s 1847 notation as a typed geometric value-token DSL alongside Heath’s classical alphabetic Euclid andgeometor/elementsformal pseudocode; and100% Exact Symbolic Constructions & Renderer (
geometor.byrne.constructions,geometor.byrne.render) built ongeometor.model.Modelover exact SymPy number fields ($mathbb{Q}$, $mathbb{Q}(sqrt{3})$, $mathbb{Q}(phi)$, and cyclotomic pentagonal extensions).
Submodules¶
Attributes¶
Classes¶
Complete symbolic model, verified invariants, and 1847 visual layers for one plate. |
|
Color specification for one of Oliver Byrne's four 1847 woodblock inks. |
|
Complete 3-way Rosetta formalization of a Euclidean proposition. |
|
A single structured line in a Byrne visual program. |
|
Quantitative comparison across Heath (alphabetic), Byrne (visual), and GEOMETOR (DAG). |
|
An inline pass-by-value geometric glyph in a Byrne statement. |
Functions¶
|
Construct and verify all 17 showcase |
|
Construct and verify a single |
|
Return ordered list of all 17 showcase Byrne proposition IDs. |
|
Return the |
|
Compute quantitative Rosetta comparison metrics for a |
|
Lookup a |
|
Construct and export all 17 showcase Byrne plates into |
|
Write |
|
Render a |
Package Contents¶
- geometor.byrne.PHI: sympy.Expr¶
- geometor.byrne.PLATE_REGISTRY: dict[str, collections.abc.Callable[[], ByrnePlate]]¶
- class geometor.byrne.ByrnePlate¶
Complete symbolic model, verified invariants, and 1847 visual layers for one plate.
- model: geometor.model.Model¶
- polygons: list[StyledPolygon] = []¶
- wedges: list[StyledAngleWedge] = []¶
- circles: list[StyledCircle] = []¶
- segments: list[StyledSegment] = []¶
- geometor.byrne.build_all_plates() list[ByrnePlate]¶
Construct and verify all 17 showcase
ByrnePlatemodels.
- geometor.byrne.build_plate(prop_id: str) ByrnePlate¶
Construct and verify a single
ByrnePlateby proposition ID.
- geometor.byrne.list_plate_ids() list[str]¶
Return ordered list of all 17 showcase Byrne proposition IDs.
- geometor.byrne.BYRNE_COLORS: dict[str, ByrneColorSpec]¶
- class geometor.byrne.ByrneColorSpec¶
Color specification for one of Oliver Byrne’s four 1847 woodblock inks.
Stores canonical token
name, human-readablelabel, light/dark stroke and fill hex values (light_hex,dark_hex,light_fill_hex,dark_fill_hex), CSS custom property tokens (css_var,css_fill_var), and the 1847 Chiswick Presshistorical_pigmentnote.
- geometor.byrne.get_color_spec(color: str) ByrneColorSpec¶
Return the
ByrneColorSpecforcolor(case-insensitive).- Parameters:
color – Color identifier (
"red","blue","yellow","black", or"ink").- Returns:
Matching
ByrneColorSpec.- Raises:
ValueError – If
coloris not one of Byrne’s four canonical colors.
- geometor.byrne.ROSETTA_PROGRAMS: dict[str, ByrneProgram]¶
- class geometor.byrne.ByrneProgram¶
Complete 3-way Rosetta formalization of a Euclidean proposition.
Pairs Byrne’s 1847 pointer-free visual program with Heath’s classical alphabetic English translation and GEOMETOR’s formal DAG pseudocode.
- statements: tuple[ByrneStatement, ...]¶
- all_visual_tokens() list[VisualToken]¶
Flatten all visual tokens appearing across all phases of the program.
- class geometor.byrne.ByrneStatement¶
A single structured line in a Byrne visual program.
Stores block
phase(ProofPhase), ordereditemsof visual tokens, operators, and minimal connectors, marginal Euclideanjustifications, and an optional analyticalcomment.- phase: ProofPhase¶
- visual_tokens() list[VisualToken]¶
Return all
VisualTokeninstances in this statement.
- class geometor.byrne.RosettaMetrics¶
Quantitative comparison across Heath (alphabetic), Byrne (visual), and GEOMETOR (DAG).
- register_diagnostic: RegisterDiagnostic¶
- class geometor.byrne.VisualToken¶
An inline pass-by-value geometric glyph in a Byrne statement.
Encodes primitive
kind(TokenKind), Byrnecolorexpression,stroke(StrokeMode),fill(FillMode), optional interactivegeom_ref,squaredexponent flag, Book Vshape_hint, and intentional symmetriccongruence_group.- stroke: StrokeMode¶
- geometor.byrne.compute_rosetta_metrics(program: ByrneProgram) RosettaMetrics¶
Compute quantitative Rosetta comparison metrics for a
ByrneProgram.
- geometor.byrne.get_rosetta_program(prop_id: str) ByrneProgram¶
Lookup a
ByrneProgramby proposition ID (e.g."I.47").
- geometor.byrne.export_all_plates(output_dir: str | pathlib.Path) list[pathlib.Path]¶
Construct and export all 17 showcase Byrne plates into
output_dir.
- geometor.byrne.export_plate_svg(plate: geometor.byrne.constructions.ByrnePlate, output_path: str | pathlib.Path, *, margin: float = 42.0, show_labels: bool | None = None) pathlib.Path¶
Write
plateas an interactive.euclid-graphicSVG file.
- geometor.byrne.render_plate_svg(plate: geometor.byrne.constructions.ByrnePlate, *, margin: float = 42.0, show_labels: bool | None = None) str¶
Render a
ByrnePlateinto a.euclid-graphicSVG.
- geometor.byrne.__version__ = '0.1.0'¶