Comments (3)
Then various files in the library will fail to build, so you add necessary hints to fix those places. For example, Jason suggested:
#[export] Hint Mode IsTrunc ! ! : typeclass_instances. (* if the level and type both have some known structure, we can proceed *) #[export] Hint Mode IsTrunc - + : typeclass_instances. (* if the type is fully known we can use tc to infer the level *) #[export] Hint Mode IsEquiv - - + : typeclass_instances. (* only infer equivalence if the function is known; - - ! would also be fine if we want to infer IsEquiv id without needing the types to be known *) #[export] Hint Mode Equiv + + : typeclass_instances. (* only infer Equiv if both types are fully known *)But many others will be needed.
Ah, these suggestions are not to fix the problems caused by Hint Constants Opaque
, but to further (and orthogonally) constrain typeclass search. Instead the problems caused by Hint Constants Opaque
need to be fixed by Hint Transparent some_particular_constant : typeclass_instances.
from coq-hott.
Thanks for clarifying. So here's one approach:
Phase 1: add Hint Constants Opaque
; see what breaks; add Hint Transparent
as needed.
Phase 2: add Hint Mode
to add additional constraints based on what makes sense for various typeclasses, and make sure things still build.
As you make changes, check the build time and make sure you haven't caused a slowdown.
I guess phase 2 can be done without doing phase 1, and might be less work.
from coq-hott.
More tips about phase 1 from @JasonGross:
Roughly the rule of thumb is that you need to mark transparent any definition whose truncatedness you want tc to infer, but for which no trunc instance is declared. (For example, if you want to use instances of
IsTrunc _ { a : A & ... }
interchangably with instances ofIsTrunc _ (hfiber ...)
). There are a couple of exceptions, though I expect them to be quite rare forIsTrunc
. One example is that if you proveforall (A : Type) (ls : list A), IsHProp (nil = ls)
and then want to automatically inferforall (A B : Type) (f : A -> B) (ls : list B), IsHProp (map f nil = ls)
, you'll need to declaremap
transparent. I wouldn't be all that surprised if none of the truncation instances broke.
from coq-hott.
Related Issues (20)
- Please pick the version you prefer for Coq 8.17 in Coq Platform 2023.03 HOT 11
- Generate coqdoc using Dune
- Library description for a handbook chapter HOT 5
- HITs in Spaces/No/Core.v might be inconsistent HOT 1
- Please pick the version you prefer for Coq 8.18 in Coq Platform 2023.10 HOT 1
- coqdoc section links don't work for alectryon and timing toc pages HOT 1
- Generalise ExactSequence.v to a pointed wildcat with kernels HOT 1
- Flattening lemma for GraphQuotient HOT 6
- Add transport lemmas for families of equivalences
- Split HIT files into Core and lemmas HOT 2
- slow builds with Coq 8.19 and/or dune 3.14.0 HOT 19
- HITs with rewrite rules HOT 11
- Dependences of Nat/Core.v and DProp.v HOT 4
- Bifunctors HOT 12
- Generalise results about wedge for pointed categories
- Preservation of products
- Show that pType has all coproducts
- Change definition of smash HOT 2
- Project: coherence for monoidal categories HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coq-hott.