tasksource/leandojo huggingface dataset:
Theorem: AlgebraicTopology.AlternatingCofaceMapComplex.d_eq_unop_d
File: Mathlib/AlgebraicTopology/AlternatingFaceMapComplex.lean

tactic: simp only [objD, AlternatingFaceMapComplex.objD, unop_sum, unop_zsmul]
state_before: C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
A : Type ?u.280998
inst✝¹ : Category A
inst✝ : Abelian A
X Y : CosimplicialObject C
n : ℕ
⊢ objD X n = (AlternatingFaceMapComplex.objD ((cosimplicialSimplicialEquiv C).functor.obj X.op) n).unop

tactic: rfl
state_before: C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
A : Type ?u.280998
inst✝¹ : Category A
inst✝ : Abelian A
X Y : CosimplicialObject C
n : ℕ
⊢ ∑ i : Fin (n + 2), (-1) ^ ↑i • CosimplicialObject.δ X i =
    ∑ x : Fin (n + 2), (-1) ^ ↑x • (SimplicialObject.δ ((cosimplicialSimplicialEquiv C).functor.obj X.op) x).unop
Theorem: LocalHomeomorph.trans_ofSet
File: Mathlib/Topology/LocalHomeomorph.lean

tactic: rw [trans_source, restr_source, ofSet_source, ← preimage_interior, hs.interior_eq]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.70901
δ : Type ?u.70904
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
e : LocalHomeomorph α β
e' : LocalHomeomorph β γ
s : Set β
hs : IsOpen s
⊢ (LocalHomeomorph.trans e (ofSet s hs)).toLocalEquiv.source = (LocalHomeomorph.restr e (↑e ⁻¹' s)).toLocalEquiv.source
Theorem: Set.injective_iff_injective_of_iUnion_eq_univ
File: Mathlib/Data/Set/Lattice.lean

tactic: refine' ⟨fun H i => (U i).restrictPreimage_injective H, fun H x y e => _⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.185953
ι : Sort ?u.185956
ι' : Sort ?u.185959
ι₂ : Sort ?u.185962
κ : ι → Sort ?u.185967
κ₁ : ι → Sort ?u.185972
κ₂ : ι → Sort ?u.185977
κ' : ι' → Sort ?u.185982
s : Set β
f : α → β
U : ι → Set β
hU : iUnion U = univ
⊢ Injective f ↔ ∀ (i : ι), Injective (restrictPreimage (U i) f)

tactic: obtain ⟨i, hi⟩ := Set.mem_iUnion.mp
    (show f x ∈ Set.iUnion U by rw [hU]; triv)
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.185953
ι : Sort ?u.185956
ι' : Sort ?u.185959
ι₂ : Sort ?u.185962
κ : ι → Sort ?u.185967
κ₁ : ι → Sort ?u.185972
κ₂ : ι → Sort ?u.185977
κ' : ι' → Sort ?u.185982
s : Set β
f : α → β
U : ι → Set β
hU : iUnion U = univ
H : ∀ (i : ι), Injective (restrictPreimage (U i) f)
x y : α
e : f x = f y
⊢ x = y

tactic: injection @H i ⟨x, hi⟩ ⟨y, show f y ∈ U i from e ▸ hi⟩ (Subtype.ext e)
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.185953
ι : Sort ?u.185956
ι' : Sort ?u.185959
ι₂ : Sort ?u.185962
κ : ι → Sort ?u.185967
κ₁ : ι → Sort ?u.185972
κ₂ : ι → Sort ?u.185977
κ' : ι' → Sort ?u.185982
s : Set β
f : α → β
U : ι → Set β
hU : iUnion U = univ
H : ∀ (i : ι), Injective (restrictPreimage (U i) f)
x y : α
e : f x = f y
i : ι
hi : f x ∈ U i
⊢ x = y

tactic: rw [hU]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.185953
ι : Sort ?u.185956
ι' : Sort ?u.185959
ι₂ : Sort ?u.185962
κ : ι → Sort ?u.185967
κ₁ : ι → Sort ?u.185972
κ₂ : ι → Sort ?u.185977
κ' : ι' → Sort ?u.185982
s : Set β
f : α → β
U : ι → Set β
hU : iUnion U = univ
H : ∀ (i : ι), Injective (restrictPreimage (U i) f)
x y : α
e : f x = f y
⊢ f x ∈ iUnion U

tactic: triv
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.185953
ι : Sort ?u.185956
ι' : Sort ?u.185959
ι₂ : Sort ?u.185962
κ : ι → Sort ?u.185967
κ₁ : ι → Sort ?u.185972
κ₂ : ι → Sort ?u.185977
κ' : ι' → Sort ?u.185982
s : Set β
f : α → β
U : ι → Set β
hU : iUnion U = univ
H : ∀ (i : ι), Injective (restrictPreimage (U i) f)
x y : α
e : f x = f y
⊢ f x ∈ univ
Theorem: iUnion_Icc_zsmul
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: simpa only [zero_add] using iUnion_Icc_add_zsmul hp 0
state_before: α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
p : α
hp : 0 < p
a : α
⊢ (⋃ (n : ℤ), Icc (n • p) ((n + 1) • p)) = univ
Theorem: Filter.EventuallyEq.hasStrictFDerivAt_iff
File: Mathlib/Analysis/Calculus/FDeriv/Basic.lean

tactic: refine' isLittleO_congr ((h.prod_mk_nhds h).mono _) (eventually_of_forall fun _ => _root_.rfl)
state_before: 𝕜 : Type u_3
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_1
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_2
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type ?u.467335
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.467430
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 : f₀ =ᶠ[𝓝 x] f₁
h' : ∀ (y : E), ↑f₀' y = ↑f₁' y
⊢ HasStrictFDerivAt f₀ f₀' x ↔ HasStrictFDerivAt f₁ f₁' x

tactic: rintro p ⟨hp₁, hp₂⟩
state_before: 𝕜 : Type u_3
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_1
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_2
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type ?u.467335
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.467430
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 : f₀ =ᶠ[𝓝 x] f₁
h' : ∀ (y : E), ↑f₀' y = ↑f₁' y
⊢ ∀ (x : E × E),
    f₀ x.fst = f₁ x.fst ∧ f₀ x.snd = f₁ x.snd →
      (fun p => f₀ p.fst - f₀ p.snd - ↑f₀' (p.fst - p.snd)) x = (fun p => f₁ p.fst - f₁ p.snd - ↑f₁' (p.fst - p.snd)) x

tactic: simp only [*]
state_before: case intro
𝕜 : Type u_3
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_1
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_2
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type ?u.467335
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.467430
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 : f₀ =ᶠ[𝓝 x] f₁
h' : ∀ (y : E), ↑f₀' y = ↑f₁' y
p : E × E
hp₁ : f₀ p.fst = f₁ p.fst
hp₂ : f₀ p.snd = f₁ p.snd
⊢ (fun p => f₀ p.fst - f₀ p.snd - ↑f₀' (p.fst - p.snd)) p = (fun p => f₁ p.fst - f₁ p.snd - ↑f₁' (p.fst - p.snd)) p
Theorem: Finite.exists_infinite_fiber
File: Mathlib/Data/Fintype/Card.lean

tactic: classical
  by_contra' hf
  cases nonempty_fintype β
  haveI := fun y => fintypeOfNotInfinite <| hf y
  let key : Fintype α :=
    { elems := univ.biUnion fun y : β => (f ⁻¹' {y}).toFinset
      complete := by simp }
  exact key.false
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.83632
inst✝¹ : Infinite α
inst✝ : Finite β
f : α → β
⊢ ∃ y, Infinite ↑(f ⁻¹' {y})

tactic: by_contra' hf
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.83632
inst✝¹ : Infinite α
inst✝ : Finite β
f : α → β
⊢ ∃ y, Infinite ↑(f ⁻¹' {y})

tactic: cases nonempty_fintype β
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.83632
inst✝¹ : Infinite α
inst✝ : Finite β
f : α → β
hf : ∀ (y : β), ¬Infinite ↑(f ⁻¹' {y})
⊢ False

tactic: haveI := fun y => fintypeOfNotInfinite <| hf y
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.83632
inst✝¹ : Infinite α
inst✝ : Finite β
f : α → β
hf : ∀ (y : β), ¬Infinite ↑(f ⁻¹' {y})
val✝ : Fintype β
⊢ False

tactic: let key : Fintype α :=
  { elems := univ.biUnion fun y : β => (f ⁻¹' {y}).toFinset
    complete := by simp }
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.83632
inst✝¹ : Infinite α
inst✝ : Finite β
f : α → β
hf : ∀ (y : β), ¬Infinite ↑(f ⁻¹' {y})
val✝ : Fintype β
this : (y : β) → Fintype ↑(f ⁻¹' {y})
⊢ False

tactic: exact key.false
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.83632
inst✝¹ : Infinite α
inst✝ : Finite β
f : α → β
hf : ∀ (y : β), ¬Infinite ↑(f ⁻¹' {y})
val✝ : Fintype β
this : (y : β) → Fintype ↑(f ⁻¹' {y})
key : Fintype α :=
  { elems := Finset.biUnion univ fun y => Set.toFinset (f ⁻¹' {y}),
    complete := (_ : ∀ (a : α), a ∈ Finset.biUnion univ fun y => Set.toFinset (f ⁻¹' {y})) }
⊢ False

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.83632
inst✝¹ : Infinite α
inst✝ : Finite β
f : α → β
hf : ∀ (y : β), ¬Infinite ↑(f ⁻¹' {y})
val✝ : Fintype β
this : (y : β) → Fintype ↑(f ⁻¹' {y})
⊢ ∀ (x : α), x ∈ Finset.biUnion univ fun y => Set.toFinset (f ⁻¹' {y})
Theorem: Substring.Valid.prevn
File: Std/Data/String/Lemmas.lean

tactic: let ⟨l, m, r, h⟩ := h.validFor
state_before: m₂ m₁ : List Char
x✝ : Substring
h : Valid x✝
e : (toString x✝).data = List.reverse m₁ ++ m₂
⊢ ∀ (n : Nat), Substring.prevn x✝ n { byteIdx := utf8Len m₁ } = { byteIdx := utf8Len (List.drop n m₁) }

tactic: simp [h.toString] at e
state_before: m₂ m₁ : List Char
x✝ : Substring
h✝ : Valid x✝
e : (toString x✝).data = List.reverse m₁ ++ m₂
l m r : List Char
h : ValidFor l m r x✝
⊢ ∀ (n : Nat), Substring.prevn x✝ n { byteIdx := utf8Len m₁ } = { byteIdx := utf8Len (List.drop n m₁) }

tactic: subst e
state_before: m₂ m₁ : List Char
x✝ : Substring
h✝ : Valid x✝
l m r : List Char
h : ValidFor l m r x✝
e : m = List.reverse m₁ ++ m₂
⊢ ∀ (n : Nat), Substring.prevn x✝ n { byteIdx := utf8Len m₁ } = { byteIdx := utf8Len (List.drop n m₁) }

tactic: simp [h.prevn]
state_before: m₂ m₁ : List Char
x✝ : Substring
h✝ : Valid x✝
l r : List Char
h : ValidFor l (List.reverse m₁ ++ m₂) r x✝
⊢ ∀ (n : Nat), Substring.prevn x✝ n { byteIdx := utf8Len m₁ } = { byteIdx := utf8Len (List.drop n m₁) }
Theorem: AlgebraicTopology.DoldKan.N₂Γ₂_toKaroubi
File: Mathlib/AlgebraicTopology/DoldKan/GammaCompN.lean

tactic: have h := Functor.congr_obj (functorExtension₂_comp_whiskeringLeft_toKaroubi
  (ChainComplex C ℕ) (SimplicialObject C)) Γ₀
state_before: C : Type u_1
inst✝² : Category C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
⊢ toKaroubi (ChainComplex C ℕ) ⋙ Γ₂ ⋙ N₂ = Γ₀ ⋙ N₁

tactic: have h' := Functor.congr_obj (functorExtension₁_comp_whiskeringLeft_toKaroubi
  (SimplicialObject C) (ChainComplex C ℕ)) N₁
state_before: C : Type u_1
inst✝² : Category C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
h :
  (functorExtension₂ (ChainComplex C ℕ) (SimplicialObject C) ⋙
          (whiskeringLeft (ChainComplex C ℕ) (Karoubi (ChainComplex C ℕ)) (Karoubi (SimplicialObject C))).obj
            (toKaroubi (ChainComplex C ℕ))).obj
      Γ₀ =
    ((whiskeringRight (ChainComplex C ℕ) (SimplicialObject C) (Karoubi (SimplicialObject C))).obj
          (toKaroubi (SimplicialObject C))).obj
      Γ₀
⊢ toKaroubi (ChainComplex C ℕ) ⋙ Γ₂ ⋙ N₂ = Γ₀ ⋙ N₁

tactic: dsimp [N₂, Γ₂, functorExtension₁] at h h' ⊢
state_before: C : Type u_1
inst✝² : Category C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
h :
  (functorExtension₂ (ChainComplex C ℕ) (SimplicialObject C) ⋙
          (whiskeringLeft (ChainComplex C ℕ) (Karoubi (ChainComplex C ℕ)) (Karoubi (SimplicialObject C))).obj
            (toKaroubi (ChainComplex C ℕ))).obj
      Γ₀ =
    ((whiskeringRight (ChainComplex C ℕ) (SimplicialObject C) (Karoubi (SimplicialObject C))).obj
          (toKaroubi (SimplicialObject C))).obj
      Γ₀
h' :
  (functorExtension₁ (SimplicialObject C) (ChainComplex C ℕ) ⋙
          (whiskeringLeft (SimplicialObject C) (Karoubi (SimplicialObject C)) (Karoubi (ChainComplex C ℕ))).obj
            (toKaroubi (SimplicialObject C))).obj
      N₁ =
    (𝟭 (SimplicialObject C ⥤ Karoubi (ChainComplex C ℕ))).obj N₁
⊢ toKaroubi (ChainComplex C ℕ) ⋙ Γ₂ ⋙ N₂ = Γ₀ ⋙ N₁

tactic: rw [← Functor.assoc, h, Functor.assoc, h']
state_before: C : Type u_1
inst✝² : Category C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
h :
  toKaroubi (ChainComplex C ℕ) ⋙ (functorExtension₂ (ChainComplex C ℕ) (SimplicialObject C)).obj Γ₀ =
    Γ₀ ⋙ toKaroubi (SimplicialObject C)
h' : toKaroubi (SimplicialObject C) ⋙ FunctorExtension₁.obj N₁ = N₁
⊢ toKaroubi (ChainComplex C ℕ) ⋙
      (functorExtension₂ (ChainComplex C ℕ) (SimplicialObject C)).obj Γ₀ ⋙ FunctorExtension₁.obj N₁ =
    Γ₀ ⋙ N₁
Theorem: Cardinal.aleph_zero
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: rw [aleph, add_zero, aleph'_omega]
state_before: ⊢ aleph 0 = ℵ₀
Theorem: Option.map_map₂_right_anticomm
File: Mathlib/Data/Option/NAry.lean

tactic: cases a <;> cases b <;> simp [h_right_anticomm]
state_before: α : Type u_4
β : Type u_5
γ : Type u_3
f✝ : α → β → γ
a : Option α
b : Option β
c : Option γ
β' : Type u_1
δ : Type u_2
f : α → β' → γ
g : β → β'
f' : β → α → δ
g' : δ → γ
h_right_anticomm : ∀ (a : α) (b : β), f a (g b) = g' (f' b a)
⊢ map₂ f a (Option.map g b) = Option.map g' (map₂ f' b a)
Theorem: WittVector.zero_coeff
File: Mathlib/RingTheory/WittVector/Defs.lean

tactic: simp only [wittZero_eq_zero, AlgHom.map_zero]
state_before: p : ℕ
R : Type u_1
hp : Fact (Nat.Prime p)
inst✝ : CommRing R
n : ℕ
⊢ ↑(aeval (Function.uncurry fun i => ![].coeff)) (wittZero p n) = 0
Theorem: min_mul_distrib'
File: Mathlib/Algebra/Order/Monoid/Canonical/Defs.lean

tactic: simpa [min_comm _ c] using min_mul_distrib c a b
state_before: α : Type u
inst✝ : CanonicallyLinearOrderedMonoid α
a b c : α
⊢ min (a * b) c = min (min a c * min b c) c
Theorem: Std.HashMap.Imp.Bucket.exists_of_update
File: Std/Data/HashMap/WF.lean

tactic: simp [Array.getElem_eq_data_get]
state_before: α : Type u_1
β : Type u_2
self : Bucket α β
i : USize
d : AssocList α β
h : USize.toNat i < Array.size self.val
⊢ ∃ l₁ l₂,
    self.val.data = l₁ ++ self.val[i] :: l₂ ∧
      List.length l₁ = USize.toNat i ∧ (update self i d h).val.data = l₁ ++ d :: l₂

tactic: exact List.exists_of_set' h
state_before: α : Type u_1
β : Type u_2
self : Bucket α β
i : USize
d : AssocList α β
h : USize.toNat i < Array.size self.val
⊢ ∃ l₁ l₂,
    self.val.data = l₁ ++ List.get self.val.data { val := USize.toNat i, isLt := h } :: l₂ ∧
      List.length l₁ = USize.toNat i ∧ (update self i d h).val.data = l₁ ++ d :: l₂
Theorem: Nat.Prime.divisors
File: Mathlib/NumberTheory/Divisors.lean

tactic: ext
state_before: n p : ℕ
pp : Prime p
⊢ Nat.divisors p = {1, p}

tactic: rw [mem_divisors, dvd_prime pp, and_iff_left pp.ne_zero, Finset.mem_insert, Finset.mem_singleton]
state_before: case a
n p : ℕ
pp : Prime p
a✝ : ℕ
⊢ a✝ ∈ Nat.divisors p ↔ a✝ ∈ {1, p}
Theorem: Bool.not_not
File: src/lean/Init/SimpLemmas.lean

tactic: cases b <;> rfl
state_before: b : Bool
⊢ (!!b) = b
Theorem: HasDerivWithinAt.div
File: Mathlib/Analysis/Calculus/Deriv/Inv.lean

tactic: convert hc.mul ((hasDerivAt_inv hx).comp_hasDerivWithinAt x hd) using 1
state_before: 𝕜 : Type u
inst✝⁶ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
E : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L : Filter 𝕜
𝕜' : Type u_1
inst✝¹ : NontriviallyNormedField 𝕜'
inst✝ : NormedAlgebra 𝕜 𝕜'
c d : 𝕜 → 𝕜'
c' d' : 𝕜'
hc : HasDerivWithinAt c c' s x
hd : HasDerivWithinAt d d' s x
hx : d x ≠ 0
⊢ HasDerivWithinAt (fun y => c y / d y) ((c' * d x - c x * d') / d x ^ 2) s x

tactic: field_simp
state_before: case h.e'_7
𝕜 : Type u
inst✝⁶ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
E : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L : Filter 𝕜
𝕜' : Type u_1
inst✝¹ : NontriviallyNormedField 𝕜'
inst✝ : NormedAlgebra 𝕜 𝕜'
c d : 𝕜 → 𝕜'
c' d' : 𝕜'
hc : HasDerivWithinAt c c' s x
hd : HasDerivWithinAt d d' s x
hx : d x ≠ 0
⊢ (c' * d x - c x * d') / d x ^ 2 = c' * ((fun y => y⁻¹) ∘ d) x + c x * (-(d x ^ 2)⁻¹ * d')

tactic: ring
state_before: case h.e'_7
𝕜 : Type u
inst✝⁶ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
E : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L : Filter 𝕜
𝕜' : Type u_1
inst✝¹ : NontriviallyNormedField 𝕜'
inst✝ : NormedAlgebra 𝕜 𝕜'
c d : 𝕜 → 𝕜'
c' d' : 𝕜'
hc : HasDerivWithinAt c c' s x
hd : HasDerivWithinAt d d' s x
hx : d x ≠ 0
⊢ (c' * d x - c x * d') * (d x * d x ^ 2) = (c' * d x ^ 2 + -(c x * d' * d x)) * d x ^ 2
Theorem: Int.gcd_a_modEq
File: Mathlib/Data/Int/ModEq.lean

tactic: rw [← add_zero ((a : ℤ) * _), Nat.gcd_eq_gcd_ab]
state_before: m n a✝ b✝ c d : ℤ
a b : ℕ
⊢ ↑a * Nat.gcdA a b ≡ ↑(Nat.gcd a b) [ZMOD ↑b]

tactic: exact (dvd_mul_right _ _).zero_modEq_int.add_left _
state_before: m n a✝ b✝ c d : ℤ
a b : ℕ
⊢ ↑a * Nat.gcdA a b + 0 ≡ ↑a * Nat.gcdA a b + ↑b * Nat.gcdB a b [ZMOD ↑b]
Theorem: infEdist_smul₀
File: Mathlib/Analysis/NormedSpace/Pointwise.lean

tactic: simp_rw [EMetric.infEdist]
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedDivisionRing 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
c : 𝕜
hc : c ≠ 0
s : Set E
x : E
⊢ EMetric.infEdist (c • x) (c • s) = ‖c‖₊ • EMetric.infEdist x s

tactic: trans ⨅ (y) (_ : y ∈ s), ‖c‖₊ • edist x y
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedDivisionRing 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
c : 𝕜
hc : c ≠ 0
s : Set E
x : E
this : Function.Surjective fun x => c • x
⊢ (⨅ (y : E) (_ : y ∈ c • s), edist (c • x) y) = ‖c‖₊ • ⨅ (y : E) (_ : y ∈ s), edist x y

tactic: refine' (this.iInf_congr _ fun y => _).symm
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedDivisionRing 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
c : 𝕜
hc : c ≠ 0
s : Set E
x : E
this : Function.Surjective fun x => c • x
⊢ (⨅ (y : E) (_ : y ∈ c • s), edist (c • x) y) = ⨅ (y : E) (_ : y ∈ s), ‖c‖₊ • edist x y

tactic: simp_rw [smul_mem_smul_set_iff₀ hc, edist_smul₀]
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedDivisionRing 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
c : 𝕜
hc : c ≠ 0
s : Set E
x : E
this : Function.Surjective fun x => c • x
y : E
⊢ (⨅ (_ : c • y ∈ c • s), edist (c • x) (c • y)) = ⨅ (_ : y ∈ s), ‖c‖₊ • edist x y

tactic: have : (‖c‖₊ : ENNReal) ≠ 0 := by simp [hc]
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedDivisionRing 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
c : 𝕜
hc : c ≠ 0
s : Set E
x : E
this : Function.Surjective fun x => c • x
⊢ (⨅ (y : E) (_ : y ∈ s), ‖c‖₊ • edist x y) = ‖c‖₊ • ⨅ (y : E) (_ : y ∈ s), edist x y

tactic: simp_rw [ENNReal.smul_def, smul_eq_mul, ENNReal.mul_iInf_of_ne this ENNReal.coe_ne_top]
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedDivisionRing 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
c : 𝕜
hc : c ≠ 0
s : Set E
x : E
this✝ : Function.Surjective fun x => c • x
this : ↑‖c‖₊ ≠ 0
⊢ (⨅ (y : E) (_ : y ∈ s), ‖c‖₊ • edist x y) = ‖c‖₊ • ⨅ (y : E) (_ : y ∈ s), edist x y

tactic: simp [hc]
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedDivisionRing 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
c : 𝕜
hc : c ≠ 0
s : Set E
x : E
this : Function.Surjective fun x => c • x
⊢ ↑‖c‖₊ ≠ 0
Theorem: TensorProduct.ext
File: Mathlib/LinearAlgebra/TensorProduct.lean

tactic: rw [← lift_mk_compr₂ g, H, lift_mk_compr₂]
state_before: R : Type u_1
inst✝¹⁴ : CommSemiring R
R' : Type ?u.625961
inst✝¹³ : Monoid R'
R'' : Type ?u.625967
inst✝¹² : Semiring R''
M : Type u_3
N : Type u_2
P : Type u_4
Q : Type ?u.625982
S : Type ?u.625985
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid N
inst✝⁹ : AddCommMonoid P
inst✝⁸ : AddCommMonoid Q
inst✝⁷ : AddCommMonoid S
inst✝⁶ : Module R M
inst✝⁵ : Module R N
inst✝⁴ : Module R P
inst✝³ : Module R Q
inst✝² : Module R S
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
f : M →ₗ[R] N →ₗ[R] P
g h : M ⊗[R] N →ₗ[R] P
H : LinearMap.compr₂ (mk R M N) g = LinearMap.compr₂ (mk R M N) h
⊢ g = h
Theorem: RestrictScalars.addEquiv_symm_map_smul_smul
File: Mathlib/Algebra/Algebra/RestrictScalars.lean

tactic: rw [Algebra.smul_def, mul_smul]
state_before: R : Type u_2
S : Type u_3
M : Type u_1
A : Type ?u.72538
inst✝⁴ : AddCommMonoid M
inst✝³ : CommSemiring R
inst✝² : Semiring S
inst✝¹ : Algebra R S
inst✝ : Module S M
r : R
s : S
x : M
⊢ ↑(AddEquiv.symm (addEquiv R S M)) ((r • s) • x) = r • ↑(AddEquiv.symm (addEquiv R S M)) (s • x)

tactic: rfl
state_before: R : Type u_2
S : Type u_3
M : Type u_1
A : Type ?u.72538
inst✝⁴ : AddCommMonoid M
inst✝³ : CommSemiring R
inst✝² : Semiring S
inst✝¹ : Algebra R S
inst✝ : Module S M
r : R
s : S
x : M
⊢ ↑(AddEquiv.symm (addEquiv R S M)) (↑(algebraMap R S) r • s • x) = r • ↑(AddEquiv.symm (addEquiv R S M)) (s • x)
Theorem: Dfinsupp.sumAddHom_comm
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: obtain ⟨⟨f₁, s₁, h₁⟩, ⟨f₂, s₂, h₂⟩⟩ := f₁, f₂
state_before: ι : Type u
γ✝ : Type w
β : ι → Type v
β₁✝ : ι → Type v₁
β₂✝ : ι → Type v₂
dec : DecidableEq ι
ι₁ : Type u_1
ι₂ : Type u_2
β₁ : ι₁ → Type u_3
β₂ : ι₂ → Type u_4
γ : Type u_5
inst✝⁴ : DecidableEq ι₁
inst✝³ : DecidableEq ι₂
inst✝² : (i : ι₁) → AddZeroClass (β₁ i)
inst✝¹ : (i : ι₂) → AddZeroClass (β₂ i)
inst✝ : AddCommMonoid γ
f₁ : Π₀ (i : ι₁), β₁ i
f₂ : Π₀ (i : ι₂), β₂ i
h : (i : ι₁) → (j : ι₂) → β₁ i →+ β₂ j →+ γ
⊢ ↑(sumAddHom fun i₂ => ↑(sumAddHom fun i₁ => h i₁ i₂) f₁) f₂ =
    ↑(sumAddHom fun i₁ => ↑(sumAddHom fun i₂ => AddMonoidHom.flip (h i₁ i₂)) f₂) f₁

tactic: simp only [sumAddHom, AddMonoidHom.finset_sum_apply, Quotient.liftOn_mk, AddMonoidHom.coe_mk,
  AddMonoidHom.flip_apply, Trunc.lift, toFun_eq_coe, ZeroHom.coe_mk, coe_mk']
state_before: case mk'.mk.mk.mk'.mk.mk
ι : Type u
γ✝ : Type w
β : ι → Type v
β₁✝ : ι → Type v₁
β₂✝ : ι → Type v₂
dec : DecidableEq ι
ι₁ : Type u_1
ι₂ : Type u_2
β₁ : ι₁ → Type u_3
β₂ : ι₂ → Type u_4
γ : Type u_5
inst✝⁴ : DecidableEq ι₁
inst✝³ : DecidableEq ι₂
inst✝² : (i : ι₁) → AddZeroClass (β₁ i)
inst✝¹ : (i : ι₂) → AddZeroClass (β₂ i)
inst✝ : AddCommMonoid γ
h : (i : ι₁) → (j : ι₂) → β₁ i →+ β₂ j →+ γ
f₁ : (i : ι₁) → β₁ i
support'✝¹ : Trunc { s // ∀ (i : ι₁), i ∈ s ∨ f₁ i = 0 }
s₁ : Multiset ι₁
h₁ : ∀ (i : ι₁), i ∈ s₁ ∨ f₁ i = 0
f₂ : (i : ι₂) → β₂ i
support'✝ : Trunc { s // ∀ (i : ι₂), i ∈ s ∨ f₂ i = 0 }
s₂ : Multiset ι₂
h₂ : ∀ (i : ι₂), i ∈ s₂ ∨ f₂ i = 0
⊢ ↑(sumAddHom fun i₂ =>
          ↑(sumAddHom fun i₁ => h i₁ i₂) { toFun := f₁, support' := Quot.mk Setoid.r { val := s₁, property := h₁ } })
      { toFun := f₂, support' := Quot.mk Setoid.r { val := s₂, property := h₂ } } =
    ↑(sumAddHom fun i₁ =>
          ↑(sumAddHom fun i₂ => AddMonoidHom.flip (h i₁ i₂))
            { toFun := f₂, support' := Quot.mk Setoid.r { val := s₂, property := h₂ } })
      { toFun := f₁, support' := Quot.mk Setoid.r { val := s₁, property := h₁ } }

tactic: exact Finset.sum_comm
state_before: case mk'.mk.mk.mk'.mk.mk
ι : Type u
γ✝ : Type w
β : ι → Type v
β₁✝ : ι → Type v₁
β₂✝ : ι → Type v₂
dec : DecidableEq ι
ι₁ : Type u_1
ι₂ : Type u_2
β₁ : ι₁ → Type u_3
β₂ : ι₂ → Type u_4
γ : Type u_5
inst✝⁴ : DecidableEq ι₁
inst✝³ : DecidableEq ι₂
inst✝² : (i : ι₁) → AddZeroClass (β₁ i)
inst✝¹ : (i : ι₂) → AddZeroClass (β₂ i)
inst✝ : AddCommMonoid γ
h : (i : ι₁) → (j : ι₂) → β₁ i →+ β₂ j →+ γ
f₁ : (i : ι₁) → β₁ i
support'✝¹ : Trunc { s // ∀ (i : ι₁), i ∈ s ∨ f₁ i = 0 }
s₁ : Multiset ι₁
h₁ : ∀ (i : ι₁), i ∈ s₁ ∨ f₁ i = 0
f₂ : (i : ι₂) → β₂ i
support'✝ : Trunc { s // ∀ (i : ι₂), i ∈ s ∨ f₂ i = 0 }
s₂ : Multiset ι₂
h₂ : ∀ (i : ι₂), i ∈ s₂ ∨ f₂ i = 0
⊢ ∑ x in Multiset.toFinset s₂, ∑ x_1 in Multiset.toFinset s₁, ↑(↑(h x_1 x) (f₁ x_1)) (f₂ x) =
    ∑ x in Multiset.toFinset s₁, ∑ x_1 in Multiset.toFinset s₂, ↑(↑(h x x_1) (f₁ x)) (f₂ x_1)
Theorem: String.find_of_valid
File: Std/Data/String/Lemmas.lean

tactic: simpa using findAux_of_valid p [] s.1 []
state_before: p : Char → Bool
s : String
⊢ find s p = { byteIdx := utf8Len (List.takeWhile (fun x => !p x) s.data) }
Theorem: finRotate_last'
File: Mathlib/Logic/Equiv/Fin.lean

tactic: dsimp [finRotate_succ]
state_before: m n : ℕ
⊢ ↑(finRotate (n + 1)) { val := n, isLt := (_ : n < n + 1) } = { val := 0, isLt := (_ : 0 < Nat.succ n) }

tactic: rw [finAddFlip_apply_mk_right le_rfl]
state_before: m n : ℕ
⊢ ↑(finCongr (_ : 1 + n = n + 1)) (↑finAddFlip { val := n, isLt := (_ : n < n + 1) }) = 0

tactic: simp
state_before: m n : ℕ
⊢ ↑(finCongr (_ : 1 + n = n + 1)) { val := n - n, isLt := (_ : n - n < 1 + n) } = 0
Theorem: MeasureTheory.Measure.measure_inv
File: Mathlib/MeasureTheory/Group/Measure.lean

tactic: rw [← inv_apply, inv_eq_self]
state_before: 𝕜 : Type ?u.499171
G : Type u_1
H : Type ?u.499177
inst✝⁴ : MeasurableSpace G
inst✝³ : MeasurableSpace H
inst✝² : InvolutiveInv G
inst✝¹ : MeasurableInv G
μ : Measure G
inst✝ : IsInvInvariant μ
A : Set G
⊢ ↑↑μ A⁻¹ = ↑↑μ A
Theorem: Cardinal.natCast_pow
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: induction n <;> simp [pow_succ', power_add, *, Pow.pow]
state_before: α β : Type u
m n : ℕ
⊢ ↑(m ^ n) = ↑m ^ ↑n