Zulip Chat Archive

Stream: new members

Topic: irrational


vxctyxeha (May 19 2025 at 15:50):

I want to prove that the square root of 2 plus the square root of 7 is an irrational number, and I found add_cases: Irrational (x + y) → Irrational x ∨ Irrational y in mathlib; however, I tried using rw [add_case], but it failed.·

import Mathlib
open Polynomial
namespace Irrational
theorem sqrt2_add_sqrt7_irrational : Irrational (Real.sqrt 2 + Real.sqrt 7) := by
  rw [add_cases]

Sébastien Gouëzel (May 19 2025 at 15:53):

What is your math proof?

Aaron Liu (May 19 2025 at 16:01):

You can't rewrite because it's not an iff

Aaron Liu (May 19 2025 at 16:06):

Compare with

import Mathlib
open Polynomial
namespace Irrational
theorem sqrt2_add_neg_sqrt2_irrational : Irrational (Real.sqrt 2 + -Real.sqrt 2) := by
  rw [add_cases]

vxctyxeha (May 20 2025 at 06:23):

Is there a definition of Isrational in mathlib?

Kevin Buzzard (May 20 2025 at 06:25):

I don't believe so, just use Exists q : Rat, r = q.

Notification Bot (May 20 2025 at 13:09):

vxctyxeha has marked this topic as resolved.

Notification Bot (May 20 2025 at 15:45):

vxctyxeha has marked this topic as unresolved.

vxctyxeha (May 20 2025 at 17:08):

By the way, do you have any suggestions for proving that e is an irrational number?

Eric Wieser (May 20 2025 at 17:16):

#new members > Euler number (Real.exp 1) is transcendental @ 💬


Last updated: Dec 20 2025 at 21:32 UTC