Zulip Chat Archive

Stream: new members

Topic: Duplicate hypothesis


André Hernández-Espiet (Rutgers) (Jan 08 2024 at 16:20):

For some reason, when I try to rewrite the definition of S it creates a "another" y. Why does it do that, and is there any way to avoid this? Thanks!

example (α : Type) (P : Prop) (S : Set α) (y : S) (hypS : S = {x | P}) : y  {x | P} := by
  rw[hypS] at y

Yaël Dillies (Jan 08 2024 at 16:31):

This is to avoid your goal not typechecking anymore

Patrick Massot (Jan 08 2024 at 16:32):

You can probably work around this by using subst hypS instead of rw.

Yaël Dillies (Jan 08 2024 at 16:33):

If it did change y in place, your goal would have become y ∈ {x : S | P} while y : {x : α | P}. Since there's no Mem (Set {x : S | P}) {x : α | P}, this would fail.


Last updated: May 02 2025 at 03:31 UTC