Zulip Chat Archive

Stream: Is there code for X?

Topic: half_eq_one_div_two


Iván Renison (Jan 20 2026 at 22:15):

Hi, do you know how can I probe this?

example : (0.5 : ) = 1/2 := sorry

Adam Topaz (Jan 20 2026 at 22:17):

by norm_num.

Iván Renison (Jan 20 2026 at 22:18):

With norm_num I get the in goal 0.5 = 2⁻¹

Adam Topaz (Jan 20 2026 at 22:20):

It works for me:

import Mathlib

example : (0.5 : ) = 1/2 := by norm_num

Adam Topaz (Jan 20 2026 at 22:21):

by hint says that by bound works as well. you could try that instead.

Iván Renison (Jan 20 2026 at 22:25):

Ah, okay, I was not importing the hole of Mathlib, that's why it didn't work for me

Iván Renison (Jan 20 2026 at 22:26):

Do you know what should I import if I want to use it with out having to import the whole Mathlib?

Damiano Testa (Jan 20 2026 at 22:30):

#min_imports will tell you:

import Mathlib

lemma X : (0.5 : ) = 1/2 := by norm_num

#min_imports -- import Mathlib.Analysis.RCLike.Basic

Iván Renison (Jan 20 2026 at 22:31):

Great! I didn't know about #min_imports. Thank you very much!

Violeta Hernández (Jan 20 2026 at 22:31):

I think the real answer is, why are you writing 0.5 to begin with?

Iván Renison (Jan 20 2026 at 22:32):

I'm trying to formalize a math olympiad problem

Iván Renison (Jan 20 2026 at 22:33):

You think I should directly use 1/2?

Violeta Hernández (Jan 21 2026 at 00:27):

I think you should directly use 2⁻¹ but 1/2 is probably fine too.

Iván Renison (Jan 21 2026 at 12:46):

Ok, thank you


Last updated: Feb 28 2026 at 14:05 UTC