crosslang/GolangLean
Maximus Gorog 878a84e072 Add Tiny Go Core (TGC): kernel calculus with proven determinism.
GolangLean/Core/ holds a small calculus that surface Go is intended to
desugar into. Three files:

  Syntax.lean       - Term, BinOp; thirteen syntactic forms covering
                      let-binding, lambda, application, references
                      (Go's & / *), conditionals, sequencing.

  Semantics.lean    - Value, EnvList, Heap, BinOp.apply, BigStep relation.
                      Heap is Array Value; references are indices.
                      Closures capture EnvList lexically, as in Go.
                      Fourteen big-step constructors, one per syntactic form
                      (with ifte split into ifTR / ifFR).

  Determinism.lean  - theorem BigStep.deterministic:
                        BigStep h env e v1 h1 -> BigStep h env e v2 h2 ->
                        v1 = v2 /\ h1 = h2
                      Proof by induction on the first derivation, case
                      analysis on the second. The ifTR/ifFR cross-cases
                      close by contradiction via Bool.noConfusion.

No sorries, no axioms, no admits. The kernel is small enough to extend
compositionally: each new syntactic form adds one constructor and one
case to each proof. Type system and concurrency layer come later.

Strategic note: this kernel is shaped so the same construction will
work for any sequential calculus. When octive-lean grows a parallel
Tiny Octave Core, the determinism proof's structure will line up
case-for-case where the languages share constructors. That alignment
is the seed of the cross-language layer.
2026-05-10 02:23:58 -06:00
..
Core Add Tiny Go Core (TGC): kernel calculus with proven determinism. 2026-05-10 02:23:58 -06:00
AST.lean Initial scaffold: Lean 4 reimplementation of Go. 2026-05-10 02:12:19 -06:00
BigStep.lean Initial scaffold: Lean 4 reimplementation of Go. 2026-05-10 02:12:19 -06:00
Builtins.lean Initial scaffold: Lean 4 reimplementation of Go. 2026-05-10 02:12:19 -06:00
Env.lean Initial scaffold: Lean 4 reimplementation of Go. 2026-05-10 02:12:19 -06:00
Error.lean Initial scaffold: Lean 4 reimplementation of Go. 2026-05-10 02:12:19 -06:00
Eval.lean Initial scaffold: Lean 4 reimplementation of Go. 2026-05-10 02:12:19 -06:00
Parser.lean Initial scaffold: Lean 4 reimplementation of Go. 2026-05-10 02:12:19 -06:00
PureEval.lean Initial scaffold: Lean 4 reimplementation of Go. 2026-05-10 02:12:19 -06:00
REPL.lean Initial scaffold: Lean 4 reimplementation of Go. 2026-05-10 02:12:19 -06:00
Scanner.lean Initial scaffold: Lean 4 reimplementation of Go. 2026-05-10 02:12:19 -06:00
Token.lean Initial scaffold: Lean 4 reimplementation of Go. 2026-05-10 02:12:19 -06:00
Value.lean Initial scaffold: Lean 4 reimplementation of Go. 2026-05-10 02:12:19 -06:00
ValueEquiv.lean Initial scaffold: Lean 4 reimplementation of Go. 2026-05-10 02:12:19 -06:00