[GOAL]
𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_4
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_5
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x✝¹ : E
s t : Set E
L L₁ L₂ : Filter E
x✝ : E
x : E × E
⊢ 0 = ↑e x.fst - ↑e x.snd - ↑e (x.fst - x.snd)
[PROOFSTEP]
simp only [e.map_sub, sub_self]
[GOAL]
𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_4
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_5
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x✝ : E
s t : Set E
L L₁ L₂ : Filter E
x : E
⊢ 0 = ↑e x - ↑e x✝ - ↑e (x - x✝)
[PROOFSTEP]
simp only [e.map_sub, sub_self]
[GOAL]
𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_4
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_5
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ fderivWithin 𝕜 (↑e) s x = e
[PROOFSTEP]
rw [DifferentiableAt.fderivWithin e.differentiableAt hxs]
[GOAL]
𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_4
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_5
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ fderiv 𝕜 (↑e) x = e
[PROOFSTEP]
exact e.fderiv
[GOAL]
𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_4
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_5
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
h : IsBoundedLinearMap 𝕜 f
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ _root_.fderivWithin 𝕜 f s x = toContinuousLinearMap h
[PROOFSTEP]
rw [DifferentiableAt.fderivWithin h.differentiableAt hxs]
[GOAL]
𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_4
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_5
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
h : IsBoundedLinearMap 𝕜 f
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ _root_.fderiv 𝕜 f x = toContinuousLinearMap h
[PROOFSTEP]
exact h.fderiv


[GOAL]
α : Type u_1
inst✝ : DecidableEq α
s : Multiset α
l l' : List α
h : l ~ l'
⊢ (fun l => List.toFinset (permutations l)) l = (fun l => List.toFinset (permutations l)) l'
[PROOFSTEP]
ext sl
[GOAL]
case a
α : Type u_1
inst✝ : DecidableEq α
s : Multiset α
l l' : List α
h : l ~ l'
sl : List α
⊢ sl ∈ (fun l => List.toFinset (permutations l)) l ↔ sl ∈ (fun l => List.toFinset (permutations l)) l'
[PROOFSTEP]
simp only [mem_permutations, List.mem_toFinset]
[GOAL]
case a
α : Type u_1
inst✝ : DecidableEq α
s : Multiset α
l l' : List α
h : l ~ l'
sl : List α
⊢ sl ~ l ↔ sl ~ l'
[PROOFSTEP]
exact ⟨fun hs => hs.trans h, fun hs => hs.trans h.symm⟩
[GOAL]
α : Type u_1
inst✝ : DecidableEq α
s : Multiset α
l : List α
⊢ l ∈ lists s ↔ s = Quotient.mk (isSetoid α) l
[PROOFSTEP]
induction s using Quotient.inductionOn
[GOAL]
case h
α : Type u_1
inst✝ : DecidableEq α
l a✝ : List α
⊢ l ∈ lists (Quotient.mk (isSetoid α) a✝) ↔ Quotient.mk (isSetoid α) a✝ = Quotient.mk (isSetoid α) l
[PROOFSTEP]
simpa using perm_comm
[GOAL]
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
l : List α
⊢ (l ∈ Finset.biUnion (Finset.powerset Finset.univ) fun s => Multiset.lists s.val) ↔ Nodup l
[PROOFSTEP]
suffices (∃ a : Finset α, a.val = ↑l) ↔ l.Nodup by simpa
[GOAL]
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
l : List α
this : (∃ a, a.val = ↑l) ↔ Nodup l
⊢ (l ∈ Finset.biUnion (Finset.powerset Finset.univ) fun s => Multiset.lists s.val) ↔ Nodup l
[PROOFSTEP]
simpa
[GOAL]
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
l : List α
⊢ (∃ a, a.val = ↑l) ↔ Nodup l
[PROOFSTEP]
constructor
[GOAL]
case mp
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
l : List α
⊢ (∃ a, a.val = ↑l) → Nodup l
[PROOFSTEP]
rintro ⟨s, hs⟩
[GOAL]
case mp.intro
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
l : List α
s : Finset α
hs : s.val = ↑l
⊢ Nodup l
[PROOFSTEP]
simpa [← Multiset.coe_nodup, ← hs] using s.nodup
[GOAL]
case mpr
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
l : List α
⊢ Nodup l → ∃ a, a.val = ↑l
[PROOFSTEP]
intro hl
[GOAL]
case mpr
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
l : List α
hl : Nodup l
⊢ ∃ a, a.val = ↑l
[PROOFSTEP]
refine' ⟨⟨↑l, hl⟩, _⟩
[GOAL]
case mpr
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
l : List α
hl : Nodup l
⊢ { val := ↑l, nodup := hl }.val = ↑l
[PROOFSTEP]
simp


