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:
-- -- https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Mechanics.20of.20Proof.201.2E3.2E11.20exercise.2015
import Mathlib

-- -- https://hrmacbeth.github.io/math2001/01_Proofs_by_Calculation.html#id29
example {x y : ℝ} (h1 : x + 3 = 5) (h2 : 2 * x - y * x = 0) : y = 2 :=
  calc
    y = 0 / x + y := 

Goals accomplished! 🐙

Goals accomplished! 🐙
_:
_
= (
2:
2
*
x:
x
-
y:
y
*
x:
x
) /
x:
x
+
y:
y
:=

Goals accomplished! 🐙
x, y:
h1: x + 3 = 5
h2: 2 * x - y * x = 0

0 / x + y = (2 * x - y * x) / x + y
x, y:
h1: x + 3 = 5
h2: 2 * x - y * x = 0

0 / x + y = 0 / x + y

Goals accomplished! 🐙
_:
_
= ((
2:
2
-
y:
y
) * (
x:
x
+
3:
3
-
3:
3
)) /
x:
x
+
y:
y
:=

Goals accomplished! 🐙

Goals accomplished! 🐙
_:
_
= ((
2:
2
-
y:
y
) * (
5:
5
-
3:
3
)) /
x:
x
+
y:
y
:=

Goals accomplished! 🐙
x, y:
h1: x + 3 = 5
h2: 2 * x - y * x = 0

(2 - y) * (x + 3 - 3) / x + y = (2 - y) * (5 - 3) / x + y
x, y:
h1: x + 3 = 5
h2: 2 * x - y * x = 0

(2 - y) * (5 - 3) / x + y = (2 - y) * (5 - 3) / x + y

Goals accomplished! 🐙
_:
_
= (
2:
2
-
y:
y
) *
2:
2
/
x:
x
+
y:
y
:=

Goals accomplished! 🐙

Goals accomplished! 🐙
_:
_
= (
2:
2
-
y:
y
) *
2:
2
/ (
x:
x
+
3:
3
-
3:
3
) +
y:
y
:=

Goals accomplished! 🐙

Goals accomplished! 🐙
_:
_
= (
2:
2
-
y:
y
) *
2:
2
/ (
5:
5
-
3:
3
) +
y:
y
:=

Goals accomplished! 🐙
x, y:
h1: x + 3 = 5
h2: 2 * x - y * x = 0

(2 - y) * 2 / (x + 3 - 3) + y = (2 - y) * 2 / (5 - 3) + y
x, y:
h1: x + 3 = 5
h2: 2 * x - y * x = 0

(2 - y) * 2 / (5 - 3) + y = (2 - y) * 2 / (5 - 3) + y

Goals accomplished! 🐙
_:
_
= (
2:
2
-
y:
y
) +
y:
y
:=

Goals accomplished! 🐙

Goals accomplished! 🐙
_:
_
=
2:
2
:=

Goals accomplished! 🐙

Goals accomplished! 🐙
example: 6 = 3 + 3
example
:
6:
6
=
3:
3
+
3:
3
:=

Goals accomplished! 🐙

6 = 3 + 3

Goals accomplished! 🐙

6 = 2 + 4

Goals accomplished! 🐙

6 = 1 + 5

6 = Nat.succ 5

Goals accomplished! 🐙
_:

6 = 2 + 4

Goals accomplished! 🐙

1 + 5 = 2 + 4

1 = 1

Goals accomplished! 🐙
_:

6 = 2 + 4

Goals accomplished! 🐙

2 + 4 = 3 + 3

2 = 2

Goals accomplished! 🐙

Goals accomplished! 🐙

Goals accomplished! 🐙