-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSolution.lean
58 lines (52 loc) · 1.2 KB
/
Solution.lean
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
variable (P Q R : Prop)
/-- multiline `sorry` -/
example : (P → Q) → (Q → R) → (P → R) := by
-- sorry
intro pq qr pr
exact qr (pq pr)
-- sorry
/-- various size of indent -/
example : (P → Q) → (Q → R) → (P → R) := by
try
-- sorry
intro pq qr pr
exact qr (pq pr)
-- sorry
/-- focusing dot -/
example : (P → Q) → (P → R) → (P → Q ∧ R) := by
intro pq pr p
constructor
· -- sorry
exact pq p
done
-- sorry
· -- sorry
exact pr p
done
-- sorry
/-- inline `sorry` -/
example : 1 + n = n + 1 := by
calc
1 + n = n + 1 := by /- sorry -/ rw [Nat.add_comm]
_ = n + 1 := by /- sorry -/ rfl
_ = /-+-/ n + 1 /-+-/ := by sorry
/-- ignore pattern for a line -/
example : 1 + n = n + 1 := by
calc
1 + n = 1 + n := by rfl
_ = 1 + n := by rfl --##
_ = 1 + n := by rfl --##
_ = 1 + n := by rfl --##
_ = 1 + n := by rfl --##
_ = n + 1 := by /- sorry -/ rw [Nat.add_comm]
/-- ignore pattern for a block -/
example : 1 + n = n + 1 := by
calc
1 + n = 1 + n := by rfl
--##--
_ = 1 + n := by rfl
_ = 1 + n := by rfl
_ = 1 + n := by rfl
_ = 1 + n := by rfl
--##--
_ = n + 1 := by ac_rfl