diff --git a/EasyLean/Basic.lean b/EasyLean/Basic.lean index 305e1ca..963909d 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 EasyLean.Theorems.TwoMulTwoReal +import EasyLean.Theorems.MathdAlgebra513 diff --git a/EasyLean/Theorems/MathdAlgebra513.lean b/EasyLean/Theorems/MathdAlgebra513.lean new file mode 100644 index 0000000..e932f69 --- /dev/null +++ b/EasyLean/Theorems/MathdAlgebra513.lean @@ -0,0 +1,12 @@ +import Mathlib +import EasyLean.Theorems.TwoMulTwoReal + +theorem mathd_algebra_513 (a b : ℝ) (h₀ : 3 * a + 2 * b = 5) (h₁ : a + b = 2) : + a = 1 ∧ b = 1 := by + have h₂ : 2 * a + 2 * b = 2 * 2 := by + simpa [mul_add] using congrArg (fun t : ℝ => 2 * t) h₁ + have ha : a = 1 := by + linarith [h₀, h₂] + have hb : b = 1 := by + linarith [h₁, ha] + exact ⟨ha, hb⟩ diff --git a/EasyLean/Theorems/TwoMulTwoReal.lean b/EasyLean/Theorems/TwoMulTwoReal.lean new file mode 100644 index 0000000..ea097c7 --- /dev/null +++ b/EasyLean/Theorems/TwoMulTwoReal.lean @@ -0,0 +1,4 @@ +import Mathlib + +theorem two_mul_two_real : (2 : ℝ) * 2 = (4 : ℝ) := by + norm_num diff --git a/Main.lean b/Main.lean new file mode 100644 index 0000000..0470cb8 --- /dev/null +++ b/Main.lean @@ -0,0 +1,3 @@ +import EasyLean.Theorems.MathdAlgebra513 + +def main : IO Unit := pure ()