Leonardo de Moura
b797c982fc
feat: add mkUnfoldProof
2022-01-07 13:51:45 -08:00
Mario Carneiro
dcaf3c615f
fix: induction generalizing precedence
2022-01-07 10:45:45 +01:00
Leonardo de Moura
bef161caf7
feat: add better support for discharging equation theorem hypotheses
2022-01-06 14:42:23 -08:00
Leonardo de Moura
90b179bea9
fix: add equation theorems even if definition supports smart unfolding
...
See new test.
2022-01-06 13:53:03 -08:00
Leonardo de Moura
d8d7d63830
fix: registers eqns info before adding definition
...
Otherwise `[simp]` at definition will fail to generate equational theorems.
2022-01-06 12:24:40 -08:00
Leonardo de Moura
7acbbb4fbb
fix: auxiliary whnfAux used at mkEqns
2022-01-06 09:57:41 -08:00
Leonardo de Moura
60934bf1d5
feat: add support for removing [simp] attribute from definitions with equational theorems
2022-01-05 16:57:59 -08:00
Leonardo de Moura
c2e52bd577
feat: use getEqnsFor? when applying [simp] at definitions
2022-01-05 15:59:39 -08:00
Leonardo de Moura
030e932db8
feat: use getEqnsFor? at simp
2022-01-05 11:28:24 -08:00
Leonardo de Moura
4d1343d670
chore: use _eq instead of eq to name auto generated equational theorems
2022-01-04 17:23:34 -08:00
Leonardo de Moura
b2918e0c76
test: add tests for WF.mkEqns
2022-01-04 17:18:51 -08:00
Leonardo de Moura
d782a97f5c
feat: add WF.mkProof for WF.mkEqns
2022-01-04 17:00:54 -08:00
Leonardo de Moura
b9f7d1defb
fix: constant folding after erasure
...
closes #909
2022-01-03 10:33:07 -08:00
Gabriel Ebner
e605c541d0
fix: do not infer type in erase_irrelevant
...
At the time erase_irrelevant is called, we have already eliminated the
`cast`-applications. Therefore non-atomic expressions may no longer
be well-typed (and `infer_type` can fail).
2022-01-03 07:13:55 -08:00
Sebastian Ullrich
555584375a
fix: compare fields top-down in deriving Ord
2022-01-03 07:02:13 -08:00
Leonardo de Moura
be6bc67eb0
fix: ensure match-expressions compiled using if-then-else can be reduced with TransparencyMode.reducible
...
closes #891
2021-12-18 10:55:42 -08:00
Leonardo de Moura
c954fc9ec7
fix: bug at simpLoop
2021-12-18 06:48:08 -08:00
Leonardo de Moura
0a81093db5
fix: bug at simpProj
...
This bug was reported at https://github.com/dwrensha/lean4-maze/issues/1
2021-12-15 17:07:00 -08:00
Gabriel Ebner
7e483d3a0a
feat: support syntax abbreviations in dynamic quotations
2021-12-15 11:17:58 +00:00
Leonardo de Moura
b6ef65d8fd
fix: where structure instance parser
...
closes #753
2021-12-12 07:52:52 -08:00
Leonardo de Moura
a3361e7d86
fix: missing universe assignments made during TC resolution
...
closes #796
2021-12-12 07:07:13 -08:00
Leonardo de Moura
483f32edd8
feat: in pure code, do use assume Id monad at do notation
...
This feature produced counterintuitive behavior and confused users.
See discussion at #770 .
As pointed out by @tydeu, it is not too much work to write `Id.run <|`
before the `do` when we want to use the `do` notation in pure code.
closes #770
2021-12-10 12:55:14 -08:00
Leonardo de Moura
96e0e1db98
fix: nontermination at simp [OfNat.ofNat]
...
closes #788
2021-12-10 12:29:33 -08:00
Leonardo de Moura
e64cfbb9b2
test: well-founded recursion example
...
see #860
2021-12-09 14:32:06 -08:00
Leonardo de Moura
41040a81de
fix: auxiliary matcher definitions should be treated as abbreviations
...
The motivation is to prevent performance problems such as the one
described at issue #854 .
Fixes #854 after a update stage0
2021-12-07 16:43:20 -08:00
Leonardo de Moura
b0fe1e5d10
feat: add Tomas Skrivan's TC resolution improvement
...
This commit implements the TC resolution improvement suggested by
Tomas at #815 .
Closes #815 .
2021-12-06 17:46:11 -08:00
Sebastian Ullrich
80c3d88e3e
refactor: optimize critical import path
2021-12-06 08:05:24 -08:00
Leonardo de Moura
b2d88f7bcc
fix: bug at saveEqn
2021-12-02 17:38:39 -08:00
Leonardo de Moura
bb768b06cd
feat: add PersistentArray.foldrM
2021-12-02 17:17:55 -08:00
Leonardo de Moura
c42196440f
fix: give preference to non-indices at findRecArg
...
fixes #837
2021-12-01 16:45:19 -08:00
Sebastian Ullrich
465913c391
fix: this must be a keyword
2021-11-29 10:06:15 -08:00
Sebastian Ullrich
531eefb7db
chore: adapt syntax
2021-11-29 10:06:15 -08:00
Leonardo de Moura
0aa32d643e
fix: eta struct and proof irrelevance issue
...
see #777
2021-11-27 07:15:57 -08:00
Leonardo de Moura
2d113e83f9
feat: eta struct support for unit-like datatypes
...
For example, given `a b : Unit`, we have that `a` and `b` are
definitionally equal by `etaStruct`.
See #777
2021-11-26 08:36:25 -08:00
Sebastian Ullrich
e9f7c88299
feat: record doc strings of builtin parsers & elaborators
2021-11-26 17:13:19 +01:00
Leonardo de Moura
0fc8c1da77
feat: eta for structures at recursors
...
see #777
2021-11-25 11:31:00 -08:00
Leonardo de Moura
a8f4146070
feat: support eta struct recursively
...
Addresses issues raised by @gebner at #777
2021-11-23 17:38:48 -08:00
Gabriel Ebner
7537fa7795
fix: unfold x<y in discrimination tree module
2021-11-23 07:34:51 -08:00
Leonardo de Moura
e15a656fd2
fix: remove @[reducible] annotation from Function.comp and Function.const
...
closes #813
2021-11-23 07:29:25 -08:00
Leonardo de Moura
d685c545b4
feat: eta for structures
2021-11-23 06:21:25 -08:00
Leonardo de Moura
d9b057af03
fix: fixes #793
2021-11-22 13:28:08 -08:00
Gabriel Ebner
f55649f81b
fix: prefer simp lemmas with *higher* priority
2021-11-22 11:52:45 -08:00
Leonardo de Moura
2a7b33089a
fix: transparency settings at simp TC check
...
fixes #790
2021-11-15 18:09:31 -08:00
Leonardo de Moura
4b2fa38cb8
fix: #check_failure command should succeed if there are stuck TC problems
2021-11-15 16:56:55 -08:00
Leonardo de Moura
9a152d2051
fix: use withSynthesize at elabStructInstance
...
fixes #783
2021-11-15 16:45:26 -08:00
Leonardo de Moura
743810b77a
feat: use binrel_no_prop% to define == notation
...
fixes #764
2021-11-09 07:46:10 -08:00
Sebastian Ullrich
177d45a752
chore: fail without decreasing proof
2021-11-06 18:29:59 +01:00
Sebastian Ullrich
03551487ad
chore: simplify test
2021-11-05 10:45:27 +01:00
Sebastian Ullrich
6e45685310
fix: propositions should never be considered enum types
2021-11-04 15:27:15 -07:00
Leonardo de Moura
3367501511
fix: inaccessible annotations at isDefEq issue
...
Issue was reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Change.20in.20pattern.20matching.3B.20expected.20behaviour.3F/near/259059096
fixes #742
2021-10-27 09:26:12 -07:00