E.W.Ayers
d954706fcf
feat: ApplyNewGoals config for apply
...
Lean.Meta.Tactic.apply now accepts an ApplyConfig argument.
`apply` now changes which metavariables are stored with choice
of the newGoals config.
This allows one to implement `fapply` and `eapply`.
An example of this is given in tests/lean/run/apply_tac.lean.
Closes #1045
2022-03-19 15:51:40 -07:00
Leonardo de Moura
38a1675c72
fix: dicrimination tree getMatchWithExtra
...
It was buggy when the input argument could be reduced `e`.
fixes #1048
2022-03-17 16:44:38 -07:00
Daniel Fabian
969eea19f0
refactor: do not use mkAppM so much
2022-03-16 17:21:20 -07:00
Daniel Fabian
cf4e873974
feat: support Sort u in ac_refl.
2022-03-16 17:21:20 -07:00
Daniel Fabian
8e0763f502
fix: binder case.
2022-03-16 17:21:20 -07:00
Daniel Fabian
d667d5ab5d
feat: rewrite the tactic using simp as the basis.
2022-03-16 17:21:20 -07:00
Daniel Fabian
ed63274874
refactor: move ac_refl syntaxt to Init/Notation
2022-03-16 17:21:20 -07:00
Daniel Fabian
73a59e5bc4
feat: use simp instead of rewrite inside of ac_refl
2022-03-16 17:21:20 -07:00
Daniel Fabian
84f72b9389
test: add further ac_refl tests.
2022-03-16 17:21:20 -07:00
Daniel Fabian
a60220b036
feat: add tactic for ac_refl.
2022-03-16 17:21:20 -07:00
Daniel Fabian
eaa48f0d8d
refactor: move ac proofs to Init.
2022-03-16 17:21:20 -07:00
Daniel Fabian
1114dfac6c
feat: add theory for ac normalization.
...
This lets us implement an AC reflexivity tactic.
2022-03-16 17:21:20 -07:00
Leonardo de Moura
50813429b8
fix: add expected type hint
...
Other tactics (e.g., `simp_all`) may try to infer the type of the
proof, and `Nat.Linear.eq_of_toNormPoly_eq` has a messy resulting type.
2022-03-16 17:07:22 -07:00
Leonardo de Moura
cb925a3a3c
fix: return some at simpCnstrPos? if arith expr was normalized, but not simplified
...
Example: converted `<`, `>`, or `>=` into `<=`.
2022-03-16 16:36:39 -07:00
Leonardo de Moura
09648521d1
chore: add Repr instances
2022-03-16 16:07:14 -07:00
Leonardo de Moura
0bd9de1cb9
perf: add InstantiateLevelCaches for types and values at CoreM
2022-03-15 17:42:38 -07:00
Leonardo de Moura
d6de53a7aa
perf: custom splitAnd
2022-03-15 16:59:11 -07:00
Leonardo de Moura
7ee7ca30b8
fix: index out of bounds
2022-03-15 05:16:19 -07:00
Leonardo de Moura
86fc089e07
fix: tryAutoCongrTheorem? may still use dsimp for fixed arguments
...
Reviewed-by: Leonardo de Moura <leonardo@microsoft.com>
2022-03-14 14:04:28 -07:00
Leonardo de Moura
272dd5533f
chore: style use · instead of . for lambda dot notation
...
We are considering removing `.` as an alternative for `·` in the
lambda dot notation (e.g., `(·+·)`).
Reasons:
- `.` is not a perfect replacement for `·` (e.g., `(·.insert ·)`)
- `.` is too overloaded: `(f.x)` and `(f .x)` and `(f . x)`. We want to keep the first two.
2022-03-11 07:49:03 -08:00
Leonardo de Moura
4660485ac8
refactor: collectDeps => collectForwardDeps
2022-03-09 11:27:58 -08:00
Sebastian Ullrich
ff097e952f
chore: link orphan file
2022-03-07 10:59:49 +01:00
Leonardo de Moura
f306c9b69b
fix: split tactic
...
`unreachable!` assertions at `simpIfLocalDecl` and
`simpTargetLocalDecl` were reachable.
2022-03-03 18:13:34 -08:00
Leonardo de Moura
137c70f055
chore: add LinearArith/Nat/Solver.lean
2022-03-03 11:13:40 -08:00
Leonardo de Moura
88a2645a5f
refactor: add Lean/Meta/Tactic/LinearArith/Basic.lean
2022-03-02 11:52:00 -08:00
Leonardo de Moura
f171286e74
refactor: add src/Lean/Meta/Tactic/LinearArith/Nat
2022-03-02 11:52:00 -08:00
Leonardo de Moura
4e310ac63d
feat: improve SimpTheorem preprocessor
2022-02-28 18:27:36 -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
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
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
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
3f636b9f83
feat: add Lean.Meta.Linear.Nat.simpCnstr?
2022-02-25 16:27:21 -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
f7f04483b1
feat: add src/Lean/Meta/Tactic/LinearArith/Nat.lean
2022-02-24 15:24:59 -08:00
Leonardo de Moura
a430b2ad71
chore: add copyright
2022-02-24 13:45:34 -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
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
52ff840321
feat: support for HEq at injection
2022-02-22 17:24:11 -08:00
Leonardo de Moura
c73d177c94
perf: simpH? at MatchEqns.lean
2022-02-21 12:04:03 -08:00
Leonardo de Moura
33b1d2fd98
fix: preserve arrow binder names and info at simp
...
We use the idiom `revert; simp; ...; intro` in a few places. Some of
the reverted hypotheses manifest themselves as arrows in the target.
Before this commit, `simp` would lose the binder names and info when
simplifying an arrow, and we would get inaccessible names when
reintroducing them.
2022-02-20 16:27:40 -08:00