tasksource/leandojo huggingface dataset:
Theorem: Nat.le_sub_of_add_le
File: src/lean/Init/Data/Nat/Basic.lean

tactic: match le.dest h with
| ⟨d, hd⟩ =>
  apply @le.intro _ _ d
  have hd : a + d + b = c := by simp [← hd, Nat.add_comm, Nat.add_assoc, Nat.add_left_comm]
  have hd := Nat.sub_eq_of_eq_add hd.symm
  exact hd.symm
state_before: a b c : Nat
h : a + b ≤ c
⊢ a ≤ c - b

tactic: apply @le.intro _ _ d
state_before: a b c : Nat
h : a + b ≤ c
d : Nat
hd : a + b + d = c
⊢ a ≤ c - b

tactic: have hd : a + d + b = c := by simp [← hd, Nat.add_comm, Nat.add_assoc, Nat.add_left_comm]
state_before: a b c : Nat
h : a + b ≤ c
d : Nat
hd : a + b + d = c
⊢ a + d = c - b

tactic: have hd := Nat.sub_eq_of_eq_add hd.symm
state_before: a b c : Nat
h : a + b ≤ c
d : Nat
hd✝ : a + b + d = c
hd : a + d + b = c
⊢ a + d = c - b

tactic: exact hd.symm
state_before: a b c : Nat
h : a + b ≤ c
d : Nat
hd✝¹ : a + b + d = c
hd✝ : a + d + b = c
hd : c - b = a + d
⊢ a + d = c - b

tactic: simp [← hd, Nat.add_comm, Nat.add_assoc, Nat.add_left_comm]
state_before: a b c : Nat
h : a + b ≤ c
d : Nat
hd : a + b + d = c
⊢ a + d + b = c
Theorem: List.map₂Right_eq_map₂Right'
File: Mathlib/Data/List/Basic.lean

tactic: simp only [map₂Right, map₂Right', map₂Left_eq_map₂Left']
state_before: ι : Type ?u.475857
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : Option α → β → γ
a : α
as : List α
b : β
bs : List β
⊢ map₂Right f as bs = (map₂Right' f as bs).fst
Theorem: tendstoLocallyUniformly_iff_forall_tendsto
File: Mathlib/Topology/UniformSpace/UniformConvergence.lean

tactic: simp [← tendstoLocallyUniformlyOn_univ, isOpen_univ.tendstoLocallyUniformlyOn_iff_forall_tendsto]
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝¹ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
inst✝ : TopologicalSpace α
⊢ TendstoLocallyUniformly F f p ↔ ∀ (x : α), Tendsto (fun y => (f y.snd, F y.fst y.snd)) (p ×ˢ 𝓝 x) (𝓤 β)
Theorem: Representation.ofModule_asModule_act
File: Mathlib/RepresentationTheory/Basic.lean

tactic: apply_fun RestrictScalars.addEquiv _ _ ρ.asModule using
  (RestrictScalars.addEquiv _ _ ρ.asModule).injective
state_before: k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
ρ : Representation k G V
M : Type ?u.351323
inst✝¹ : AddCommMonoid M
inst✝ : Module (MonoidAlgebra k G) M
g : G
x : RestrictScalars k (MonoidAlgebra k G) (asModule ρ)
⊢ ↑(↑(ofModule (asModule ρ)) g) x =
    ↑(AddEquiv.symm
          (RestrictScalars.addEquiv k (MonoidAlgebra k G)
            ((fun x => asModule ρ)
              (↑(↑ρ g) (↑(asModuleEquiv ρ) (↑(RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)) x))))))
      (↑(AddEquiv.symm (asModuleEquiv ρ))
        (↑(↑ρ g) (↑(asModuleEquiv ρ) (↑(RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)) x))))

tactic: dsimp [ofModule, RestrictScalars.lsmul_apply_apply]
state_before: k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
ρ : Representation k G V
M : Type ?u.351323
inst✝¹ : AddCommMonoid M
inst✝ : Module (MonoidAlgebra k G) M
g : G
x : RestrictScalars k (MonoidAlgebra k G) (asModule ρ)
⊢ ↑(RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)) (↑(↑(ofModule (asModule ρ)) g) x) =
    ↑(RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ))
      (↑(AddEquiv.symm
            (RestrictScalars.addEquiv k (MonoidAlgebra k G)
              ((fun x => asModule ρ)
                (↑(↑ρ g) (↑(asModuleEquiv ρ) (↑(RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)) x))))))
        (↑(AddEquiv.symm (asModuleEquiv ρ))
          (↑(↑ρ g) (↑(asModuleEquiv ρ) (↑(RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)) x)))))

