Skip to content

Import categorial, Lambek, and minimalist grammar equivalences - #1066

Merged
Vilin97 merged 3 commits into
mainfrom
feature/grammar-equivalences-20261128
Nov 28, 2026
Merged

Vilin97 merged 3 commits into
mainfrom
feature/grammar-equivalences-20261128

Conversation

@Vilin97

@Vilin97 Vilin97 commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Result

Three classical grammar equivalences, with explicit translations and their
correctness proofs.

  • Basic categorial grammars and context-free languages excluding the empty word.
    Bar-Hillel, Gaifman and Shamir (1960)
  • Product Lambek grammars with a primitive goal type and context-free languages
    excluding the empty word. The proof includes cut elimination, thin sequents,
    interpolation and free-group machinery. Lambek to CFG uses the primitive-goal
    case of Pentus’s Theorem 2. CFG to Lambek uses the Greibach-derived basic
    categorial lexicon and its embedding in the Lambek calculus, a direction
    Pentus’s introduction credits to Cohen.
    Pentus (1993),
    Kanazawa (2018), Sections 3–4,
    Cohen (1967)
  • Chain-based Stabler–Keenan minimalist grammars and linear non-erasing
    multiple context-free grammars. This variant uses nonempty lexical feature
    lists, a distinguished basic goal category, and the shortest-move condition.
    It formalizes overt phrasal movement.
    Stabler and Keenan, §2 Definition 1 and §2.3,
    Michaelis, forward,
    Michaelis, converse,
    Harkema, converse

The CFG transformations use ordered rule lists. The new Mathlib bridge proves
language preservation in both directions and restates the first two equivalences
using Language.IsContextFree. The normal forms and the LCFRS transformations
remain available as reusable modules. Lean Pool’s existing
PumpingCfg project includes ContextFreeGrammar.toCNF_correct for Mathlib’s
finite-set grammar representation. The list-based conversion here supplies
the production data for the Greibach and categorial translations.

Upstream and port

  • First public release on November 28, 2026 at 08:27:47 UTC, with Pentus’s
    theorem added in the 09:04:03 UTC release.
    Version 1.0,
    Version 2.0
  • Imported revision 967b3f2cfa05b52ca253b37d3e58b49abd6d150d, MIT.
    The entry module carries the complete upstream MIT notice. The upstream
    credits Gemini and Claude with drafting proof scripts and the author with
    direction and audit. The card records AI provenance on that evidence.
    Pinned upstream source
  • Imported the three equivalences and their 22-module core, including the
    normal forms, grammar translations, and Lambek proof theory. The separate
    upstream example file and diagnostic commands stay upstream. Added the
    Mathlib bridge as a separate module.
  • Ported to Lean v4.36.0 and Mathlib fc4f59e577feb1a4956671bc04ac18aaaf8cd842.
    Converted to the module system, removed the unused-simp suppression by
    fixing its proofs, split five proofs to fit the proof-length gate, and
    documented the public definitions.
  • The main statements retain their upstream hypotheses and conclusions.
    The repository’s project-scoped declaration, axiom, option, and build
    message audits pass with the standard three Lean axioms.

Compile measurements and checks

A clean upstream build with four Lean threads took 11.38 s. The comparable
Lean Pool measurement uses LEAN_NUM_THREADS=4 lake --no-cache build LeanPool.FormalLinguistics.Imports with prebuilt dependencies and a fresh
project build directory. The initial lint-clean core took 9.01 s. Reusing
the unique-mover split lemma removes the repeated chain-membership and
list-mapping arguments in both movement cases, and the merge-rule
constructors share the precomputed grammar profiles. Removed nine redundant
direct imports. The review repair also moves the shared list helpers into
Fixpoint.lean, which removes the dependency on the Chomsky normal-form
module from the minimalist-grammar pipeline. The CFG normal-form code shares
the nullable symbols and unary-path candidates across each conversion.
Lean confirms the four updated definitions are definitionally equal to their
prior versions. Generated code confirms that empty-production elimination
makes one nullability call before its filters. The first clean optimized
core run took 9.82 s on the shared VM. Three alternating clean builds with
one Lean thread, matched
imports and prebuilt dependencies had median wall times of 22.39 s and
22.34 s. Synchronous command profiling measured 151,651 → 148,067
heartbeats for MGtoMCFG; the two movement proofs together went from
11,219 to 7,636 heartbeats, including the new shared lemma.
The wall-clock runs show variation and establish no material overall
speedup. The complete repaired project, including the Mathlib bridge,
built from fresh project artifacts in 8.17 s with four Lean threads.

Locally passed the warning-as-error project build, generated index check,
Mathlib linters, style checks, full-tree static quality checks, and
project-scoped Lean quality audit. The full Lean Pool build and all
applicable checks run in GitHub CI.

@greptile-apps

greptile-apps Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict.

No blocking issue was found in the latest changes; external source fidelity remains unverified.RetriggerView in Greptile

[Low impact] No blocking issue was found in the latest changes; external source fidelity remains unverified.

Summary

Imports three grammar equivalences, their supporting translations and proofs, and a bridge to Mathlib’s context-free languages.

  • Basic categorial grammars match context-free languages without the empty word.
  • Product Lambek grammars match context-free languages without the empty word.
  • Chain-based minimalist grammars match linear non-erasing multiple context-free grammars.
  • Context-free grammar results now connect to Mathlib's language interface.

Reviews (3) · Last reviewed commit: "Clarify grammar sources and share normal..." · Reviewed by Greptile

@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Proof profile (new / modified Lean files)

lake build wall time (changed modules): 43.90 s (= 0.73 min) — user 51.94 s, sys 7.79 s.

This build covers the changed modules and their dependency cones on top of the restored cache. The serial per-file sums below are useful for ranking slow files, not as a build budget.

Total heartbeats: 534,433 maxHeartbeats units across 25 valid files (11,728 added LOC).

Sum of lean --profile: 54519.2 ms (= 54.52 s) across 25 valid files. Import-excluded time: 50247.2 ms (= 50.25 s).

Count-heartbeats wall-clock total: 94.38 s. Repeated import cost inside lean --profile: 4272.0 ms (= 4.27 s).

Heartbeat values sum disjoint root command traces with trace.profiler.useHeartbeats and synchronous elaboration, converted from raw allocations to maxHeartbeats units by dividing by 1000. They include command elaboration and kernel checking, exclude imports, and include profiler overhead; they are not comparable to the deprecated linter's totals. Per-file wall clocks are measured under parallel load and are noisier than heartbeats.

