test(tests/lean): add test for congruence theorem that uses an argument before simplification
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
180be5c4a2
commit
cd87cb3de4
2 changed files with 28 additions and 0 deletions
15
tests/lean/simp17.lean
Normal file
15
tests/lean/simp17.lean
Normal file
|
@ -0,0 +1,15 @@
|
|||
rewrite_set simple
|
||||
add_rewrite and_truer and_truel and_falser and_falsel or_falsel Nat::add_zeror : simple
|
||||
(*
|
||||
add_congr_theorem("simple", "and_congrr")
|
||||
*)
|
||||
|
||||
variables a b c : Nat
|
||||
|
||||
(*
|
||||
local t = parse_lean([[c + 0 ≠ b + 1 ∧ b = 0 ∧ c = 1]])
|
||||
local s, pr = simplify(t, "simple")
|
||||
print(s)
|
||||
print(pr)
|
||||
print(get_environment():type_check(pr))
|
||||
*)
|
13
tests/lean/simp17.lean.expected.out
Normal file
13
tests/lean/simp17.lean.expected.out
Normal file
|
@ -0,0 +1,13 @@
|
|||
Set: pp::colors
|
||||
Set: pp::unicode
|
||||
Assumed: a
|
||||
Assumed: b
|
||||
Assumed: c
|
||||
⊥
|
||||
trans (and_congrr
|
||||
(λ C::1 : b = 0 ∧ c = 1,
|
||||
congr (congr2 neq (congr1 0 (congr2 Nat::add (and_elimr C::1))))
|
||||
(congr1 1 (congr2 Nat::add (and_eliml C::1))))
|
||||
(λ C::1 : ⊥, refl (b = 0 ∧ c = 1)))
|
||||
(and_falser (b = 0 ∧ c = 1))
|
||||
(c + 0 ≠ b + 1 ∧ b = 0 ∧ c = 1) = ⊥
|
Loading…
Reference in a new issue