Zulip Chat Archive

Stream: new members

Topic: recursor 'Exists.dcases_on' can only eliminate into Prop


Xavier Roblot (Oct 02 2022 at 08:31):

I already got this error in the past and I do not understand what causes it and how to fix it. Here is a #mwe

import data.complex.module
import algebra.algebra.tower

open_locale complex_conjugate

lemma exist_i {S : Type*} [comm_ring S] [algebra  S] [algebra S ]
  (h : is_scalar_tower  S ) (hc : conj  (algebra_map S )  algebra_map S ) :
   s : S, (algebra_map S ) s = complex.I := by sorry

def iso_sc {S : Type*} [comm_ring S] [algebra  S] [algebra S ]
  (h : is_scalar_tower  S ) (hc : conj  (algebra_map S )  algebra_map S ) :
  S ≃+*  :=
begin
  obtain s, hs := exist_i h hc,
  sorry,
end

Reid Barton (Oct 02 2022 at 09:07):

The short and inaccurate explanation is that there could be multiple s with (algebra_map S ℂ) s = complex.I, and then which one do you want to pick in the definition of iso_sc?

Kevin Buzzard (Oct 02 2022 at 09:21):

Your goal is not a Prop so some tactics don't work properly (you shouldn't be in tactic mode at all really). Use exists.some instead.

Eric Rodriguez (Oct 02 2022 at 10:20):

essentially this is because all terms of a Prop are defeq to each other; for example, for ∃ n : nat, true, both 0 and 1 work, so what should Lean choose? Even with a unique existence, this isn't enough for Lean to find out, as in certain cases it couldn't compute what it is! (For example, consider ∃! o : real, is_champernownes_constant o...)


Last updated: Dec 20 2023 at 11:08 UTC