Zulip Chat Archive
Stream: lean4
Topic: tactics after `induction ... with`, but before goals
Jireh Loreaux (Apr 04 2024 at 13:46):
Is it possible to run tactics after an induction ... with
, but before any of the cases in the induction? I couldn't find any syntax which seemed to make this work.
Ruben Van de Velde (Apr 04 2024 at 13:54):
Allegedly this works:
lemma toDigitsCore_lens_eq_aux (b f : Nat) :
∀ (n : Nat) (l1 l2 : List Char), l1.length = l2.length →
(Nat.toDigitsCore b f n l1).length = (Nat.toDigitsCore b f n l2).length := by
induction f with (simp only [Nat.toDigitsCore, List.length]; intro n l1 l2 hlen)
| zero => assumption
| succ f ih =>
Jireh Loreaux (Apr 04 2024 at 13:56):
hmmm... doesn't seem to work in my use case anyway. (but what I have is a bit hard to #mwe)
Eric Wieser (Apr 04 2024 at 18:17):
Isn't it <;>
not ;
?
Ruben Van de Velde (Apr 04 2024 at 18:21):
I copied that straight from mathlib
Last updated: May 02 2025 at 03:31 UTC