test(tests/lean/run): add more tests sent by Cody
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
faee08591f
commit
4b2e403023
2 changed files with 47 additions and 0 deletions
24
tests/lean/run/cody1.lean
Normal file
24
tests/lean/run/cody1.lean
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
import logic
|
||||||
|
|
||||||
|
abbreviation subsets (P : Type) := P → Prop.
|
||||||
|
|
||||||
|
section
|
||||||
|
|
||||||
|
hypothesis A : Type.
|
||||||
|
|
||||||
|
hypothesis r : A → subsets A.
|
||||||
|
|
||||||
|
hypothesis i : subsets A → A.
|
||||||
|
|
||||||
|
hypothesis retract {P : subsets A} {a : A} : r (i P) a = P a.
|
||||||
|
|
||||||
|
definition delta (a:A) : Prop := ¬ (r a a).
|
||||||
|
|
||||||
|
notation `δ` := delta.
|
||||||
|
|
||||||
|
-- Crashes unifier!
|
||||||
|
theorem false_aux : ¬ (δ (i delta))
|
||||||
|
:= assume H : δ (i delta),
|
||||||
|
have H' : r (i delta) (i delta),
|
||||||
|
from eq_rec H (symm retract),
|
||||||
|
H H'.
|
23
tests/lean/run/cody2.lean
Normal file
23
tests/lean/run/cody2.lean
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
import logic
|
||||||
|
|
||||||
|
abbreviation subsets (P : Type) := P → Prop.
|
||||||
|
|
||||||
|
section
|
||||||
|
|
||||||
|
hypothesis A : Type.
|
||||||
|
|
||||||
|
hypothesis r : A → subsets A.
|
||||||
|
|
||||||
|
hypothesis i : subsets A → A.
|
||||||
|
|
||||||
|
hypothesis retract {P : subsets A} {a : A} : r (i P) a = P a.
|
||||||
|
|
||||||
|
definition delta (a:A) : Prop := ¬ (r a a).
|
||||||
|
|
||||||
|
notation `δ` := delta.
|
||||||
|
|
||||||
|
theorem delta_aux : ¬ (δ (i delta))
|
||||||
|
:= assume H : δ (i delta),
|
||||||
|
H (subst (symm retract) H).
|
||||||
|
|
||||||
|
check delta_aux.
|
Loading…
Reference in a new issue