Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Both annoying things in one place

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Both annoying things in one place


Chronological Thread 
  • From: Ilmārs Cīrulis <ilmars.cirulis AT gmail.com>
  • To: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Both annoying things in one place
  • Date: Mon, 13 Mar 2017 12:22:53 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=ilmars.cirulis AT gmail.com; spf=Pass smtp.mailfrom=ilmars.cirulis AT gmail.com; spf=None smtp.helo=postmaster AT mail-vk0-f45.google.com
  • Ironport-phdr: 9a23:OsJ6tBYLsgDuVv2vCoDzU0X/LSx+4OfEezUN459isYplN5qZoMS8bnLW6fgltlLVR4KTs6sC0LuL9f28EjVaqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjSwbLdyIRmsrQjcucYajZZ8Jq0s1hbHv3xEdvhMy2h1P1yThRH85smx/J5n7Stdvu8q+tBDX6vnYak2VKRUAzs6PW874s3rrgTDQhCU5nQASGUWkwFHDBbD4RrnQ5r+qCr6tu562CmHIc37SK0/VDq+46t3ThLjlSEKPCM7/m7KkMx9lKBUoByhqRJxwIDafZ+bO+Zlc6zHYd8XX3BMUtpNWyFDBI63cosBD/AGPeZdt4TzpF8OrR64AAm2H+Pk1yFFhn7s3a0n1+QhEBrG1xEnEtIPtHTUqc/6NL0JUeyv0KbIzC/Db+5S2Tf884jFaR8hofSWUrJxdcrd01UgFwTAjliJr4HuIj2b1uMIs2eB7upgU/qii2EmqwFtojiv29wjhpPViYISz1DJ8zhyzoUtJdCgVkJ3fdqpHIFTuiyaLYd6XN4uTm9ytCs1yrALv4OwcjIQx5Q93RHfbuSKc4iW7RLnU+acOTJ4i2hkeLK7nhqy70ugxvHlWsm631tHrjBJktbLtnAK2BzT7taIRuFh8Uem3DaDzwHT6udaLkAojafXNYItz7oqmpcQsUnPBDH6lFj4gaOMeUgp+vCk6+H9bbXnop+cOZV0igb7Mqk2m8y/BeE4PRIUX2iA4+izyLzj/VfkQLVOj/02ibLUsJ/fJcsBp665BxVZ3Zok6xa6FzumysgXnWEbLFJZfxKKl5TmO1bXIPzhEfi/h0msnyxwyvDdPrzhB43NIWLZnLfge7Z98U9cxxApwdBR/ZIHQo0Gdbj4XVa0v9jFBDc4NRa1yqDpEp81gogZQCeEBrKTGKLUq16BoOw1dbqifogQ7Rf5LlM//LbFjGUknV4GNf2o2Z4ecmv+FfV8PkGYelLjh94AFSEBuQ9oH7+is0GLTTMGPyX6ZKk7/DxuUI8=

Big thank you, Gaëtan!

On Mon, Mar 13, 2017 at 11:41 AM, Gaetan Gilbert <gaetan.gilbert AT ens-lyon.fr> wrote:
>1) No 'assert' tactics with transparent result. (Maybe I don't know the right way.)

You can use [simple refine (let x := _ : A in _)] instead of [refine. Unshelve. swap.]

See https://github.com/HoTT/HoTT/blob/master/theories/Basics/Overture.v#L856 to make it into a [transparent assert] tactic.

>2) Opaque proofs where one needs transparency. :(

le_unique from Arith is enough for this proof.

Gaëtan Gilbert


On 13/03/2017 10:18, Ilmārs Cīrulis wrote:
1) No 'assert' tactics with transparent result. (Maybe I don't know the right way.)
2) Opaque proofs where one needs transparency. :(

Require Import Omega.
Set Implicit Arguments.

Axiom PI: forall (P: Prop) (a b: P), a = b.

Structure bijection A B := {
  bijF1: A -> B;
  bijF2: B -> A;
  _: forall x, bijF1 (bijF2 x) = x;
  _: forall x, bijF2 (bijF1 x) = x
}.

Definition fin n := { m | m < n }.
Definition finite A n := bijection A (fin n).

Example E1 a b (H: a <= b):
  let A := { n | a <= n /\ n <= b }
  in finite A (S b - a).
Proof.
  intro A.
  refine (let f := (_ : A -> fin (S b - a)) in _). Unshelve. all:swap 1 2.
    intros [n [H1 H2]]. exists (n - a). intuition.
  refine (let g := (_: fin (S b - a) -> A) in _). Unshelve. all:swap 1 2.
    intros [n H0]. exists (n + a). intuition.
  exists f g.
    intros [n H0]. simpl. f_equal. (* apply PI. *)
Admitted.






Archive powered by MHonArc 2.6.18.

Top of Page