Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Question about definitions inside type classes

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Question about definitions inside type classes


Chronological Thread 
  • From: "John Wiegley" <johnw AT newartisans.com>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] Question about definitions inside type classes
  • Date: Tue, 25 Apr 2017 01:59:11 -0700
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jwiegley AT gmail.com; spf=Pass smtp.mailfrom=jwiegley AT gmail.com; spf=None smtp.helo=postmaster AT mail-pf0-f171.google.com
  • Ironport-phdr: 9a23:6SFY4B2uob7qTIoismDT+DRfVm0co7zxezQtwd8Zse0eKPad9pjvdHbS+e9qxAeQG96Kt7Qc06L/iOPJYSQ4+5GPsXQPItRndiQuroEopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZvJuTyB4Xek9m72/q89pDXbAhEniaxba9vJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfMQA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb7S60/Vza/4KdxUBLmiDkJOSM3/mHQicJ/gq1Urw6uqRFk347UeZuYOOZicq7Hf94XQ3dKUMZLVyxGB4Oxd4UDAe4GPeZYqYn2ulsBrRqgCgmjAOPg1D9JinHr1qA90eQhFgHG3AouHt8VtnTbstv0O70IUeCpzanI1i/Mb/VN2Tvn9IfIdRUhrOiKULltf8TRzkwvGBnEjlWWsYHlOS2a1+oXvGiB8+pgVPmvhHQhqwFquDSg2sAsiozPi4kIyV7E7T10zJgpKdC8UkJ2Yt6pHIFNuyyeKYd6WN4uTmN1tCoiyLALuIS3cDYExZko3RLSaviKf5KV7h/sUOucJypzimh/d7KlnRmy9FCtyu3iWcmw11ZHti9FncPNtnAJzhDT8saHRudk8kevxDqC1R3f5vtLIUAzkqrbJJohzaAqmpUPtkTDGzf6mETwjKCIakUp4vak5/jjb7n8pZKRN5V4hhz6P6gwgMCzHOY1PhUWU2ie4+u81bnj/UPjQLVNi/07iqvZsZ7bJcsFqa65BxFa04Y45hawCjepytUYnX0dIF1ZfxKHipDlO0vSL/DgEfe/n1OsnS93yPDBJ73tG4nCLnzekLj6Zrt98E5dyA8rzd9F/Z5UC7cBIOjyWkDrrtDYAAU5YESIxLPsD8w43YcDU0qOBLWYOeXcqwym/OUqdqOuY48T8An8Jvch6u+kxSs7nl8bYoGv0IQecmy5Bf1gOAOSZn+60YRJKnsDogdrFL+is1aFSzMGP3s=
  • Organization: New Artisans LLC

I have a type class with some defined members:

Class Adjunction := {
adj_iso {a b} : F a ~{C}~> b ≊ a ~{D}~> U b;
adj_left {X Y} := to (@adj_iso X Y);
adj_left_nat_l {a b c} (f : F b ~> c) (g : a ~> b) :
adj_left _ _ (f ∘ fmap[F] g) ≈ adj_left _ _ f ∘ g
}.

As you can see, adj_left is defined directly in terms of adj_iso.

My problem is that I cannot rewrite suing adj_left_nat_l when I see a use of
"adj_left" in my goal, because adj_left_nat_l has already unfolded the
definition of adj_left and is actually now in terms of adj_iso. I have to
simplify my goal to unfold adj_left to a use of adj_iso, and then the rewrite
works.

Is there any way to make the member adj_left so that it does not unfold on
simplification, and is not unfolded in the type of adj_left_nat_l?

--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2



Archive powered by MHonArc 2.6.18.

Top of Page