TITLE: Assuming decidable equality but not LEM in HoTT
QUESTION [5 upvotes]: The law of excluded middle in homotopy type theory is a term of $$\prod_{A:\mathcal{U}}\Big(\mathrm{isProp}(A)\to(A+\neg A)\Big).$$What if we assume a term of$$\prod_{A:\mathcal{U}}\Big(\mathrm{isSet}(A)\to\prod_{x,y:A}\big((x=y)+\neg (x=y)\big)\Big)$$instead?
Is this a strictly weaker axiom than LEM? Is it useful? Are there any philosophical reasons to accept this axiom but not LEM?
EDIT: If we only assume a term of$$\prod_{A:\mathcal{U}_0}\Big(\mathrm{isSet}(A)\to\prod_{x,y:A}\big((x=y)+\neg (x=y)\big)\Big)$$does that change much?

REPLY [4 votes]: In addition to Simon Henry's proof you can also use suspensions to show that decidable equality implies the law of excluded middle. Given a proposition $A : \mathrm{hProp}$ you can show using an encode-decode argument that the suspension $\Sigma A$ is a set and that the equality $N = S$ is equivalent to $A$. So decidable equality for every set of the form $\Sigma A$ implies the law of excluded middle.