Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions MIL/C06_Discrete_Mathematics/S02_Counting_Arguments.lean
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ example (n : ℕ) : #(triangle n) = (n + 1) * n / 2 := by
intro x _ y _ xney
simp [disjoint_iff_ne, xney]
-- continue the calculation
transitivity (∑ i in range (n+1), i)
transitivity (∑ i range (n+1), i)
· congr; ext i
rw [card_image_of_injective, card_range]
intros i1 i2; simp
Expand Down Expand Up @@ -236,7 +236,7 @@ example (n : ℕ) : #(triangle' n) = #(triangle n) := by
omega
. simp; omega
rw [this, card_image_of_injOn]
rintro ⟨p1, p2⟩ hp ⟨q1, q2⟩ hq; simp [f] at *
rintro ⟨p1, p2⟩ hp ⟨q1, q2⟩ hq; simp [f]
BOTH: -/
-- QUOTE.

Expand All @@ -253,7 +253,7 @@ EXAMPLES: -/
section
-- QUOTE:
open Classical
variable (s t : Finset Nat) (a b : Nat)
variable (s t : Finset ) (a b : )

theorem doubleCounting {α β : Type*} (s : Finset α) (t : Finset β)
(r : α → β → Prop)
Expand Down Expand Up @@ -313,9 +313,8 @@ BOTH: -/
sorry
/- SOLUTIONS:
rcases ht' with ⟨m, ⟨hm, hm'⟩, k, ⟨hk, hk'⟩, hmk⟩
use m, hm, k, hk
have : m = k + 1 ∨ k = m + 1 := by omega
rcases this with rfl | rfl
. use k, hk, k+1, hm; simp
. use m, hm, m+1, hk; simp
rcases this with h | h <;> simp [h]
BOTH: -/
-- QUOTE.
2 changes: 1 addition & 1 deletion MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ linear-time implementation.
Try proving ``reverse (as ++ bs) = reverse bs ++ reverse as`` and
``reverse (reverse as) = as``.
You can use ``cons_append`` and ``append_assoc``, but you
You may need to come up with auxiliary lemmas and prove them.
may need to come up with auxiliary lemmas and prove them.
EXAMPLES: -/
-- QUOTE:
def reverseαα : List α → List α := sorry
Expand Down