LOC counts added lines in the profiled Lean files from this PR diff.

File LOC Heartbeats (maxHB) Count wall (s) lean --profile (s) Without import (s) Import (s) Commands Errors
LeanPool/FormalLinguistics/MGtoMCFG.lean 3,221 148,041 17.90 26.79 26.66 0.13 118 0
LeanPool/FormalLinguistics/MCFGtoMG.lean 1,682 75,563 9.73 5.33 5.20 0.13 121 0
LeanPool/FormalLinguistics/CNF.lean 782 44,847 6.82 2.88 2.75 0.13 104 0
LeanPool/FormalLinguistics/LambekInterpolation.lean 291 35,778 4.31 1.72 1.59 0.12 31 0
LeanPool/FormalLinguistics/BinMCFG.lean 811 33,876 5.38 2.65 2.53 0.12 57 0
LeanPool/FormalLinguistics/MGMCFGEquiv.lean 472 26,800 4.57 1.82 1.70 0.13 70 0
LeanPool/FormalLinguistics/LambekPentus.lean 576 21,047 4.58 1.93 1.80 0.13 54 0
LeanPool/FormalLinguistics/LambekFreeGroup.lean 652 20,937 4.97 1.84 1.72 0.13 98 0
LeanPool/FormalLinguistics/ABG.lean 274 14,059 2.30 0.63 0.50 0.13 109 0
LeanPool/FormalLinguistics/MG.lean 229 13,720 2.24 0.48 0.36 0.12 64 0
LeanPool/FormalLinguistics/MathlibBridge.lean 155 12,608 3.09 0.93 0.45 0.48 46 0
LeanPool/FormalLinguistics/Lambek.lean 319 12,439 2.41 0.65 0.53 0.12 76 0
LeanPool/FormalLinguistics/LambekCut.lean 280 11,866 2.73 0.75 0.62 0.13 38 0
LeanPool/FormalLinguistics/MCFG.lean 178 11,628 1.91 0.54 0.41 0.12 65 0
LeanPool/FormalLinguistics/LambekThin.lean 190 10,638 2.87 0.97 0.85 0.13 22 0
LeanPool/FormalLinguistics/CFG.lean 206 10,428 1.99 0.53 0.40 0.13 92 0
LeanPool/FormalLinguistics/GNF.lean 277 10,259 2.54 0.68 0.56 0.12 40 0
LeanPool/FormalLinguistics/ABGtoCFG.lean 180 5,876 2.05 0.55 0.42 0.13 27 0
LeanPool/FormalLinguistics/MGOriginal.lean 255 4,153 1.94 0.36 0.23 0.13 35 0
LeanPool/FormalLinguistics/Fixpoint.lean 222 3,791 2.09 0.45 0.33 0.12 23 0
LeanPool/FormalLinguistics/CFGtoABG.lean 138 2,608 1.72 0.34 0.22 0.12 14 0
LeanPool/FormalLinguistics/LambekCore.lean 122 1,845 1.37 0.26 0.13 0.13 27 0
LeanPool/FormalLinguistics/BarHillel.lean 135 1,625 1.70 0.27 0.15 0.12 23 0
LeanPool/FormalLinguistics.lean 49 0 1.28 0.16 0.03 0.13 2 0
LeanPool/FormalLinguistics/Imports.lean 32 0 1.89 1.00 0.11 0.89 1 0
Total 11,728 534,433 94.38 54.52 50.25 4.27 1357 0

Aggregate phase totals

Phase Time
blocked (unaccounted) 18852.0 ms (= 18.85 s)
tactic execution 9217.8 ms (= 9.22 s)
simp 7840.0 ms (= 7.84 s)
import 4272.0 ms (= 4.27 s)
type checking 4020.7 ms (= 4.02 s)
elaboration 3353.1 ms (= 3.35 s)
process pre-definitions 1424.5 ms (= 1.42 s)
typeclass inference 1327.2 ms (= 1.33 s)
linting 908.5 ms (= 0.91 s)
initialization 720.3 ms (= 0.72 s)
parsing 560.6 ms (= 0.56 s)
instantiate metavars 371.2 ms (= 0.37 s)

Slowest changed modules (from lake build)

Changed module Lake time
LeanPool.FormalLinguistics.MGtoMCFG 10.00 s
LeanPool.FormalLinguistics.MCFGtoMG 6.30 s
LeanPool.FormalLinguistics.CNF 3.60 s
LeanPool.FormalLinguistics.BinMCFG 3.40 s
LeanPool.FormalLinguistics.MathlibBridge 2.50 s
LeanPool.FormalLinguistics.LambekFreeGroup 2.20 s
LeanPool.FormalLinguistics.LambekThin 2.10 s
LeanPool.FormalLinguistics.MGMCFGEquiv 1.60 s
LeanPool.FormalLinguistics.ABGtoCFG 1.50 s
LeanPool.FormalLinguistics.MG 1.20 s
LeanPool.FormalLinguistics.ABG 1.10 s
LeanPool.FormalLinguistics.CFG 1.10 s
Per-file `lean --profile` output

LeanPool/FormalLinguistics.lean

import took 132ms
cumulative profiling times:
	elaboration 0.113ms
	import 132ms
	initialization 26.8ms
	interpretation 2.48ms
	linting 0.288ms
	parsing 0.0423ms
real 0.92
user 0.37
sys 0.63

LeanPool/FormalLinguistics/ABG.lean

import took 127ms
cumulative profiling times:
	attribute application 0.512ms
	blocked (unaccounted) 52.1ms
	compilation (IR) 0.468ms
	compilation (LCNF base) 4.76ms
	compilation (LCNF impure) 2.03ms
	compilation (LCNF mono) 3.14ms
	congr simp thm 1.26ms
	elaboration 92.7ms
	fix level params 0.805ms
	import 127ms
	initialization 27.1ms
	instantiate metavars 3.74ms
	interpretation 2.33ms
	let-to-have transformation 1.04ms
	linting 19.2ms
	parsing 13.8ms
	process pre-definitions 16.1ms
	share common exprs 4.87ms
	simp 51.7ms
	tactic execution 115ms
	type checking 65.3ms
	typeclass inference 20.7ms
real 1.09
user 0.82
sys 0.58

