Built with Alectryon. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use instead of Ctrl.
Hover-Settings: Show types: Show goals:
import Mathlib

open Real

π :
π:
π
rexp 1 :
rexp: ℝ → ℝ
rexp
1:
1
Irrational (rexp 1 + π) : Prop
Irrational: ℝ → Prop
Irrational
(
rexp: ℝ → ℝ
rexp
1:
1
+
π:
π
)
example: ∀ (a b c : ℕ), a + b * c = c * b + a
example
(
a:
a
b:
b
c:
c
:
: Type
) :
a:
a
+
b:
b
*
c:
c
=
c:
c
*
b:
b
+
a:
a
:=

Goals accomplished! 🐙

Goals accomplished! 🐙
example: ∀ (a b c : ℕ), a + b * c = c * b + a
example
(
a:
a
b:
b
c:
c
:
: Type
) :
a:
a
+
b:
b
*
c:
c
=
c:
c
*
b:
b
+
a:
a
:=

Goals accomplished! 🐙
Try this: exact Mathlib.Tactic.Ring.of_eq (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.atom_pf a) (Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf b) (Mathlib.Tactic.Ring.atom_pf c) (Mathlib.Tactic.Ring.add_mul (Mathlib.Tactic.Ring.mul_add (Mathlib.Tactic.Ring.mul_pf_left b (Nat.rawCast 1) (Mathlib.Tactic.Ring.mul_pf_right c (Nat.rawCast 1) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))) (Mathlib.Tactic.Ring.mul_zero (b ^ Nat.rawCast 1 * Nat.rawCast 1)) (Mathlib.Tactic.Ring.add_pf_add_zero (b ^ Nat.rawCast 1 * (c ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))) (Mathlib.Tactic.Ring.zero_mul (c ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)) (Mathlib.Tactic.Ring.add_pf_add_zero (b ^ Nat.rawCast 1 * (c ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))) (Mathlib.Tactic.Ring.add_pf_add_lt (a ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_zero_add (b ^ Nat.rawCast 1 * (c ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))) (Mathlib.Tactic.Ring.add_congr (Mathlib.Tactic.Ring.mul_congr (Mathlib.Tactic.Ring.atom_pf c) (Mathlib.Tactic.Ring.atom_pf b) (Mathlib.Tactic.Ring.add_mul (Mathlib.Tactic.Ring.mul_add (Mathlib.Tactic.Ring.mul_pf_right b (Nat.rawCast 1) (Mathlib.Tactic.Ring.mul_pf_left c (Nat.rawCast 1) (Mathlib.Tactic.Ring.one_mul (Nat.rawCast 1)))) (Mathlib.Tactic.Ring.mul_zero (c ^ Nat.rawCast 1 * Nat.rawCast 1)) (Mathlib.Tactic.Ring.add_pf_add_zero (b ^ Nat.rawCast 1 * (c ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))) (Mathlib.Tactic.Ring.zero_mul (b ^ Nat.rawCast 1 * Nat.rawCast 1 + 0)) (Mathlib.Tactic.Ring.add_pf_add_zero (b ^ Nat.rawCast 1 * (c ^ Nat.rawCast 1 * Nat.rawCast 1) + 0)))) (Mathlib.Tactic.Ring.atom_pf a) (Mathlib.Tactic.Ring.add_pf_add_gt (a ^ Nat.rawCast 1 * Nat.rawCast 1) (Mathlib.Tactic.Ring.add_pf_add_zero (b ^ Nat.rawCast 1 * (c ^ Nat.rawCast 1 * Nat.rawCast 1) + 0))))
a, b, c:

a + b * c = c * b + a

Goals accomplished! 🐙
example: 24 ^ 9 < 9 ^ 25
example
:
24:
24
^
9:
9
<
9:
9
^
25:
25
:=

Goals accomplished! 🐙
Try this: exact of_eq_true (eq_true (Mathlib.Meta.NormNum.isNat_lt_true (Mathlib.Meta.NormNum.isNat_pow (Eq.refl HPow.hPow) (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 24)) (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 9)) (Mathlib.Meta.NormNum.IsNatPowT.run (Mathlib.Meta.NormNum.IsNatPowT.trans (Mathlib.Meta.NormNum.IsNatPowT.trans Mathlib.Meta.NormNum.IsNatPowT.bit0 Mathlib.Meta.NormNum.IsNatPowT.bit0) Mathlib.Meta.NormNum.IsNatPowT.bit1))) (Mathlib.Meta.NormNum.isNat_pow (Eq.refl HPow.hPow) (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 9)) (Mathlib.Meta.NormNum.isNat_ofNat (Eq.refl 25)) (Mathlib.Meta.NormNum.IsNatPowT.run (Mathlib.Meta.NormNum.IsNatPowT.trans (Mathlib.Meta.NormNum.IsNatPowT.trans Mathlib.Meta.NormNum.IsNatPowT.bit1 Mathlib.Meta.NormNum.IsNatPowT.bit0) (Mathlib.Meta.NormNum.IsNatPowT.trans Mathlib.Meta.NormNum.IsNatPowT.bit0 Mathlib.Meta.NormNum.IsNatPowT.bit1)))) (Eq.refl false)))

