Zulip Chat Archive
Stream: new members
Topic: Error from the output of `tidy`
Stuart Presnell (Dec 26 2021 at 09:06):
I'm working on eliminating the use of finish
in order/filter/lift
, specifically the use in eventually_lift'_powerset_eventually
. I tried commenting out finish
and replacing it with tidy
, which closes the goal: when the cursor is between tidy
and the closing bracket I get goals accomplished π
. However, now I also get an error type mismatch at application αΎ°_w αΎ°
, attributed to the line of the statement of lemma eventually_lift'_powerset_eventually
rather than the line where tidy
appears.
Is tidy
producing a faulty solution (by duplicating names)? And if so, why is it not being blamed in the error statement?
import order.filter.bases
open set
open_locale classical filter
namespace filter
variables {Ξ± : Type*} {Ξ² : Type*} {f fβ fβ : filter Ξ±}
protected def lift (f : filter Ξ±) (g : set Ξ± β filter Ξ²) :=
β¨
s β f, g s
protected def lift' (f : filter Ξ±) (h : set Ξ± β set Ξ²) :=
f.lift (π β h)
lemma eventually_lift'_powerset' {f : filter Ξ±} {p : set Ξ± β Prop}
(hp : β β¦s tβ¦, s β t β p t β p s) :
(βαΆ s in f.lift' powerset, p s) β β s β f, p s := sorry
@[simp] lemma eventually_lift'_powerset_eventually {f g : filter Ξ±} {p : Ξ± β Prop} :
(βαΆ s in f.lift' powerset, βαΆ x in g, x β s β p x) β βαΆ x in f β g, p x :=
calc _ β β s β f, βαΆ x in g, x β s β p x :
eventually_lift'_powerset' $ Ξ» s t hst ht, ht.mono $ Ξ» x hx hs, hx (hst hs)
... β β (s β f) (t β g), β x, x β t β x β s β p x :
by simp only [eventually_iff_exists_mem]
... β βαΆ x in f β g, p x : by { rw eventually_inf, tidy }
end filter
Ruben Van de Velde (Dec 26 2021 at 09:21):
Dunno about the error, but this works:
... β βαΆ x in f β g, p x : by { rw eventually_inf, simp only [and_comm, mem_inter_iff, βand_imp] }
Ruben Van de Velde (Dec 26 2021 at 09:21):
Or
... β βαΆ x in f β g, p x : by simp only [eventually_inf, and_comm, mem_inter_iff, βand_imp]
Stuart Presnell (Dec 26 2021 at 09:36):
Ah, thanks!
Last updated: Dec 20 2023 at 11:08 UTC