Update for use with latest Mathlib version.
parent
05639fd07e
commit
4f371ac9b8
|
@ -118,7 +118,7 @@ Derive the result analytically as follows: By changing the index of summation,
|
|||
note that `Σ_{n=1}^{b-1} ⌊na / b⌋ = Σ_{n=1}^{b-1} ⌊a(b - n) / b⌋`. Now apply
|
||||
Exercises 4(a) and (b) to the bracket on the right.
|
||||
-/
|
||||
theorem exercise_7b (ha : a > 0) (hb : b > 0) (hp : Nat.coprime a b)
|
||||
theorem exercise_7b (ha : a > 0) (hb : b > 0) (hp : Nat.Coprime a b)
|
||||
: ∑ n in (Finset.range b).filter (· > 0), ⌊n * ((a : ℕ) : ℝ) / b⌋ =
|
||||
((a - 1) * (b - 1)) / 2 := by
|
||||
sorry
|
||||
|
|
|
@ -475,7 +475,7 @@ theorem exercise_1_2_2b_iii {k : ℕ} (h : Odd k)
|
|||
have ⟨r, hr⟩ := h
|
||||
refine ⟨r, hr, ?_⟩
|
||||
by_contra nr
|
||||
have : r = 0 := Nat.eq_zero_of_nonpos r nr
|
||||
have : r = 0 := Nat.eq_zero_of_not_pos nr
|
||||
rw [this] at hr
|
||||
simp only [mul_zero, zero_add] at hr
|
||||
exact absurd hr hk
|
||||
|
|
|
@ -171,8 +171,7 @@ theorem emptyset_identity_ii (A : Set α)
|
|||
: A ∩ ∅ = ∅ := calc A ∩ ∅
|
||||
_ = { x | x ∈ A ∧ x ∈ ∅ } := rfl
|
||||
_ = { x | x ∈ A ∧ False } := rfl
|
||||
_ = { x | False } := by simp
|
||||
_ = ∅ := rfl
|
||||
_ = ∅ := by simp
|
||||
|
||||
#check Set.inter_empty
|
||||
|
||||
|
@ -181,8 +180,7 @@ theorem emptyset_identity_iii (A C : Set α)
|
|||
_ = { x | x ∈ A ∧ x ∈ C \ A } := rfl
|
||||
_ = { x | x ∈ A ∧ (x ∈ C ∧ x ∉ A) } := rfl
|
||||
_ = { x | x ∈ C ∧ False } := by simp
|
||||
_ = { x | False } := by simp
|
||||
_ = ∅ := rfl
|
||||
_ = ∅ := by simp
|
||||
|
||||
#check Set.inter_diff_self
|
||||
|
||||
|
@ -792,11 +790,11 @@ theorem exercise_2_17_ii {A B : Set α} (h : A \ B = ∅)
|
|||
|
||||
theorem exercise_2_17_iii {A B : Set α} (h : A ∪ B = B)
|
||||
: A ∩ B = A := by
|
||||
suffices A ⊆ B from Set.inter_eq_left_iff_subset.mpr this
|
||||
exact Set.union_eq_right_iff_subset.mp h
|
||||
suffices A ⊆ B from Set.inter_eq_left.mpr this
|
||||
exact Set.union_eq_right.mp h
|
||||
|
||||
theorem exercise_2_17_iv {A B : Set α} (h : A ∩ B = A)
|
||||
: A ⊆ B := Set.inter_eq_left_iff_subset.mp h
|
||||
: A ⊆ B := Set.inter_eq_left.mp h
|
||||
|
||||
/-- #### Exercise 2.19
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import Mathlib.Logic.Basic
|
||||
import Mathlib.Data.Set.Basic
|
||||
import Mathlib.Tactic.Tauto
|
||||
|
||||
/-! # Common.Logic.Basic
|
||||
|
|
|
@ -84,10 +84,10 @@ def shouldRender : ModuleMember → Bool
|
|||
end ModuleMember
|
||||
|
||||
inductive AnalyzeTask where
|
||||
| loadAll (load : List Name) : AnalyzeTask
|
||||
| loadAllLimitAnalysis (analyze : List Name) : AnalyzeTask
|
||||
| loadAll (load : Array Name) : AnalyzeTask
|
||||
| loadAllLimitAnalysis (analyze : Array Name) : AnalyzeTask
|
||||
|
||||
def AnalyzeTask.getLoad : AnalyzeTask → List Name
|
||||
def AnalyzeTask.getLoad : AnalyzeTask → Array Name
|
||||
| loadAll load => load
|
||||
| loadAllLimitAnalysis load => load
|
||||
|
||||
|
|
Loading…
Reference in New Issue