tactic: simp
state_before: k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
ρ : Representation k G V
M : Type ?u.351323
inst✝¹ : AddCommMonoid M
inst✝ : Module (MonoidAlgebra k G) M
g : G
x : RestrictScalars k (MonoidAlgebra k G) (asModule ρ)
⊢ ↑(RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ))
      (↑(AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)))
        (MonoidAlgebra.single g 1 • ↑(RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)) x)) =
    ↑(RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ))
      (↑(AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)))
        (↑(AddEquiv.symm (asModuleEquiv ρ))
          (↑(↑ρ g) (↑(asModuleEquiv ρ) (↑(RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)) x)))))
Theorem: Equiv.Perm.extendDomain_apply_subtype
File: Mathlib/Logic/Equiv/Basic.lean

tactic: simp [Perm.extendDomain, h]
state_before: α' : Type u_2
β' : Type u_1
e : Perm α'
p : β' → Prop
inst✝ : DecidablePred p
f : α' ≃ Subtype p
b : β'
h : p b
⊢ ↑(extendDomain e f) b = ↑(↑f (↑e (↑f.symm { val := b, property := h })))
Theorem: Real.tendsto_pow_mul_exp_neg_atTop_nhds_0
File: Mathlib/Analysis/SpecialFunctions/Exp.lean

tactic: rw [comp_apply, inv_eq_one_div, div_div_eq_mul_div, one_mul, div_eq_mul_inv, exp_neg]
state_before: α : Type ?u.32561
x✝ y z : ℝ
l : Filter α
n : ℕ
x : ℝ
⊢ ((fun r => r⁻¹) ∘ fun x => exp x / x ^ n) x = x ^ n * exp (-x)
Theorem: Rat.mk_eq_mkRat
File: Std/Data/Rat/Lemmas.lean

tactic: simp [mk_eq_normalize, normalize_eq_mkRat]
state_before: num : Int
den : Nat
nz : den ≠ 0
c : Nat.coprime (Int.natAbs num) den
⊢ mk' num den = mkRat num den
Theorem: Equiv.Perm.perm_inv_mapsTo_of_mapsTo
File: Mathlib/GroupTheory/Perm/Sign.lean

tactic: cases nonempty_fintype s
state_before: α : Type u
β : Type v
f : Perm α
s : Set α
inst✝ : Finite ↑s
h : Set.MapsTo (↑f) s s
⊢ Set.MapsTo (↑f⁻¹) s s

tactic: exact fun x hx =>
  Set.mem_toFinset.mp <|
    perm_inv_on_of_perm_on_finset
      (fun a ha => Set.mem_toFinset.mpr (h (Set.mem_toFinset.mp ha)))
      (Set.mem_toFinset.mpr hx)
state_before: case intro
α : Type u
β : Type v
f : Perm α
s : Set α
inst✝ : Finite ↑s
h : Set.MapsTo (↑f) s s
val✝ : Fintype ↑s
⊢ Set.MapsTo (↑f⁻¹) s s
Theorem: map_commutatorElement
File: Mathlib/GroupTheory/Commutator.lean

tactic: simp_rw [commutatorElement_def, map_mul f, map_inv f]
state_before: G : Type u_2
G' : Type u_1
F : Type u_3
inst✝² : Group G
inst✝¹ : Group G'
inst✝ : MonoidHomClass F G G'
f : F
g₁ g₂ g₃ g : G
⊢ ↑f ⁅g₁, g₂⁆ = ⁅↑f g₁, ↑f g₂⁆
Theorem: Finset.card_Iio_finset
File: Mathlib/Data/Finset/Interval.lean

tactic: rw [Iio_eq_ssubsets, ssubsets, card_erase_of_mem (mem_powerset_self _), card_powerset]
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
⊢ card (Iio s) = 2 ^ card s - 1
Theorem: CircleDeg1Lift.dist_map_zero_lt_of_semiconj
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

