Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions EasyLean/Basic.lean
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import Mathlib.Data.Real.Basic
import Mathlib.Tactic.Linarith
import Mathlib
import EasyLean.Theorems.mathd_algebra_513
import EasyLean.Theorems.eq_four

theorem mathd_algebra_513
(a b : ℝ)
(h₀ : 3 * a + 2 * b = 5)
(h₁ : a + b = 2) :
a = 1 ∧ b = 1 := by
sorry

theorem eq_four : ∀ a b c d : Nat, a = b → a = d → a = c → c = b := by
sorry
-- Additional project-wide declarations can be added here if needed.
5 changes: 5 additions & 0 deletions EasyLean/Theorems/eq_four.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Mathlib

theorem eq_four : ∀ a b c d : Nat, a = b → a = d → a = c → c = b := by
intro a b c d hab had hac
exact hac.symm.trans hab
22 changes: 22 additions & 0 deletions EasyLean/Theorems/mathd_algebra_513.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Mathlib

open scoped Real

theorem mathd_algebra_513 (a b : Real) (h0 : 3 * a + 2 * b = 5) (h1 : a + b = 2) : a = 1 ∧ b = 1 := by
have hb : b = 2 - a := by
have ht : (a + b) - a = 2 - a := by
simpa using congrArg (fun t => t - a) h1
have hx : (a + b) - a = b := by
simpa using add_sub_cancel a b
simpa [hx] using ht
have h2 : 3 * a + 2 * (2 - a) = 5 := by
simpa [hb] using h0
have h3 : 4 + a = 5 := by
have h2' := h2
ring_nf at h2'
simpa using h2'
have ha : a = 1 := by
linarith [h3]
have hb1 : b = 1 := by
linarith [h1, ha]
exact ⟨ha, hb1⟩