Zulip Chat Archive
Stream: new members
Topic: Rewrite hypothesis to `True`/negation of hypothesis to `Fals
Alex Mobius (Oct 30 2024 at 22:40):
Wondering if there's a better way to do stuff like this. My current project has a lot of iff lemmata (soundness of transformations), and with initial case analysis they mostly boil down to True iff True and False iff False. I know I can do things like constructor; intros; assumption; intros; assumption
for the true case, but false case is uglier, so I'm wondering if there's a way to perform a targeted rewrite.
(speaking about targeted rewrites, is there just no way to get up in conv
?)
example (P Q: Prop) (p: P) (q: Q): P ↔ Q := by
have : P ↔ True := by rw [iff_true]; exact p
rw [this]
have : Q ↔ True := by rw [iff_true]; exact q
rw [this]
Ruben Van de Velde (Oct 30 2024 at 22:42):
There's docs#iff_of_true / docs#iff_of_false
Alex Mobius (Oct 30 2024 at 22:42):
oh nice, apply
ing those should do the trick! thanks!
Alex Mobius (Oct 31 2024 at 00:14):
iff_true_intro
is the thing I was looking for!
Last updated: May 02 2025 at 03:31 UTC