[GOAL]
m n✝ : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
f : Fin (n + 1) → α → β
v : Fin (n + 1) → α
i : Fin (n + 1)
⊢ seq f v i = f i (v i)
[PROOFSTEP]
simp_rw [seq, seq_eq]
[GOAL]
m n✝ : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
f : Fin (n + 1) → α → β
v : Fin (n + 1) → α
i : Fin (n + 1)
⊢ Matrix.vecCons (f 0 (v 0)) (fun i => Matrix.vecTail f i (Matrix.vecTail v i)) i = f i (v i)
[PROOFSTEP]
refine' i.cases _ fun i => _
[GOAL]
case refine'_1
m n✝ : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
f : Fin (n + 1) → α → β
v : Fin (n + 1) → α
i : Fin (n + 1)
⊢ Matrix.vecCons (f 0 (v 0)) (fun i => Matrix.vecTail f i (Matrix.vecTail v i)) 0 = f 0 (v 0)
[PROOFSTEP]
rfl
[GOAL]
case refine'_2
m n✝ : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
f : Fin (n + 1) → α → β
v : Fin (n + 1) → α
i✝ : Fin (n + 1)
i : Fin n
⊢ Matrix.vecCons (f 0 (v 0)) (fun i => Matrix.vecTail f i (Matrix.vecTail v i)) (Fin.succ i) =
    f (Fin.succ i) (v (Fin.succ i))
[PROOFSTEP]
rw [Matrix.cons_val_succ]
[GOAL]
case refine'_2
m n✝ : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
f : Fin (n + 1) → α → β
v : Fin (n + 1) → α
i✝ : Fin (n + 1)
i : Fin n
⊢ Matrix.vecTail f i (Matrix.vecTail v i) = f (Fin.succ i) (v (Fin.succ i))
[PROOFSTEP]
rfl
[GOAL]
m n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
P : (Fin 0 → α) → Prop
⊢ Forall P ↔ ∀ (x : Fin 0 → α), P x
[PROOFSTEP]
simp only [Forall, Fin.forall_fin_zero_pi]
[GOAL]
m n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
P : (Fin 0 → α) → Prop
⊢ P ![] ↔ P finZeroElim
[PROOFSTEP]
rfl
[GOAL]
m n✝ : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
P : (Fin (Nat.succ n) → α) → Prop
⊢ Forall P ↔ ∀ (x : Fin (Nat.succ n) → α), P x
[PROOFSTEP]
simp only [Forall, forall_iff, Fin.forall_fin_succ_pi, Matrix.vecCons]
[GOAL]
m n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
P : (Fin 0 → α) → Prop
⊢ Exists P ↔ ∃ x, P x
[PROOFSTEP]
simp only [Exists, Fin.exists_fin_zero_pi, Matrix.vecEmpty]
[GOAL]
m n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
P : (Fin 0 → α) → Prop
⊢ P Fin.elim0' ↔ P finZeroElim
[PROOFSTEP]
rfl
[GOAL]
m n✝ : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
P : (Fin (Nat.succ n) → α) → Prop
⊢ Exists P ↔ ∃ x, P x
[PROOFSTEP]
simp only [Exists, exists_iff, Fin.exists_fin_succ_pi, Matrix.vecCons]
[GOAL]
m n✝ : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : AddCommMonoid α
n : ℕ
a : Fin (n + 2) → α
⊢ sum a = ∑ i : Fin (n + 2), a i
[PROOFSTEP]
rw [Fin.sum_univ_castSucc, sum, sum_eq]


