forked from leanprover-community/mathlib3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapply.lean
More file actions
42 lines (37 loc) · 1.05 KB
/
Copy pathapply.lean
File metadata and controls
42 lines (37 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import tactic.apply
import topology.instances.real
-- algebra.pi_instances
example : ∀ n m : ℕ, n + m = m + n :=
begin
apply' nat.rec,
-- refine nat.rec _ _,
{ intros n h m,
ring, },
{ intro m, ring }
end
instance : partial_order unit :=
{ le := λ _ _, ∀ (x : ℕ), x = x,
lt := λ _ _, false,
le_refl := λ _ _, rfl,
le_trans := λ _ _ _ _ _ _, rfl,
lt_iff_le_not_le := λ _ _, by simp,
le_antisymm := λ ⟨⟩ ⟨⟩ _ _, rfl }
example : unit.star ≤ unit.star :=
begin
apply' le_trans,
-- refine le_trans _ _,
-- exact unit.star,
refl', refl'
-- refine le_refl _, refine le_refl _,
end
example {α β : Type*} [partial_order β] (x y z : α → β) (h₀ : x ≤ y) (h₁ : y ≤ z) : x ≤ z :=
begin
transitivity'; assumption
end
example : continuous (λ (x : ℝ), x + x) :=
begin
apply' continuous.add,
guard_target' continuous (λ (x : ℝ), x), apply @continuous_id ℝ _,
guard_target' continuous (λ (x : ℝ), x), apply @continuous_id ℝ _,
-- guard_target' topological_add_monoid ℝ, admit,
end