internlm/Lean-Github huggingface dataset:
Theorem: ConsExp.decode_encode
Proof state before:
case cons
a✝¹ a✝ : ConsExp
a_ih✝¹ : decode (encode a✝¹) = a✝¹
a_ih✝ : decode (encode a✝) = a✝
⊢ decode (encode (cons a✝¹ a✝)) = cons a✝¹ a✝
Tactic:
next hf hg =>
  rw [encode, decode]
  split
  next h => simp at h
  next h =>
    simp [Nat.div2_val] at h
    cases h
    simp [*]
Proof state after:
no goals
Theorem: ConsExp.decode_encode
Proof state before:
a✝ m✝ : ℕ
h : Nat.boddDiv2 (2 * a✝) = (false, m✝)
⊢ nat m✝ = nat a✝
Tactic:
simp [Nat.div2_val] at h
Proof state after:
a✝ m✝ : ℕ
h : a✝ = m✝
⊢ nat m✝ = nat a✝
Theorem: ConsExp.decode_encode
Proof state before:
a✝ m✝ : ℕ
h : a✝ = m✝
⊢ nat m✝ = nat a✝
Tactic:
simp [*]
Proof state after:
no goals
Theorem: ConsExp.decode_encode
Proof state before:
a✝ m✝ : ℕ
h : Nat.boddDiv2 (2 * a✝) = (true, m✝)
⊢ (match hm : Nat.unpair m✝ with
    | (f, g) =>
      let_fun hn' := (_ : 1 ≤ 2 * a✝);
      let_fun this := (_ : m✝ < 2 * a✝);
      let_fun this_1 := (_ : f < 2 * a✝);
      let_fun this := (_ : g < 2 * a✝);
      cons (decode f) (decode g)) =
    nat a✝
