Zulip Chat Archive

Stream: new members

Topic: What's the meaninig of * in lean?


Michael Novak (Sep 30 2025 at 07:40):

I think, I learned about it previousely, but I forgot - what's the meaning of * in lean? For example in the following:

example (h : s  t) : s  u  t  u := by
  simp only [subset_def, mem_inter_iff] at *
  rintro x xs, xu
  exact h _ xs, xu

Damiano Testa (Sep 30 2025 at 07:41):

It means every hypothesis in context, including the goal.

Michael Novak (Sep 30 2025 at 07:41):

Thank you very much!

Damiano Testa (Sep 30 2025 at 07:43):

Note also that, even with tactics that fail when they do not modify something, the expectation with * is that they should fail if they do not modify all hypotheses.

Damiano Testa (Sep 30 2025 at 07:44):

In your example, * covers also s t u, simp does nothing on them, but the tactic succeeds, since it could do something on h and on the goal.

Michael Novak (Sep 30 2025 at 07:51):

I'm not sure I understand. When using *, will a tactic fail or not, if it could only modify some of the hypotheses in the context? It seems like your last two comments contradict each other, but I probably misunderstood.

Damiano Testa (Sep 30 2025 at 07:54):

Ok, I should have said "they modify some hypothesis" instead of "they do not modify all hypotheses"! :upside_down:

Damiano Testa (Sep 30 2025 at 07:54):

In your example, even though simp would fail on s, the tactic simp ... at * succeeds, since it modified h and the goal.

Michael Novak (Sep 30 2025 at 07:59):

O.k, I think I understand now. Thank you very much!


Last updated: Dec 20 2025 at 21:32 UTC