LeanPool/FormalLinguistics/ABGtoCFG.lean

import took 126ms
cumulative profiling times:
	attribute application 0.0953ms
	blocked (unaccounted) 58ms
	compilation (IR) 0.453ms
	compilation (LCNF base) 7.42ms
	compilation (LCNF impure) 1.95ms
	compilation (LCNF mono) 3.52ms
	congr simp thm 1.81ms
	elaboration 52.1ms
	fix level params 0.517ms
	import 126ms
	initialization 27ms
	instantiate metavars 2.47ms
	interpretation 2.38ms
	let-to-have transformation 0.0896ms
	linting 9.04ms
	parsing 6.26ms
	process pre-definitions 54.5ms
	share common exprs 2.84ms
	simp 73.4ms
	tactic execution 69.8ms
	type checking 42.5ms
	typeclass inference 5.71ms
real 1.10
user 0.70
sys 0.59

LeanPool/FormalLinguistics/BarHillel.lean

import took 124ms
cumulative profiling times:
	attribute application 0.0706ms
	compilation (IR) 0.227ms
	compilation (LCNF base) 1.63ms
	compilation (LCNF impure) 0.972ms
	compilation (LCNF mono) 1.43ms
	congr simp thm 0.52ms
	elaboration 19.7ms
	fix level params 0.248ms
	import 124ms
	initialization 28.2ms
	instantiate metavars 0.805ms
	interpretation 2.25ms
	let-to-have transformation 0.0901ms
	linting 4.18ms
	parsing 4.42ms
	process pre-definitions 5.06ms
	share common exprs 1.22ms
	simp 17.7ms
	tactic execution 43.8ms
	type checking 6.41ms
	typeclass inference 10.1ms
real 0.97
user 0.50
sys 0.61

LeanPool/FormalLinguistics/BinMCFG.lean

import took 124ms
cumulative profiling times:
	attribute application 0.574ms
	blocked (unaccounted) 367ms
	compilation (IR) 1.9ms
	compilation (LCNF base) 17.3ms
	compilation (LCNF impure) 9.65ms
	compilation (LCNF mono) 13.7ms
	congr simp thm 9.57ms
	elaboration 238ms
	fix level params 3.15ms
	import 124ms
	initialization 26.7ms
	instantiate metavars 18.8ms
	interpretation 2.34ms
	let-to-have transformation 1.82ms
	linting 56.8ms
	parsing 37.7ms
	process pre-definitions 238ms
	share common exprs 18.4ms
	simp 516ms
	tactic execution 554ms
	type checking 332ms
	typeclass inference 67.1ms
real 1.82
user 2.56
sys 0.59

LeanPool/FormalLinguistics/CFG.lean

import took 128ms
cumulative profiling times:
	attribute application 0.424ms
	blocked (unaccounted) 17.2ms
	compilation (IR) 0.375ms
	compilation (LCNF base) 2.85ms
	compilation (LCNF impure) 1.56ms
	compilation (LCNF mono) 2.43ms
	congr simp thm 0.817ms
	elaboration 97.8ms
	fix level params 0.609ms
	import 128ms
	initialization 34.9ms
	instantiate metavars 2.39ms
	interpretation 2.3ms
	let-to-have transformation 0.16ms
	linting 15.4ms
	parsing 10.2ms
	process pre-definitions 48ms
	share common exprs 3.17ms
	simp 22ms
	tactic execution 60.2ms
	type checking 54.6ms
	typeclass inference 20.7ms
real 1.04
user 0.74
sys 0.59

LeanPool/FormalLinguistics/CFGtoABG.lean

import took 123ms
cumulative profiling times:
	attribute application 0.0544ms
	compilation (IR) 0.325ms
	compilation (LCNF base) 4.62ms
	compilation (LCNF impure) 1.47ms
	compilation (LCNF mono) 2.07ms
	congr simp thm 1.32ms
	elaboration 28ms
	fix level params 0.492ms
	import 123ms
	initialization 27.4ms
	instantiate metavars 2.05ms
	interpretation 2.44ms
	let-to-have transformation 0.062ms
	linting 8.05ms
	parsing 4.51ms
	process pre-definitions 4.84ms
	share common exprs 2.17ms
	simp 27.3ms
	tactic execution 85.8ms
	type checking 15.8ms
	typeclass inference 2.44ms
real 1.00
user 0.60
sys 0.61

LeanPool/FormalLinguistics/CNF.lean

import took 127ms
cumulative profiling times:
	attribute application 0.793ms
	blocked (unaccounted) 459ms
	compilation (IR) 2.76ms
	compilation (LCNF base) 40.3ms
	compilation (LCNF impure) 12.8ms
	compilation (LCNF mono) 22.5ms
	congr simp thm 11.3ms
	elaboration 292ms
	fix level params 3.04ms
	import 127ms
	initialization 27ms
	instantiate metavars 11.9ms
	interpretation 2.44ms
	let-to-have transformation 1.19ms
	linting 59.9ms
	parsing 38.2ms
	process pre-definitions 85.5ms
	share common exprs 16.1ms
	simp 954ms
	tactic execution 456ms
	type checking 167ms
	typeclass inference 87.3ms
real 2.05
user 2.65
sys 0.61

LeanPool/FormalLinguistics/Fixpoint.lean

import took 124ms
cumulative profiling times:
	attribute application 0.131ms
	blocked (unaccounted) 18.6ms
	compilation (IR) 0.362ms
	compilation (LCNF base) 2.64ms
	compilation (LCNF impure) 1.5ms
	compilation (LCNF mono) 2.67ms
	congr simp thm 1.46ms
	elaboration 43.6ms
	fix level params 0.478ms
	import 124ms
	initialization 27.2ms
	instantiate metavars 1.3ms
	interpretation 2.3ms
	let-to-have transformation 0.963ms
	linting 15.3ms
	parsing 11ms
	process pre-definitions 7.2ms
	share common exprs 1.8ms
	simp 27.2ms
	tactic execution 97.6ms
	type checking 36ms
	typeclass inference 30.7ms
real 0.98
user 0.64
sys 0.62

LeanPool/FormalLinguistics/GNF.lean

