Leonardo de Moura
4e310ac63d
feat: improve SimpTheorem preprocessor
2022-02-28 18:27:36 -08:00
Leonardo de Moura
e8fb0c96ac
feat: add helper theorems
2022-02-28 18:06:02 -08:00
Leonardo de Moura
5ddb3c3435
feat: faster PolyCnstr.combine
2022-02-28 17:24:26 -08:00
Leonardo de Moura
adf3510e08
chore: increase maxHeartbeats default values
...
We now increase the number of heartbeats at `expr_eq_fn`. Thus, the
old default values are too small.
2022-02-28 15:44:08 -08:00
Leonardo de Moura
b5f28239af
feat: add List helper theorems
2022-02-28 15:16:13 -08:00
Leonardo de Moura
998a3de747
chore: update stage0
2022-02-28 15:13:38 -08:00
Leonardo de Moura
3005bab970
feat: helper theorem and tactic for WF
2022-02-28 15:11:00 -08:00
Leonardo de Moura
55bc048656
feat: make sure inequalities are normalized when no monomial was cancelled
2022-02-28 15:10:39 -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
802922ddaf
feat: add helper sizeOf simp theorems
2022-02-28 12:28:37 -08:00
Leonardo de Moura
2ba3205f94
feat: add Prod.Lex.right'
2022-02-28 11:19:28 -08:00
Leonardo de Moura
10657f5e81
feat: add trace <string> tactic
2022-02-28 11:16:42 -08:00
Leonardo de Moura
63a5cd5056
fix: trace_state messages should not be lost during backtracking
2022-02-28 11:07:41 -08:00
Leonardo de Moura
d89fa9d4c3
fix: endPos missing at trace messages
2022-02-28 10:55:45 -08:00
Leonardo de Moura
b7d2239ca4
chore: update stage0
2022-02-28 08:32:24 -08:00
Leonardo de Moura
46b97c2b70
fix: ExceptT.run_lift
2022-02-28 07:25:00 -08:00
Sebastian Ullrich
53d313c74c
chore: fix function name
2022-02-28 16:16:22 +01: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
c5baf759e2
fix: we must use addAsAxiom before getFixedPrefix
...
`getFixedPrefix` uses `isDefEq`, and it will fail if it needs to
retrieve the type of one of the recursive function being defined.
2022-02-27 09:01:52 -08:00
Leonardo de Moura
2c00823da9
test: simp_arith
2022-02-27 09:01:52 -08:00
Sebastian Ullrich
6c6f66b812
feat: propagate actual file name in file worker
...
Also stop recreating the FileMap for every command, that's quadratic!
2022-02-27 10:33:27 +01:00
Leonardo de Moura
90055fb7d4
chore: clarify error message at decreasing_tactic
2022-02-26 10:15:05 -08:00
Leonardo de Moura
f22b48b226
fix: display all remaining goals at fail tactic error message
2022-02-26 09:49:06 -08:00
Leonardo de Moura
f7f886dcb2
feat: improve error message for decreasing_tactic failures
2022-02-26 09:42:59 -08:00
Leonardo de Moura
cabd599de1
feat: add fail tactic
2022-02-26 09:31:19 -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
5030e613a2
feat: add isSimpCnstrTarget
2022-02-25 17:18:50 -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
812cc72285
chore: add helper theorems
2022-02-25 17:04:04 -08:00
Leonardo de Moura
0681d818ec
chore: add helper function for simp
2022-02-25 16:42:41 -08:00
Leonardo de Moura
38da48c5cf
refactor: LinearArith/Basic.lean => LinearArith/Solver.lean
2022-02-25 16:35:36 -08:00
Leonardo de Moura
cd710e903e
chore: update stage0
2022-02-25 16:32:03 -08:00
Leonardo de Moura
77dda12bc9
chore: add Simp.Config.arith option
2022-02-25 16:30:44 -08:00
Leonardo de Moura
3f636b9f83
feat: add Lean.Meta.Linear.Nat.simpCnstr?
2022-02-25 16:27:21 -08:00
Leonardo de Moura
f7fd706973
chore: missing import
2022-02-25 16:20:26 -08:00
Leonardo de Moura
346930af9d
feat: add ExprCnstr.eq_of_toNormPoly_eq
2022-02-25 14:55:20 -08:00
Leonardo de Moura
b8bed6fb5c
feat: add LawfulBEq class
2022-02-25 13:35:08 -08:00
Leonardo de Moura
3b130ee42f
feat: add Poly.toExpr
2022-02-25 12:31:30 -08:00
Leonardo de Moura
7d8cb84834
chore: update stage0
2022-02-25 08:50:05 -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
82e3789604
fix: run_lift type
2022-02-25 07:49:34 -08:00
Leonardo de Moura
7920db9521
feat: check for invalid projections during elaboration
...
It produces a better error message than the one produced by the
kernel.
2022-02-25 07:43:37 -08:00
Leonardo de Moura
04b93fc725
chore: fix invalid proof
2022-02-25 07:24:02 -08:00
Leonardo de Moura
0611eb84cc
chore: update stage0
2022-02-25 07:22:59 -08:00
Leonardo de Moura
c9471ea029
fix: invalid proof
2022-02-25 07:17:31 -08:00
Leonardo de Moura
db38bc4043
fix: missing check at infer_proj
...
We should not allow `h.1` if `h` is a proposition and the result is
not. The recursor for `h`'s type can only eliminate into `Prop`.
2022-02-25 07:15:34 -08:00