Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Computation and proofs over proof objects | How to prove that two proofs objects are equal?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Computation and proofs over proof objects | How to prove that two proofs objects are equal?


Chronological Thread 
  • From: Benoît Viguier <beviguier AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Computation and proofs over proof objects | How to prove that two proofs objects are equal?
  • Date: Wed, 24 Apr 2019 17:01:51 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=beviguier AT gmail.com; spf=Pass smtp.mailfrom=beviguier AT gmail.com; spf=None smtp.helo=postmaster AT mail-ed1-f49.google.com
  • Ironport-phdr: 9a23:rMHjcBxisNtNse/XCy+O+j09IxM/srCxBDY+r6Qd1OkRIJqq85mqBkHD//Il1AaPAdyCra8dwLCP+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1Ov71GonPhMiryuy+4ZLebxhViDanYb5+MRq6oRvMusILnYZsN6E9xwfTrHBVYepW32RoJVySnxb4+Mi9+YNo/jpTtfw86cNOSL32cKskQ7NWCjQmKH0169bwtRbfVwuP52ATXXsQnxFVHgXK9hD6XpP2sivnqupw3TSRMMPqQbwoXzmp8qFmQwLqhigaLT406HzZhNJ+jKxboxyvqRJwzIHWb46JL/dxZL/RcMkASGZdUMtcVSpMCZ68YYsVCOoBOP5VopTjqFsIqhumCxWsC/vgxT9JiX/2wKw63Po7EQrb2wEvBMwBsGrVrNX6KacSUP66zLPTwDXMavNZwzb96IzSfh89pvGMWKt9fMzMwkcsDwPIlkucpZDhMj+P1ekAs3KX4/R8We+skWIqpAV8riCyysojioTFnJ8Zxk3F+Clj3Yo4K9K1RFRlbdOkDpddsTyROZFsTcM4WW5ovT43yr0Ytp6/eygH0JEnyATea/yDaoSH/A/sWPuILTd2i39ofKizhxm18Uinxe38Ute73ExWoSpCl9nArnEN1xrN5cibUvZx4Fut1DKV2w3Q6uxIO144mbbYJpI7zbM9koIfsUHZES/3nEX2grWWdkIh+uWw8OvofKvmpp6TN49piwHxLL4ul9ewAeQ9KAcOXmyb9f6g273k+E31WK9KgeEukqnFrJDaItwWqbK+Aw9My4os9xK/Dyq939kDhnkGLFdFeAqdgITzOlHOJur4DfaljFi2njdr3aOOArq0CZLUa3PHjb3JfLBn6kcaxhBg48pY4sd+B7cGpu7EZE7+qd3VFFdtOQGqwun6Cdhn/owbUGOLRKSeNfWB4hez+uszLrzUN8cuszHnJq19vq+8vToCgVYYOJKR894SYXG8EO5hJhzAM3Xpi9YFV2wNu1hnFbG4uBi5STdWIk2Kcec86zU8Ut/0CI7CQsWgjOXE0nvqWJJRYW9CBxaHFnK6L9zYCcdJUzqbJ4paqhJBTaKoEtZz2hSntQu8wL1ifLLZ

Hi Cao Qinxiang,

Thank you for your quick answer. :)

On 4/24/19 4:54 PM, Cao Qinxiang wrote:
A short answer is: when you prove [introTF], use [Defined] instead of [Qed].

Unfortunately, I don't have control over that code unless I create a fork of ssreflect:

Locate on introTF gives me: Constant Coq.ssr.ssrbool.introTF

Another suggestion: try to avoid proving an equality between two proof terms. :)

I wish I could in that case. :)

Qinxiang Cao
Shanghai Jiao Tong University, John Hopcroft Center
Room 1110-2, SJTUSE Building
800 Dongchuan Road, Shanghai, China, 200240



On Wed, Apr 24, 2019 at 10:28 PM Benoît Viguier <beviguier AT gmail.com> wrote:

Dear all,

I have a type defined in the following kind:

  Definition oncurve (p : point K) := (
    match p with
    | EC_Inf    => true
    | EC_In x y => M#b * y^+2 == x^+3 + M#a * x^+2 + x
    end).

  Inductive mc : Type := MC p of oncurve p.

  Coercion point_of_mc p := let: MC p _ := p in p.
            

and at some point I am trying to prove that :

MC p (proof_of p) = MC p (another_proof_of p).
            Reflexivity do not work in this case because : (proof_of_p
            p) and (another_proof_of p) while being the same in some
            senses are not the same object.

However by doing f_equal, the goal becomes:

proof_of p = another_proof_of p

            

I can unfold both of them and the subsequent definitions, applying a compute leads me to the following state:

match
  match
    introTF (c:=true) idP
      (equivPif idP (fun _view_subject_ : true = true => _view_subject_)
         (fun _view_subject_ : true = true => _view_subject_)) in 
    (_ = y) return (y = true)
  with
  | Logic.eq_refl => Logic.eq_refl
  end in (_ = y) return (y = true)
with
| Logic.eq_refl =>
    match
      introTF (c:=true) idP
        (equivPif idP (fun _view_subject_ : true = true => _view_subject_)
           (fun _view_subject_ : true = true => _view_subject_)) in 
      (_ = y) return (y = true)
    with
    | Logic.eq_refl => Logic.eq_refl
    end
end = is_true_true

            

Thus my question would be is there anyway to un-opaque those last part ? It says that introTF is defined as Opaque, thus Transparent does not go through either. How can I proceed forward?

From which I cannot work further as introTF etc are opaque. Is there any other way I can prove my equality?

Thanks a lot for any help or insight you can provide me with.

Kind Regards,

Benoit Viguier.




Archive powered by MHonArc 2.6.18.

Top of Page