import took 124ms
cumulative profiling times:
	attribute application 0.362ms
	blocked (unaccounted) 2.17ms
	compilation (IR) 0.878ms
	compilation (LCNF base) 6.55ms
	compilation (LCNF impure) 3.77ms
	compilation (LCNF mono) 6.56ms
	congr simp thm 3.21ms
	elaboration 84.1ms
	fix level params 1.1ms
	import 124ms
	initialization 27.3ms
	instantiate metavars 5.04ms
	interpretation 2.37ms
	let-to-have transformation 0.144ms
	linting 18.6ms
	parsing 10.7ms
	process pre-definitions 11.3ms
	share common exprs 5.39ms
	simp 161ms
	tactic execution 113ms
	type checking 78.4ms
	typeclass inference 18ms
real 1.13
user 0.92
sys 0.60

LeanPool/FormalLinguistics/Imports.lean

import took 894ms
cumulative profiling times:
	declTypeLinter 0.0976ms
	elaboration 0.0922ms
	import 894ms
	initialization 27.4ms
	interpretation 79.5ms
	linting 0.219ms
	module linting 0.0226ms
	parsing 0.00247ms
	tacticAnalysis 0.131ms
real 1.75
user 0.71
sys 0.75

LeanPool/FormalLinguistics/Lambek.lean

import took 125ms
cumulative profiling times:
	attribute application 0.421ms
	blocked (unaccounted) 25.3ms
	compilation (IR) 0.843ms
	compilation (LCNF base) 7.66ms
	compilation (LCNF impure) 3.84ms
	compilation (LCNF mono) 5.86ms
	congr simp thm 1.96ms
	elaboration 101ms
	fix level params 0.773ms
	import 125ms
	initialization 27.7ms
	instantiate metavars 3.63ms
	interpretation 2.31ms
	let-to-have transformation 1.06ms
	linting 20.3ms
	parsing 13ms
	process pre-definitions 20.7ms
	share common exprs 4.32ms
	simp 65.4ms
	tactic execution 143ms
	type checking 57ms
	typeclass inference 20.2ms
real 1.13
user 0.87
sys 0.60

LeanPool/FormalLinguistics/LambekCore.lean

import took 131ms
cumulative profiling times:
	attribute application 0.122ms
	blocked (unaccounted) 1.54ms
	compilation (IR) 1.02ms
	compilation (LCNF base) 9.37ms
	compilation (LCNF impure) 3.49ms
	compilation (LCNF mono) 6.06ms
	elaboration 36.3ms
	fix level params 0.0772ms
	import 131ms
	initialization 27.1ms
	instantiate metavars 0.0979ms
	interpretation 2.38ms
	let-to-have transformation 0.0906ms
	linting 5.77ms
	parsing 6.18ms
	process pre-definitions 8.16ms
	share common exprs 0.415ms
	type checking 15.5ms
	typeclass inference 6.31ms
real 0.94
user 0.48
sys 0.58

LeanPool/FormalLinguistics/LambekCut.lean

import took 127ms
cumulative profiling times:
	attribute application 0.125ms
	blocked (unaccounted) 3.76ms
	compilation (IR) 0.147ms
	compilation (LCNF base) 0.828ms
	compilation (LCNF impure) 0.781ms
	compilation (LCNF mono) 0.873ms
	congr simp thm 2.65ms
	elaboration 53.6ms
	fix level params 1.2ms
	import 127ms
	initialization 27.2ms
	instantiate metavars 7.83ms
	interpretation 2.26ms
	let-to-have transformation 0.175ms
	linting 29.2ms
	parsing 15.7ms
	process pre-definitions 15.3ms
	share common exprs 7.91ms
	simp 213ms
	tactic execution 180ms
	type checking 42.5ms
	typeclass inference 14.4ms
real 1.12
user 0.96
sys 0.58

LeanPool/FormalLinguistics/LambekFreeGroup.lean

import took 126ms
cumulative profiling times:
	attribute application 2.17ms
	blocked (unaccounted) 195ms
	compilation (IR) 0.523ms
	compilation (LCNF base) 4.12ms
	compilation (LCNF impure) 2.33ms
	compilation (LCNF mono) 4.21ms
	congr simp thm 10.9ms
	elaboration 154ms
	fix level params 2.01ms
	import 126ms
	initialization 30.9ms
	instantiate metavars 9.38ms
	interpretation 2.34ms
	let-to-have transformation 0.57ms
	linting 51.5ms
	parsing 33.3ms
	process pre-definitions 26.6ms
	share common exprs 10.8ms
	simp 291ms
	tactic execution 550ms
	type checking 191ms
	typeclass inference 146ms
real 1.34
user 1.82
sys 0.60

LeanPool/FormalLinguistics/LambekInterpolation.lean

import took 125ms
cumulative profiling times:
	attribute application 0.874ms
	blocked (unaccounted) 48.2ms
	compilation (IR) 0.638ms
	compilation (LCNF base) 8.1ms
	compilation (LCNF impure) 2.24ms
	compilation (LCNF mono) 3.27ms
	congr simp thm 9.17ms
	elaboration 75.1ms
	fix level params 1.85ms
	import 125ms
	initialization 32.2ms
	instantiate metavars 30.4ms
	interpretation 7.29ms
	let-to-have transformation 0.159ms
	linting 33.6ms
	parsing 11.2ms
	process pre-definitions 17.5ms
	share common exprs 16ms
	simp 500ms
	tactic execution 426ms
	type checking 329ms
	typeclass inference 40.5ms
real 2.09
user 1.90
sys 0.61

LeanPool/FormalLinguistics/LambekPentus.lean

import took 127ms
cumulative profiling times:
	attribute application 0.286ms
	blocked (unaccounted) 331ms
	compilation (IR) 0.465ms
	compilation (LCNF base) 5.8ms
	compilation (LCNF impure) 1.95ms
	compilation (LCNF mono) 3.29ms
	congr simp thm 6.32ms
	elaboration 140ms
	fix level params 2.32ms
	import 127ms
	initialization 27.4ms
	instantiate metavars 12.3ms
	interpretation 2.39ms
	let-to-have transformation 0.374ms
	linting 48ms
	parsing 30.1ms
	process pre-definitions 78ms
	share common exprs 13.3ms
	simp 251ms
	tactic execution 514ms
	type checking 264ms
	typeclass inference 67.4ms
real 1.52
user 1.75
sys 0.61

LeanPool/FormalLinguistics/LambekThin.lean

