tasksource/leandojo huggingface dataset:
Theorem: ContinuousLinearEquiv.comp_differentiableWithinAt_iff
File: Mathlib/Analysis/Calculus/FDeriv/Equiv.lean

tactic: refine'
  ⟨fun H => _, fun H => iso.differentiable.differentiableAt.comp_differentiableWithinAt x H⟩
state_before: 𝕜 : Type u_2
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_4
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_1
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.60346
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
iso : E ≃L[𝕜] F
f : G → E
s : Set G
x : G
⊢ DifferentiableWithinAt 𝕜 (↑iso ∘ f) s x ↔ DifferentiableWithinAt 𝕜 f s x

tactic: have : DifferentiableWithinAt 𝕜 (iso.symm ∘ iso ∘ f) s x :=
  iso.symm.differentiable.differentiableAt.comp_differentiableWithinAt x H
state_before: 𝕜 : Type u_2
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_4
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_1
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.60346
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
iso : E ≃L[𝕜] F
f : G → E
s : Set G
x : G
H : DifferentiableWithinAt 𝕜 (↑iso ∘ f) s x
⊢ DifferentiableWithinAt 𝕜 f s x

tactic: rwa [← Function.comp.assoc iso.symm iso f, iso.symm_comp_self] at this
state_before: 𝕜 : Type u_2
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_4
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_1
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.60346
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
iso : E ≃L[𝕜] F
f : G → E
s : Set G
x : G
H : DifferentiableWithinAt 𝕜 (↑iso ∘ f) s x
this : DifferentiableWithinAt 𝕜 (↑(ContinuousLinearEquiv.symm iso) ∘ ↑iso ∘ f) s x
⊢ DifferentiableWithinAt 𝕜 f s x
Theorem: MeasureTheory.Content.outerMeasure_lt_top_of_isCompact
File: Mathlib/MeasureTheory/Measure/Content.lean

tactic: rcases exists_compact_superset hK with ⟨F, h1F, h2F⟩
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
inst✝ : LocallyCompactSpace G
K : Set G
hK : IsCompact K
⊢ ↑(Content.outerMeasure μ) K < ⊤

tactic: calc
  μ.outerMeasure K ≤ μ.outerMeasure (interior F) := OuterMeasure.mono' _ h2F
  _ ≤ μ ⟨F, h1F⟩ := by
    apply μ.outerMeasure_le ⟨interior F, isOpen_interior⟩ ⟨F, h1F⟩ interior_subset
  _ < ⊤ := μ.lt_top _
state_before: case intro.intro
G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
inst✝ : LocallyCompactSpace G
K : Set G
hK : IsCompact K
F : Set G
h1F : IsCompact F
h2F : K ⊆ interior F
⊢ ↑(Content.outerMeasure μ) K < ⊤

