Extract abstract mathematical models from imperative code (C, C++, Python, Java, etc.) suitable for formal reasoning in Coq. Use when the user asks to model imperative code in Coq, create Coq specifications from imperative programs, extract mathematical models for verification, or translate imperative algorithms to Coq for formal reasoning and proof.
88
82%
Does it follow best practices?
Impact
99%
1.03xAverage score across 3 eval scenarios
Passed
No known issues
Type selection and explicit state modeling
Z for signed values
60%
100%
nat for counts
100%
100%
Record for state
100%
100%
State transformation signature
100%
100%
Fixpoint for loop
100%
100%
list for sequences
100%
100%
No implicit mutation
100%
100%
Inductive for enums
100%
100%
Comments present
100%
100%
Coq file produced
100%
100%
Standard library imports
100%
100%
State machine with inductive types and transition specs
Inductive for machine states
100%
100%
State type in function signatures
100%
100%
No implicit mutation in transitions
100%
100%
Record for compound state
100%
100%
Z or nat type selection
100%
87%
valid_transition Inductive
46%
100%
Pattern matching in transitions
100%
100%
Coq file produced
100%
100%
Comments present
100%
100%
Standard library imports
100%
100%
Formal specifications and loop invariants
Fixpoint for loop
100%
100%
list type for array
100%
100%
Require Import List
100%
100%
Correctness lemma
100%
100%
Loop invariant lemma
100%
100%
Precondition or postcondition lemma
100%
100%
Z type for signed values
100%
100%
nat type for indices
100%
100%
Comments in model
100%
100%
Proof sketches or Admitted
100%
100%
Related lemmas grouped
100%
100%
0f00a4f
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.