import took 126ms
cumulative profiling times:
	attribute application 0.571ms
	blocked (unaccounted) 82.2ms
	compilation (IR) 0.117ms
	compilation (LCNF base) 0.644ms
	compilation (LCNF impure) 0.459ms
	compilation (LCNF mono) 0.581ms
	congr simp thm 4.61ms
	elaboration 92.2ms
	fix level params 1.31ms
	import 126ms
	initialization 31.8ms
	instantiate metavars 10.1ms
	interpretation 2.3ms
	let-to-have transformation 0.144ms
	linting 17.6ms
	parsing 7.92ms
	process pre-definitions 10.7ms
	share common exprs 7.83ms
	simp 88.8ms
	tactic execution 274ms
	type checking 191ms
	typeclass inference 23.3ms
real 1.40
user 1.15
sys 0.59

LeanPool/FormalLinguistics/MCFG.lean

import took 123ms
cumulative profiling times:
	attribute application 0.598ms
	blocked (unaccounted) 45.4ms
	compilation (IR) 1.33ms
	compilation (LCNF base) 12.4ms
	compilation (LCNF impure) 5.77ms
	compilation (LCNF mono) 8.7ms
	congr simp thm 3ms
	elaboration 102ms
	fix level params 0.3ms
	import 123ms
	initialization 28ms
	instantiate metavars 0.535ms
	interpretation 2.22ms
	let-to-have transformation 0.714ms
	linting 8.81ms
	parsing 7.42ms
	process pre-definitions 47.4ms
	share common exprs 1.42ms
	simp 35ms
	tactic execution 33.6ms
	type checking 46ms
	typeclass inference 22.7ms
real 1.11
user 0.74
sys 0.62

LeanPool/FormalLinguistics/MCFGtoMG.lean

import took 126ms
process pre-definitions took 134ms
type checking took 109ms
cumulative profiling times:
	attribute application 2.51ms
	blocked (unaccounted) 375ms
	compilation (IR) 3.75ms
	compilation (LCNF base) 56.9ms
	compilation (LCNF impure) 15.3ms
	compilation (LCNF mono) 31.3ms
	congr simp thm 15.4ms
	elaboration 532ms
	fix level params 13.6ms
	import 126ms
	initialization 31.9ms
	instantiate metavars 119ms
	interpretation 2.31ms
	let-to-have transformation 1.7ms
	linting 168ms
	parsing 81.5ms
	process pre-definitions 288ms
	share common exprs 109ms
	simp 848ms
	tactic execution 1.67s
	type checking 711ms
	typeclass inference 126ms
real 3.14
user 5.22
sys 0.64

LeanPool/FormalLinguistics/MG.lean

import took 124ms
cumulative profiling times:
	attribute application 0.985ms
	blocked (unaccounted) 10.3ms
	compilation (IR) 1.14ms
	compilation (LCNF base) 9.81ms
	compilation (LCNF impure) 4.79ms
	compilation (LCNF mono) 8.31ms
	congr simp thm 1.51ms
	elaboration 108ms
	fix level params 0.508ms
	import 124ms
	initialization 32.9ms
	instantiate metavars 1.56ms
	interpretation 2.34ms
	let-to-have transformation 0.162ms
	linting 12.3ms
	parsing 8.18ms
	process pre-definitions 8.17ms
	share common exprs 2.5ms
	simp 10.2ms
	tactic execution 53.1ms
	type checking 53.1ms
	typeclass inference 28.8ms
real 1.11
user 0.72
sys 0.58

LeanPool/FormalLinguistics/MGMCFGEquiv.lean

import took 126ms
cumulative profiling times:
	attribute application 1.13ms
	blocked (unaccounted) 457ms
	compilation (IR) 5.06ms
	compilation (LCNF base) 71.6ms
	compilation (LCNF impure) 21.7ms
	compilation (LCNF mono) 37.1ms
	congr simp thm 10.7ms
	elaboration 172ms
	fix level params 1.29ms
	import 126ms
	initialization 27.1ms
	instantiate metavars 3.18ms
	interpretation 2.43ms
	let-to-have transformation 0.226ms
	linting 23.5ms
	parsing 20.7ms
	process pre-definitions 37.3ms
	share common exprs 13.6ms
	simp 351ms
	tactic execution 301ms
	type checking 103ms
	typeclass inference 34.7ms
real 1.87
user 1.62
sys 0.62

LeanPool/FormalLinguistics/MGOriginal.lean

import took 126ms
cumulative profiling times:
	attribute application 0.119ms
	blocked (unaccounted) 3.22ms
	congr simp thm 0.442ms
	elaboration 52.3ms
	fix level params 0.53ms
	import 126ms
	initialization 26.9ms
	instantiate metavars 1.46ms
	interpretation 2.41ms
	let-to-have transformation 0.102ms
	linting 12.8ms
	parsing 8.58ms
	process pre-definitions 6.44ms
	share common exprs 2.7ms
	simp 8.47ms
	tactic execution 61.9ms
	type checking 35.9ms
	typeclass inference 5.95ms
real 0.96
user 0.56
sys 0.58

LeanPool/FormalLinguistics/MGtoMCFG.lean

import took 126ms
tactic execution of Lean.Parser.Tactic.simp took 104ms
process pre-definitions took 161ms
simp took 126ms
simp took 113ms
cumulative profiling times:
	attribute application 5.87ms
	blocked (unaccounted) 16.3s
	compilation (IR) 5.7ms
	compilation (LCNF base) 57.5ms
	compilation (LCNF impure) 27ms
	compilation (LCNF mono) 46.5ms
	congr simp thm 64.5ms
	dsimp 35.8ms
	elaboration 758ms
	fix level params 18.7ms
	import 126ms
	initialization 35.1ms
	instantiate metavars 122ms
	interpretation 2.31ms
	let-to-have transformation 8.73ms
	linting 261ms
	parsing 172ms
	process pre-definitions 385ms
	share common exprs 109ms
	simp 3.3s
	tactic execution 3.28s
	type checking 1.17s
	typeclass inference 496ms
real 5.05
user 10.60
sys 0.82

LeanPool/FormalLinguistics/MathlibBridge.lean

