Leonardo de Moura
4ba97c22ec
test: proving properties of mutually defined functions
2022-03-02 13:40:19 -08:00
Leonardo de Moura
14ef4b4304
test: add WF test that exposes the need for better error messages
2022-03-02 12:47:19 -08:00
Leonardo de Moura
52403fca83
feat: add support for guessing (very) simple WF relations
...
There are a lot of TODOs, but it is already useful for simple cases.
closes #847
2022-03-02 11:52:00 -08:00
Leonardo de Moura
1e205d635e
fix: bug at wfRecursion
...
"After compilation" attributes were being applied to soon when we did
not need to generate auxiliary functions.
2022-03-01 17:48:06 -08:00
Leonardo de Moura
2daf8d62ac
test: LazyList with Thunk
2022-03-01 16:55:56 -08:00
Leonardo de Moura
4e310ac63d
feat: improve SimpTheorem preprocessor
2022-02-28 18:27:36 -08:00
Leonardo de Moura
e455df9c95
fix: use a def-eq aware mapping at toLinearExpr
...
The new test exposes the problem fixed by this commit.
In the termination proof we have two `sizeOf xs` terms that are not
syntactically identical (only definitional equal) because the
instances are different.
2022-02-28 13:46:36 -08:00
Leonardo de Moura
c5fdd54cd8
feat: support for acyclicity at unifyEqs
...
closes #1022
2022-02-27 10:03:40 -08:00
Leonardo de Moura
89f88b1caa
feat: simplify nested arith expressions
2022-02-27 09:01:52 -08:00
Leonardo de Moura
2c00823da9
test: simp_arith
2022-02-27 09:01:52 -08:00
Leonardo de Moura
0242eb7ede
feat: use simp (config := { arith := true }) at decreasing_tactic
...
closes #262
2022-02-26 09:12:34 -08:00
Leonardo de Moura
ff76958959
feat: basic support for linear Nat arithmetic at simp
2022-02-26 08:58:32 -08:00
Leonardo de Moura
41a5c2bce4
feat: add support for negation at simpCnstr?
2022-02-25 18:30:09 -08:00
Leonardo de Moura
7217ee7754
fix: GE.ge and GT.gt support at simpCnstr?
2022-02-25 17:12:27 -08:00
Leonardo de Moura
3f636b9f83
feat: add Lean.Meta.Linear.Nat.simpCnstr?
2022-02-25 16:27:21 -08:00
Leonardo de Moura
049273afee
fix: add workarounds to code generator
...
The issue is only going to be properly fixed when we rewrite `csimp`
in Lean. The `csimp` performs transformations that do not preserve
typability, but it also uses the kernel `infer_type` which assumes the
input is type correct. In the new `csimp`, we must have a different
`infer_type` which returns an `Any` type in this kind of situation.
The workaround in this commit simply disables optimizations when
`infer_type` fails. It does not fix all occurrences of this problem,
but the two places that issue #1030 triggered.
closes #1030
2022-02-25 08:47:56 -08:00
Leonardo de Moura
4f7067fe7f
fix: substEqs may close input goal
...
closes #1029
2022-02-25 08:07:23 -08:00
Leonardo de Moura
e04ad112b2
fix: store levelNames in the SavedContext
2022-02-24 17:47:26 -08:00
Leonardo de Moura
2961e9cbf0
fix: heuristic for deciding which additional propositions must be included in equality theorems
2022-02-24 17:17:07 -08:00
Leonardo de Moura
bdea43a52a
feat: while and repeat macros
2022-02-24 16:26:07 -08:00
Leonardo de Moura
05be43455a
feat: add src/Init/Data/Nat/Linear.lean
2022-02-24 13:45:17 -08:00
Leonardo de Moura
43c2169f78
fix: when performing contextual simplification, and arrow may become a dependent arrow
...
fixes #1024
2022-02-23 18:43:32 -08:00
Leonardo de Moura
49c64040a2
feat: add support for HEq at injections tactic
2022-02-23 17:31:17 -08:00
Leonardo de Moura
0125db40a2
fix: remove [..] annotation from if simp theorems
...
fixes #1025
2022-02-23 16:28:12 -08:00
Leonardo de Moura
1ac9c1263b
test: add helper theorems
2022-02-23 11:52:03 -08:00
Leonardo de Moura
dbe9bf61c5
fix: unfold auxiliary theorems created by decreasing_tactic
2022-02-23 09:02:23 -08:00
Leonardo de Moura
52ff840321
feat: support for HEq at injection
2022-02-22 17:24:11 -08:00
Leonardo de Moura
c9f8ec71df
fix: invalid rewrite when proving equation theorems for declaration using well-founded recursion
2022-02-22 16:38:51 -08:00
Leonardo de Moura
d36027d2fa
test: add Certificate.of_combine_isUnsat
2022-02-22 16:04:23 -08:00
Leonardo de Moura
77fc0d3223
test: cleanup
2022-02-22 07:23:07 -08:00
Leonardo de Moura
c932d9d33c
test: combine two inequalities
2022-02-21 15:13:37 -08:00
Leonardo de Moura
e9ee8ee86f
test: add cancelation theorems for <= and <
2022-02-21 08:49:50 -08:00
Leonardo de Moura
0986696758
test: add cancelation example
2022-02-20 17:35:33 -08:00
Leonardo de Moura
a8427702e8
test: reverse direction for cancelation procedure
2022-02-20 17:03:11 -08:00
Leonardo de Moura
4ccab41819
test: proof by reflection example
2022-02-20 10:11:40 -08:00
Leonardo de Moura
cf0f7a30c4
test: add Monomials.cancel
2022-02-19 21:29:33 -08:00
Leonardo de Moura
855b71299f
test: arith by reflection
2022-02-19 17:54:32 -08:00
Leonardo de Moura
7a81589c49
feat: improve "constant approximation" heuristic used at isDefEq
2022-02-19 08:09:31 -08:00
Leonardo de Moura
e61d0be561
feat: isolate fixed prefix at well-founded recursion
...
closes #1017
2022-02-18 10:40:32 -08:00
Leonardo de Moura
9ee529e5ce
fix: use PSum instead of Sum when using well-founded recursion
...
See new test for example that did not work with `Sum` because type
alpha was `Sort u`.
2022-02-17 16:14:34 -08:00
Leonardo de Moura
dedb6ee01b
fix: skip value if type is computationally irrelevant
2022-02-17 10:41:16 -08:00
Leonardo de Moura
ad5099ec3c
fix: mkLetRecClosureFor for nested let-recs
...
closes #1020
2022-02-16 12:44:02 -08:00
Leonardo de Moura
df584567f5
feat: (generalizing := true) is the default behavior for match-expressions
...
closes #1018
2022-02-15 11:12:04 -08:00
Leonardo de Moura
66e0b72c6f
test: notation for providing names to equality proofs in match expressions is not whitespace sensitivity anymore
2022-02-14 15:51:23 -08:00
Leonardo de Moura
93b5b74b36
feat: modify notation for providing motive in "match" expressions
2022-02-14 15:36:14 -08:00
Leonardo de Moura
aa63fda835
fix: mark auxiliary noConfusion declarations for enumeration types as [reducible]
...
closes #1016
2022-02-14 12:03:49 -08:00
Leonardo de Moura
82bce7ebec
fix: declare local instaces occurring in patterns
2022-02-12 12:01:08 -08:00
Leonardo de Moura
999e80745e
test: add test for already fixed issue reported on Zulip
2022-02-12 07:53:31 -08:00
Leonardo de Moura
ab41dd0d83
test: add test for issue #1013
2022-02-11 09:28:46 -08:00
Sebastian Ullrich
80e2e1daa8
test: mutual block not needed
2022-02-11 16:22:13 +01:00