Tactic:
simp at h
Proof state after:
no goals
Theorem: ConsExp.decode_encode
Proof state before:
a✝¹ a✝ : ConsExp
hf : decode (encode a✝¹) = a✝¹
hg : decode (encode a✝) = a✝
⊢ decode (encode (cons a✝¹ a✝)) = cons a✝¹ a✝
Tactic:
rw [encode, decode]
Proof state after:
a✝¹ a✝ : ConsExp
hf : decode (encode a✝¹) = a✝¹
hg : decode (encode a✝) = a✝
⊢ (match hn : Nat.boddDiv2 (2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1) with
    | (false, m) => nat m
    | (true, m) =>
      match hm : Nat.unpair m with
      | (f, g) =>
        let_fun hn' := (_ : 1 ≤ 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
        let_fun this := (_ : m < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
        let_fun this_1 := (_ : f < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
        let_fun this := (_ : g < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
        cons (decode f) (decode g)) =
    cons a✝¹ a✝
Theorem: ConsExp.decode_encode
Proof state before:
a✝¹ a✝ : ConsExp
hf : decode (encode a✝¹) = a✝¹
hg : decode (encode a✝) = a✝
⊢ (match hn : Nat.boddDiv2 (2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1) with
    | (false, m) => nat m
    | (true, m) =>
      match hm : Nat.unpair m with
      | (f, g) =>
        let_fun hn' := (_ : 1 ≤ 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
        let_fun this := (_ : m < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
        let_fun this_1 := (_ : f < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
        let_fun this := (_ : g < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
        cons (decode f) (decode g)) =
    cons a✝¹ a✝
Tactic:
split
Proof state after:
case h_1
a✝¹ a✝ : ConsExp
hf : decode (encode a✝¹) = a✝¹
hg : decode (encode a✝) = a✝
m✝ : ℕ
heq✝ : Nat.boddDiv2 (2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1) = (false, m✝)
⊢ nat m✝ = cons a✝¹ a✝

case h_2
a✝¹ a✝ : ConsExp
hf : decode (encode a✝¹) = a✝¹
hg : decode (encode a✝) = a✝
m✝ : ℕ
heq✝ : Nat.boddDiv2 (2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1) = (true, m✝)
⊢ (match hm : Nat.unpair m✝ with
    | (f, g) =>
      let_fun hn' := (_ : 1 ≤ 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : m✝ < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this_1 := (_ : f < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : g < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      cons (decode f) (decode g)) =
    cons a✝¹ a✝
Theorem: ConsExp.decode_encode
Proof state before:
case h_1
a✝¹ a✝ : ConsExp
hf : decode (encode a✝¹) = a✝¹
hg : decode (encode a✝) = a✝
m✝ : ℕ
heq✝ : Nat.boddDiv2 (2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1) = (false, m✝)
⊢ nat m✝ = cons a✝¹ a✝

case h_2
a✝¹ a✝ : ConsExp
hf : decode (encode a✝¹) = a✝¹
hg : decode (encode a✝) = a✝
m✝ : ℕ
heq✝ : Nat.boddDiv2 (2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1) = (true, m✝)
⊢ (match hm : Nat.unpair m✝ with
    | (f, g) =>
      let_fun hn' := (_ : 1 ≤ 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : m✝ < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this_1 := (_ : f < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : g < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      cons (decode f) (decode g)) =
    cons a✝¹ a✝
Tactic:
next h => simp at h
Proof state after:
case h_2
a✝¹ a✝ : ConsExp
hf : decode (encode a✝¹) = a✝¹
hg : decode (encode a✝) = a✝
m✝ : ℕ
heq✝ : Nat.boddDiv2 (2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1) = (true, m✝)
⊢ (match hm : Nat.unpair m✝ with
    | (f, g) =>
      let_fun hn' := (_ : 1 ≤ 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : m✝ < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this_1 := (_ : f < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : g < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      cons (decode f) (decode g)) =
    cons a✝¹ a✝
Theorem: ConsExp.decode_encode
Proof state before:
case h_2
a✝¹ a✝ : ConsExp
hf : decode (encode a✝¹) = a✝¹
hg : decode (encode a✝) = a✝
m✝ : ℕ
heq✝ : Nat.boddDiv2 (2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1) = (true, m✝)
⊢ (match hm : Nat.unpair m✝ with
    | (f, g) =>
      let_fun hn' := (_ : 1 ≤ 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : m✝ < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this_1 := (_ : f < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : g < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      cons (decode f) (decode g)) =
    cons a✝¹ a✝
Tactic:
next h =>
  simp [Nat.div2_val] at h
  cases h
  simp [*]
Proof state after:
no goals
Theorem: ConsExp.decode_encode
Proof state before:
a✝¹ a✝ : ConsExp
hf : decode (encode a✝¹) = a✝¹
hg : decode (encode a✝) = a✝
m✝ : ℕ
h : Nat.boddDiv2 (2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1) = (false, m✝)
⊢ nat m✝ = cons a✝¹ a✝
Tactic:
simp at h
Proof state after:
no goals
Theorem: ConsExp.decode_encode
Proof state before:
a✝¹ a✝ : ConsExp
hf : decode (encode a✝¹) = a✝¹
hg : decode (encode a✝) = a✝
m✝ : ℕ
h : Nat.boddDiv2 (2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1) = (true, m✝)
⊢ (match hm : Nat.unpair m✝ with
    | (f, g) =>
      let_fun hn' := (_ : 1 ≤ 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : m✝ < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this_1 := (_ : f < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : g < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      cons (decode f) (decode g)) =
    cons a✝¹ a✝
Tactic:
simp [Nat.div2_val] at h
Proof state after:
a✝¹ a✝ : ConsExp
hf : decode (encode a✝¹) = a✝¹
hg : decode (encode a✝) = a✝
m✝ : ℕ
h✝ : Nat.boddDiv2 (2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1) = (true, m✝)
h : Nat.mkpair (encode a✝¹) (encode a✝) = m✝
⊢ (match hm : Nat.unpair m✝ with
    | (f, g) =>
      let_fun hn' := (_ : 1 ≤ 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : m✝ < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this_1 := (_ : f < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : g < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      cons (decode f) (decode g)) =
    cons a✝¹ a✝
Theorem: ConsExp.decode_encode
Proof state before:
a✝¹ a✝ : ConsExp
hf : decode (encode a✝¹) = a✝¹
hg : decode (encode a✝) = a✝
m✝ : ℕ
h✝ : Nat.boddDiv2 (2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1) = (true, m✝)
h : Nat.mkpair (encode a✝¹) (encode a✝) = m✝
⊢ (match hm : Nat.unpair m✝ with
    | (f, g) =>
      let_fun hn' := (_ : 1 ≤ 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : m✝ < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this_1 := (_ : f < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : g < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      cons (decode f) (decode g)) =
    cons a✝¹ a✝
Tactic:
cases h
Proof state after:
case refl
a✝¹ a✝ : ConsExp
hf : decode (encode a✝¹) = a✝¹
hg : decode (encode a✝) = a✝
h : Nat.boddDiv2 (2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1) = (true, Nat.mkpair (encode a✝¹) (encode a✝))
⊢ (match hm : Nat.unpair (Nat.mkpair (encode a✝¹) (encode a✝)) with
    | (f, g) =>
      let_fun hn' := (_ : 1 ≤ 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : Nat.mkpair (encode a✝¹) (encode a✝) < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this_1 := (_ : f < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : g < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      cons (decode f) (decode g)) =
    cons a✝¹ a✝
Theorem: ConsExp.decode_encode
Proof state before:
case refl
a✝¹ a✝ : ConsExp
hf : decode (encode a✝¹) = a✝¹
hg : decode (encode a✝) = a✝
h : Nat.boddDiv2 (2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1) = (true, Nat.mkpair (encode a✝¹) (encode a✝))
⊢ (match hm : Nat.unpair (Nat.mkpair (encode a✝¹) (encode a✝)) with
    | (f, g) =>
      let_fun hn' := (_ : 1 ≤ 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : Nat.mkpair (encode a✝¹) (encode a✝) < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this_1 := (_ : f < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      let_fun this := (_ : g < 2 * Nat.mkpair (encode a✝¹) (encode a✝) + 1);
      cons (decode f) (decode g)) =
    cons a✝¹ a✝
Tactic:
simp [*]
Proof state after:
no goals
Theorem: crucial
Proof state before:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
⊢ cindex c r f = 1
Tactic:
have hr : 0 < r := dist_nonneg.trans_lt hz₀
Proof state after:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
⊢ cindex c r f = 1
Theorem: crucial
Proof state before:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
⊢ cindex c r f = 1
Tactic:
set g := dslope f z₀
Proof state after:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
⊢ cindex c r f = 1
Theorem: crucial
Proof state before:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
⊢ cindex c r f = 1
Tactic:
have h1 : DifferentiableOn ℂ g U :=
  (differentiableOn_dslope (hU.mem_nhds (hcr (ball_subset_closedBall hz₀)))).2 hf
Proof state after:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
⊢ cindex c r f = 1
Theorem: crucial
Proof state before:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
⊢ cindex c r f = 1
Tactic:
have h2 : ∀ z ∈ closedBall c r, g z ≠ 0 := by
  rintro z hz
  by_cases h : z = z₀
  case pos => simp [g, dslope, h, Function.update, hf'z₀]
  case neg => simp [g, dslope, h, Function.update, slope, sub_ne_zero.2 h, hfz₀, hfz z hz h]
Proof state after:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
h2 : ∀ z ∈ closedBall c r, g z ≠ 0
⊢ cindex c r f = 1
Theorem: crucial
Proof state before:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
h2 : ∀ z ∈ closedBall c r, g z ≠ 0
⊢ cindex c r f = 1
Tactic:
have h10 : ∀ z ∈ sphere c r, z - z₀ ≠ 0 :=
  λ z hz => sub_ne_zero.2 (sphere_disjoint_ball.ne_of_mem hz hz₀)
Proof state after:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
h2 : ∀ z ∈ closedBall c r, g z ≠ 0
h10 : ∀ z ∈ sphere c r, z - z₀ ≠ 0
⊢ cindex c r f = 1
Theorem: crucial
Proof state before:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
h2 : ∀ z ∈ closedBall c r, g z ≠ 0
h10 : ∀ z ∈ sphere c r, z - z₀ ≠ 0
⊢ cindex c r f = 1
Tactic:
suffices this : cindex c r f = ((2 * Real.pi * I)⁻¹ * ∮ z in C(c, r), (z - z₀)⁻¹) + cindex c r g
  by rw [this, integral_sub_inv_of_mem_ball hz₀, cindex_eq_zero hU hr hcr h1 h2]
     field_simp [two_ne_zero, Real.pi_ne_zero, I_ne_zero]
Proof state after:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
h2 : ∀ z ∈ closedBall c r, g z ≠ 0
h10 : ∀ z ∈ sphere c r, z - z₀ ≠ 0
⊢ cindex c r f = ((2 * ↑Real.pi * I)⁻¹ * ∮ (z : ℂ) in C(c, r), (z - z₀)⁻¹) + cindex c r g
Theorem: crucial
Proof state before:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
h2 : ∀ z ∈ closedBall c r, g z ≠ 0
h10 : ∀ z ∈ sphere c r, z - z₀ ≠ 0
⊢ cindex c r f = ((2 * ↑Real.pi * I)⁻¹ * ∮ (z : ℂ) in C(c, r), (z - z₀)⁻¹) + cindex c r g
Tactic:
have h6 : ∀ z ∈ sphere c r, deriv f z / f z = (z - z₀)⁻¹ + deriv g z / g z := by
  rintro z hz
  have h3 : ∀ z ∈ U, f z = (z - z₀) * g z :=
    λ z _ => by simpa only [smul_eq_mul, hfz₀, sub_zero] using (sub_smul_dslope f z₀ z).symm
  have hz' : z ∈ U := hcr (sphere_subset_closedBall hz)
  have e0 : U ∈ 𝓝 z := hU.mem_nhds hz'
  have h4 : deriv f z = deriv (λ w => (w - z₀) * g w) z :=
    EventuallyEq.deriv_eq (eventually_of_mem e0 h3)
  have e1 : DifferentiableAt ℂ (λ y => y - z₀) z := differentiableAt_id.sub_const z₀
  have e2 : DifferentiableAt ℂ g z := h1.differentiableAt e0
  have h5 : deriv f z = g z + (z - z₀) * deriv g z := by
    have : deriv (fun y => y - z₀) z = 1 := by
      change deriv (fun y => id y - z₀) z = 1
      simp [deriv_sub_const]
    simp [h4, deriv_mul e1 e2, this]
  have e3 : g z ≠ 0 := h2 z (sphere_subset_closedBall hz)
  field_simp [h3 z hz', h5, mul_comm, h10 z hz]
Proof state after:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
h2 : ∀ z ∈ closedBall c r, g z ≠ 0
h10 : ∀ z ∈ sphere c r, z - z₀ ≠ 0
h6 : ∀ z ∈ sphere c r, deriv f z / f z = (z - z₀)⁻¹ + deriv g z / g z
⊢ cindex c r f = ((2 * ↑Real.pi * I)⁻¹ * ∮ (z : ℂ) in C(c, r), (z - z₀)⁻¹) + cindex c r g
Theorem: crucial
Proof state before:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
h2 : ∀ z ∈ closedBall c r, g z ≠ 0
h10 : ∀ z ∈ sphere c r, z - z₀ ≠ 0
h6 : ∀ z ∈ sphere c r, deriv f z / f z = (z - z₀)⁻¹ + deriv g z / g z
⊢ cindex c r f = ((2 * ↑Real.pi * I)⁻¹ * ∮ (z : ℂ) in C(c, r), (z - z₀)⁻¹) + cindex c r g
Tactic:
simp only [cindex, integral_congr hr.le h6, ← mul_add]
Proof state after:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
h2 : ∀ z ∈ closedBall c r, g z ≠ 0
h10 : ∀ z ∈ sphere c r, z - z₀ ≠ 0
h6 : ∀ z ∈ sphere c r, deriv f z / f z = (z - z₀)⁻¹ + deriv g z / g z
⊢ ((2 * ↑Real.pi * I)⁻¹ * ∮ (z : ℂ) in C(c, r), (z - z₀)⁻¹ + deriv g z / g z) =
    (2 * ↑Real.pi * I)⁻¹ * ((∮ (z : ℂ) in C(c, r), (z - z₀)⁻¹) + ∮ (z : ℂ) in C(c, r), deriv g z / g z)
Theorem: crucial
Proof state before:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
h2 : ∀ z ∈ closedBall c r, g z ≠ 0
h10 : ∀ z ∈ sphere c r, z - z₀ ≠ 0
h6 : ∀ z ∈ sphere c r, deriv f z / f z = (z - z₀)⁻¹ + deriv g z / g z
⊢ ((2 * ↑Real.pi * I)⁻¹ * ∮ (z : ℂ) in C(c, r), (z - z₀)⁻¹ + deriv g z / g z) =
    (2 * ↑Real.pi * I)⁻¹ * ((∮ (z : ℂ) in C(c, r), (z - z₀)⁻¹) + ∮ (z : ℂ) in C(c, r), deriv g z / g z)
Tactic:
congr
Proof state after:
case e_a
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
h2 : ∀ z ∈ closedBall c r, g z ≠ 0
h10 : ∀ z ∈ sphere c r, z - z₀ ≠ 0
h6 : ∀ z ∈ sphere c r, deriv f z / f z = (z - z₀)⁻¹ + deriv g z / g z
⊢ (∮ (z : ℂ) in C(c, r), (z - z₀)⁻¹ + deriv g z / g z) =
    (∮ (z : ℂ) in C(c, r), (z - z₀)⁻¹) + ∮ (z : ℂ) in C(c, r), deriv g z / g z
Theorem: crucial
Proof state before:
case e_a
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
h2 : ∀ z ∈ closedBall c r, g z ≠ 0
h10 : ∀ z ∈ sphere c r, z - z₀ ≠ 0
h6 : ∀ z ∈ sphere c r, deriv f z / f z = (z - z₀)⁻¹ + deriv g z / g z
⊢ (∮ (z : ℂ) in C(c, r), (z - z₀)⁻¹ + deriv g z / g z) =
    (∮ (z : ℂ) in C(c, r), (z - z₀)⁻¹) + ∮ (z : ℂ) in C(c, r), deriv g z / g z
Tactic:
apply circleIntegral.integral_add
Proof state after:
case e_a.hf
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
h2 : ∀ z ∈ closedBall c r, g z ≠ 0
h10 : ∀ z ∈ sphere c r, z - z₀ ≠ 0
h6 : ∀ z ∈ sphere c r, deriv f z / f z = (z - z₀)⁻¹ + deriv g z / g z
⊢ CircleIntegrable (fun z => (z - z₀)⁻¹) c r

case e_a.hg
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
h2 : ∀ z ∈ closedBall c r, g z ≠ 0
h10 : ∀ z ∈ sphere c r, z - z₀ ≠ 0
h6 : ∀ z ∈ sphere c r, deriv f z / f z = (z - z₀)⁻¹ + deriv g z / g z
⊢ CircleIntegrable (fun z => deriv g z / g z) c r
Theorem: crucial
Proof state before:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
⊢ ∀ z ∈ closedBall c r, g z ≠ 0
Tactic:
rintro z hz
Proof state after:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
z : ℂ
hz : z ∈ closedBall c r
⊢ g z ≠ 0
Theorem: crucial
Proof state before:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
z : ℂ
hz : z ∈ closedBall c r
⊢ g z ≠ 0
Tactic:
by_cases h : z = z₀
Proof state after:
case pos
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
z : ℂ
hz : z ∈ closedBall c r
h : z = z₀
⊢ g z ≠ 0

case neg
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
z : ℂ
hz : z ∈ closedBall c r
h : ¬z = z₀
⊢ g z ≠ 0
Theorem: crucial
Proof state before:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
z : ℂ
hz : z ∈ closedBall c r
h : z = z₀
⊢ g z ≠ 0
Tactic:
case pos => simp [g, dslope, h, Function.update, hf'z₀]
Proof state after:
no goals
Theorem: crucial
Proof state before:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
z : ℂ
hz : z ∈ closedBall c r
h : ¬z = z₀
⊢ g z ≠ 0
Tactic:
case neg => simp [g, dslope, h, Function.update, slope, sub_ne_zero.2 h, hfz₀, hfz z hz h]
Proof state after:
no goals
Theorem: crucial
Proof state before:
ι : Type u_1
α : Type u_2
β : Type u_3
U : Set ℂ
c z₀ : ℂ
r : ℝ
f g✝ : ℂ → ℂ
hU : IsOpen U
hcr : closedBall c r ⊆ U
hz₀ : z₀ ∈ ball c r
hf : DifferentiableOn ℂ f U
hfz₀ : f z₀ = 0
hf'z₀ : deriv f z₀ ≠ 0
hfz : ∀ z ∈ closedBall c r, z ≠ z₀ → f z ≠ 0
hr : 0 < r
g : ℂ → ℂ := dslope f z₀
h1 : DifferentiableOn ℂ g U
z : ℂ
hz : z ∈ closedBall c r
h : z = z₀
⊢ g z ≠ 0
Tactic:
simp [g, dslope, h, Function.update, hf'z₀]
Proof state after:
no goals