aboutsummaryrefslogtreecommitdiff
path: root/pretyping
AgeCommit message (Collapse)Author
2014-06-26Change interface of refresh universes to get a pbty argument instead ofMatthieu Sozeau
the computed direction argument. In case pbty is conv, no refreshing is done as the evar body must be convertible with the given term, however refreshing of template application evar arguments can still happen. (Re)-Closing bug #2966.
2014-06-25Use the right transparent state when comparing _types_ of metas.Matthieu Sozeau
2014-06-25Fix type_of_inductive_knowing_conclusion, relying on an actually broken ↵Matthieu Sozeau
univ_depends. Also add a missing constraint when generating a fresh universe for a template polymorphic inductive in that case.
2014-06-25Use full transparent state when checking well-typedness of a second order ↵Matthieu Sozeau
matching infered predicate, instead of the arguments ts which might be empty (e.g. in unification). Fixes failure in success/unification.v
2014-06-24Fix program cases and inversion tactic to correctly record universe constraints.Matthieu Sozeau
Fixes FingerTree contrib.
2014-06-23Fix for bug 1951, allowing at least fully-applied inductives types to be usedMatthieu Sozeau
for building polymorphic instances of template polymorphic inductives.
2014-06-21- Add an option to refresh only algebraic universes, for e_type_of. The goalMatthieu Sozeau
there is not the same as in Evd.define. - Fixed bugs #3330 and #3331.
2014-06-20Fixed some HoTT bugs, provide a proper error message when giving an ill-formedMatthieu Sozeau
universe instance.
2014-06-20Cleanup treatment of template universe polymorphism (thanks to E. TassiMatthieu Sozeau
for helping fixing this). Now the issue is handled solely through refreshing of the terms assigned to evars during unification. If ?X = list ?Y, then Y's type is refreshed so that it doesn't mention a template universe and in turn, ?X won't. Same goes when typechecking (nil ?X, nil ?Y), the pair constructor levels will be set higher than fresh universes for the lists carriers. This also handles user-defined functions on template polymorphic inductives, which was fragile before. Pretyping and Evd are now uncluttered from template-specific code.
2014-06-19- Fix bug in unification, not only named metas are turned into evars (e.g. ↵Matthieu Sozeau
in Ssreflect). - Fix is_applied_rewrite_relation to look for propositional relations.
2014-06-18Proofs now take and return an evar_universe_context, simplifying interfacesMatthieu Sozeau
and avoiding explicit substitutions and merging of contexts, e.g. in obligations.ml. The context produced by typechecking a statement is passed in the proof, allowing the universe name context to be correctly folded as well. Mainly an API cleanup.
2014-06-18Code factorization in LMap.Pierre-Marie Pédrot
2014-06-17Reinstate eta for records in evarconv, fixing two HoTT coq bugs.Matthieu Sozeau
2014-06-17Adapt coercion code to work with projections as target classes.Matthieu Sozeau
2014-06-17Fixing #3282 (two bugs in the presence of let-in's in "fix").Hugo Herbelin
2014-06-17Removing dead code.Pierre-Marie Pédrot
2014-06-17Fix type inference of the record argument of a projection to catch ill-typedMatthieu Sozeau
applications earlier.
2014-06-17- Fix the de Bruijn problem in check_projection for good :)Matthieu Sozeau
- Fix HoTT coq bug #80, implicit arguments with primitive projections were wrongly automatically infered.
2014-06-17Existing Class now works with universe polymorphism. Fixes HoTT bug #063Matthieu Sozeau
2014-06-16Unification in HoTT_coq_061.v was looping with previous commit (whileHugo Herbelin
it was failing with Not_found before previous commit). This "fixes" the loop by expanding local defs in "imitate" rather than keeping them explicit. The example is otherwise too large for me to be able to understand where does the loop come from.
2014-06-16Fixing part of HoTT bug #61 (in declare_evar_from_virtual_equation,Hugo Herbelin
fix the type of the term which has to be in the signature of the evar to declare); some problems remain though (see next commit).
2014-06-16- Add "Show Universes" to print information about universes during a proof.Matthieu Sozeau
- Remove dead code in evarconv.
2014-06-15Change Ltac constr matching semantics to consider universes when merging twoMatthieu Sozeau
bindings of the same variable (fixing HoTT bug #52). Document the unification of universes in Ltac/tactics.
2014-06-13Fix HoTT/coq bug # 14. Now coercion code correctly raises an error instead ↵Matthieu Sozeau
of an anomaly in case a universe inconsistency occurs when applying a coercion. The statement of the test-suite file cannot check as is, but does check when the correct FunctorCategory is given, instantiating the TypeCat to Set.
2014-06-13Fixing "clear" in internal_cut_replace: forbid dependencies in theHugo Herbelin
name of replaced hypothesis.
2014-06-13Improved error message when a meta posed as an evar remains unsolvedHugo Herbelin
in case prefix 'e' of "apply" and co is not given.
2014-06-13Fixing wrong environment for Meta's in pose_all_metas_as_evars (bug #3284).Hugo Herbelin
2014-06-13Adapt simpl/cbn unfolding and refolding machinery to projections, so thatMatthieu Sozeau
primitive projections obey the Arguments command.
2014-06-11- Fix bug #3368, due to wrong use of the Cst_stack for projections.Matthieu Sozeau
- Monomorphize Cst_stack to 'a = constr. - Add corresponding debug printer.
2014-06-11In generalized rewrite, avoid retyping completely and constantly the ↵Matthieu Sozeau
conclusion, and results of unifying the lemma with subterms. Using Retyping.get_type_of instead results in 3x speedup in Ncring_polynom.
2014-06-10Compute the trace of a universe inconsistency only when explicitly requiredPierre-Marie Pédrot
by the printing options (i.e. when "Print Universes" is set).
2014-06-10Made explanations for universe inconsistencies optional. They are only usedPierre-Marie Pédrot
by the printer anyway.
2014-06-10- Fix substitution of universes which needlessly hashconsed existing universes.Matthieu Sozeau
- More cleanup. remove unneeded functions in universes
2014-06-10Cleanup in Univ, moving code for UniverseConstraints outside the kernel in ↵Matthieu Sozeau
Universes. Needed to exponse compare_head_gen(_leq) so that it could be reused in Universes. Remove unused functions from univ as well and refactor a little bit. Changed the syntax to Type@{} for explicit universe level specs, following the WG decision.
2014-06-08Fix canonical structure resolution in unification (bug found in Ssreflect).Matthieu Sozeau
2014-06-06Make kernel reduction code parametric over the handling of universes,Matthieu Sozeau
allowing fast conversion to be used during unification while respecting the semantics of unification w.r.t universes. - Inside kernel, checked_conv is used mainly, it just does checking, while infer_conv is used for module subtyping. - Outside, infer_conv is wrapped in Reductionops to register the right constraints in an evarmap. - In univ, add a flag to universes to cache the fact that they are >= Set, the most common constraints, resulting in an 4x speedup in some cases (e.g. HigmanS).
2014-06-04Collecting in Namegen those conventional default names that are used in ↵Hugo Herbelin
different places
2014-06-04Fix canonical structure resolution (makes test-suite files go through again).Matthieu Sozeau
2014-06-04- Allow parsing of @const@{instance} for specifying universe instances of ↵Matthieu Sozeau
polymorphic constants.
2014-06-04- Force every universe level to be >= Prop, so one cannot "go under" it anymore.Matthieu Sozeau
- Finish the change to level-to-level substitutions, in the checker.
2014-06-04- Fix hashing of levels to get the "right" order in universe contexts etc...Matthieu Sozeau
- Add a tentative syntax for specifying universes: Type{"i"} and foo@{Type{"i"},Type{"j"}}. These are always rigid. - Use level-to-level substitutions where the more general level-to-universe substitutions were previously used.
2014-06-04- Keep all <= constraints during refinement, otherwise we might miss ↵Matthieu Sozeau
collapsed universes. - Fix normalization with universe substitutions during refinement being inconsistent with the one in the kernel.
2014-06-04cbn understand ! Arguments directivePierre Boutillier
Of course, this is an under approximation of the expected behavior : unfolding a constant iff a leaf of its underlying split-tree is reached.
2014-06-01Use of "H"-based names for propositional hypotheses obtained byHugo Herbelin
destruction of schemes in Type such as sumbool. Added an option "Set Standard Proposition Elimination Names" for governing this strategy (activated by default). This provides names supposingly more uniform than before for those who like to have names automatically generated, at least in the first phase of the development process of proofs. Examples: *** Non dependent case *** Goal {True}+{False}-> True. intros [|]. Before: t : True ============================ True and f : False ============================ True After: H : True ============================ True H : False ============================ True *** Dependent case *** Goal forall x:{True}+{False}, x=x. intros [|]. Before: t : True ============================ left t = left t f : False ============================ right f = right f After: HTrue : True ============================ left HTrue = left HTrue HFalse : False ============================ right HFalse = right HFalse
2014-05-31Dead code + typo.Hugo Herbelin
2014-05-28- Fix for commit 15999903f875f4b5dbb3d5240d2ca39acc3cd777 which disallowed someMatthieu Sozeau
cases of Type (* Prop *) <= Set. - Do check types of metavariables at the end of apply's unification, if it failed at the beginning (otherwise universe constraints can be incomplete).
2014-05-26Cbn reduces Pos.compare p~1 q~1 to Pos.compare p qPierre Boutillier
(refolding of cbn is smarter)
2014-05-26Reduction.Stack.Fix/Case stores Cst_stack.tPierre Boutillier
2014-05-26Cst_stack before stack (abstraction leak in whd_gen)Pierre Boutillier
2014-05-26cbn: args list instead of arg numberPierre Boutillier