tactic: apply μ.outerMeasure_le ⟨interior F, isOpen_interior⟩ ⟨F, h1F⟩ interior_subset
state_before: G : Type w
inst✝² : TopologicalSpace G
μ : Content G
inst✝¹ : T2Space G
inst✝ : LocallyCompactSpace G
K : Set G
hK : IsCompact K
F : Set G
h1F : IsCompact F
h2F : K ⊆ interior F
⊢ ↑(Content.outerMeasure μ) (interior F) ≤ (fun s => ↑(toFun μ s)) { carrier := F, isCompact' := h1F }
Theorem: Seminorm.bddBelow_range_add
File: Mathlib/Analysis/Seminorm.lean

tactic: rintro _ ⟨x, rfl⟩
state_before: R : Type ?u.587125
R' : Type ?u.587128
𝕜 : Type u_2
𝕜₂ : Type ?u.587134
𝕜₃ : Type ?u.587137
𝕝 : Type ?u.587140
E : Type u_1
E₂ : Type ?u.587146
E₃ : Type ?u.587149
F : Type ?u.587152
G : Type ?u.587155
ι : Type ?u.587158
inst✝² : NormedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
p q : Seminorm 𝕜 E
x : E
⊢ 0 ∈ lowerBounds (range fun u => ↑p u + ↑q (x - u))

tactic: dsimp
state_before: case intro
R : Type ?u.587125
R' : Type ?u.587128
𝕜 : Type u_2
𝕜₂ : Type ?u.587134
𝕜₃ : Type ?u.587137
𝕝 : Type ?u.587140
E : Type u_1
E₂ : Type ?u.587146
E₃ : Type ?u.587149
F : Type ?u.587152
G : Type ?u.587155
ι : Type ?u.587158
inst✝² : NormedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
p q : Seminorm 𝕜 E
x✝ x : E
⊢ 0 ≤ (fun u => ↑p u + ↑q (x✝ - u)) x

tactic: positivity
state_before: case intro
R : Type ?u.587125
R' : Type ?u.587128
𝕜 : Type u_2
𝕜₂ : Type ?u.587134
𝕜₃ : Type ?u.587137
𝕝 : Type ?u.587140
E : Type u_1
E₂ : Type ?u.587146
E₃ : Type ?u.587149
F : Type ?u.587152
G : Type ?u.587155
ι : Type ?u.587158
inst✝² : NormedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
p q : Seminorm 𝕜 E
x✝ x : E
⊢ 0 ≤ ↑p x + ↑q (x✝ - x)
Theorem: tendsto_ceil_right_pure_floor_add_one
File: Mathlib/Topology/Algebra/Order/Floor.lean

tactic: rw [cast_add, cast_one, add_sub_cancel]
state_before: α : Type u_1
β : Type ?u.10951
γ : Type ?u.10954
inst✝³ : LinearOrderedRing α
inst✝² : FloorRing α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
x : α
⊢ ↑(⌊x⌋ + 1) - 1 ≤ x

tactic: exact floor_le _
state_before: α : Type u_1
β : Type ?u.10951
γ : Type ?u.10954
inst✝³ : LinearOrderedRing α
inst✝² : FloorRing α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
x : α
⊢ ↑⌊x⌋ ≤ x
Theorem: Finsupp.mapRange_neLocus_eq
File: Mathlib/Data/Finsupp/NeLocus.lean

tactic: ext
state_before: α : Type u_3
M : Type u_2
N : Type u_1
P : Type ?u.12674
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq N
inst✝² : DecidableEq M
inst✝¹ : Zero M
inst✝ : Zero N
f g : α →₀ N
F : N → M
F0 : F 0 = 0
hF : Function.Injective F
⊢ neLocus (mapRange F F0 f) (mapRange F F0 g) = neLocus f g

tactic: simpa only [mem_neLocus] using hF.ne_iff
state_before: case a
α : Type u_3
M : Type u_2
N : Type u_1
P : Type ?u.12674
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq N
inst✝² : DecidableEq M
inst✝¹ : Zero M
inst✝ : Zero N
f g : α →₀ N
F : N → M
F0 : F 0 = 0
hF : Function.Injective F
a✝ : α
⊢ a✝ ∈ neLocus (mapRange F F0 f) (mapRange F F0 g) ↔ a✝ ∈ neLocus f g
Theorem: Nat.card_units_zmod_lt_sub_one
File: Mathlib/Data/Nat/Totient.lean

tactic: haveI : NeZero p := ⟨(pos_of_gt hp).ne'⟩
state_before: p : ℕ
hp : 1 < p
inst✝ : Fintype (ZMod p)ˣ
⊢ Fintype.card (ZMod p)ˣ ≤ p - 1

tactic: rw [ZMod.card_units_eq_totient p]
state_before: p : ℕ
hp : 1 < p
inst✝ : Fintype (ZMod p)ˣ
this : NeZero p
⊢ Fintype.card (ZMod p)ˣ ≤ p - 1

tactic: exact Nat.le_pred_of_lt (Nat.totient_lt p hp)
state_before: p : ℕ
hp : 1 < p
inst✝ : Fintype (ZMod p)ˣ
this : NeZero p
⊢ φ p ≤ p - 1
Theorem: CategoryTheory.Bicategory.pentagon_hom_inv_inv_inv_inv
File: Mathlib/CategoryTheory/Bicategory/Basic.lean

tactic: simp [← cancel_epi (f ◁ (α_ g h i).inv)]
state_before: B : Type u
inst✝ : Bicategory B
a b c d e : B
f : a ⟶ b
g : b ⟶ c
h : c ⟶ d
i : d ⟶ e
⊢ f ◁ (α_ g h i).hom ≫ (α_ f g (h ≫ i)).inv ≫ (α_ (f ≫ g) h i).inv = (α_ f (g ≫ h) i).inv ≫ (α_ f g h).inv ▷ i
Theorem: List.findIdx_cons
File: Mathlib/Data/List/Basic.lean

tactic: cases H : p b with
  | true => simp [H, findIdx, findIdx.go]
  | false => simp [H, findIdx, findIdx.go, findIdx_go_succ]
state_before: ι : Type ?u.75547
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : DecidableEq α
p : α → Bool
b : α
l : List α
⊢ findIdx p (b :: l) = bif p b then 0 else findIdx p l + 1

tactic: simp [H, findIdx, findIdx.go]
state_before: case true
ι : Type ?u.75547
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : DecidableEq α
p : α → Bool
b : α
l : List α
H : p b = true
⊢ findIdx p (b :: l) = bif true then 0 else findIdx p l + 1

tactic: simp [H, findIdx, findIdx.go, findIdx_go_succ]
state_before: case false
ι : Type ?u.75547
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : DecidableEq α
p : α → Bool
b : α
l : List α
H : p b = false
⊢ findIdx p (b :: l) = bif false then 0 else findIdx p l + 1

tactic: cases l with
| nil => unfold List.findIdx.go; exact Nat.succ_eq_add_one n
| cons head tail =>
  unfold List.findIdx.go
  cases p head <;> simp only [cond_false, cond_true]
  exact findIdx_go_succ p tail (n + 1)
state_before: ι : Type ?u.75547
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : DecidableEq α
p✝ : α → Bool
b : α
l✝ : List α
p : α → Bool
l : List α
n : ℕ
⊢ findIdx.go p l (n + 1) = findIdx.go p l n + 1

tactic: unfold List.findIdx.go
state_before: case nil
ι : Type ?u.75547
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : DecidableEq α
p✝ : α → Bool
b : α
l : List α
p : α → Bool
n : ℕ
⊢ findIdx.go p [] (n + 1) = findIdx.go p [] n + 1

tactic: exact Nat.succ_eq_add_one n
state_before: case nil
ι : Type ?u.75547
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : DecidableEq α
p✝ : α → Bool
b : α
l : List α
p : α → Bool
n : ℕ
⊢ n + 1 = n + 1

tactic: unfold List.findIdx.go
state_before: case cons
ι : Type ?u.75547
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : DecidableEq α
p✝ : α → Bool
b : α
l : List α
p : α → Bool
n : ℕ
head : α
tail : List α
⊢ findIdx.go p (head :: tail) (n + 1) = findIdx.go p (head :: tail) n + 1

tactic: cases p head <;> simp only [cond_false, cond_true]
state_before: case cons
ι : Type ?u.75547
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : DecidableEq α
p✝ : α → Bool
b : α
l : List α
p : α → Bool
n : ℕ
head : α
tail : List α
⊢ (bif p head then n + 1 else findIdx.go p tail (n + 1 + 1)) = (bif p head then n else findIdx.go p tail (n + 1)) + 1

tactic: exact findIdx_go_succ p tail (n + 1)
state_before: case cons.false
ι : Type ?u.75547
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : DecidableEq α
p✝ : α → Bool
b : α
l : List α
p : α → Bool
n : ℕ
head : α
tail : List α
⊢ findIdx.go p tail (n + 1 + 1) = findIdx.go p tail (n + 1) + 1
Theorem: add_self
File: Mathlib/Algebra/Ring/BooleanRing.lean

tactic: have : a + a = a + a + (a + a) :=
  calc
    a + a = (a + a) * (a + a) := by rw [mul_self]
    _ = a * a + a * a + (a * a + a * a) := by rw [add_mul, mul_add]
    _ = a + a + (a + a) := by rw [mul_self]
state_before: α : Type u_1
β : Type ?u.543
γ : Type ?u.546
inst✝ : BooleanRing α
a b : α
⊢ a + a = 0

tactic: rwa [self_eq_add_left] at this
state_before: α : Type u_1
β : Type ?u.543
γ : Type ?u.546
inst✝ : BooleanRing α
a b : α
this : a + a = a + a + (a + a)
⊢ a + a = 0

tactic: rw [mul_self]
state_before: α : Type u_1
β : Type ?u.543
γ : Type ?u.546
inst✝ : BooleanRing α
a b : α
⊢ a + a = (a + a) * (a + a)

tactic: rw [add_mul, mul_add]
state_before: α : Type u_1
β : Type ?u.543
γ : Type ?u.546
inst✝ : BooleanRing α
a b : α
⊢ (a + a) * (a + a) = a * a + a * a + (a * a + a * a)

tactic: rw [mul_self]
state_before: α : Type u_1
β : Type ?u.543
γ : Type ?u.546
inst✝ : BooleanRing α
a b : α
⊢ a * a + a * a + (a * a + a * a) = a + a + (a + a)
Theorem: Real.log_abs
File: Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

tactic: by_cases h : x = 0
state_before: x✝ y x : ℝ
⊢ log (abs x) = log x

tactic: simp [h]
state_before: case pos
x✝ y x : ℝ
h : x = 0
⊢ log (abs x) = log x

tactic: rw [← exp_eq_exp, exp_log_eq_abs h, exp_log_eq_abs (abs_pos.2 h).ne', abs_abs]
state_before: case neg
x✝ y x : ℝ
h : ¬x = 0
⊢ log (abs x) = log x
Theorem: LiouvilleWith.frequently_lt_rpow_neg
File: Mathlib/NumberTheory/Liouville/LiouvilleWith.lean

tactic: rcases h.exists_pos with ⟨C, _hC₀, hC⟩
state_before: p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hlt : q < p
⊢ ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ abs (x - ↑m / ↑n) < ↑n ^ (-q)

tactic: refine (this.and_frequently hC).mono ?_
state_before: case intro.intro
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hlt : q < p
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ abs (x - ↑m / ↑n) < C / ↑n ^ p
this : ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)
⊢ ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ abs (x - ↑m / ↑n) < ↑n ^ (-q)

tactic: rintro n ⟨hnC, hn, m, hne, hlt⟩
state_before: case intro.intro
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hlt : q < p
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ abs (x - ↑m / ↑n) < C / ↑n ^ p
this : ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)
⊢ ∀ (x_1 : ℕ),
    (C < ↑x_1 ^ (p - q) ∧ 1 ≤ x_1 ∧ ∃ m, x ≠ ↑m / ↑x_1 ∧ abs (x - ↑m / ↑x_1) < C / ↑x_1 ^ p) →
      ∃ m, x ≠ ↑m / ↑x_1 ∧ abs (x - ↑m / ↑x_1) < ↑x_1 ^ (-q)

tactic: replace hn : (0 : ℝ) < n := Nat.cast_pos.2 hn
state_before: case intro.intro.intro.intro.intro.intro
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hlt✝ : q < p
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ abs (x - ↑m / ↑n) < C / ↑n ^ p
this : ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)
n : ℕ
hnC : C < ↑n ^ (p - q)
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : abs (x - ↑m / ↑n) < C / ↑n ^ p
⊢ ∃ m, x ≠ ↑m / ↑n ∧ abs (x - ↑m / ↑n) < ↑n ^ (-q)

tactic: refine ⟨m, hne, hlt.trans <| (div_lt_iff <| rpow_pos_of_pos hn _).2 ?_⟩
state_before: case intro.intro.intro.intro.intro.intro
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hlt✝ : q < p
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ abs (x - ↑m / ↑n) < C / ↑n ^ p
this : ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)
n : ℕ
hnC : C < ↑n ^ (p - q)
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : abs (x - ↑m / ↑n) < C / ↑n ^ p
hn : 0 < ↑n
⊢ ∃ m, x ≠ ↑m / ↑n ∧ abs (x - ↑m / ↑n) < ↑n ^ (-q)

tactic: rwa [mul_comm, ← rpow_add hn, ← sub_eq_add_neg]
state_before: case intro.intro.intro.intro.intro.intro
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hlt✝ : q < p
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ abs (x - ↑m / ↑n) < C / ↑n ^ p
this : ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)
n : ℕ
hnC : C < ↑n ^ (p - q)
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : abs (x - ↑m / ↑n) < C / ↑n ^ p
hn : 0 < ↑n
⊢ C < ↑n ^ (-q) * ↑n ^ p
Theorem: Nat.pair_lt_pair_right
File: Mathlib/Data/Nat/Pairing.lean

