본문으로 건너뛰기
cccskills
무료GitHub에 공개

coqgym

Machine learning environment for automated theorem proving with Coq.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md4.2 KB
  • CONCOMITANT_SKILLS.md1.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

CoqGym

Machine learning environment for automated theorem proving with Coq.

Overview

CoqGym is a learning environment for theorem proving with the Coq proof assistant. It provides:

  • 71K human-written proofs from 123 Coq projects
  • ASTactic - neural theorem prover using proof state ASTs
  • CoqHammer integration for automated reasoning
  • Benchmark for evaluating ML-based provers

Paper: arXiv:1905.09381

Installation

# Clone repository
git clone https://github.com/princeton-vl/CoqGym
cd CoqGym

# Install dependencies
pip install -r requirements.txt

# Install Coq 8.9.1
opam switch create coq891 4.07.1
opam install coq.8.9.1

# Build CoqGym
python setup.py build

Dataset Structure

CoqGym/
├── coq_projects/     # 123 Coq projects
├── data/             # Extracted proof data
│   ├── *.json        # Proof states and tactics
│   └── sexp_cache/   # S-expression cache
├── ASTactic/         # Neural prover
└── coqhammer/        # Hammer integration

Proof State Representation

Each proof state contains:

  • Goals: Current proof obligations
  • Local context: Hypotheses in scope
  • Global context: Available lemmas/definitions
  • Tactic history: Previous tactics applied
{
    "goals": [...],
    "local_context": [...],
    "tactic": "intros n.",
    "proof_tree": {...}
}

ASTactic Model

Neural network that predicts tactics from proof state ASTs:

from astactic import ASTactic

model = ASTactic.load("models/astactic.pt")
tactic = model.predict(proof_state)

Architecture:

  • TreeLSTM encoder for AST structure
  • Attention over local/global context
  • Tactic decoder with copy mechanism

Training

# Extract proofs
python extract_proofs.py --project mathcomp

# Train ASTactic
python train.py \
    --data data/train.json \
    --model astactic \
    --epochs 100

Evaluation

# Evaluate on test set
python evaluate.py \
    --model models/astactic.pt \
    --data data/test.json \
    --timeout 600

Metrics:

  • Proof success rate: % of theorems proved
  • Tactic accuracy: Top-k tactic prediction
  • Proof length: Steps vs human proofs

CoqHammer Integration

Combines ML predictions with automated reasoning:

(* In Coq *)
Require Import Hammer.

Lemma example : forall n, n + 0 = n.
Proof.
  hammer.  (* Calls external ATPs *)
Qed.

Integration with Gay.jl Verification

Use CoqGym to learn proof strategies for Gay.jl properties:

  1. Extract proofs from similar PRNG verification projects
  2. Train on SplitMix64-style proofs
  3. Apply learned tactics to new Gay.jl lemmas
# Find similar proofs
similar = coqgym.search(
    query="deterministic hash function",
    projects=["compcert", "flocq"]
)

GF(3) Trit

RoleTritDescription
Learner-1Extract patterns from proofs
Predictor0Tactic prediction (ergodic)
Prover+1Generate complete proofs

Key Papers

Resources

Related Skills

  • coq-of-rust - Rust to Coq translation
  • narya-proofs - Higher observational type theory
  • proofgeneral-narya - Proof assistant integration
  • forward-forward-learning - Local learning without backprop

Autopoietic Marginalia

The interaction IS the skill improving itself.

Every use of this skill is an opportunity for worlding:

  • MEMORY (-1): Record what was learned
  • REMEMBERING (0): Connect patterns to other skills
  • WORLDING (+1): Evolve the skill based on use

Add Interaction Exemplars here as the skill is used.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Model ElevenLabs voice synthesis as an ACSet schema with Unison ability handlers for typed voice operations. Use when integrating ElevenLabs TTS into category-theoretic pipelines, building typed voice synthesis workflows, or managing multi-voice narration with GF(3) conservation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

Systematic process for analyzing and modernizing legacy applications to comply with the 12-Factor App methodology. Covers code analysis, configuration externalization, dependency management, and container/Kubernetes best practices.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

13c0e3

무료

Gay MCP skill at invocation 26

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

19d57d

무료

Gay MCP skill at invocation 5

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

1ea91a

무료

Gay MCP skill at invocation 27

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

1eab21

무료

Gay MCP skill at invocation 3

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

plurigrid의 스킬 모두 보기

이 스킬의 문제 신고