Commit graph

842 commits

Author SHA1 Message Date
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
Leonardo de Moura
693a96681a doc: fix eta struct comment 2021-11-26 08:36:25 -08:00
Leonardo de Moura
88b6ad4756 feat: add etaStruct to Meta.Simp.Config 2021-11-25 11:31:00 -08:00
Leonardo de Moura
d806344ee2 fix: set etaStruct := false at MatchEqns 2021-11-25 11:31:00 -08:00
Leonardo de Moura
43217884c0 feat: add Meta.Config.etaStruct
It is useful to disable eta for structures for meta programs.
2021-11-25 11:31:00 -08:00
Leonardo de Moura
0fc8c1da77 feat: eta for structures at recursors
see #777
2021-11-25 11:31:00 -08:00
Leonardo de Moura
9e1704f658 chore: simplify toCtorWhenK 2021-11-25 11:31:00 -08:00
Leonardo de Moura
ccc3f99507 chore: use isStructureLike 2021-11-25 11:31:00 -08:00
Leonardo de Moura
0de700fe45 chore: naming convetion 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
d685c545b4 feat: eta for structures 2021-11-23 06:21:25 -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
a5b1b8de4f fix: bug at Offset.lean
Offset equalities should not assume default `Nat` instances for
numerals, `+`, `*`, and `-` have been used.

fixes #755
2021-11-08 18:27:25 -08:00
Leonardo de Moura
84d4d771ca fix: bug at addPPExplicitToExposeDiff 2021-11-08 18:25:57 -08: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
Leonardo de Moura
57f02804f3 feat: use forallTelescopeReducing
This is needed now that we allow definitions at `inductive`.
2021-10-25 13:05:23 -07:00
Leonardo de Moura
3dbd1fd074 chore: style 2021-10-25 13:02:15 -07:00
Leonardo de Moura
851ac3809e feat: extend isInductivePredicate 2021-10-25 12:37:04 -07:00
Leonardo de Moura
83cf5b20a1 fix: simpLet
Given `let x := v; b`, `simpLet` was using an incorrect local context to simplify `v`.
2021-10-22 16:29:00 -07:00
Leonardo de Moura
b4a6b4f882 fix: do not consume pretty print hints at isDefEq
TODO: improve the solution. It is too hackish.

The issue was reported here https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/.E2.9C.94.20MData.20and.20unification/near/258352713
2021-10-20 15:58:56 -07:00
Leonardo de Moura
58430704e5 refactor: move inaccessible? to Expr.lean 2021-10-20 15:54:18 -07:00
Leonardo de Moura
b5e640a423 fix: avoid getMVarType' at cleanup tactic
`getMVarType'` applies `whnf`
2021-10-19 06:43:07 -07:00
Leonardo de Moura
67c8e76b08 fix: preserve unused let declarations
This commit fixes reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/unused.20let.20disappears/near/257528105
2021-10-18 17:40:15 -07:00
Leonardo de Moura
6b2303b243 fix: bug at tryLemmaCore when numExtraArgs > 1
Fixes bug reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Simp.20bug.20-.20produces.60application.20type.20mismatch.60/near/257711901
2021-10-18 13:59:19 -07:00
Sebastian Ullrich
e068833e8d fix: register missing simp trace classes 2021-10-11 15:37:56 +02:00
Leonardo de Moura
91d2f6d4fc feat: add cleanup tactic 2021-10-06 19:54:28 -07:00
Leonardo de Moura
c02b4f2675 refactor: move to Meta namespace 2021-10-06 19:05:37 -07:00
Leonardo de Moura
def7641926 feat: add helper methods for checking dependencies 2021-10-06 19:04:02 -07:00
Leonardo de Moura
59d7b00557 feat: add mapping from mvar user name to MVarId 2021-10-02 15:26:44 -07:00
Leonardo de Moura
dba358067a chore: remove workaround 2021-09-30 22:37:20 -07:00
Leonardo de Moura
3fed9c9df7 feat: reject partial when if constant is not a function
fixes #697
2021-09-28 21:07:14 -07:00
Leonardo de Moura
d0462153a0 fix: bug at smart unfolding procedure
It fixes an issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Simplifications.20in.20proofs.2Ftype-checking.20not.20happening.3B.20wh.2E.2E.2E
2021-09-28 10:45:54 -07:00
Leonardo de Moura
f1be1d5bba feat: add simpProj
Simplifier for kernel projections.
2021-09-27 19:06:10 -07:00
Leonardo de Moura
1282fb2d97 fix: getMatchWithExtra
`getMatchKeyArgs` returns arguments in reverse order.
2021-09-25 08:36:12 -07:00
Leonardo de Moura
5fe40fbccf refactor: add sortFVarIds to Meta/Basic.lean 2021-09-20 11:32:53 -07:00
Leonardo de Moura
1868cea536 fix: "stuck at universe contraint" issues 2021-09-20 07:22:14 -07:00
Leonardo de Moura
9e980b2a78 fix: bug at decAux?
We are getting a few "stuck at universe constraint" errors after the
fix. We may need to add some kind of approximation in the future.
2021-09-20 07:12:57 -07:00
Leonardo de Moura
f2a418a7ae chore: smartUnfolding cleanup
We remove dead code, update comments, and add new tests

See #445
2021-09-19 15:29:11 -07:00
Leonardo de Moura
5b0a1c2b2f feat: smart unfolding support for nested match-expressions
See #445
2021-09-19 15:17:56 -07:00
Leonardo de Moura
35c7081377 feat: improve casesOnStuckLHS 2021-09-19 08:28:10 -07:00
Leonardo de Moura
2775298fef feat: add applyMatchSplitter
It applies the match splitter without using simplification theorems
2021-09-18 16:30:47 -07:00
Leonardo de Moura
38090fa3c0 feat: improve casesOnStuckLHS 2021-09-17 18:48:45 -07:00
Leonardo de Moura
6fbb6c7215 feat: add delta? 2021-09-17 18:46:09 -07:00
Leonardo de Moura
6eff84a7bb refactor: add generic mkBaseNameFor 2021-09-17 16:30:09 -07:00
Leonardo de Moura
70a4d2691f chore: cleanup 2021-09-17 16:00:00 -07:00
Leonardo de Moura
793d493df0 feat: equation theorem manager 2021-09-17 14:20:28 -07:00
Leonardo de Moura
42eba87325 feat: add simpMatchTarget 2021-09-17 14:20:28 -07:00