Zulip Chat Archive

Stream: general

Topic: problems with coercion to function


Johan Commelin (May 21 2019 at 06:55):

Can someone explain to me how I should convince Lean that f and g can be coerced to a function in the assumption h on this line: https://github.com/leanprover-community/mathlib/pull/1064/files#diff-694e7969af05a14241540bb2e6204a01R1132

@[extensionality] lemma ext {f g : β ≃ₗ[α] γ} (h : f.to_fun = g.to_fun) : f = g :=
to_equiv_injective (equiv.eq_of_to_fun_eq h)

Johan Commelin (May 21 2019 at 06:57):

I can't write (h : (f : β → γ) = g). I also can't write (h : ∀ x:β, f x = g x).

Chris Hughes (May 21 2019 at 07:50):

Put it later in the file, so it's after the has_coe instance.

Johan Commelin (May 21 2019 at 08:01):

Oooh, that was silly.


Last updated: Dec 20 2023 at 11:08 UTC