diff --git a/EasyLean/Basic.lean b/EasyLean/Basic.lean index 305e1ca..40f4dd7 100644 --- a/EasyLean/Basic.lean +++ b/EasyLean/Basic.lean @@ -1,12 +1,2 @@ -import Mathlib.Data.Real.Basic -import Mathlib.Tactic.Linarith - -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 +import Mathlib +import EasyLean.Mathd.Algebra.mathd_algebra_513 diff --git a/EasyLean/Mathd/Algebra/mathd_algebra_513.lean b/EasyLean/Mathd/Algebra/mathd_algebra_513.lean new file mode 100644 index 0000000..976d580 --- /dev/null +++ b/EasyLean/Mathd/Algebra/mathd_algebra_513.lean @@ -0,0 +1,8 @@ +import Mathlib +import EasyLean.Mathd.Algebra.mathd_algebra_513_a +import EasyLean.Mathd.Algebra.mathd_algebra_513_b + +theorem mathd_algebra_513 (a b : ℝ) (h₀ : 3 * a + 2 * b = 5) (h₁ : a + b = 2) : a = 1 ∧ b = 1 := by + have ha : a = 1 := mathd_algebra_513_a a b h₀ h₁ + have hb : b = 1 := mathd_algebra_513_b a b h₁ ha + exact ⟨ha, hb⟩ diff --git a/EasyLean/Mathd/Algebra/mathd_algebra_513_a.lean b/EasyLean/Mathd/Algebra/mathd_algebra_513_a.lean new file mode 100644 index 0000000..a6f2169 --- /dev/null +++ b/EasyLean/Mathd/Algebra/mathd_algebra_513_a.lean @@ -0,0 +1,6 @@ +import Mathlib + +theorem mathd_algebra_513_a (a b : ℝ) (h0 : 3 * a + 2 * b = 5) (h1 : a + b = 2) : a = 1 := by + have : a = 1 := by + linear_combination h0 - (2 : ℝ) * h1 + exact this diff --git a/EasyLean/Mathd/Algebra/mathd_algebra_513_b.lean b/EasyLean/Mathd/Algebra/mathd_algebra_513_b.lean new file mode 100644 index 0000000..33ca240 --- /dev/null +++ b/EasyLean/Mathd/Algebra/mathd_algebra_513_b.lean @@ -0,0 +1,6 @@ +import Mathlib + +theorem mathd_algebra_513_b (a b : ℝ) (h1 : a + b = 2) (ha : a = 1) : b = 1 := by + have hb' : 1 + b = 2 := by simpa [ha] using h1 + have hb'' : b = 1 := by linarith [hb'] + exact hb''