Quantcast
Channel: User Agnishom Chattopadhyay - Proof Assistants Stack Exchange
Browsing latest articles
Browse All 34 View Live

Comment by Agnishom Chattopadhyay on How to deduce this equality based on the...

@AndrejBauer I don't think I know how to prove prefer_concat_antirefl seperately either. I think the same issues would show up.

View Article



Comment by Agnishom Chattopadhyay on Formally verified email or communication?

This is more of a research question, and as such, a QnA website is probably not the best way to discuss them. It may be a better idea to ask on Coq Club or Coq Discourse or Lean Zulip

View Article

Comment by Agnishom Chattopadhyay on Have Hyperdoctrines been formalized?

If someone else, like me, was wondering: ncatlab.org/nlab/show/hyperdoctrine

View Article

Comment by Agnishom Chattopadhyay on Programming challenge site for lean4

Related: proofassistants.stackexchange.com/questions/1553/…

View Article

Comment by Agnishom Chattopadhyay on How to search for an existing theorem in...

Which one of this is the closest to the Search command in Coq?

View Article


Comment by Agnishom Chattopadhyay on Defining a Recursive Function decreasing...

Thanks! It worked. I had to make a couple of changes, but the pattern matches do carry through to the Obligations. gist.github.com/Agnishom/…

View Article

Comment by Agnishom Chattopadhyay on How to handle data from json files in...

Lean has Json parsers in its stdlib? :o

View Article

Comment by Agnishom Chattopadhyay on how to prove 2+2+a=4+a in lean4?

What does norm_num do?

View Article


Comment by Agnishom Chattopadhyay on How to introduce assumption in lean4

You seem to be doing classical reasoning.

View Article


Comment by Agnishom Chattopadhyay on Proof Assistants in OOP languages

I hope you enjoy self-studying HoTT, Logic and Category theory. However, if you just want to learn how to use Proof Assistants, just start with a tutorial for your favourite proof assistant and start...

View Article

Comment by Agnishom Chattopadhyay on For formal proofs of graph structures...

"I haven't gotten to the point where I would even know how to define what a vertex/edge is in Coq." I think you could do this in multiple ways (adjacency matrices, relations, adjacency lists) with...

View Article

Answer by Agnishom Chattopadhyay for Proof assistants for beginners - a...

CoqThe easiest proof assistant to start with isThe assistant with the best learning resourcesThe assistant with a great communityThe assistant with the nicest librariesin that order of priority.I vote...

View Article

Answer by Agnishom Chattopadhyay for Which programming languages are most...

This is a trick question, since proof assistants are also themselves programming languages.If we had to choose among languages which are not full blown proof assistants, I would choose a pure...

View Article


When to use coinductive types?

One could define streams in the following mannerSection stream. Variable A : Type. CoInductive stream : Type := | Cons : A -> stream -> stream.End stream.But as far as I can tell, such a...

View Article

Proof Assistants with support for creating executable software artifacts

I am looking for proof assistants with which I can write sound proofs about my functions and values, as well as compile actions of type IO () into executable code. In other words, I am looking for a...

View Article


Answer by Agnishom Chattopadhyay for What mathematical topics should I learn...

Here are some topics I would recommend learning:Some Functional Programming. I think it is good to learn some functional programming language. Preferably some language which takes immutability...

View Article

What are some good resources for Proof Assistant based exercises/puzzles for...

Proof Assistant based exercises and puzzles make for a good recreational activity, as well as help sharpen skills of users of said systems. There are many such equivalent resources for algorithmic...

View Article


Proof by Exhaustive Computation for small initial segment of natural numbers...

I have two functions f, g : nat -> nat. Let's pretend that f and g are cheap to compute.I would like to prove something likeLemma upto_20 (n : nat): n <= 20 -> f n = g n.For the proof, I could...

View Article

Coq simpl failing to do beta reduction in this fixpoint expression

I haveFixpoint concat_aux {A : Type} (lang1 lang2 : list A -> nat -> nat -> bool) (w : list A) (start : nat) (delta i : nat) : bool := match lang1 w start i && lang2 w (start + i)...

View Article

In Coq, is there a simpler tactic for introducing a disjunction and...

Very often, I find myself writing some tactics like these:assert (delta = 1 \/ delta <> 1) as Hd by lia.destruct Hd....(proceed to work with two cases)...Is there a shorter way or a more...

View Article

Why can't I use let bindings to pattern match a 3-tuple in Coq?

Consider the followingAxiom foo : nat -> nat * nat.Definition fooX (x : nat) := let (y, z) := foo x in y + z.which is fine.Now, considerAxiom bar : nat -> nat * nat * nat.Definition barX1 (x :...

View Article


How to prove this correctness principle of transposition of lists of lists in...

I have defined the function transpose as follows:Fixpoint transpose {X : Type} (len : nat) (tapes : list (list X)) : list (list X) := match tapes with | [] => repeat [] len | t :: ts => zipWith...

View Article


Rewriting inside quantified propositions in Coq?

Is there a simple way to use rewrites inside quantified Props? As an example, consider the following:Goal forall (xs : list nat) (ys : list nat), (forall x, In x (xs ++ ys) -> x < 10) ->...

View Article

Injectivity, Surjectivity and Smallness on lists of natural numbers imply...

Require Import Coq.Lists.List.I have the following properties defined on a list of natural numbers:Definition small (l : list nat) : Prop := forall n, In n l -> n < length l.Definition surj (l :...

View Article

Defining a Recursive Function decreasing on one argument with < and another...

I want to define a function which decreases in one argument using < and on another structurally. What is the least painful way to do this? Among the many options (Function, Program Fixpoint,...

View Article


Selecting both a hypothesis and Goal while applying a tactic

I have a hypothesis H and some function foo. I want to simplify foo in both H and the Goal. How do I achieve this with a single tactic?The tactic simpl foo in * selects everything. The tactic simpl foo...

View Article

Creating a tactic for 'destructing' a list by last element?

Sometimes, I have a context in which I have some l : list X, and I want to prove the goal by proving that (1) If l = [], the goal holds, and (2) If l = l'++ [x], the goal still holds.This usually takes...

View Article

Comment by Agnishom Chattopadhyay on Creating a tactic for 'destructing' a...

Thanks for this suggestion. However, writing induction in a destruction based proof feels rather odd to me

View Article

Comment by Agnishom Chattopadhyay on To what extent is formalized mathematics...

There is also the Annals of Formalized Mathematics: afm.episciences.org

View Article



Comment by Agnishom Chattopadhyay on Tactic to Propify a bool expression

I think we want the ? modifier instead of !

View Article

Tactic to Propify a bool expression

Let's say I have bool expressions <bexp> consisting of true, false, variables, eqbandb, orb and negb. When I see an expression of the form bexp = true or bexp = false, I want to convert them to...

View Article

Comment by Agnishom Chattopadhyay on Topic for undergraduate thesis

This is a great project. From what I have seen, formalizing DFS is quite nontrivial.

View Article

How do I enable this kind of rewriting?

Link to Code GistGiven two extensionally equal sets, s1 ≡ s2, I want to be able to obtain a ∈ s2 from a ∈ s1using rewriting.I want to enable an extensionality-style rewriting for unary...

View Article

Browsing latest articles
Browse All 34 View Live




Latest Images