aboutsummaryrefslogtreecommitdiff
path: root/pretyping
AgeCommit message (Collapse)Author
2014-08-05A new step in the new "standard" naming policy for propositional hypothesesHugo Herbelin
obtained from case analysis or induction. Made it under experimental status. This replaces commit bf7d2a3ad2535e7d57db79c17c81aaf67d956965 which was acting at the level of logic.ml. Now acting in tactics.ml. Parts of things to be done about naming (not related to Propositions): induction on H:nat+bool produces hypotheses n and b but destruct on H produces a and b. This is because induction takes the dependent scheme whose names are statically inferred to be a and b while destruct dynamically builds a new scheme.
2014-08-03- Fix handling of opaque polymorphic definitions which were turned transparent.Matthieu Sozeau
- Decomment code in reductionops forgotten after debugging.
2014-08-03Move to a representation of universe polymorphic constants using indices for ↵Matthieu Sozeau
variables. Simplifies instantiation of constants/inductives, requiring less allocation and Map.find's. Abstraction by variables is handled mostly inside the kernel but could be moved outside.
2014-08-03- Fix has_undefined_evars not using its or_sorts argument anymore.Matthieu Sozeau
- Allow apply's unification to use conversion even if some polymorphic constants appear in the goal (consistent with occur_meta_or_evar, and evarconv in general).
2014-08-01Continuing (incomplete) cleaning of Inductiveops.Hugo Herbelin
2014-08-01A tentative uniform naming policy in module Inductiveops.Hugo Herbelin
- realargs: refers either to the indices of an inductive, or to the proper args of a constructor - params: refers to parameters (which are common to inductive and constructors) - allargs = params + realargs - realdecls: refers to the defining context of indices or proper args of a constructor (it includes letins) - paramdecls: refers to the defining context of params (it includes letins) - alldecls = paramdecls + realdecls
2014-07-31Add an option to solve typeclass goals generated by apply which can't beMatthieu Sozeau
catched otherwise due to the discrepancy between evars and metas.
2014-07-30Avoid introducing additional universes when doing pruning in evarsolve.Matthieu Sozeau
2014-07-29Rework code for refolding projections in whd_state/whd_simpl to allow ArgumentsMatthieu Sozeau
Specifications indicating that the record object must be a constructor. Fixes bug #3432.
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