Untitled

MathCodes.org — System Specification

0. Identity & Purpose

MathCodes.org is a LeetCode-style platform for mathematical thinking.

1. Core Principles

  1. Code-first correctness

    • Each math problem has a deterministic Python validation harness.
    • A user’s solution is a Python function or script that must pass that harness.
    • If the code passes all tests, the solution is accepted.
  2. Math > Code

    • Problems emphasize mathematical reasoning and concepts (limits, derivatives, eigenvalues, convergence, etc.).
    • Code is the execution layer that checks the math.
  3. Separation of Concerns

    • Problem definition lives in structured content files.
    • Validation logic is deterministic Python maintained by humans.
    • Frontend renders problems, runs code submissions, and displays personal notes.
  4. User-facing rules

    • Users write Python code that obeys the required interface.
    • The platform executes code in a sandbox and reports PASS/FAIL solely from validation outcomes.
    • Personal Markdown/LaTeX notes are optional and never affect grading.

2. Content Model

Every problem is a content file (YAML/JSON) with fields including:

Invariants

3. User Interaction Model

3.1 Solving a Problem

  1. Users see the title, statement (LaTeX rendered), I/O spec, examples, code editor, and notes area.
  2. Users write Python that matches the required interface and produces correct outputs.
  3. On submission, the backend sandbox executes the code and calls the problem-specific validator.
  4. The frontend reports ✅ All tests passed or ❌ Some tests failed, with minimal feedback.

3.2 Notes / LaTeX

4. Validation System (Conceptual)

Requirements

  1. Python-Only validation and deterministic tests.
  2. Sandboxed Execution blocking filesystem/network access for user code.
  3. Outcome reports the mismatch type; randomness, if any, uses fixed seeds.

5. Problem Types

6. Difficulty & Topic Structure

7. Non-Goals and Prohibitions

8. Extensibility Rules

9. Developer Responsibilities

10. Summary

MathCodes.org is a human-authored, Python-validated problem platform where users learn and demonstrate mathematical understanding by writing code whose outputs are rigorously tested. LaTeX is for personal notes only and never part of grading.