tactic: by_cases h₁ : a < b₁ <;> simp [pair, h₁, add_assoc]
state_before: a b₁ b₂ : ℕ
h : b₁ < b₂
⊢ pair a b₁ < pair a b₂

tactic: simp [pair, lt_trans h₁ h, h]
state_before: case pos
a b₁ b₂ : ℕ
h : b₁ < b₂
h₁ : a < b₁
⊢ b₁ * b₁ + a < if a < b₂ then b₂ * b₂ + a else a * a + (a + b₂)

tactic: exact mul_self_lt_mul_self h
state_before: case pos
a b₁ b₂ : ℕ
h : b₁ < b₂
h₁ : a < b₁
⊢ b₁ * b₁ < b₂ * b₂

tactic: by_cases h₂ : a < b₂ <;> simp [pair, h₂, h]
state_before: case neg
a b₁ b₂ : ℕ
h : b₁ < b₂
h₁ : ¬a < b₁
⊢ a * a + (a + b₁) < if a < b₂ then b₂ * b₂ + a else a * a + (a + b₂)

tactic: simp at h₁
state_before: case pos
a b₁ b₂ : ℕ
h : b₁ < b₂
h₁ : ¬a < b₁
h₂ : a < b₂
⊢ a * a + (a + b₁) < b₂ * b₂ + a

tactic: rw [add_comm, add_comm _ a, add_assoc, add_lt_add_iff_left]
state_before: case pos
a b₁ b₂ : ℕ
h : b₁ < b₂
h₂ : a < b₂
h₁ : b₁ ≤ a
⊢ a * a + (a + b₁) < b₂ * b₂ + a

tactic: rwa [add_comm, ← sqrt_lt, sqrt_add_eq]
state_before: case pos
a b₁ b₂ : ℕ
h : b₁ < b₂
h₂ : a < b₂
h₁ : b₁ ≤ a
⊢ b₁ + a * a < b₂ * b₂

tactic: exact le_trans h₁ (Nat.le_add_left _ _)
state_before: case pos.h
a b₁ b₂ : ℕ
h : b₁ < b₂
h₂ : a < b₂
h₁ : b₁ ≤ a
⊢ b₁ ≤ a + a
Theorem: List.modifyNth_eq_take_cons_drop
File: Mathlib/Data/List/Basic.lean

tactic: rw [modifyNth_eq_take_drop, drop_eq_get_cons h]
state_before: ι : Type ?u.220838
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → α
n : ℕ
l : List α
h : n < length l
⊢ modifyNth f n l = take n l ++ f (get l { val := n, isLt := h }) :: drop (n + 1) l

tactic: rfl
state_before: ι : Type ?u.220838
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → α
n : ℕ
l : List α
h : n < length l
⊢ take n l ++ modifyHead f (get l { val := n, isLt := h } :: drop (n + 1) l) =
    take n l ++ f (get l { val := n, isLt := h }) :: drop (n + 1) l
Theorem: norm_smul
File: Mathlib/Analysis/Normed/MulAction.lean

tactic: by_cases h : r = 0
state_before: α : Type u_2
β : Type u_1
inst✝³ : NormedDivisionRing α
inst✝² : SeminormedAddGroup β
inst✝¹ : MulActionWithZero α β
inst✝ : BoundedSMul α β
r : α
x : β
⊢ ‖r • x‖ = ‖r‖ * ‖x‖

tactic: simp [h, zero_smul α x]
state_before: case pos
α : Type u_2
β : Type u_1
inst✝³ : NormedDivisionRing α
inst✝² : SeminormedAddGroup β
inst✝¹ : MulActionWithZero α β
inst✝ : BoundedSMul α β
r : α
x : β
h : r = 0
⊢ ‖r • x‖ = ‖r‖ * ‖x‖

tactic: refine' le_antisymm (norm_smul_le r x) _
state_before: case neg
α : Type u_2
β : Type u_1
inst✝³ : NormedDivisionRing α
inst✝² : SeminormedAddGroup β
inst✝¹ : MulActionWithZero α β
inst✝ : BoundedSMul α β
r : α
x : β
h : ¬r = 0
⊢ ‖r • x‖ = ‖r‖ * ‖x‖

tactic: calc
  ‖r‖ * ‖x‖ = ‖r‖ * ‖r⁻¹ • r • x‖ := by rw [inv_smul_smul₀ h]
  _ ≤ ‖r‖ * (‖r⁻¹‖ * ‖r • x‖) := by gcongr; apply norm_smul_le
  _ = ‖r • x‖ := by rw [norm_inv, ← mul_assoc, mul_inv_cancel (mt norm_eq_zero.1 h), one_mul]
state_before: case neg
α : Type u_2
β : Type u_1
inst✝³ : NormedDivisionRing α
inst✝² : SeminormedAddGroup β
inst✝¹ : MulActionWithZero α β
inst✝ : BoundedSMul α β
r : α
x : β
h : ¬r = 0
⊢ ‖r‖ * ‖x‖ ≤ ‖r • x‖

tactic: rw [inv_smul_smul₀ h]
state_before: α : Type u_2
β : Type u_1
inst✝³ : NormedDivisionRing α
inst✝² : SeminormedAddGroup β
inst✝¹ : MulActionWithZero α β
inst✝ : BoundedSMul α β
r : α
x : β
h : ¬r = 0
⊢ ‖r‖ * ‖x‖ = ‖r‖ * ‖r⁻¹ • r • x‖

tactic: gcongr
state_before: α : Type u_2
β : Type u_1
inst✝³ : NormedDivisionRing α
inst✝² : SeminormedAddGroup β
inst✝¹ : MulActionWithZero α β
inst✝ : BoundedSMul α β
r : α
x : β
h : ¬r = 0
⊢ ‖r‖ * ‖r⁻¹ • r • x‖ ≤ ‖r‖ * (‖r⁻¹‖ * ‖r • x‖)

tactic: apply norm_smul_le
state_before: case h
α : Type u_2
β : Type u_1
inst✝³ : NormedDivisionRing α
inst✝² : SeminormedAddGroup β
inst✝¹ : MulActionWithZero α β
inst✝ : BoundedSMul α β
r : α
x : β
h : ¬r = 0
⊢ ‖r⁻¹ • r • x‖ ≤ ‖r⁻¹‖ * ‖r • x‖

tactic: rw [norm_inv, ← mul_assoc, mul_inv_cancel (mt norm_eq_zero.1 h), one_mul]
state_before: α : Type u_2
β : Type u_1
inst✝³ : NormedDivisionRing α
inst✝² : SeminormedAddGroup β
inst✝¹ : MulActionWithZero α β
inst✝ : BoundedSMul α β
r : α
x : β
h : ¬r = 0
⊢ ‖r‖ * (‖r⁻¹‖ * ‖r • x‖) = ‖r • x‖
Theorem: MeasureTheory.integrableOn_iff_integrable_of_support_subset
File: Mathlib/MeasureTheory/Integral/IntegrableOn.lean