import took 481ms
cumulative profiling times:
	attribute application 0.142ms
	compilation (IR) 0.177ms
	compilation (LCNF base) 1.02ms
	compilation (LCNF impure) 0.869ms
	compilation (LCNF mono) 1.07ms
	congr simp thm 1.08ms
	declTypeLinter 3.98ms
	elaboration 28.4ms
	fix level params 0.409ms
	import 481ms
	initialization 27.1ms
	instantiate metavars 1.23ms
	interpretation 151ms
	let-to-have transformation 0.108ms
	linting 9.13ms
	module linting 0.0252ms
	parsing 8ms
	process pre-definitions 4.75ms
	share common exprs 2.38ms
	simp 27.8ms
	tactic execution 136ms
	tacticAnalysis 3.19ms
	type checking 13.7ms
	typeclass inference 32.2ms
real 1.50
user 1.02
sys 0.71

Advisory only — never blocks merge. Full log uploaded as the proof-profile artifact.

@Vilin97

Vilin97 commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

Submitter assessment for 4435287d1d97417e83e6ae1b54c3949c08f8a9cd

My source, proof, and engineering review found the project ready for independent review.

Statement and proof scope

  • bar_hillel_gaifman_shamir compares the generated language pointwise and
    makes exclusion of [] explicit. The reverse translation goes through
    binary Chomsky form and binary Greibach form, with language preservation
    proved at each step. chomsky_pentus uses finite lexical assignments and
    a distinguished primitive type. Its hard direction obtains a finite
    set of bounded grammar rules from cut elimination, thin sequents,
    interpolation and the free-group inequality. Pentus’s Theorem 2 supplies
    the Lambek-to-CFG direction. The converse uses the Greibach-derived basic
    categorial lexicon and the embedding credited to Cohen.
    Bar-Hillel, Gaifman and Shamir,
    Pentus,
    Kanazawa,
    Cohen
  • michaelis_harkema_equivalence_SK compares chain-based Stabler–Keenan
    grammar languages with finite linear non-erasing MCFG languages.
    MGOriginal.lean proves the connection to the invariant-carrying
    presentation used by the translations. MCFGRule.WellFormed checks linearity,
    variable coverage and output arity. Binarization and both simulations
    prove language preservation. The variant uses nonempty lexical feature
    lists and a distinguished basic goal category.
    Stabler and Keenan, §2 Definition 1 and §2.3,
    Michaelis, forward,
    Michaelis, converse,
    Harkema

Novelty, source and engineering

  • I inspected the pinned upstream source and MIT notice, compared the three
    headline statements, and reviewed each imported module in bounded slices
    covering definitions, translation invariants and preservation theorems.
    Mathlib has a pre-existing CFG representation. The new bridge preserves
    membership in the generated languages in both directions and uses
    Language.IsContextFree for the first two equivalences. I found no
    matching headline result in the pinned Mathlib or Tau Ceti sources,
    the pool, or its prior PRs.
    Pinned release source

  • The extracted lemmas preserve the upstream translation signatures. The
    common mover-split lemma replaces repeated membership proofs with
    equality of both list parts at a unique mover. The paired wall times
    were effectively flat, while the two movement proofs plus the shared
    helper decreased from 11,219 to 7,636 heartbeats. The project build and
    repository quality audits passed locally, including axiom checks on the
    proved equivalences and the two Mathlib restatements. The latest revision
    also shares the CFG nullability and unary-path inputs. Four definitional
    equality checks verify the prior conversion behavior.

  • Greptile’s advisory range-lemma observation is accurate. Resolving it in full
    would touch the shared MCFG module and several translations. The protected
    grammar statements and their validation are already in place, and the measured
    improvement above is from the mover proofs. Greptile’s thread

GitHub checks

The previous repaired head passed all applicable Lean and content checks.
The current head passed the project build, generated indexes, Mathlib and
style linters, and project quality audit locally.
Previous Lean Action CI

@Vilin97

Vilin97 commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

🤖 LLM review (gpt-6.2-sol, 5 rubrics)

Reviewed head: 4435287d1d97417e83e6ae1b54c3949c08f8a9cd

Verdict: ✅ approve — computed from the rubric verdicts below, not chosen by a model.

Rubric Verdict Bottom line
Faithfulness ✅ pass All three headline equivalences match the card and construct grammar witnesses in both directions.
Novelty ✅ pass The pool comparison and pinned Mathlib and Tau Ceti keyword searches found no duplicate of any of the three headlines, with comprehensive semantic coverage of Mathlib and Tau Ceti still unverifiable.
Significance ✅ pass The three research-level classifications form a self-contained development with proved grammar translations, Chomsky and Greibach normal forms, and Lambek cut elimination and interpolation.
Sources ✅ pass The citations support all three equivalences as scoped in Lean, with the 1960 result corroborated through Bar-Hillel’s later account and the Lambek converse credited to Cohen through Pentus’s introduction. Bar-Hillel’s lectures, Pentus’s paper, Stabler and Keenan, §2 and §2.3
Code quality (advisory) ⚠️ flag The main maintenance costs are oversized grammar enumerations and translation proofs that repeat the same invariants and case analysis.
Aspect Value
Proves the claim ✅ proves_it
Assumed, not proved The card discloses [DecidableEq T] for the first two headlines, and their Mathlib restatements supply it classically. Decidable equality on CFG nonterminals is part of the existential witness and can also be supplied classically. The card discloses the minimalist grammar’s nonempty lexical feature lists and basic goal category.
Matches cited source ✅ matches
Fit ✅ good_fit
Level research
Branch formal language theory
Mode theory_building
Code quality 3 / 5

Statement check: Basic categorial grammars and product Lambek grammars with a primitive goal each characterize the context-free languages excluding [], and the stated chain-based Stabler–Keenan variant characterizes the languages of finite linear non-erasing MCFGs of arbitrary rank.

Basic categorial grammars and product Lambek grammars with a primitive goal each generate exactly the context-free languages that exclude the empty word, and the formalized chain-based Stabler–Keenan grammars generate exactly the languages of finite linear non-erasing multiple context-free grammars.

Novelty findings (1)

  • partial-overlap — LeanPool/FormalLinguistics/CNF.lean:775
    The pool would maintain two certified conversions to epsilon-free Chomsky normal form. The new computable conversion supplies separate terminal and binary rule lists to the Greibach construction used by the categorial and Lambek translations.
    Evidence: ContextFreeGrammar.toCNF_correct in LeanPool/PumpingCfg/ChomskyNormalForm/Translation.lean proves that the finite-set CNF grammar generates exactly the nonempty words of the original grammar. The new FormalLinguistics.cfgToCNF_lang states (cfgToCNF G).Lang w ↔ G.Lang w ∧ w ≠ [], and cfgToABG uses CNFtoGNF.cnfToGNF (cfgToCNF G).