tactic: simp only [h.eq, Real.dist_eq, sub_sub, add_comm (f 0), sub_sub_eq_add_sub,
  abs_sub_comm (g₂ (f 0))]
state_before: f✝ g f g₁ g₂ : CircleDeg1Lift
h : Semiconj ↑f ↑g₁ ↑g₂
⊢ dist (↑g₁ 0) (↑f (↑g₁ 0) - ↑f 0) + dist (↑f (↑g₁ 0) - ↑f 0) (↑g₂ 0) =
    dist (↑f 0 + ↑g₁ 0) (↑f (↑g₁ 0)) + dist (↑g₂ 0 + ↑f 0) (↑g₂ (↑f 0))
Theorem: CategoryTheory.rightAdjointMate_comp
File: Mathlib/CategoryTheory/Monoidal/Rigid/Basic.lean

tactic: dsimp only [rightAdjointMate]
state_before: C : Type u₁
inst✝³ : Category C
inst✝² : MonoidalCategory C
X Y Z : C
inst✝¹ : HasRightDual X
inst✝ : HasRightDual Y
f : X ⟶ Y
g : Xᘁ ⟶ Z
⊢ fᘁ ≫ g = (ρ_ Yᘁ).inv ≫ (𝟙 Yᘁ ⊗ η_ X Xᘁ) ≫ (𝟙 Yᘁ ⊗ f ⊗ g) ≫ (α_ Yᘁ Y Z).inv ≫ (ε_ Y Yᘁ ⊗ 𝟙 Z) ≫ (λ_ Z).hom

tactic: rw [Category.assoc, Category.assoc, associator_inv_naturality_assoc,
  associator_inv_naturality_assoc, ← tensor_id_comp_id_tensor g, Category.assoc, Category.assoc,
  Category.assoc, Category.assoc, id_tensor_comp_tensor_id_assoc, ← leftUnitor_naturality,
  tensor_id_comp_id_tensor_assoc]
state_before: C : Type u₁
inst✝³ : Category C
inst✝² : MonoidalCategory C
X Y Z : C
inst✝¹ : HasRightDual X
inst✝ : HasRightDual Y
f : X ⟶ Y
g : Xᘁ ⟶ Z
⊢ ((ρ_ Yᘁ).inv ≫ (𝟙 Yᘁ ⊗ η_ X Xᘁ) ≫ (𝟙 Yᘁ ⊗ f ⊗ 𝟙 Xᘁ) ≫ (α_ Yᘁ Y Xᘁ).inv ≫ (ε_ Y Yᘁ ⊗ 𝟙 Xᘁ) ≫ (λ_ Xᘁ).hom) ≫ g =
    (ρ_ Yᘁ).inv ≫ (𝟙 Yᘁ ⊗ η_ X Xᘁ) ≫ (𝟙 Yᘁ ⊗ f ⊗ g) ≫ (α_ Yᘁ Y Z).inv ≫ (ε_ Y Yᘁ ⊗ 𝟙 Z) ≫ (λ_ Z).hom
Theorem: ProjectiveSpectrum.coe_vanishingIdeal
File: Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean

tactic: ext f
state_before: R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
t : Set (ProjectiveSpectrum 𝒜)
⊢ ↑(vanishingIdeal t) = {f | ∀ (x : ProjectiveSpectrum 𝒜), x ∈ t → f ∈ x.asHomogeneousIdeal}

tactic: rw [vanishingIdeal, SetLike.mem_coe, ← HomogeneousIdeal.mem_iff, HomogeneousIdeal.toIdeal_iInf,
  Submodule.mem_iInf]
state_before: case h
R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
t : Set (ProjectiveSpectrum 𝒜)
f : A
⊢ f ∈ ↑(vanishingIdeal t) ↔ f ∈ {f | ∀ (x : ProjectiveSpectrum 𝒜), x ∈ t → f ∈ x.asHomogeneousIdeal}

tactic: refine' forall_congr' fun x => _
state_before: case h
R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
t : Set (ProjectiveSpectrum 𝒜)
f : A
⊢ (∀ (i : ProjectiveSpectrum 𝒜), f ∈ HomogeneousIdeal.toIdeal (⨅ (_ : i ∈ t), i.asHomogeneousIdeal)) ↔
    f ∈ {f | ∀ (x : ProjectiveSpectrum 𝒜), x ∈ t → f ∈ x.asHomogeneousIdeal}

tactic: rw [HomogeneousIdeal.toIdeal_iInf, Submodule.mem_iInf, HomogeneousIdeal.mem_iff]
state_before: case h
R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
t : Set (ProjectiveSpectrum 𝒜)
f : A
x : ProjectiveSpectrum 𝒜
⊢ f ∈ HomogeneousIdeal.toIdeal (⨅ (_ : x ∈ t), x.asHomogeneousIdeal) ↔ x ∈ t → f ∈ x.asHomogeneousIdeal
Theorem: isCycle_finRotate
File: Mathlib/GroupTheory/Perm/Fin.lean

tactic: refine' ⟨0, by simp, fun x hx' => ⟨x, _⟩⟩
state_before: n : ℕ
⊢ IsCycle (finRotate (n + 2))

tactic: clear hx'
state_before: n : ℕ
x : Fin (n + 2)
hx' : ↑(finRotate (n + 2)) x ≠ x
⊢ ↑(finRotate (n + 2) ^ ↑↑x) 0 = x

tactic: cases' x with x hx
state_before: n : ℕ
x : Fin (n + 2)
⊢ ↑(finRotate (n + 2) ^ ↑↑x) 0 = x

tactic: rw [zpow_ofNat, Fin.ext_iff, Fin.val_mk]
state_before: case mk
n x : ℕ
hx : x < n + 2
⊢ ↑(finRotate (n + 2) ^ ↑↑{ val := x, isLt := hx }) 0 = { val := x, isLt := hx }

tactic: induction' x with x ih
state_before: case mk
n x : ℕ
hx : x < n + 2
⊢ ↑(↑(finRotate (n + 2) ^ ↑{ val := x, isLt := hx }) 0) = ↑{ val := x, isLt := hx }

tactic: rw [pow_succ, Perm.mul_apply, coe_finRotate_of_ne_last, ih (lt_trans x.lt_succ_self hx)]
state_before: case mk.succ
n x✝ : ℕ
hx✝ : x✝ < n + 2
x : ℕ
ih : ∀ (hx : x < n + 2), ↑(↑(finRotate (n + 2) ^ ↑{ val := x, isLt := hx }) 0) = ↑{ val := x, isLt := hx }
hx : Nat.succ x < n + 2
⊢ ↑(↑(finRotate (n + 2) ^ ↑{ val := Nat.succ x, isLt := hx }) 0) = ↑{ val := Nat.succ x, isLt := hx }

tactic: rw [Ne.def, Fin.ext_iff, ih (lt_trans x.lt_succ_self hx), Fin.val_last]
state_before: case mk.succ
n x✝ : ℕ
hx✝ : x✝ < n + 2
x : ℕ
ih : ∀ (hx : x < n + 2), ↑(↑(finRotate (n + 2) ^ ↑{ val := x, isLt := hx }) 0) = ↑{ val := x, isLt := hx }
hx : Nat.succ x < n + 2
⊢ ↑(finRotate (n + 2) ^ x) 0 ≠ Fin.last (n + 1)

tactic: exact ne_of_lt (Nat.lt_of_succ_lt_succ hx)
state_before: case mk.succ
n x✝ : ℕ
hx✝ : x✝ < n + 2
x : ℕ
ih : ∀ (hx : x < n + 2), ↑(↑(finRotate (n + 2) ^ ↑{ val := x, isLt := hx }) 0) = ↑{ val := x, isLt := hx }
hx : Nat.succ x < n + 2
⊢ ¬↑{ val := x, isLt := (_ : x < n + 2) } = n + 1

tactic: simp
state_before: n : ℕ
⊢ ↑(finRotate (n + 2)) 0 ≠ 0

tactic: rfl
state_before: case mk.zero
n x : ℕ
hx✝ : x < n + 2
hx : Nat.zero < n + 2
⊢ ↑(↑(finRotate (n + 2) ^ ↑{ val := Nat.zero, isLt := hx }) 0) = ↑{ val := Nat.zero, isLt := hx }
Theorem: LinearMap.disjoint_stdBasis_stdBasis
File: Mathlib/LinearAlgebra/StdBasis.lean

tactic: refine'
  Disjoint.mono (iSup_range_stdBasis_le_iInf_ker_proj _ _ _ _ <| disjoint_compl_right)
    (iSup_range_stdBasis_le_iInf_ker_proj _ _ _ _ <| disjoint_compl_right) _
state_before: R : Type u_3
ι : Type u_1
inst✝³ : Semiring R
φ : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (φ i)
inst✝¹ : (i : ι) → Module R (φ i)
inst✝ : DecidableEq ι
I J : Set ι
h : Disjoint I J
⊢ Disjoint (⨆ (i : ι) (_ : i ∈ I), range (stdBasis R φ i)) (⨆ (i : ι) (_ : i ∈ J), range (stdBasis R φ i))

tactic: simp only [disjoint_iff_inf_le, SetLike.le_def, mem_iInf, mem_inf, mem_ker, mem_bot, proj_apply,
  funext_iff]
state_before: R : Type u_3
ι : Type u_1
inst✝³ : Semiring R
φ : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (φ i)
inst✝¹ : (i : ι) → Module R (φ i)
inst✝ : DecidableEq ι
I J : Set ι
h : Disjoint I J
⊢ Disjoint (⨅ (i : ι) (_ : i ∈ Iᶜ), ker (proj i)) (⨅ (i : ι) (_ : i ∈ Jᶜ), ker (proj i))

tactic: rintro b ⟨hI, hJ⟩ i
state_before: R : Type u_3
ι : Type u_1
inst✝³ : Semiring R
φ : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (φ i)
inst✝¹ : (i : ι) → Module R (φ i)
inst✝ : DecidableEq ι
I J : Set ι
h : Disjoint I J
⊢ ∀ ⦃x : (i : ι) → φ i⦄,
    ((∀ (i : ι), i ∈ Iᶜ → x i = 0) ∧ ∀ (i : ι), i ∈ Jᶜ → x i = 0) → ∀ (a : ι), x a = OfNat.ofNat 0 a

tactic: by_cases hiI : i ∈ I
state_before: case intro
R : Type u_3
ι : Type u_1
inst✝³ : Semiring R
φ : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (φ i)
inst✝¹ : (i : ι) → Module R (φ i)
inst✝ : DecidableEq ι
I J : Set ι
h : Disjoint I J
b : (i : ι) → φ i
hI : ∀ (i : ι), i ∈ Iᶜ → b i = 0
hJ : ∀ (i : ι), i ∈ Jᶜ → b i = 0
i : ι
⊢ b i = OfNat.ofNat 0 i

tactic: by_cases hiJ : i ∈ J
state_before: case pos
R : Type u_3
ι : Type u_1
inst✝³ : Semiring R
φ : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (φ i)
inst✝¹ : (i : ι) → Module R (φ i)
inst✝ : DecidableEq ι
I J : Set ι
h : Disjoint I J
b : (i : ι) → φ i
hI : ∀ (i : ι), i ∈ Iᶜ → b i = 0
hJ : ∀ (i : ι), i ∈ Jᶜ → b i = 0
i : ι
hiI : i ∈ I
⊢ b i = OfNat.ofNat 0 i

tactic: exact (h.le_bot ⟨hiI, hiJ⟩).elim
state_before: case pos
R : Type u_3
ι : Type u_1
inst✝³ : Semiring R
φ : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (φ i)
inst✝¹ : (i : ι) → Module R (φ i)
inst✝ : DecidableEq ι
I J : Set ι
h : Disjoint I J
b : (i : ι) → φ i
hI : ∀ (i : ι), i ∈ Iᶜ → b i = 0
hJ : ∀ (i : ι), i ∈ Jᶜ → b i = 0
i : ι
hiI : i ∈ I
hiJ : i ∈ J
⊢ b i = OfNat.ofNat 0 i

tactic: exact hJ i hiJ
state_before: case neg
R : Type u_3
ι : Type u_1
inst✝³ : Semiring R
φ : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (φ i)
inst✝¹ : (i : ι) → Module R (φ i)
inst✝ : DecidableEq ι
I J : Set ι
h : Disjoint I J
b : (i : ι) → φ i
hI : ∀ (i : ι), i ∈ Iᶜ → b i = 0
hJ : ∀ (i : ι), i ∈ Jᶜ → b i = 0
i : ι
hiI : i ∈ I
hiJ : ¬i ∈ J
⊢ b i = OfNat.ofNat 0 i

tactic: exact hI i hiI
state_before: case neg
R : Type u_3
ι : Type u_1
inst✝³ : Semiring R
φ : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (φ i)
inst✝¹ : (i : ι) → Module R (φ i)
inst✝ : DecidableEq ι
I J : Set ι
h : Disjoint I J
b : (i : ι) → φ i
hI : ∀ (i : ι), i ∈ Iᶜ → b i = 0
hJ : ∀ (i : ι), i ∈ Jᶜ → b i = 0
i : ι
hiI : ¬i ∈ I
⊢ b i = OfNat.ofNat 0 i
Theorem: hammingDist_zero_left
File: Mathlib/InformationTheory/Hamming.lean

tactic: rw [hammingDist_comm, hammingDist_zero_right]
state_before: α : Type ?u.19245
ι : Type u_1
β : ι → Type u_2
inst✝⁴ : Fintype ι
inst✝³ : (i : ι) → DecidableEq (β i)
γ : ι → Type ?u.19277
inst✝² : (i : ι) → DecidableEq (γ i)
inst✝¹ : (i : ι) → Zero (β i)
inst✝ : (i : ι) → Zero (γ i)
x : (i : ι) → β i
⊢ hammingDist 0 x = hammingNorm x
Theorem: Real.Angle.abs_toReal_neg_coe_eq_self_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: refine' ⟨fun h => h ▸ ⟨abs_nonneg _, abs_toReal_le_pi _⟩, fun h => _⟩
state_before: θ : ℝ
⊢ abs (toReal (-↑θ)) = θ ↔ 0 ≤ θ ∧ θ ≤ π

tactic: by_cases hnegpi : θ = π
state_before: θ : ℝ
h : 0 ≤ θ ∧ θ ≤ π
⊢ abs (toReal (-↑θ)) = θ

tactic: rw [← coe_neg,
  toReal_coe_eq_self_iff.2
    ⟨neg_lt_neg (lt_of_le_of_ne h.2 hnegpi), (neg_nonpos.2 h.1).trans Real.pi_pos.le⟩,
  abs_neg, abs_eq_self.2 h.1]
state_before: case neg
θ : ℝ
h : 0 ≤ θ ∧ θ ≤ π
hnegpi : ¬θ = π
⊢ abs (toReal (-↑θ)) = θ

tactic: simp [hnegpi, Real.pi_pos.le]
state_before: case pos
θ : ℝ
h : 0 ≤ θ ∧ θ ≤ π
hnegpi : θ = π
⊢ abs (toReal (-↑θ)) = θ
Theorem: List.range_loop_range'
File: Std/Data/List/Lemmas.lean

tactic: rw [← Nat.add_assoc, Nat.add_right_comm n s 1]
state_before: s n : Nat
⊢ range.loop (s + 1) (range' (s + 1) n) = range' 0 (n + (s + 1))

tactic: exact range_loop_range' s (n + 1)
state_before: s n : Nat
⊢ range.loop (s + 1) (range' (s + 1) n) = range' 0 (n + 1 + s)
Theorem: Set.mulIndicator_apply_eq_self
File: Mathlib/Algebra/IndicatorFunction.lean

tactic: rw [@eq_comm _ (f a)]
state_before: α : Type u_2
β : Type ?u.2550
ι : Type ?u.2553
M : Type u_1
N : Type ?u.2559
inst✝¹ : One M
inst✝ : One N
s t : Set α
f g : α → M
a : α
this : Decidable (a ∈ s) := Classical.dec (a ∈ s)
⊢ ¬a ∈ s → 1 = f a ↔ ¬a ∈ s → f a = 1
Theorem: Cubic.natDegree_of_b_eq_zero
File: Mathlib/Algebra/CubicDiscriminant.lean

tactic: simpa only [of_b_eq_zero ha hb] using natDegree_linear_le
state_before: R : Type u_1
S : Type ?u.590199
F : Type ?u.590202
K : Type ?u.590205
P Q : Cubic R
a b c d a' b' c' d' : R
inst✝ : Semiring R
ha : P.a = 0
hb : P.b = 0
⊢ natDegree (toPoly P) ≤ 1
Theorem: MvPolynomial.coe_mul
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: simp only [coeff_coe, MvPowerSeries.coeff_mul, coeff_mul]
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ : MvPolynomial σ R
n : σ →₀ ℕ
⊢ ↑(MvPowerSeries.coeff R n) ↑(φ * ψ) = ↑(MvPowerSeries.coeff R n) (↑φ * ↑ψ)
Theorem: GeneralizedContinuedFraction.exists_s_a_of_part_num
File: Mathlib/Algebra/ContinuedFractions/Translations.lean

tactic: simpa [partialNumerators, Stream'.Seq.map_get?] using nth_part_num_eq
state_before: α : Type u_1
g : GeneralizedContinuedFraction α
n : ℕ
a : α
nth_part_num_eq : Stream'.Seq.get? (partialNumerators g) n = some a
⊢ ∃ gp, Stream'.Seq.get? g.s n = some gp ∧ gp.a = a
Theorem: Finsupp.mapRange.zeroHom_comp
File: Mathlib/Data/Finsupp/Basic.lean

tactic: simp only [comp_apply, map_zero]
state_before: α : Type u_4
β : Type ?u.21150
γ : Type ?u.21153
ι : Type ?u.21156
M : Type u_3
M' : Type ?u.21162
N : Type u_1
P : Type u_2
G : Type ?u.21171
H : Type ?u.21174
R : Type ?u.21177
S : Type ?u.21180
inst✝² : Zero M
inst✝¹ : Zero N
inst✝ : Zero P
f : ZeroHom N P
f₂ : ZeroHom M N
⊢ (↑f ∘ ↑f₂) 0 = 0
Theorem: CategoryTheory.Limits.limit.lift_post
File: Mathlib/CategoryTheory/Limits/HasLimits.lean

tactic: ext
state_before: J : Type u₁
inst✝⁵ : Category J
K : Type u₂
inst✝⁴ : Category K
C : Type u
inst✝³ : Category C
F : J ⥤ C
D : Type u'
inst✝² : Category D
inst✝¹ : HasLimit F
G : C ⥤ D
inst✝ : HasLimit (F ⋙ G)
c : Cone F
⊢ G.map (lift F c) ≫ post F G = lift (F ⋙ G) (G.mapCone c)

tactic: rw [assoc, limit.post_π, ← G.map_comp, limit.lift_π, limit.lift_π]
state_before: case w
J : Type u₁
inst✝⁵ : Category J
K : Type u₂
inst✝⁴ : Category K
C : Type u
inst✝³ : Category C
F : J ⥤ C
D : Type u'
inst✝² : Category D
inst✝¹ : HasLimit F
G : C ⥤ D
inst✝ : HasLimit (F ⋙ G)
c : Cone F
j✝ : J
⊢ (G.map (lift F c) ≫ post F G) ≫ π (F ⋙ G) j✝ = lift (F ⋙ G) (G.mapCone c) ≫ π (F ⋙ G) j✝

tactic: rfl
state_before: case w
J : Type u₁
inst✝⁵ : Category J
K : Type u₂
inst✝⁴ : Category K
C : Type u
inst✝³ : Category C
F : J ⥤ C
D : Type u'
inst✝² : Category D
inst✝¹ : HasLimit F
G : C ⥤ D
inst✝ : HasLimit (F ⋙ G)
c : Cone F
j✝ : J
⊢ G.map (c.π.app j✝) = (G.mapCone c).π.app j✝
Theorem: CategoryTheory.GrothendieckTopology.arrow_stable
File: Mathlib/CategoryTheory/Sites/Grothendieck.lean

tactic: rw [covers_iff] at h⊢
state_before: C : Type u
inst✝ : Category C
X Y : C
S✝ R : Sieve X
J : GrothendieckTopology C
f : Y ⟶ X
S : Sieve X
h : Covers J S f
Z : C
g : Z ⟶ Y
⊢ Covers J S (g ≫ f)

tactic: simp [h, Sieve.pullback_comp]
state_before: C : Type u
inst✝ : Category C
X Y : C
S✝ R : Sieve X
J : GrothendieckTopology C
f : Y ⟶ X
S : Sieve X
h : Sieve.pullback f S ∈ sieves J Y
Z : C
g : Z ⟶ Y
⊢ Sieve.pullback (g ≫ f) S ∈ sieves J Z
Theorem: LinearMap.mulLeft_eq_zero_iff
File: Mathlib/Algebra/Algebra/Bilinear.lean

tactic: constructor <;> intro h
state_before: R : Type u_2
A : Type u_1
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a : A
⊢ mulLeft R a = 0 ↔ a = 0

tactic: rw [← mul_one a, ← @mulLeft_apply R _ _ _ _ _ _ a 1, h, LinearMap.zero_apply]
state_before: case mp
R : Type u_2
A : Type u_1
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a : A
h : mulLeft R a = 0
⊢ a = 0

tactic: rw [h]
state_before: case mpr
R : Type u_2
A : Type u_1
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a : A
h : a = 0
⊢ mulLeft R a = 0

tactic: exact mulLeft_zero_eq_zero
state_before: case mpr
R : Type u_2
A : Type u_1
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a : A
h : a = 0
⊢ mulLeft R 0 = 0
Theorem: LinearIsometry.norm_iteratedFDerivWithin_comp_left
File: Mathlib/Analysis/Calculus/ContDiff.lean

tactic: have :
  iteratedFDerivWithin 𝕜 i (g ∘ f) s x =
    g.toContinuousLinearMap.compContinuousMultilinearMap (iteratedFDerivWithin 𝕜 i f s x) :=
  g.toContinuousLinearMap.iteratedFDerivWithin_comp_left hf hs hx hi
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
D : Type uD
inst✝⁹ : NormedAddCommGroup D
inst✝⁸ : NormedSpace 𝕜 D
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type ?u.256782
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f✝ f₁ : E → F
g✝ : F → G
x x₀ : E
c : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
f : E → F
g : F →ₗᵢ[𝕜] G
hf : ContDiffOn 𝕜 n f s
hs : UniqueDiffOn 𝕜 s
hx : x ∈ s
i : ℕ
hi : ↑i ≤ n
⊢ ‖iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖

tactic: rw [this]
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
D : Type uD
inst✝⁹ : NormedAddCommGroup D
inst✝⁸ : NormedSpace 𝕜 D
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type ?u.256782
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f✝ f₁ : E → F
g✝ : F → G
x x₀ : E
c : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
f : E → F
g : F →ₗᵢ[𝕜] G
hf : ContDiffOn 𝕜 n f s
hs : UniqueDiffOn 𝕜 s
hx : x ∈ s
i : ℕ
hi : ↑i ≤ n
this :
  iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x =
    ContinuousLinearMap.compContinuousMultilinearMap (toContinuousLinearMap g) (iteratedFDerivWithin 𝕜 i f s x)
⊢ ‖iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖

tactic: apply LinearIsometry.norm_compContinuousMultilinearMap
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
D : Type uD
inst✝⁹ : NormedAddCommGroup D
inst✝⁸ : NormedSpace 𝕜 D
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type ?u.256782
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f✝ f₁ : E → F
g✝ : F → G
x x₀ : E
c : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
f : E → F
g : F →ₗᵢ[𝕜] G
hf : ContDiffOn 𝕜 n f s
hs : UniqueDiffOn 𝕜 s
hx : x ∈ s
i : ℕ
hi : ↑i ≤ n
this :
  iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x =
    ContinuousLinearMap.compContinuousMultilinearMap (toContinuousLinearMap g) (iteratedFDerivWithin 𝕜 i f s x)
⊢ ‖ContinuousLinearMap.compContinuousMultilinearMap (toContinuousLinearMap g) (iteratedFDerivWithin 𝕜 i f s x)‖ =
    ‖iteratedFDerivWithin 𝕜 i f s x‖
Theorem: Homeomorph.image_interior
File: Mathlib/Topology/Homeomorph.lean

tactic: rw [← preimage_symm, preimage_interior]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.66801
δ : Type ?u.66804
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
h : α ≃ₜ β
s : Set α
⊢ ↑h '' interior s = interior (↑h '' s)