Zulip Chat Archive
Stream: Is there code for X?
Topic: lean 4 ac_refl
Kevin Buzzard (Apr 04 2023 at 12:13):
I'm stuck on this:
import Mathlib
example (A B C D E F G H : Prop) : A ∨ B ∨ C ∨ D ∨ E ∨ F ∨ G ∨ H ↔ (F ∨ G) ∨ (H ∨ B) ∨ (A ∨ E) ∨ (D ∨ C) := by
simp [or_assoc]
-- out of ideas
sorry
In Lean 3, apply iff_of_eq, ac_refl,
would do it, but I can't find ac_refl
in mathlib4. Is this just annoying in mathlib4 right now?
Matthew Ballard (Apr 04 2023 at 12:17):
ac_rfl
implementation new syntax
Moritz Doll (Apr 04 2023 at 12:26):
did you check whether ac_refl
is still on the list of unported tactics?
Alex J. Best (Apr 04 2023 at 12:28):
tauto
also works for this fwiw
Kevin Buzzard (Apr 04 2023 at 12:45):
Moritz Doll said:
did you check whether
ac_refl
is still on the list of unported tactics?
I looked in the Tactic
directory of mathlib4 and couldn't find it. I can quite believe that there are better ways to do this!
Matthew Ballard (Apr 04 2023 at 12:56):
It’s in core now
Matthew Ballard (Apr 04 2023 at 12:58):
Does aesop
also work?
Kevin Buzzard (Apr 04 2023 at 13:21):
It does in my use case (which is 5 times worse than the example above)!
Yakov Pechersky (Apr 04 2023 at 13:43):
The assoc, comm, left_comm
combination works for any abelian-group-like op:
example (A B C D E F G H : Prop) : A ∨ B ∨ C ∨ D ∨ E ∨ F ∨ G ∨ H ↔ (F ∨ G) ∨ (H ∨ B) ∨ (A ∨ E) ∨ (D ∨ C) := by
simp [or_assoc, or_comm, or_left_comm]
Kevin Buzzard (Apr 04 2023 at 14:18):
gaargh I tried this! But I forgot or_left_comm
! Thanks! That'll learn me (until the next time I forget it)
Last updated: Dec 20 2023 at 11:08 UTC