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
Leonardo de Moura
622995b2c7
chore: style
2022-02-24 17:57:21 -08:00
Leonardo de Moura
e04ad112b2
fix: store levelNames in the SavedContext
2022-02-24 17:47:26 -08:00
Leonardo de Moura
be2e2cb70e
chore: adjust proofs affected by update stage0
2022-02-24 17:20:17 -08:00
Leonardo de Moura
7480670c6a
chore: update stage0
2022-02-24 17:18:42 -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
f7f04483b1
feat: add src/Lean/Meta/Tactic/LinearArith/Nat.lean
2022-02-24 15:24:59 -08:00
Leonardo de Moura
bd3ad35a1c
fix: we may get False in unreachable branches
2022-02-24 15:24:07 -08:00
Leonardo de Moura
8131aa5a64
chore: add simp theorem heq_eq_eq
2022-02-24 13:45:34 -08:00
Leonardo de Moura
b134b9a3a4
chore: move isNatProjInst
2022-02-24 13:45:34 -08:00
Leonardo de Moura
a430b2ad71
chore: add copyright
2022-02-24 13:45:34 -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
07d1ec1926
fix: simp_all was "self-simplifying" simplified hypotheses
...
fixes #1027
2022-02-23 16:48:28 -08:00
Leonardo de Moura
16b8800607
chore: fix tests
2022-02-23 16:30:27 -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
3e0ea7fbae
fix: use instantiateMVars before invoking pure function findIfToSplit
2022-02-23 16:25:33 -08:00
Leonardo de Moura
a1366fcb3b
chore: cleanup
2022-02-23 16:24:42 -08:00
Leonardo de Moura
c491659970
feat: improve split tactic error message
2022-02-23 16:00:42 -08:00
Leonardo de Moura
902e60c480
feat: add Format.isEmpty
2022-02-23 13:34:25 -08:00
Leonardo de Moura
52b53ab7a2
fix: heuristic for generating equation theorem types
...
closes #1026
2022-02-23 13:10:30 -08:00
Leonardo de Moura
2340f1b9bd
feat: add isBRecOnRecursor
2022-02-23 13:09:29 -08:00
Leonardo de Moura
15546fbc48
feat: add Expr.findExt?
2022-02-23 12:32:17 -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
4794b9709f
feat: improve equation theorem and match-splitter generation at MatchEqns.lean
2022-02-22 17:43:42 -08:00
Leonardo de Moura
52ff840321
feat: support for HEq at injection
2022-02-22 17:24:11 -08:00