Skip to content

Commit

Permalink
add Seminar_example.lean file
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoLuccioli committed Sep 18, 2024
1 parent 541c58d commit 07cdb8b
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Seminar_example.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import Mathlib.Data.Real.Basic
import Mathlib.MeasureTheory.MeasurableSpace.Defs
import Mathlib.Tactic.Ring

namespace Example

def Measurable {α β : Type*} [MeasurableSpace α] [MeasurableSpace β]
(f : α → β) : Prop :=
∀ (t : Set β), MeasurableSet t → MeasurableSet (f ⁻¹' t)

theorem add_sub_cancel (a b : ℝ) : b + a - b = a := by
rw [add_comm]
rw [add_sub_assoc]
rw [sub_self]
exact add_zero a

-- Example of a wrong proof
-- example (a b : ℝ) : b + a - b = a := by
-- exact add_zero a

example (a b : ℝ) : b + a - b = a := by
rw [add_comm, add_sub_assoc, sub_self, add_zero]

example (a b : ℝ) : b + a - b = a := by
ring

example (a b : ℝ) (ha_pos : 0 < a) (hb_pos : 0 < b) : 0 < a + b := by
exact add_pos ha_pos hb_pos

end Example

0 comments on commit 07cdb8b

Please sign in to comment.