aboutsummaryrefslogtreecommitdiff
path: root/pretyping
AgeCommit message (Collapse)Author
2014-07-29Fix bug #3453, not recognizing primitive projections in Coercion declarations.Matthieu Sozeau
2014-07-20Use kernel conversion on terms that contain universe variables during ↵Matthieu Sozeau
unification, speeding it up considerably Revert backwards-incompatible commit 77df7b1283940d979d3e14893d151bc544f41410
2014-07-17Fix coercion code to disallow using cumulativity in the domain of products, ↵Matthieu Sozeau
which results in strange changes in user provided terms.
2014-07-14Add interface function to replace new_Type ()Matthieu Sozeau
2014-07-10Reduce non-toplevel letins in splay_prod_assum (bug found in Ergo).Matthieu Sozeau
2014-07-09Revert patch making the oracle be used for the transparent state in evarconv,Matthieu Sozeau
which made CoRN (and probably Ergo) fail. Another option should be found for making a constant not unfoldable by tactics/refinement.
2014-07-07In flex-flex cases, the undefinedness of an evar can not be preseved after ↵Matthieu Sozeau
converting the stacks. Take care of this by recalling unification.
2014-07-07Missing check of evar instantiation, resulting in missing constraints (bug ↵Matthieu Sozeau
from MathClasses).
2014-07-03Cleanup code related to the constraint solving, which sits now outside theMatthieu Sozeau
kernel in library/universes.ml.
2014-07-03Fix eta expansion of primitive records (HoTT bug #78), which now fails ↵Matthieu Sozeau
cleanly when called on partially applied constructors. Also protect evar_conv from that case.
2014-07-03When defining a monomorphic Program, do not allow arbitrary instantiationsMatthieu Sozeau
of the universe context in the obligations, it gets gradually fixed globally by each one of them. Fixes bug found in Misc/Overloading.
2014-07-02Fix a Not_found anomaly raised by solve_evar_evar, we were breaking theMatthieu Sozeau
invariant that the evar arguments to that function always have to be undefined.
2014-07-01Add toplevel commands to declare global universes and constraints.Matthieu Sozeau
2014-06-30Clarifying 'No such bound variable' message in apply, as suggested in #2387Hugo Herbelin
2014-06-29When building on-the-fly elimination principles, set the predicates universe ↵Matthieu Sozeau
variable as algebraic so it can disappear from the proof (it always gets substituted away from the term). This means less spurious universes remaining in proof terms.
2014-06-29Really honor the [simpl never] flag in whd_simpl, it was still doing ↵Matthieu Sozeau
reductions in case the constant was hiding a direct match for example. Also avoid two lookups of ReductionBehavior per constant application in simpl.
2014-06-28Quick fix of bug #2996 continued (case of inductive types).Hugo Herbelin
2014-06-28Quickly fixing bug #2996: typing functions now check when referring toHugo Herbelin
a global reference that the current (goal) env contains all the section variables that the global reference expects to be present. Note that the test for inclusion might be costly: everytime a conversion happens in a section variable copied in a goal, this conversion has to be redone when referring to a constant dependent on this section variable. It is unclear to me whether we should not instead give global names to section variables so that they exist even if they are not listed in the context of the current goal. Here are two examples which are still problematic: Section A. Let B := True : Type. Definition C := eq_refl : B = True. Theorem D : Type. clearbody B. set (x := C). unfold C in x. (* inconsistent context *) or Section A. Let B : Type. exact True. Qed. Definition C := eq_refl : B = True. (* Note that this violated the Qed. *) Theorem D : Type. set (x := C). unfold C in x. (* inconsistent context *)
2014-06-28Moved code for finding subterms (pattern, induction, set, generalize, ...)Hugo Herbelin
into a specific new cleaned file find_subterm.ml. This makes things clearer but also solves some dependencies problem between Evd, Termops and Pretype_errors.
2014-06-28Extra check for indirect dependency when abstracting a term which isHugo Herbelin
not a variable, in the future objective to factorize code between "generalize dependent" and "set", "destruct", etc.
2014-06-28Made the subterm finding function make_abstraction independent of theHugo Herbelin
proof engine. Moved it to unification.ml.
2014-06-28Small short optimization of instantiation in Evd.Hugo Herbelin
2014-06-27Fast path in Canonical structure detection. We do not always compute the normalPierre-Marie Pédrot
form of a potential canonical argument anymore, and we check that it may be part of a canonical structure first.
2014-06-26Deactivate the "Standard Propositions Naming" flag, source of a lot ofHugo Herbelin
incompatibilities, at least until the check of compilation of contribs succeeds more often. Incidentally adapted some proofs in Reals which were not agnostic relatively to whether the option is on or off.
2014-06-26Add an option to disable typeclass resolution during conversion, whichMatthieu Sozeau
is has non-local effects. For now it is not disabled by default, but we'll try to disable it once the test-suite and contribs are stabilized.
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.