Created
July 5, 2022 01:01
-
-
Save jittat/88ed7e6206f76f1d11decb810a03dc51 to your computer and use it in GitHub Desktop.
demo1 for LEAN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Mostly taken from Xena project at | |
-- https://github.com/ImperialCollegeLondon/M40001_lean/blob/master/src/2021/logic/README.md | |
import tactic -- imports all the Lean tactics | |
variables (P Q R W S: Prop) | |
/- | |
## Tactics: | |
* `intro` | |
* `exact` | |
* `apply` | |
-/ | |
example (hP : P) (hQ : Q) (hR : R) : P := | |
begin | |
sorry | |
end | |
-- Assume `Q` is true. Prove that `P → Q`. | |
example (hQ : Q) : P → Q := | |
begin | |
sorry | |
end | |
-- Assume `P → Q` and `P` is true. Deduce `Q`. | |
example (h : P → Q) (hP : P) : Q := | |
begin | |
sorry | |
end | |
example : P → P := | |
begin | |
sorry | |
end | |
example : P → Q → P := | |
begin | |
sorry | |
end | |
example : P → (P → Q) → Q := | |
begin | |
sorry | |
end | |
example (hPR : P → R) (hQR : Q → R) : (P ∨ Q) → R := | |
begin | |
sorry | |
end | |
example (hPQ : P → Q) (hPnQ : P → ¬Q) : ¬P := | |
begin | |
sorry | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment