Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] smarter fold tactic

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] smarter fold tactic


Chronological Thread 
  • From: Laurent Thery <Laurent.Thery AT inria.fr>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] smarter fold tactic
  • Date: Sat, 1 Aug 2020 01:33:44 +0200


Hi,

The fold version of ssreflect seems to allow _ so rewrite -/(twice _) works.

================

Require Import ZArith.
Require Import ssreflect.

Definition twice (x:Z) : Z := x+x.
Open Scope Z_scope.

Lemma twiceFold (x:Z) : x+x = twice x.
Proof using.
reflexivity.
Qed.

Lemma xx (x:Z) : twice x = 0.
Proof using.
unfold twice.
rewrite -/(twice _).
===============================



Archive powered by MHonArc 2.6.19+.

Top of Page