24 ^ 9 < 9 ^ 25

Goals accomplished! 🐙
example: ∀ (a b c : ℕ), a + b * c = c * b + a
example
(
a:
a
b:
b
c:
c
:
: Type
) :
a:
a
+
b:
b
*
c:
c
=
c:
c
*
b:
b
+
a:
a
:=

Goals accomplished! 🐙
a, b, c:

a + b * c = c * b + a
a, b, c:

b * c + a = c * b + a
a, b, c:

b * c = c * b
a, b, c:

c * b = c * b

Goals accomplished! 🐙
example: ∀ {b : ℤ}, 0 ≤ max (-3) (b ^ 2)
example
{
b:
b
:
: Type
} :
0:
0
max: {α : Type} → [self : Max α] → α → α → α
max
(-
3:
3
) (
b:
b
^
2:
2
) :=

Goals accomplished! 🐙

Goals accomplished! 🐙
noncomputable def
chooseNat: (∃ x, x > 4) → ℕ
chooseNat
(
h: ∃ x, x > 4
h
: (
x:
x
:
: Type
),
x:
x
>
4:
4
) :
: Type
:=
Nat.find: {p : ℕ → Prop} → [inst : DecidablePred p] → (∃ n, p n) → ℕ
Nat.find
h: ∃ x, x > 4
h
noncomputable def
chooseNat': (∃ x, x > 4) → ℕ
chooseNat'
(
h: ∃ x, x > 4
h
: (
x:
x
:
: Type
),
x:
x
>
4:
4
) :
: Type
:=
Exists.choose: {α : Type} → {p : α → Prop} → (∃ a, p a) → α
Exists.choose
h: ∃ x, x > 4
h
variable {
f: ℝ → ℝ
f
:
: Type
: Type
} def
fnUB: (ℝ → ℝ) → ℝ → Prop
fnUB
(
f: ℝ → ℝ
f
:
: Type
: Type
) (
a:
a
:
: Type
) :=
x:
x
,
f: ℝ → ℝ
f
x:
x
a:
a
def
fnHasUB: (ℝ → ℝ) → Prop
fnHasUB
(
f: ℝ → ℝ
f
:
: Type
: Type
) :=
a:
a
,
fnUB: (ℝ → ℝ) → ℝ → Prop
fnUB
f: ℝ → ℝ
f
a:
a
example: ∀ {f : ℝ → ℝ}, (∀ (a : ℝ), ∃ x, f x > a) → ¬fnHasUB f
example
(
h: ∀ (a : ℝ), ∃ x, f x > a
h
:
a:
a
,
x:
x
,
f: ℝ → ℝ
f
x:
x
>
a:
a
) : ¬
fnHasUB: (ℝ → ℝ) → Prop
fnHasUB
f: ℝ → ℝ
f
:=

Goals accomplished! 🐙
f:
h: (a : ℝ), x, f x > a

¬∃ a, (x : ℝ), f x a
-- intro hh -- obtain ⟨a, ha⟩ := hh
f:
h: (a : ℝ), x, f x > a
a:
ha: (x : ℝ), f x a

intro
False
f:
a:
ha: (x : ℝ), f x a
h: x, f x > a

intro
False
f:
a:
ha: (x : ℝ), f x a
b:
hb: f b > a

intro.intro
False
f:
a, b:
hb: f b > a
ha: f b a

intro.intro
False
f:
a, b:
hb: f b > a
ha: f b a

intro.intro
False
f:
a, b:
hb: f b > a
ha: ¬a < f b

intro.intro
False
f:
a, b:
hb: f b > a
ha: ¬a < f b

intro.intro
False
f:
a, b:
hb: f b > a
ha: ¬a < f b

intro.intro
False

Goals accomplished! 🐙
example: ∀ {f : ℝ → ℝ}, ¬fnHasUB f → ∀ (a : ℝ), ∃ x, f x > a
example
(
h: ¬fnHasUB f
h
: ¬
fnHasUB: (ℝ → ℝ) → Prop
fnHasUB
f: ℝ → ℝ
f
) :
a:
a
,
x:
x
,
f: ℝ → ℝ
f
x:
x
>
a:
a
:=

Goals accomplished! 🐙
f:
h: ¬∃ a, (x : ℝ), f x a

(a : ℝ), x, f x > a
f:
h: a, (x : ℝ), f x a

a, (x : ℝ), f x a
f:
a:
ha: (x : ℝ), f x a

intro
a, (x : ℝ), f x a

Goals accomplished! 🐙
-- this file seems to be following https://github.com/lftcm2023/lftcm2023/blob/master/LftCM/C02_Logic/Logic.lean