Code quality findings (11)

  • oversized-enumeration — LeanPool/FormalLinguistics/LambekPentus.lean:252
    allTypes bounds connective depth and carries forward duplicate types, while the completeness proof needs only types with at most m primitive occurrences. A Lean probe with one primitive and m = 3 produced 8,164 entries, with 157 distinct types within the required size bound. pentusCFG takes the cube of the candidate list before filtering binary rules. Enumerate by exact size, combine operands whose sizes sum to that size, and reuse the resulting bounded list in both rule families.
    Evidence: allTypes uses allTypes ps n ++ (allTypes ps n).flatMap (fun X => (allTypes ps n).flatMap. Good requires A.size ≤ m ∧ ∀ p ∈ prims A, p ∈ ps. The binary-rule branch of pentusCFG uses (allTypes ps m).flatMap (fun A => (allTypes ps m).flatMap (fun B => followed by (allTypes ps m).map (fun D => (D, [Symbol.nt A, Symbol.nt B])).
  • repeated-computation — LeanPool/FormalLinguistics/MGtoMCFG.lean:2056
    The slot-vector Cartesian product is rebuilt for each head-feature suffix and lexical flag. Move 2 also repeats the licensee-suffix search for each matching profile, and Merge 1 rebuilds the empty slot vector during profile traversal. Compiler output confirms these calls remain inside the traversals. Compute the suffixes, choices by licensee, slot vectors, and empty slot vector once per grammar and pass them to the builders.
    Evidence: allProfiles nests [true, false].flatMap fun b =>, (allFeats G).flatMap fun α =>, and (allSlotVectors G (allLics G)).map fun slots => (b, α, slots). Move 2 uses (licFeats G f').filterMap fun δ => inside profs.flatMap. merge1Rules uses if b1 = true ∧ s1 = ((allLics G).map fun _ => none) then inside profiles.flatMap.
  • repeated-computation — LeanPool/FormalLinguistics/CNF.lean:620
    allPairs runs quadratic list deduplication on a Cartesian product that is already duplicate-free, giving quartic equality checks in the number of distinct nonterminals. Both unary reachability and nullability also rescan their universes for the full iteration budget after membership stabilizes. Prove the product is duplicate-free and let the bounded fixed-point iteration stop when the monotone step leaves the candidate count unchanged.
    Evidence: allNTs uses dedupList (allNTsRaw G), and allPairs uses dedupList (nonterminals.flatMap fun A => nonterminals.map fun B => (A, B)). unitReach runs iterN (stepFilter pairs (unitPred G)) pairs.length [] and nullableList runs iterN (stepFilter nonterminals (nullPred G)) nonterminals.length []. Fixpoint.iterN takes every step via | n + 1, x => iterN f n (f x).
  • duplicate-rule-generation — LeanPool/FormalLinguistics/GNF.lean:131
    Each binary production with the same left-hand side causes three Greibach rule families to emit another copy of the same rules. A Lean probe with three distinct binary productions sharing a left-hand side produced nine entries in rules2, of which three were distinct. The duplicates carry through to the categorial lexicon. Deduplicate the left-hand sides once before generating those families.
    Evidence: allBinLHS is G.binRules.map fun (A, _, _) => A. cnfToGNF uses (allBinLHS G).flatMap fun A => twice in rules1 and once in rules2. GNFtoABG.toABG maps G.rules2 directly with (G.rules2.map fun (U, a, V, W) =>.
  • duplicate-proof — LeanPool/FormalLinguistics/MGtoMCFG.lean:941
    Both MCFG translations prove the same range length, uniqueness, coordinate membership, and evaluation facts separately for input positions 0 and 1. Put the range lemmas beside MCFG.evalYield, parameterized by input position and component offset. The reverse translation repeats the same two-position split in buildDom_step_var0 and buildDom_step_var1, which can share a proof parameterized by input position and its bank.
    Evidence: range_vars_props and range_vars1_props both start induction len generalizing base with. BinMCFG.range_var0_props and range_var1_props both start induction d with. Both evalYield_range_vars variants and both local proofs in BinMCFG.evalYield_joinYield use induction mid generalizing pre with. Both buildDom_step_var proofs begin have hnd := nodup_buildVars hlin hget hsplit and repeat the membership argument for Bank.L and Bank.R.
  • duplicate-proof — LeanPool/FormalLinguistics/MGtoMCFG.lean:2263
    Well-formedness and soundness independently unpack the same nested filters and slot-operation results for all three merge and both move families. A change to how the rules are enumerated therefore requires synchronized proof edits. Give each family a membership lemma exposing the selected profiles, successful slot operations, and resulting rule, and use it from both proofs.
    Evidence: merge1Rules_wellFormed and merge1Rules_sound both start simp only [merge1Rules, List.mem_flatMap] at hM1, then unpack the same List.mem_filterMap. The Merge 2 and Merge 3 pairs follow the same pattern. Both buildRules_wf and mgToMCFG_sound use cases hcl : clearSlot (T := T) f 1 (allLics G) s with and cases hrel : relocateSlot (T := T) f f' δ (allLics G) s with.
  • duplicate-definition — LeanPool/FormalLinguistics/MCFGtoMG.lean:386
    Variable collection is implemented in the MCFG rule API, both translators, and inline in the binarization proofs. The reverse translator also copies the evaluator's variable lookup and fallback. Define these operations once in MCFG.lean and reuse them so a change to template evaluation or variable collection reaches every consumer.
    Evidence: MCFGRule.varOccurrences and MGtoMCFG.compsVars both use comp.filterMap fun with | MCFGAtom.var i j => some (i, j). The reverse translator uses cs.flatMap compVars and proves r.varOccurrences = compsVars r.yield := rfl. BinMCFG.varOccurrences_remapYield inlines the same filter. argPiece and MCFG.evalComp both use match args[i]? with and match tup[j]? with, with | none => [] at both levels.
  • unused-hypothesis — LeanPool/FormalLinguistics/MGtoMCFG.lean:894
    Three slot lemmas require premises absent from their proof terms. Drop the unused premises so callers only supply the invariants each operation needs. In particular, both relocateSlot_eval_and_mem callers can omit the uniqueness and coverage proofs for the license list.
    Evidence: not_mem_headLic_of_insertSlot and locateSlot_eval each bind (_hsmc : SMC ms). relocateSlot_eval_and_mem binds (_hLnd : L.Nodup) and (_hLms : ∀ c, c ∈ ms → ∀ g, c.headLic = some g → g ∈ L). The latter proof uses its separate (hsmc : SMC ms) premise.
  • duplicate-core-api — LeanPool/FormalLinguistics/MCFGtoMG.lean:87
    Several general list operations and proofs duplicate the pinned Lean library. Use List.zipIdx with swapped pairs and its indexed membership lemma, List.getElem?_of_mem, List.drop_eq_getElem?_toList_append, and List.reverse_perm with List.Perm.nodup_iff. The same cleanup applies to MG.isSuffix, Fixpoint.nodup_length_le, MGMCFGEquiv's replicate equation, and the conditional lemmas in LambekFreeGroup. This removes independent inductions and wrappers for standard operations.
    Evidence: indexFrom recurses with | a :: t => (k, a) :: indexFrom (k + 1) t. The local lookup, drop, and reverse lemmas use ∃ idx : Nat, L[idx]? = some x, L.drop k = x :: L.drop (k + 1), and (h : L.reverse.Nodup) : L.Nodup. The other copies use ∃ p, p ++ s = l, l1.length ≤ l2.length, List.replicate n x ++ [x] = List.replicate (n + 1) x, and (if c then a else b) = a or (if c then a else b) = b.
  • duplicate-lemma — LeanPool/FormalLinguistics/LambekThin.lean:25
    Thin sequents and interpolation publish separate copies of the same three occurrence-count lemmas. Cut elimination and interpolation also publish the same antecedent transport lemma. Put these next to occList and LDer0 in the shared core so the proofs use one API.
    Evidence: LThin.occList_append states occList q (a ++ b) = occList q a + occList q b, and LInterp.occList_append states occList p (Γ ++ Δ) = occList p Γ + occList p Δ. Both use simp [occList, List.sum_append] and sit beside copies of occList_nil and occList_cons. LCut.cast and LInterp.castD each use e ▸ h.
  • module-coupling — LeanPool/FormalLinguistics/LambekCore.lean:9
    Importing Lambek cut elimination, thin sequents, interpolation, or free-group proofs pulls in the CFG normal forms through the reverse grammar translation. The general Mathlib CFG bridge also pulls in Pentus, and the Stabler–Keenan equivalence imports the cross-serial example development. Put the Lambek syntax and calculus upstream of the translations, put the general bridge upstream of the theorem restatements, and move the examples to a module that imports the equivalence.
    Evidence: LambekCore.lean uses public import LeanPool.FormalLinguistics.Lambek, and Lambek.lean uses public import LeanPool.FormalLinguistics.BarHillel for results including cfg_to_lambek_equiv. MathlibBridge.lean uses public import LeanPool.FormalLinguistics.LambekPentus and defines CFG.ofMathlib. MGOriginal.lean uses public import LeanPool.FormalLinguistics.MGMCFGEquiv, whose equivalence theorem is followed by namespace CrossSerialExample.

Tokens: 10,029,638 in / 52,461 out across 5 model calls · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $40.9055 (Standard API equivalent; uncached input)
Each rubric is an independent review against .github/review-rubrics/ on top of .github/REVIEW_RULES.md. Disagree? Reply on the PR; rules can be updated in a PR of their own.

@Vilin97 Vilin97 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source review passed for e69454de7e41202b5deeb4fbb5022e18841eb4ce.

  • The new citations credit Michaelis’s forward construction, distinguish the converse papers, and describe the chain-based Stabler–Keenan presentation and primitive-goal specialization of Pentus. Michaelis’s forward construction
  • The three deduplication declarations and proofs moved unchanged to Fixpoint. CNF still reexports that module, and the minimalist translation now imports the smaller dependency directly. The headline statements and proofs are unchanged. Two older docstrings in MGOriginal still use “literal” where the module documentation describes the formalization’s variants.

Required Lean CI and importer custody are tracked separately. Lean Action CI

@Vilin97

Vilin97 commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator Author

/review

Head e69454de7e41202b5deeb4fbb5022e18841eb4ce addresses the source findings.
The module and card now credit Michaelis at LACL 1998 for the forward
translation and the two LACL 2001 papers for the converse. The rule
documentation describes the Stabler–Keenan presentation and its permitted
empty head remainder. The module, theorem and Mathlib restatement identify
the primitive-goal specialization of Pentus’s Theorem 2.

The shared list helpers move to Fixpoint.lean, removing the minimalist
grammar translation’s dependency on the Chomsky normal-form development.
The theorem statements retain their original scope. Local validation passed.

@Vilin97 Vilin97 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source review passed for 4435287d1d97417e83e6ae1b54c3949c08f8a9cd.

  • The four CNF definitions bind repeated computations once. Expanding the new let bindings gives the previous terms, including the filter order and pair deduplication. The theorem statements and proofs are unchanged.
  • The revised source notes state the lexical-feature restriction of the Stabler–Keenan variant and credit Pentus and Cohen for the respective directions of the Lambek equivalence.
  • Required Lean validation is running for this head. Lean Action CI

@Vilin97

Vilin97 commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator Author

/review

Head 4435287d1d97417e83e6ae1b54c3949c08f8a9cd addresses the
findings from the previous review.

  • The minimalist grammar definitions, theorem and card identify the formalized
    variant's nonempty lexical feature lists and distinguished basic goal
    category. The card cites §2, Definition 1 for the rules and §2.3 for weak
    generative capacity. Stabler and Keenan
  • The Lambek theorem's docs and card credit Pentus's Theorem 2 for Lambek to
    CFG. They describe the converse through the Greibach-derived basic
    categorial lexicon and the embedding into Lambek grammars that Pentus
    credits to Cohen. Pentus,
    Cohen
  • The earlier source fixes for the Michaelis forward direction, both converse
    papers, and empty head remainders are present. The discussion uses the
    heading “Submitter assessment.”
  • The normal-form conversion shares the nullable symbols and unary-path
    inputs. Lean checked definitional equality with all four earlier bodies.
    All theorem statements are preserved. The project build, linters, generated
    indexes, and repository quality checks passed.

Lean Action CI

@Vilin97
Vilin97 added this pull request to the merge queue Nov 28, 2026
Merged via the queue into main with commit b971e4b Nov 28, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant