Zulip Chat Archive
Stream: general
Topic: error: don't know how to synthesize placeholder
Bernd Losert (Jan 18 2022 at 22:54):
import tactic
import order.filter.partial
import algebra.support
noncomputable theory
open set filter classical option function open category_theory
open_locale classical filter
constant envelope : ∀ (G X : Type*), G × X → G × X → Prop
namespace envelope
variables {G X : Type*}
constant pure : ∀ (x : X), quot (envelope G X)
end envelope
variables {G X : Type*}
def weakly_adh_restrictive : Prop := ∀ {ℱ : filter X}, (ℱ.map envelope.pure) = (ℱ.map envelope.pure)
When I run this through Lean, it says:
test.lean:17:86: error: don't know how to synthesize placeholder
context:
X : Type u_2,
ℱ : filter X
⊢ Type ?
I'm not sure how to fix this. Which placeholder is it talking about?
Kevin Buzzard (Jan 18 2022 at 22:56):
I guess G
. Lean can't work out G
from what you've given it.
Kevin Buzzard (Jan 18 2022 at 22:56):
def weakly_adh_restrictive : Prop := ∀ {ℱ : filter X}, (ℱ.map (@envelope.pure G _)) = (ℱ.map (@envelope.pure G _))
Bernd Losert (Jan 18 2022 at 22:56):
Ah, yeah. That makes sense actually.
Kevin Buzzard (Jan 18 2022 at 22:57):
It can work out X
from ℱ
but you didn't give it enough clues for G
.
Bernd Losert (Jan 18 2022 at 23:00):
Indeed. Thank you. Hmm... now I need to figure out how many _ to put in the real code when I use @envelope.pure
.
Bernd Losert (Jan 18 2022 at 23:01):
Maybe I should just change the definition of envelope.pure
to take G instead of this hackery.
Last updated: Dec 20 2023 at 11:08 UTC