| Age | Commit message (Collapse) | Author |
|
|
|
|
|
This will enable to handle implicit arguments by ignoring them during
preprocessing (before uninterpreting (i.e., printing)) and remplace
them with holes `_` during postprocessing (after interpreting (i.e.,
parsing)).
|
|
|
|
|
|
Previously real constants were parsed by an unproved OCaml code. The
parser and printer are now implemented in Coq, which will enable a
proof and hopefully make it easier to maintain / make evolve.
Previously reals were all parsed as an integer, an integer multiplied
by a power of ten or an integer divided by a power of ten. This means
1.02 and 102e-2 were both parsed as 102 / 100 and could not be tell
apart when printing. So the printer had to choose between two
representations : without exponent or without decimal dot. The choice
was made heuristically toward a most compact representation.
Now, decimal dot is parsed as a rational and exponents are parsed as a
product or division by a power of ten. For instance, 1.02 is parsed as
Q2R (102 # 100) whereas 102e-2 is parsed as IZR 102 / IZR (Z.pow_pos
10 2).
1.02 and 102e-2 remain equal (proved by reflexivity) but 1.02e1 = Q2R
(102 # 100) * 10 and 10.2 = Q2R (102 # 10) no longer are.
|
|
|
|
|
|
Previously rationals were all parsed as a pair numerator, denominator.
This means 1.02 and 102e-2 were both parsed as 102 # 100 and could not
be tell apart when printing. So the printer had to choose between two
representations : without exponent or without decimal dot. The choice
was made heuristically toward a most compact representation.
Now, decimal dot is still parsed as a power of ten denominator but
exponents are parsed as a product or division by Z.pow_pos. For
instance, 1.02 is parsed as 102 # 100 whereas 102e-2 is parsed as
(102 # 1) / (Z.pow_pos 10 2 # 1).
1.02 and 102e-2 remain equal (proved by reflexivity) but 1.02e1
= (102 # 100) * (10 # 1) = 1020 # 100 and 10.2 = 102 # 10 no longer are.
A nice side effect is that exponents can no longer blow up during
parsing. Previously 1e1_000_000 literally produced a numerator with a
million digits, now it just yields (1 # 1) * (Z.pow_pos 10 1_000_000 # 1).
|
|
Just to get a cleaner log, this will be proved again in a few commits.
|
|
|
|
|
|
Reviewed-by: MSoegtropIMC
Ack-by: Zimmi48
Reviewed-by: jfehrle
|
|
This enables numeral notations for non inductive types by
pre/postprocessing them to a given proxy inductive type.
For instance, this should enable the use of numeral notations for R.
|
|
This will enable to define numeral notation on non inductive by using
an inductive type as proxy and those translations to translate to/from
the actual type to the inductive type.
|
|
|
|
This is a generated file since #13147
|
|
|
|
|
|
This is a syntactic sugar that is compiled away to a simple case analysis.
|
|
|
|
We accept patterns that we failed to type as a fallback.
|
|
|
|
|
|
|
|
are in custom output path
Reviewed-by: maximedenes
Reviewed-by: herbelin
|
|
|
|
An alternative could also be to split the initialization of the
environment and the declaration of initial "binders".
|
|
|
|
Also some dead code.
If no typo is introduced, there should be no semantic changes.
|
|
Reviewed-by: SkySkimmer
|
|
Reviewed-by: SkySkimmer
|
|
|
|
|
|
We reuse the standard code path for term interpretation instead of trying
to mangle it.
|
|
The prepare_hint function was trying to requantify over all undefined evars,
but actually this should not happen when defining generic terms as hints through
some Hint vernacular command.
|
|
|
|
|
|
We know statically that only global references are passed to make_resolves.
|
|
|
|
Reviewed-by: jfehrle
Reviewed-by: Zimmi48
|
|
Reviewed-by: herbelin
|
|
Reviewed-by: herbelin
|
|
Reviewed-by: herbelin
|
|
notations in patterns
Reviewed-by: ejgallego
Ack-by: ppedrot
Ack-by: LasseBlaauwbroek
|
|
|
|
|
|
No need to zip the stack if the machine has made no progress.
|
|
(By closing unfinished proofs.)
|
|
From
[|x; y; z | def : ty |]
to
[| x; y; z | def : ty |]
|