r/Coq • u/introsp3ctor • Jan 10 '24
r/Coq • u/davidw_- • Apr 29 '26
The Final Form of Software Development
blog.zksecurity.xyzr/Coq • u/aureus80 • Jul 24 '25
Are IA used for formalizing proofs?
Some years ago, I worked with Coq (in particular ssreflect and mathcomp, I was interested in formalizing some graph theory concepts) but then I got disconnected from the formal methods community. At that time there were a few tools to automatize generation of proofs like coqhammer. I wonder if there were advances with IA LLMs for generating formal proofs. Recently, there are news about generating olympiad-level proofs but not sure if these models are particularly useful for formal generation.
r/Coq • u/Riiiiime • Aug 15 '26
[Tool] AI agents for writing proofs and proposing lemmas
We've released LemmaNet, a new agent that closes Rocq goals (e.g. what Frama-C/WP leaves after SMT). It searches for a proof, invents *helper lemmas* when it gets stuck (either on-the-fly and inferred from *source code*), and caches them for later goals — or you can drive it yourself from a REPL. Docker included; improved +25% over SoTA agents and +200% over hammer. Feedback and bug reports are welcome, especially goals where it does badly.
r/Coq • u/[deleted] • Jul 25 '20
Install proofweb
Help me! I cannot install proofweb via the automatic installation file, available at http://proofweb.cs.ru.nl/install.php
r/Coq • u/papa_rudin • Aug 31 '23
How do we derive the 'match ... with' thing in pure CIC?
fun (A B : Prop) (H : A /\ B => match H with | conj x x0 => (fun (H0 : A) (_ : B => H0) x x0 end
They define the conjunctuon elemination rule this way. I want to derive it 100% from scratch using the CIC derivation rules. Can you do it on paper for me and send a photo?
r/Coq • u/introsp3ctor • Dec 13 '23
Is the compcert licence not just overreach? How can copying code from github restrict your usage?
self.llamaintrospectorr/Coq • u/audion00ba • Apr 16 '20
Decreasing length induction
I think in undergraduate classes I wrote a similar one, but searching in the standard library for such an induction principle, I didn't find anything (does everyone reimplement these principles over and over or is it just hidden under a different type?):
Theorem ind_rev_length: forall (P: list nat -> nat -> Prop) ,
(forall (n:nat), P nil n) ->
(forall (n a:nat) (l:list nat), P (a :: l) n -> P l n) ->
(forall (n:nat) (xs:list nat), P xs n -> n>=length xs -> P xs (S n)) ->
(forall n (xs:list nat), P xs (S n)-> P xs n) ->
forall l n, P l n.
Proof.Not sure how to prove it, yet (even though I'd consider it so trivial that a machine should be able to automatically find a proof). I am aware list nat can be generalized.
r/Coq • u/audion00ba • Apr 18 '20
Lemmas over constant vectors of arbitrary length
Are there any lemmas that can help with this?
Require Import Coq.Vectors.Vector.
Lemma q: forall h v, Vector.map (fun (x:nat) => 1) v = Vector.const 1 h.
Proof.Using const_nth doesn't work, because it then generates a precondition of fin 0, which can't be constructed.
Update:
Looks like dependent induction helps:
Lemma qaa: forall h v, Vector.map (fun (x:nat) => 1) v = Vector.const 1 h.
Proof with auto. dependent induction v;simpl... rewrite IHv...
Qed.Still, are there any lemmas that would show this?
That is, why is there no
Lemma map_const_vector_const: forall A (a:A) n v, Vector.map (fun (x:A) => a) v = Vector.const a n.
Proof with auto. dependent induction v;simpl... rewrite IHv...
Qed.A limitation of this approach is that it uses JMeq. How can that be eliminated?
r/Coq • u/PM_ME_UR_OBSIDIAN • Jun 18 '17
Can someone please create the "Gallina" question tag on Stack Overflow?
I'd do it myself, but I don't have 1.5k reputation.
r/Coq • u/real_pinocchio • Dec 17 '18
How do inductive proposition work in Coq?
r/Coq • u/LeCoqUser • Sep 05 '14
/r/coq, we have a problem: how can our community strive for diversity when it is unsafe to invite people to discuss matters on reddit?
r/Coq • u/[deleted] • Feb 15 '23
Type Theory Forall #28 - Formally Verifying Smart Contracts using Coq, Pruvendo
typetheoryforall.comr/Coq • u/MartimZanatti • Apr 26 '20
Can't prove a subgoal
https://imgur.com/a/Pii7blW in this link are four images. Two functions, a lemma and a subgoal that I can't prove. someone can help me please?
r/Coq • u/artagnon • Feb 02 '20
An inquiry into the Foundations of Mathematics
artagnon.comr/Coq • u/spoljooooo_ • May 17 '20
Problem with proof!
Hi guys, anyone knows how to proof this?
Definition sys (f : nat -> nat) : Prop := f 0 = 0 /\ forall x, f (S x) = S (f (f x)).
Goal forall f g, sys f -> sys g -> forall x, f x = g x.
r/Coq • u/sideEffffECt • Mar 20 '14
Theorem Proving in Programming, by Stephan Boyer
r/Coq • u/Iaroslav-Baranov • Aug 05 '24
Reviews of "Programming Language Foundations" (Volume II of SF series)
Hello, Rocq Prover engineers!
I usually look up rewiews of a texbook on Amazon, but there is no reviews on this one because it is free. I'm wondering if some of you has finished PLF and be so kind to share their review here. Any feedback is great, but Im especially interested in the following questions:
Will it be relevant to a career of Java Developer? I use OOP quite a lot, but it seems it is not covered in the textbook.
What are the practical benefits for you?
Is it OK to complete the book without watching any lectures on programming language theories?
https://softwarefoundations.cis.upenn.edu/plf-current/index.html
Thanks in advance!
r/Coq • u/Ornery_Device_997 • Jul 23 '24
How does a cumputer understand Fixpoint?
I can't solve the following seeming contradiction:
Inductive rgb : Type :=
| red
| green
| blue.
In the above code when used the variable names must match "red" "green" or "blue" exactly for this to mean anything.
Inductive nat : Type :=
| O
| S (n : nat).
in this example code the variable names are completely arbitrary and I can change them and the code still works.
In coq I keep having trouble figuring out what exactly the processor is doing and what the limits of syntax are, coming from c++
r/Coq • u/greenrd • May 20 '11
What proportion of published mathematical proofs are wrong? [Quora]
r/Coq • u/astrolabe • Apr 25 '15
Why hasn't it happened that Coq, bitcoin and models of computer architecture have been combined to dominate computer programming industry?
Forgive my limited knowledge. ProofMarket.org lets you offer bitcoin amounts for supplied proofs of Coq propositions. Why isn't it thriving with large scale useful programming problems for large bounties?
r/Coq • u/badass_pangolin • Apr 27 '22
Adding a Field
I have these lines of code which declare the operations of a field and a field structure (vector space contains the field axioms).
Variable (F : Type) (F0 F1 : F) (Fadd Fmul Fsub: F -> F -> F) (Fopp : F -> F) (Fdiv : F -> F -> F) (Finv : F -> F) (Feq : F -> F -> Prop) (V : Type) (V0 : V) (Vadd Vsub: V -> V -> V) (Smul : F -> V -> V) (Vopp : V -> V) (Veq : V -> V -> Prop).
Variable vs : vector_space F F0 F1 Fadd Fmul Fsub Fopp Fdiv Finv Feq V V0 Vadd Vsub Smul Vopp Veq.However when I try to add the field I get "ring addition should be declared as a morphism". What does this error mean?
Here is a simpler situation where this error message appears
Require Import Field.
Section A.
Print field_theory.
Variable (F : Type) (F0 F1 : F)
(Fadd Fmul Fsub: F -> F -> F) (Fopp : F -> F) (Fdiv : F -> F -> F) (Finv : F -> F) (Feq : F -> F -> Prop).
Axiom field : field_theory F0 F1 Fadd Fmul Fsub Fopp Fdiv Finv Feq.
Variable (Feq_refl : forall x : F, (Feq x x)) (Feq_sym : forall x y : F, (Feq x y) -> (Feq y x))
(Feq_trans : forall x y z : F, (Feq x y) -> (Feq y z) -> (Feq x z)).
Add Parametric Relation : F Feq
reflexivity proved by Feq_refl
symmetry proved by Feq_sym
transitivity proved by Feq_trans as Feq_rel.
Add Field f : field.
End A.