[GOAL]
α : Type u
x : Tree α
⊢ numLeaves x = numNodes x + 1
[PROOFSTEP]
induction x
[GOAL]
case nil
α : Type u
⊢ numLeaves nil = numNodes nil + 1
[PROOFSTEP]
simp [*, Nat.add_comm, Nat.add_assoc, Nat.add_left_comm]
[GOAL]
case node
α : Type u
a✝² : α
a✝¹ a✝ : Tree α
a_ih✝¹ : numLeaves a✝¹ = numNodes a✝¹ + 1
a_ih✝ : numLeaves a✝ = numNodes a✝ + 1
⊢ numLeaves (node a✝² a✝¹ a✝) = numNodes (node a✝² a✝¹ a✝) + 1
[PROOFSTEP]
simp [*, Nat.add_comm, Nat.add_assoc, Nat.add_left_comm]
[GOAL]
α : Type u
x : Tree α
⊢ 0 < numLeaves x
[PROOFSTEP]
rw [numLeaves_eq_numNodes_succ]
[GOAL]
α : Type u
x : Tree α
⊢ 0 < numNodes x + 1
[PROOFSTEP]
exact x.numNodes.zero_lt_succ
[GOAL]
α : Type u
h : nil ≠ nil
⊢ node () (left nil) (right nil) = nil
[PROOFSTEP]
trivial


[GOAL]
f : ℂ[X]
hf : 0 < degree f
⊢ ∃ z, IsRoot f z
[PROOFSTEP]
contrapose! hf
[GOAL]
f : ℂ[X]
hf : ∀ (z : ℂ), ¬IsRoot f z
⊢ degree f ≤ 0
[PROOFSTEP]
have : Metric.Bounded (Set.range (eval · f)⁻¹)
[GOAL]
case this
f : ℂ[X]
hf : ∀ (z : ℂ), ¬IsRoot f z
⊢ Metric.Bounded (Set.range (fun x => eval x f)⁻¹)
[PROOFSTEP]
obtain ⟨z₀, h₀⟩ := f.exists_forall_norm_le
[GOAL]
case this.intro
f : ℂ[X]
hf : ∀ (z : ℂ), ¬IsRoot f z
z₀ : ℂ
h₀ : ∀ (y : ℂ), ‖eval z₀ f‖ ≤ ‖eval y f‖
⊢ Metric.Bounded (Set.range (fun x => eval x f)⁻¹)
[PROOFSTEP]
simp only [Pi.inv_apply, bounded_iff_forall_norm_le, Set.forall_range_iff, norm_inv]
[GOAL]
case this.intro
f : ℂ[X]
hf : ∀ (z : ℂ), ¬IsRoot f z
z₀ : ℂ
h₀ : ∀ (y : ℂ), ‖eval z₀ f‖ ≤ ‖eval y f‖
⊢ ∃ C, ∀ (i : ℂ), ‖eval i f‖⁻¹ ≤ C
[PROOFSTEP]
exact ⟨‖eval z₀ f‖⁻¹, fun z => inv_le_inv_of_le (norm_pos_iff.2 <| hf z₀) (h₀ z)⟩
[GOAL]
f : ℂ[X]
hf : ∀ (z : ℂ), ¬IsRoot f z
this : Metric.Bounded (Set.range (fun x => eval x f)⁻¹)
⊢ degree f ≤ 0
[PROOFSTEP]
obtain ⟨c, hc⟩ := (f.differentiable.inv hf).exists_const_forall_eq_of_bounded this
[GOAL]
case intro
f : ℂ[X]
hf : ∀ (z : ℂ), ¬IsRoot f z
this : Metric.Bounded (Set.range (fun x => eval x f)⁻¹)
c : ℂ
hc : ∀ (z : ℂ), (eval z f)⁻¹ = c
⊢ degree f ≤ 0
[PROOFSTEP]
obtain rfl : f = C c⁻¹ := Polynomial.funext fun z => by rw [eval_C, ← hc z, inv_inv]
[GOAL]
f : ℂ[X]
hf : ∀ (z : ℂ), ¬IsRoot f z
this : Metric.Bounded (Set.range (fun x => eval x f)⁻¹)
c : ℂ
hc : ∀ (z : ℂ), (eval z f)⁻¹ = c
z : ℂ
⊢ eval z f = eval z (↑C c⁻¹)
[PROOFSTEP]
rw [eval_C, ← hc z, inv_inv]
[GOAL]
case intro
c : ℂ
hf : ∀ (z : ℂ), ¬IsRoot (↑C c⁻¹) z
this : Metric.Bounded (Set.range (fun x => eval x (↑C c⁻¹))⁻¹)
hc : ∀ (z : ℂ), (eval z (↑C c⁻¹))⁻¹ = c
⊢ degree (↑C c⁻¹) ≤ 0
[PROOFSTEP]
exact degree_C_le