tactic: refine' ⟨fun h => _, fun h => h.integrableOn⟩
state_before: α : Type u_1
β : Type ?u.1654027
E : Type u_2
F : Type ?u.1654033
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
h1s : support f ⊆ s
⊢ IntegrableOn f s ↔ Integrable f

tactic: refine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_
state_before: α : Type u_1
β : Type ?u.1654027
E : Type u_2
F : Type ?u.1654033
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
h1s : support f ⊆ s
h : IntegrableOn f s
⊢ Integrable f

tactic: contrapose! hx
state_before: α : Type u_1
β : Type ?u.1654027
E : Type u_2
F : Type ?u.1654033
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
h1s : support f ⊆ s
h : IntegrableOn f s
x : α
hx : ¬x ∈ s
⊢ f x = 0

tactic: exact h1s (mem_support.2 hx)
state_before: α : Type u_1
β : Type ?u.1654027
E : Type u_2
F : Type ?u.1654033
inst✝¹ : MeasurableSpace α
inst✝ : NormedAddCommGroup E
f g : α → E
s t : Set α
μ ν : Measure α
h1s : support f ⊆ s
h : IntegrableOn f s
x : α
hx : f x ≠ 0
⊢ x ∈ s
Theorem: EuclideanGeometry.cos_angle_mul_dist_of_angle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

tactic: rw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ←
  inner_neg_left, neg_vsub_eq_vsub_rev] at h
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : ∠ p₁ p₂ p₃ = π / 2
⊢ Real.cos (∠ p₂ p₃ p₁) * dist p₁ p₃ = dist p₃ p₂

tactic: rw [angle, dist_eq_norm_vsub' V p₃ p₂, dist_eq_norm_vsub V p₁ p₃, ← vsub_add_vsub_cancel p₁ p₂ p₃,
  add_comm, cos_angle_add_mul_norm_of_inner_eq_zero h]
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0
⊢ Real.cos (∠ p₂ p₃ p₁) * dist p₁ p₃ = dist p₃ p₂
Theorem: Nat.zero_testBit
File: Mathlib/Data/Nat/Bitwise.lean

tactic: simp only [testBit, shiftr_zero, bodd_zero]
state_before: i : ℕ
⊢ testBit 0 i = false
Theorem: List.Pairwise.forall
File: Mathlib/Data/List/Pairwise.lean

tactic: apply Pairwise.forall_of_forall
state_before: α : Type u_1
β : Type ?u.6230
R S T : α → α → Prop
a : α
l : List α
hR : Symmetric R
hl : Pairwise R l
⊢ ∀ ⦃a : α⦄, a ∈ l → ∀ ⦃b : α⦄, b ∈ l → a ≠ b → R a b

tactic: . exact fun a b h hne => hR (h hne.symm)
state_before: case H
α : Type u_1
β : Type ?u.6230
R S T : α → α → Prop
a : α
l : List α
hR : Symmetric R
hl : Pairwise R l
⊢ Symmetric fun x y => x ≠ y → R x y

case H₁
α : Type u_1
β : Type ?u.6230
R S T : α → α → Prop
a : α
l : List α
hR : Symmetric R
hl : Pairwise R l
⊢ ∀ (x : α), x ∈ l → x ≠ x → R x x

case H₂
α : Type u_1
β : Type ?u.6230
R S T : α → α → Prop
a : α
l : List α
hR : Symmetric R
hl : Pairwise R l
⊢ Pairwise (fun x y => x ≠ y → R x y) l

tactic: . exact fun _ _ hx => (hx rfl).elim
state_before: case H₁
α : Type u_1
β : Type ?u.6230
R S T : α → α → Prop
a : α
l : List α
hR : Symmetric R
hl : Pairwise R l
⊢ ∀ (x : α), x ∈ l → x ≠ x → R x x

case H₂
α : Type u_1
β : Type ?u.6230
R S T : α → α → Prop
a : α
l : List α
hR : Symmetric R
hl : Pairwise R l
⊢ Pairwise (fun x y => x ≠ y → R x y) l

