Zulip Chat Archive
Stream: lean4
Topic: simp only puzzle
Joachim Breitner (Apr 18 2024 at 14:22):
namespace Puzzle1
opaque foo : Nat → Prop
theorem foo_eq (h : x = 5 → False) : foo x := sorry
theorem puzzle (h : ¬ x = 5) : foo x := by simp only [foo_eq] -- does it rewrite or not?
end Puzzle1
namespace Puzzle2
opaque foo : Nat → Prop
theorem foo_eq (h : ¬ x = 5) : foo x := sorry
theorem puzzle (h : ¬ x = 5) : foo x := by simp only [foo_eq] -- does it rewrite or not?
end Puzzle2
namespace Puzzle3
opaque foo : Nat → Prop
theorem foo_eq (h : ¬ x = 5) : foo x := sorry
theorem puzzle (h : x = 5 → False) : foo x := by simp only [foo_eq] -- does it rewrite or not?
end Puzzle3
namespace Puzzle4
opaque foo : Nat → Prop
theorem foo_eq (h : x = 5 → False) : foo x := sorry
theorem puzzle (h : x = 5 → False) : foo x := by simp only [foo_eq] -- does it rewrite or not?
end Puzzle4
Johan Commelin (Apr 18 2024 at 14:38):
Some Puzzle3
s should be Puzzle4
s... :wink:
Joachim Breitner (Apr 18 2024 at 14:40):
Ok, first cookie given, and puzzle fixed :-)
Joachim Breitner (Apr 18 2024 at 14:40):
NB: It says simp only [foo_eq]
, not simp only [foo_eq, h]
.
Last updated: May 02 2025 at 03:31 UTC