Questions tagged [tactic]
A tactic is a command or instruction for constructing a formal proof by applying a common proof technique. For questions about high-level techniques for constructing proofs, use the tag (strategy).
39
questions
0
votes
1
answer
116
views
Specializing forall quantifiers in Coq
I have an inductively defined type of expressions:
...
4
votes
0
answers
64
views
Using CoqHammer from Ltac2
As it seems most likely to me, due to the special way arguments are evaluated in CoqHammer tactics (I tried to read the source code in OCaml but unfortunately I didn't understand much of it), it is ...
1
vote
1
answer
126
views
Rewriting inside quantified propositions in Coq?
Is there a simple way to use rewrites inside quantified Props? As an example, consider the following:
...
2
votes
1
answer
152
views
Debug autorewrite in Coq
I often meet proofs using autorewrite which Coq takes a while to process for some reason. (Setoid rewriting)
I then manually figure out which rewrite rules were ...
1
vote
1
answer
103
views
Question about the tactic "obtain"
I am having difficulty activating the tactic obtain. Is it part of mathlib and where is its exact location?
3
votes
3
answers
210
views
In Coq, is there a simpler tactic for introducing a disjunction and immediately destructing it?
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)...
...
4
votes
1
answer
1k
views
Doing case-by-case proofs about match statements in Lean4
In Lean4, I am stuck in a proof with a goal like this:
...
5
votes
1
answer
465
views
Tactics for Array/List simplification in lean4
Because there are both Arrays and Lists in Lean4, sometimes you end up with code that has a mixture of Lists and Arrays interspersed with basic operations and conversions between the two. For example,...
5
votes
1
answer
486
views
Simple Proof about `String.split`
I am new to lean, working on proving a simple lemma in lean4.
lemma String.split_empty (c): String.split "" c = [""]
I tried looking for ...
3
votes
1
answer
154
views
Applying custom tactic in hypothesis
To avoid tedious repetition I have a tactic that looks something like this:
Ltac unfolds := try unfold foo;
try unfold bar;
try unfold baz;
apply some_lemma.
...
1
vote
1
answer
106
views
Proving that applicative functors compose
For simplicity, here an applicative functor means (in a proof assistant based on dependent type theory) the Haskellian applicative functor, bundled with its equational laws.
This I can of course brute ...
3
votes
2
answers
231
views
Coq: can `tauto` be used to prove classical tautologies?
When I experiment, I get inconsistent results.
Running the following code (with a proof included to double-check that it's provable)
...
3
votes
0
answers
92
views
Where is the discriminate tactic defined in Coq?
One can read the Coq documentation about discriminate tactic here.
Were is this tactic actually defined?
6
votes
1
answer
399
views
How to evaluate proof terms through opaque definitions?
Is there is a way to force computation over opaque terms, for the purposes of debugging/meta-analysis of proof scripts.
I understand why Coq doesn’t do this by default, and guess it would probably ...
5
votes
0
answers
163
views
Prove equality in a record type
I am trying to prove something about monoids an categories. This results in the following (partial) proof:
...