tactic: . exact hl.imp (@fun a b h _ => by exact h)
state_before: case H₂
α : Type u_1
β : Type ?u.6230
R S T : α → α → Prop
a : α
l : List α
hR : Symmetric R
hl : Pairwise R l
⊢ Pairwise (fun x y => x ≠ y → R x y) l

tactic: exact fun a b h hne => hR (h hne.symm)
state_before: case H
α : Type u_1
β : Type ?u.6230
R S T : α → α → Prop
a : α
l : List α
hR : Symmetric R
hl : Pairwise R l
⊢ Symmetric fun x y => x ≠ y → R x y

tactic: exact fun _ _ hx => (hx rfl).elim
state_before: case H₁
α : Type u_1
β : Type ?u.6230
R S T : α → α → Prop
a : α
l : List α
hR : Symmetric R
hl : Pairwise R l
⊢ ∀ (x : α), x ∈ l → x ≠ x → R x x

tactic: exact hl.imp (@fun a b h _ => by exact h)
state_before: case H₂
α : Type u_1
β : Type ?u.6230
R S T : α → α → Prop
a : α
l : List α
hR : Symmetric R
hl : Pairwise R l
⊢ Pairwise (fun x y => x ≠ y → R x y) l

tactic: exact h
state_before: α : Type u_1
β : Type ?u.6230
R S T : α → α → Prop
a✝ : α
l : List α
hR : Symmetric R
hl : Pairwise R l
a b : α
h : R a b
x✝ : a ≠ b
⊢ R a b
Theorem: Equiv.Perm.card_support_conj
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: simp
state_before: ι : Type ?u.3040728
α : Type u_1
β : Type ?u.3040734
inst✝¹ : DecidableEq α
inst✝ : Fintype α
σ τ : Perm α
⊢ card (support (σ * τ * σ⁻¹)) = card (support τ)
Theorem: TopCat.prod_topology
File: Mathlib/Topology/Category/TopCat/Limits/Products.lean

tactic: let homeo := homeoOfIso (prodIsoProd X Y)
state_before: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
⊢ (X ⨯ Y).str = induced ((forget TopCat).map prod.fst) X.str ⊓ induced ((forget TopCat).map prod.snd) Y.str

tactic: refine' homeo.inducing.induced.trans _
state_before: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
homeo : ↑(X ⨯ Y) ≃ₜ ↑(of (↑X × ↑Y)) := homeoOfIso (prodIsoProd X Y)
⊢ (X ⨯ Y).str = induced ((forget TopCat).map prod.fst) X.str ⊓ induced ((forget TopCat).map prod.snd) Y.str

tactic: change induced homeo (_ ⊓ _) = _
state_before: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
homeo : ↑(X ⨯ Y) ≃ₜ ↑(of (↑X × ↑Y)) := homeoOfIso (prodIsoProd X Y)
⊢ induced (↑homeo) (topologicalSpace_coe (of (↑X × ↑Y))) =
    induced ((forget TopCat).map prod.fst) X.str ⊓ induced ((forget TopCat).map prod.snd) Y.str

tactic: simp [induced_compose]
state_before: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
homeo : ↑(X ⨯ Y) ≃ₜ ↑(of (↑X × ↑Y)) := homeoOfIso (prodIsoProd X Y)
⊢ induced (↑homeo) (induced Prod.fst (topologicalSpace_coe X) ⊓ induced Prod.snd (topologicalSpace_coe Y)) =
    induced ((forget TopCat).map prod.fst) X.str ⊓ induced ((forget TopCat).map prod.snd) Y.str

tactic: rfl
state_before: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
homeo : ↑(X ⨯ Y) ≃ₜ ↑(of (↑X × ↑Y)) := homeoOfIso (prodIsoProd X Y)
⊢ induced (Prod.fst ∘ ↑(homeoOfIso (prodIsoProd X Y))) (topologicalSpace_coe X) ⊓
      induced (Prod.snd ∘ ↑(homeoOfIso (prodIsoProd X Y))) (topologicalSpace_coe Y) =
    induced ((forget TopCat).map prod.fst) X.str ⊓ induced ((forget TopCat).map prod.snd) Y.str