https://github.com/kiranandcode/deriving-such-that
https://github.com/kiranandcode/deriving-such-that
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/kiranandcode/deriving-such-that
- Owner: kiranandcode
- Created: 2024-04-17T06:32:56.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-22T10:58:09.000Z (about 2 years ago)
- Last Synced: 2025-02-16T14:25:05.530Z (over 1 year ago)
- Language: Lean
- Size: 3.91 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deriving Such That for Lean
This repository includes an implementation of the program derivation
tactic [deriving such
that](https://coq.inria.fr/doc/V8.18.0/refman/addendum/miscellaneous-extensions.html)
extension from the Rocq proof assistant in Lean.
## Example of use
```lean
derive p such that (k * n) + (k * m) = p as h := by
instantiate ?p := k * (n + m)
simp [p, Nat.mul_add]
#eval (p 1 2 3)
-- produces 9
```
Note: vanilla lean doesn't really expect users to use evariables, it
doesn't provide any tactics to instantiate evars, so this library
provides one.