Closure Properties of General Grammars -- Formally Verified
Dvorak, Blanchette
We formalized general (i.e., type-0) grammars using the Lean 3 proof assistant. We defined basic notions of rewrite rules and of words derived by a grammar, and used grammars to show closure of the class of type-0 languages under four operations: union, reversal, concatenation, and the Kleene star. The literature mostly focuses on Turing machine arguments, which are possibly more difficult to formalize. For the Kleene star, we could not follow the literature and came up with our own grammar-based construction.
본 논문은 Lean 3 증명 보조기를 사용하여 일반 문법(즉, type-0 문법)을 형식화했습니다. 저자들은 재작성 규칙과 문법으로부터 파생된 단어의 기본 개념을 정의하고, 문법을 사용하여 type-0 언어 클래스가 네 가지 연산 하에서의 폐쇄성을 증명했습니다: 합집합, 역전, 연결 및 Kleene 별 연산. 문헌은 주로 튜링 기계 논증에 초점을 맞추고 있으며, 이는 형식화하기가 더 어려울 수 있습니다. Kleene 별 연산의 경우, 저자들은 문헌을 따를 수 없었고 문법 기반의 자체 구성을 제시했습니다.
def grammar_transforms (g : grammar T) (w1 w2 : list (symbol T g.nt)) : Prop :=
∃ r : grule T g.nt,
r ∈ g.rules ∧
∃ u v : list (symbol T g.nt),
w1 = u ++ r.input_L ++ [symbol.nonterminal r.input_N] ++ r.input_R ++ v ∧
w2 = u ++ r.output_string ++ v
고전 교과서: Aho & Ullman의 구문 분석 이론, Hopcroft 등의 오토마타 이론
형식화 작업: 다양한 증명 보조기에서의 계산 모델 구현
도구 문서: Lean 3 및 mathlib 관련 자료
요약: 이는 이론 컴퓨터 과학 분야의 고품질 논문으로, 기술적으로 중요한 기여뿐만 아니라 형식화 방법론에서도 귀중한 경험을 제공합니다. 저자들의 작업은 완전한 형식화 Chomsky 계층 구축의 견고한 기초를 마련했으며, 형식 언어 이론 및 증명 보조기 커뮤니티 모두에 중요한 가치를 지닙니다.